Page 152 - ระบบสารสนเทศเพื่อการบริหารจัดการเอกสารอิเล็กทรอนิกส์ (e-Document)
P. 152
ห้องสมุดกรมพัฒนาที่ดิน
ค- 39
{
string sFilename = "";
if (pnlBrowse.Visible == true)
{
sFilename = sUsername + ut.CurrentYYYYMMDD() + ut.CurrentTime()
+ DateTime.Now.Second;
sFilename = sFilename.Replace(":", "");
string sTmp = "";
sTmp = upload(sFilename);
if (!(sTmp.Substring(0, 1) == "y" && sTmp.Length == 5))
{
Response.Write(ut.alert(sTmp));
return;
}
sFilename = sFilename + sTmp.Substring(1, 4);
}
DbMgt table = new DbMgt(str);
string sSql;
SqlString sql = new SqlString();
sql.Clear();
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_Permission", Request.Form["ddlPermission"]);
sql.AddString("Letter_Bureau", Request.Form["ddlBureau"]);
sql.AddString("Letter_EditUser", sUsername);
sql.AddString("Letter_EditDate", ut.CurrentYYYYMMDD());
if (Request.Form["ddlBureau"] == "9999")
{
sql.AddString("Letter_Other", txtOtherOff.Text);
}
else
{
sql.AddString("Letter_Other", "");
}
if (pnlBrowse.Visible == true)
sql.AddString("Letter_Filename", sFilename);
if (cbStatus.Checked == true)
sql.AddString("Letter_Status", "1");
else
sql.AddString("Letter_Status", "0");
sSql = sql.SqlEdit("Letter", "where Letter_No =" + sNo);
if (table.exNonQuery(sSql) == true)
{
Response.Write(ut.alert("บันทึกข้อมูลส าเร็จ"));
}
else
{