protected void Page_Load(object sender, EventArgs e) { if (!X.IsAjaxRequest) { if (Request.Cookies.Get("eReimUserID") == null) { X.AddScript("loginWindow.show();Panel1.disable();"); return; } else { ScriptManager.RegisterStartupScript(this, GetType(), "", "$('div.gn_person ul.q-menubox li:eq(0) a').text('" + Request.Cookies.Get("eReimUserName").Value + "');", true); X.AddScript("loginWindow.hide();Panel1.enable();"); cs.DBCommand dbc = new cs.DBCommand(); string sql = "select MailList as Email from MailSetting where UserID='" + Request.Cookies.Get("eReimUserID").Value + "' and MailList!=''"; DataTable dtdetail = new DataTable(); dtdetail = dbc.GetData("eReimbursement", sql); if (dtdetail != null && dtdetail.Rows.Count == 1) { string[] mc = dtdetail.Rows[0]["Email"].ToString().Split(','); DataTable dt = new DataTable(); dt.Columns.Add("Email"); for (int i = 0; i < mc.Length; i++) { DataRow dr = dt.NewRow(); dr["Email"] = mc[i]; dt.Rows.Add(dr); } StoreCCList.DataSource = dt; StoreCCList.DataBind(); } } } }
private void RefreshList(string StationCode) { //获取站点文件后缀列表 cs.DBCommand dbc = new cs.DBCommand(); string getpostfix = "select * from FileRule where StationCode='" + StationCode + "'"; DataTable dtPostfix = dbc.GetData("eReimbursement", getpostfix); dtPostfix.Columns.Add("Allow1"); for (int i = 0; i < dtPostfix.Rows.Count; i++) { dtPostfix.Rows[i]["Allow1"] = dtPostfix.Rows[i]["Allow"].ToString() == "0" ? "NO" : "YES"; } StoreCCList.DataSource = dtPostfix; StoreCCList.DataBind(); }