Page 146 - ระบบสารสนเทศเพื่อการบริหารจัดการเอกสารอิเล็กทรอนิกส์ (e-Document)
P. 146
ห้องสมุดกรมพัฒนาที่ดิน
ค- 33
else
{
sql.AddString("Letter_Number", txtLetterNum.Text);
}
sql.AddString("Letter_Title", txtLetterTitle.Text);
sql.AddString("Letter_YMD", Request.Form["ddlDolY"] +
Request.Form["ddlDolM"] + Request.Form["ddlDolD"]);
sql.AddString("Letter_Priority", Request.Form["ddlPiority"]);
sql.AddString("Letter_Bureau", Request.Form["ddlBureau"]);
sql.AddString("Letter_RecUser", sUsername);
sql.AddString("Letter_RecBureau", sBureau);
sql.AddString("Letter_RecDate", ut.CurrentYYYYMMDD());
sql.AddString("Letter_Permission", Request.Form["ddlPermission"]);
sql.AddString("Letter_Filename", sFilename);
sql.AddString("Letter_Other", txtOtherOff.Text);
sql.AddString("Letter_Status","1");
sSql = sql.SqlAdd("Letter");
if (table.exNonQuery(sSql) == true)
{
Response.Write(ut.alert("บันทึกข้อมูลส าเร็จ"));
txtLetterNum.Text = "";
txtLetterTitle.Text = "";
txtOtherOff.Text = "";
FormDDL ddl = new FormDDL(str);
if (!IsPostBack)
{
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, "na", "--วัน--",
false);
lblDolM.Text = ddl.createDDLM("ddlDolM", sM, "na", "--เดือน--
", false);
lblDolY.Text = ddl.createDDLY("ddlDolY", 2017, 2030, sY,
"na", "--ปี--", false);
}
else
{
lblDolD.Text = ddl.createDDLD("ddlDolD",
Request.Form["ddlDolD"], "na", "--วัน--", false);
lblDolM.Text = ddl.createDDLM("ddlDolM",
Request.Form["ddlDolM"], "na", "--เดือน--", false);
lblDolY.Text = ddl.createDDLY("ddlDolY", 2017, 2030,
Request.Form["ddlDolY"], "na", "--ปี--", false);
}
sSql = "SELECT BureauID AS ID, Bureau AS Value FROM Bureau";
lblBureau.Text = ddl.createDDL("ddlBureau", sSql, "ID",
"Value", "na", "na", "---หน่วยงาน---", true);
txtOtherOff.Visible = false;
string sSql1 = "SELECT PriID AS ID, PriName AS Value FROM
Piority";