Page 123 - ระบบสารสนเทศเพื่อการบริหารจัดการเอกสารอิเล็กทรอนิกส์ (e-Document)
P. 123

ห้องสมุดกรมพัฒนาที่ดิน
                                                                                                        ค- 10




                      }

                      protected void BtnCe_Click(object sender, EventArgs e)
                      {
                          string sSql = "";
                          txtLetterNumSe.Text = "";
                          txtLetterTitleSe.Text = "";

                          FormDDL ddl = new FormDDL(str);
                          string sToday = ut.CurrentYYYYMMDD();
                          string sD = sToday.Substring(6, 2);
                          string sM = sToday.Substring(4, 2);
                          string sY = sToday.Substring(0, 4);

                          lblDolD.Text = ddl.createDDLD("ddlDolD", sD, "", "", false);
                          lblDolM.Text = ddl.createDDLM("ddlDolM", sM, "", "", false);
                          lblDolY.Text = ddl.createDDLY("ddlDolY", 2018, 2030, sY, "", "",
                  false);

                          lblDolD2.Text = ddl.createDDLD("ddlDolD2", sD, "", "", false);
                          lblDolM2.Text = ddl.createDDLM("ddlDolM2", sM, "", "", false);
                          lblDolY2.Text = ddl.createDDLY("ddlDolY2", 2018, 2030, sY, "", "",
                  false);

                          sSql = "SELECT BureauID AS ID, Bureau AS Value FROM Bureau";
                          lblBureau.Text = ddl.createDDL("ddlBureau", sSql, "ID", "Value",
                  "na", "na", "---หน่วยงาน---", true);
                      }

                      protected void GridView1_RowDataBound(object sender,
                  GridViewRowEventArgs e)
                      {
                          if (e.Row.RowType == DataControlRowType.DataRow)
                          {

                              if (e.Row.Cells[1].Text == "ด่วน")
                              {
                                   // change the color
                                   e.Row.Cells[1].ForeColor = System.Drawing.Color.Red;
                              }
                              else if (e.Row.Cells[1].Text == "ด่วนมาก")
                              {
                                  // change the color
                                  e.Row.Cells[1].ForeColor = System.Drawing.Color.Red;

                              }
                              else if (e.Row.Cells[1].Text == "ด่วนที่สุด")
                              {
                                  // change the color
                                  e.Row.Cells[1].ForeColor = System.Drawing.Color.Red;
                              }
                          }
                      }
   118   119   120   121   122   123   124   125   126   127   128