protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!B_ARoleAuth.Check(ZLEnum.Auth.user, "AdminManage")) { function.WriteErrMsg("没有权限进行此项操作"); } StructID = DataConverter.CLng(Request.QueryString["id"]); curStr_L.Text = StructID == 0 ? "根结构" : strBll.SelReturnModel(StructID).Name; MyBind(); Call.HideBread(Master); //Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='StructMenber.aspx'>组织结构</a></li><li class='active'>成员列表<a href='javascript:showdiv(\"div_share\",1);'>[选择成员]</a><a href='AddStruct.aspx?pid=" + StructID + "'>[添加组织结构]</a></li>"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int pid = DataConverter.CLng(Request.QueryString["pid"]); if (Request.QueryString["ID"] != null) { int id = DataConverter.CLng(Request.QueryString["ID"]); model = bll.Select(id); TxtStructName.Text = model.Name; Remind_T.Text = model.Remind; rd1.Checked = model.Status == 1 ? true : false; lblText.Text = "查看/修改"; pid = model.ParentID; } if (pid == 0) { parent_L.Text = "根结构"; } else { parent_L.Text = bll.SelReturnModel(pid).Name; } Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='StructList.aspx'>组织结构</a></li><li class='active'>添加组织结构</li>"); } }
private void MyBind() { M_Structure strMod = strBll.SelReturnModel(DataConvert.CLng(preValue)); if (strMod == null) { return; } DataTable dt = buser.SelectUserByIds(strMod.UserIDS); //buser.SelPage(pageSize, pageIndex, out itemCount, preAction, preValue, orderType); RPT.DataSource = dt; RPT.DataBind(); }
public void LoadStructList() { DataTable dt = new DataTable(); if (GroupID > 0) { M_Structure strMod = struBll.SelReturnModel(GroupID); dt = buser.SelectUserByIds(strMod.UserIDS); User_RPT.DataSource = dt; User_RPT.DataBind(); return; } LoadUserList(); }
protected void Page_Load(object sender, EventArgs e) { if (function.isAjax()) { string action = Request.Form["action"]; string result = ""; switch (action) { case "getchild": //获取字节点 DataTable dt = bll.SelByPid(DataConvert.CLng(Request.Form["pid"])); dt.Columns.Add("UserCount"); dt.Columns.Add("UserName"); dt.Columns.Add("StatusStr"); dt.Columns.Add("OpensStr"); foreach (DataRow item in dt.Rows) { item["UserName"] = getName(item["UserID"].ToString()); item["OpensStr"] = getOpen(item["Opens"].ToString()); item["StatusStr"] = getStatus(item["Status"].ToString()); item["UserCount"] = GetCount(item["ID"]); } result = JsonHelper.JsonSerialDataTable(dt); break; case "del": bll.Del(DataConvert.CLng(Request.Form["id"])); result = "1"; break; } Response.Write(result); Response.Flush(); Response.End(); } if (!IsPostBack) { PID = DataConvert.CLng(Request.QueryString["pid"]); if (PID == 0) { curStr_L.Text = "根结构"; } else { curStr_L.Text = bll.SelReturnModel(PID).Name; } DataBind(); } Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='StructList.aspx'>组织结构</a></li><li class='active'>" + curStr_L.Text + "<a href='AddStruct.aspx?type=0' style='margin-left:5px;'>[添加部门]</a></li>"); }
private void MyBind() { DataTable dt = new DataTable(); if (!string.IsNullOrEmpty(KeyWord)) { dt = buser.SearchByInfo(KeyWord); curLabel.Text = "关键词搜索"; } else if (!string.IsNullOrEmpty(GroupID)) { M_Structure strmod = struBll.SelReturnModel(DataConvert.CLng(GroupID)); ManagerIDS = strmod.ManagerIDS; dt = buser.SelectUserByIds(strmod.UserIDS); } else { dt = buser.SelAll(); curLabel.Text = "全部会员"; } RPT.DataSource = dt; RPT.DataBind(); }