protected void Page_Load(object sender, EventArgs e) { user_id = GetAdminInfo_CCOM().User_id; var agency = new BLL.CCOM.Admin_agency().GetModel("User_id = " + user_id); if (agency != null) { agency_id = agency.Agency_id; } string str = MyRequest.GetQueryString("major_id"); if (str != null && str != "") { major_id = DESEncrypt.Decrypt(MyRequest.GetQueryString("major_id")); } var period = new BLL.CCOM.Period().GetModel("Period_state = " + DataDic.Period_state_On); if (period != null) { period_id = period.Period_id; } if (!Page.IsPostBack) { RalBind(); string strWhere = " Major_Agency_id = " + major_id + " AND Subject_level=2 AND Period_id=" + period_id; string order = ""; RptBind(strWhere, order); } }
protected void Page_Load(object sender, EventArgs e) { user_id = GetAdminInfo_CCOM().User_id; var agency = new BLL.CCOM.Admin_agency().GetModel("User_id = " + user_id); if (agency != null) { agency_id = agency.Agency_id; } var period = new BLL.CCOM.Period().GetModel("Period_state = " + DataDic.Period_state_On); if (period != null) { period_id = period.Period_id; } string str = MyRequest.GetQueryString("major_id"); if (str != null && str != "") { major_id = DESEncrypt.Decrypt(MyRequest.GetQueryString("major_id")); } if (!Page.IsPostBack) { RalBind(); } this.major_id = this.ddlMajor.SelectedValue; }
protected void Page_Load(object sender, EventArgs e) { user_id = GetAdminInfo_CCOM().User_id; var agency = new BLL.CCOM.Admin_agency().GetModel("User_id = " + user_id); if (agency != null) { agency_id = agency.Agency_id; } var period = new BLL.CCOM.Period().GetModel("Period_state = " + DataDic.Period_state_On); if (period != null) { period_id = period.Period_id; } string str = MyRequest.GetQueryString("major_id"); if (str != null && str != "") { major_id = DESEncrypt.Decrypt(MyRequest.GetQueryString("major_id")); } if (!Page.IsPostBack) { keywords = MyRequest.GetQueryString("keywords"); if (Tools.CheckParams(keywords)) { keywords = ""; } this.txtKeywords.Text = keywords; RalBind(); } }
//删除 protected void btnDelete_Click(object sender, EventArgs e) { int selectID = Utils.StrToInt(this.ddlSelectUD.SelectedValue, -1); BLL.CCOM.Admin_agency admin_bll = new BLL.CCOM.Admin_agency(); BLL.CCOM.Agency bll = new BLL.CCOM.Agency(); if (selectID == 1) { JscriptMsg("删除失败,该机构不能删除!", "", "Error"); return; } if (new BLL.CCOM.User_property().GetModel(" Agency_id=" + selectID) != null) { JscriptMsg("该机构下不为空,请先删除机构下用户,再删除机构!", "", "Error"); return; } bool result = false; try { result = bll.Delete(selectID); }catch { JscriptMsg("删除失败!", "", "Error"); } if (result == false) { JscriptMsg("删除失败!", "", "Error"); } else { JscriptMsg("删除成功!", "", "Success"); Response.Redirect(Utils.CombUrlTxt("OrgList.aspx", "fun_id={0}&selectid={1}&keywords={2}", DESEncrypt.Encrypt(fun_id), "", "")); } }
protected string CombSqlTxt(string _keywords) { StringBuilder strTemp = new StringBuilder(); _keywords = _keywords.Replace("'", ""); if (!string.IsNullOrEmpty(_keywords)) { strTemp.Append(" Agency_name like '%" + _keywords + "%' and Agency_type = 3"); } else { strTemp.Append(" 1=1"); } Model.CCOM.Admin_agency ag_model = new BLL.CCOM.Admin_agency().GetModel(" User_id='" + GetAdminInfo_CCOM().User_id + "'"); strTemp.Append(" and Agency_id in (" + GetSonUOList(ag_model.Agency_id) + ")"); return(strTemp.ToString()); }
protected void Page_Load(object sender, EventArgs e) { user_id = GetAdminInfo_CCOM().User_id; var period = new BLL.CCOM.Period().GetModel("Period_state = " + DataDic.Period_state_On); if (period != null) { period_id = period.Period_id; } var adminModel = new BLL.CCOM.Admin_agency().GetModel(" User_id=" + user_id); agency_id = adminModel.Agency_id; if (!IsPostBack) { Bind(); } }