protected void Page_Load(object sender, EventArgs e) { this.asaction = SystemSet.GetString(base.Request["action"], string.Empty); if (this.asaction == "addsave") { //string SQLString = "Select MAX(UID) as uid from Bid_WBS where bid=" + Session["Bid"].ToString() + ""; string SQLString = "Select * from EBudget_WBS where Pid=" + Session["ProjectCode"].ToString() + ""; string database = Session["DatabaseName"].ToString(); DataTable DataTableBox = WebModel.LoadSetContentData(database, SQLString); if (DataTableBox != null && DataTableBox.Rows.Count > 0) { foreach (DataRow row in DataTableBox.Rows) { uid = int.Parse(row["EWID"].ToString()); main(uid); } } } if (this.asaction == "Delete") { string uid = base.Request["uid"]; string database = Session["DatabaseName"].ToString(); string SQLString = "Delete EBudget_WBS where EWID=" + uid + ""; bool result = WebModel.SQLAction(database, SQLString); } }
protected void Page_Load(object sender, EventArgs e) { this.asaction = SystemSet.GetString(base.Request["action"], string.Empty); object data; switch (Request.QueryString["act"]) { case "getUserMessageHistory": string a; a = GetUserMessageHistory(); Response.Write("{\"userMessageHistory\":\"" + a + "\"}"); break; case "getUserData": string Keyword = base.Request["Keyword"]; string[] Kid; Kid = SearchKeyword(Session["DatabaseName"].ToString(), Session["Projectcode"].ToString(), Keyword); Response.Write("{\"getUserData\":\"" + Kid[0] + "\"}"); break; case "getReData": string KeywordRe = base.Request["Keyword"]; string[] KidRe; KidRe = SearchReKeyword(Session["DatabaseName"].ToString(), Session["Projectcode"].ToString(), KeywordRe); Response.Write("{\"getReData\":\"" + KidRe[0] + "\"}"); break; } if (this.asaction == "open") { //string SQLString = "Select MAX(UID) as uid from Bid_WBS where bid=" + Session["Bid"].ToString() + ""; string SQLString = "update SidePage set situation=1 where idno= (SELECT MAX(idno) FROM SidePage)"; if (Session["DatabaseName"] != null) { string database = Session["DatabaseName"].ToString(); bool result = WebModel.SQLAction(database, SQLString); } } if (this.asaction == "close") { if (Session["DatabaseName"] != null) { string SQLString = "update SidePage set situation=0 where idno= (SELECT MAX(idno) FROM SidePage)"; string database = Session["DatabaseName"].ToString(); bool result = WebModel.SQLAction(database, SQLString); } } if (this.asaction == "Select") { if (Session["DatabaseName"] != null) { string SQLString = "Select situation from SidePage where idno= (SELECT MAX(idno) FROM SidePage)"; string database = Session["DatabaseName"].ToString(); string result = WebModel.SItemName(database, SQLString, "situation"); } } }