Page 135 - ระบบสารสนเทศเพื่อการบริหารจัดการเอกสารอิเล็กทรอนิกส์ (e-Document)
P. 135
ห้องสมุดกรมพัฒนาที่ดิน
ค- 22
อ้างอิงไฟล์ Main.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 main : System.Web.UI.Page
{
string sUsername;
string sBureau;
string sPromote;
string sDeputy;
string sLetter;
string strIntra =
ConfigurationManager.ConnectionStrings["SqlConIntranet"].ConnectionString;
string str =
ConfigurationManager.ConnectionStrings["SqlCon"].ConnectionString;
Utilities ut = new Utilities();
protected void Page_Load(object sender, EventArgs e)
{
#region Check Session
if (Session["Username"] == null || Session["Bureau"] == null ||
Session["Promote"] == null || Session["Deputy"] == null ||
Session["Letter"] == null)
{
Response.Redirect("Login.aspx");
}
sUsername = Session["Username"].ToString();
sBureau = Session["Bureau"].ToString();
sPromote = Session["Promote"].ToString();
sDeputy = Session["Deputy"].ToString();
sLetter = Session["Letter"].ToString();
#endregion
hlPromote.Visible = false;
hlDeputy.Visible = false;
hlLetter.Visible = false;
hlPromoteEdit.Visible = false;
hlDeputyEdit.Visible = false;
hlLetterEdit.Visible = false;
if (sPromote == "Y")
{
hlPromote.Visible = true;
hlPromoteEdit.Visible = true;
}