Page 169 - ระบบสารสนเทศเพื่อการบริหารจัดการเอกสารอิเล็กทรอนิกส์ (e-Document)
P. 169
ห้องสมุดกรมพัฒนาที่ดิน
ค- 56
อ้างอิงไฟล์ GroupManage.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 GroupManage : System.Web.UI.Page
{
string str =
ConfigurationManager.ConnectionStrings["SqlCon"].ConnectionString;
Utilities ut = new Utilities();
string sUsername;
string sBureau;
string sPromote;
string sDeputy;
string sLetter;
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("SystemLogin.aspx");
}
sUsername = Session["Username"].ToString();
sBureau = Session["Bureau"].ToString();
sPromote = Session["Promote"].ToString();
sDeputy = Session["Deputy"].ToString();
sLetter = Session["Letter"].ToString();
#endregion
if (!IsPostBack)
{
hdMode.Value = "AddNew";
pnlGroupList.Visible = false;
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
string sTmp;
DbMgt table = new DbMgt(str);
string sSql;
SqlString sql = new SqlString();
sql.Clear();
sql.AddString("GroupId", txtGroupID.Text);
sql.AddString("GroupOwner", txtOwner.Text);
sql.AddString("GroupName", txtGroupName.Text);