Page 162 - ระบบสารสนเทศเพื่อการบริหารจัดการเอกสารอิเล็กทรอนิกส์ (e-Document)
P. 162
ห้องสมุดกรมพัฒนาที่ดิน
ค- 49
อ้างอิงไฟล์ Deputy.aspx.cs ดังนี้
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class Deputy : System.Web.UI.Page
{
string str =
ConfigurationManager.ConnectionStrings["SqlCon"].ConnectionString;
Utilities ut = new Utilities();
protected void Page_Load(object sender, EventArgs e)
{
lbl01.Visible = false;
FormDDL ddl = new FormDDL(str);
if (!IsPostBack)
{
lbl01.Visible = true;
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);
}
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", 2018, 2030,
Request.Form["ddlDolY"], "na", "--ปี--", false);
lblDolD2.Text = ddl.createDDLD("ddlDolD2",
Request.Form["ddlDolD2"], "na", "--วัน--", false);
lblDolM2.Text = ddl.createDDLM("ddlDolM2",
Request.Form["ddlDolM2"], "na", "--เดือน--", false);
lblDolY2.Text = ddl.createDDLY("ddlDolY2", 2018, 2030,
Request.Form["ddlDolY2"], "na", "--ปี--", false);