Page 140 - ระบบสารสนเทศเพื่อการบริหารจัดการเอกสารอิเล็กทรอนิกส์ (e-Document)
P. 140
ห้องสมุดกรมพัฒนาที่ดิน
ค- 27
{
Response.Write(ut.alert("ระบุ ชั้นความเร็ว"));
return;
}
if (Request.Form["ddlPermission"] == "na")
{
Response.Write(ut.alert("ระบุ กลุ่มผู้มีสิทธิเรียกดูเอกสาร"));
return;
}
string 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();
if (txtLetterNum.Text == "")
{
sql.AddString("Letter_Number", "---");
}
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)