protected void btnFind_Click(object sender, EventArgs e) { condObj = new IM_STORAGE(); if (txtNAME.Value != "") { condObj.Like(IM_STORAGE.Attribute.NAME, Convert.ToString(txtNAME.Value)); } if (txtSNAME.Value != "") { condObj.Like(IM_STORAGE.Attribute.SNAME, Convert.ToString(txtSNAME.Value)); } if (txtRNAME.Value != "") { condObj.Like(IM_STORAGE.Attribute.RNAME, Convert.ToString(txtRNAME.Value)); } if (wucSelORG1.ORG_ID != "") { condObj.Like(IM_STORAGE.Attribute.ORG_ID, Convert.ToString(wucSelORG1.ORG_ID)); } hidCondition.Value = condObj.ToJson(20); BindList(condObj, 1); }
protected void Page_Load(object sender, EventArgs e) { title = valObj._ZhName + "管理"; Page.Title = title; if (Request["USER_ID"] != null) { userid = Request["USER_ID"]; paraStr = "USER_ID=" + userid; } if (Request["ROLE_ID"] != null) { roleid = Request["ROLE_ID"]; paraStr = "ROLE_ID=" + roleid; } if (!IsPostBack) { #region //默认属性初始化 aspPager.CurrentPageIndex = 1; aspPager.ShowInputBox = AgileFrame.Core.WebSystem.ShowInputBox.Auto; //WebCtrls. txtPageNum.Value = "30"; aspPager.PageSize = 30; #endregion #region//数据初始化 #endregion string condids = ""; #region//数据权限条件构造 if (userid != "") { condids = UserHelper.GetUserDataIDS(userid, IM_STORAGE.Attribute.STOR_ID); } if (roleid != "") { if (condids != "") { condids += ","; } condids = RoleHelper.GetRoleDataIDS(roleid, IM_STORAGE.Attribute.STOR_ID); } #endregion if (condids != "") { if (!(condids == "0" || condids == "0,0")) { condObj.In(IM_STORAGE.Attribute.STOR_ID, condids); hidCondition.Value = condObj.ToJson(20); } BindList(condObj, 1); } } }
protected void btnFind_Click(object sender, EventArgs e) { condObj = new IM_STORAGE(); if (txtNAME.Value != "") condObj.Like(IM_STORAGE.Attribute.NAME, Convert.ToString(txtNAME.Value)); if (txtSNAME.Value != "") condObj.Like(IM_STORAGE.Attribute.SNAME, Convert.ToString(txtSNAME.Value)); if (txtRNAME.Value != "") condObj.Like(IM_STORAGE.Attribute.RNAME, Convert.ToString(txtRNAME.Value)); if (wucSelORG1.ORG_ID != "") condObj.Like(IM_STORAGE.Attribute.ORG_ID, Convert.ToString(wucSelORG1.ORG_ID)); hidCondition.Value = condObj.ToJson(20); BindList(condObj, 1); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { aspPager.PageSize = 10; aspPager.CurrentPageIndex = 1; if (!string.IsNullOrEmpty(Request["ids"])) { IM_STORAGE roleOld = new IM_STORAGE(); roleOld.Where(IM_STORAGE.Attribute.STOR_ID, Request["ids"].ToString()); listObj = BLLTable <IM_STORAGE> .Factory(conn).Select(valObj, roleOld); for (int i = 0; i < listObj.Count; i++) { if (i > 0) { hidOld.Value += ","; hidInitIDS.Value += ","; } hidOld.Value += "{ID:'" + listObj[i].STOR_ID + "',Name:'" + listObj[i].NAME + "'}";//这里的Name用于显示在列表中,请自行重定义。 hidInitIDS.Value += listObj[i].STOR_ID; } } try { listObj = BLLTable <IM_STORAGE> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount); repList.DataSource = listObj; repList.DataBind(); aspPager.RecordCount = recount; hidCondition.Value = condObj.ToJson(20); } catch (Exception ex) { litWarn.Text = ex.Message; } } }