示例#1
0
        public void MyBind()
        {
            B_Role brole = new B_Role();

            ViewState["RoleList"] = brole.GetRoleAll();
            DataTable dt = new DataTable();

            if (RoleID == 0)
            {
                dt = badmin.Sel();
            }
            else
            {
                dt = badmin.SelByRole(RoleID);
            }
            EGV.Visible = (dt != null && dt.Rows.Count > 0);
            string strwhere = "1=1 ";

            if (!string.IsNullOrEmpty(SearchKey))
            {
                strwhere += "AND AdminName Like '%" + SearchKey + "%'";
            }
            if (IsLock > -1)
            {
                strwhere += "AND islock=" + IsLock;
            }
            dt.DefaultView.RowFilter = strwhere;
            EGV.DataSource           = dt;
            EGV.DataKeyNames         = new string[] { "AdminID" };
            EGV.DataBind();
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string id = Request.QueryString["id"];
                this.lblFlow.InnerHtml = Request.QueryString["name"];
                if (id != null && !"".Equals(id))
                {
                    this.CheckBoxList1.DataSource     = br.GetRoleAll();
                    this.CheckBoxList1.DataTextField  = "RoleName";
                    this.CheckBoxList1.DataValueField = "RoleID";
                    this.CheckBoxList1.DataBind();
                }
            }

            Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx'>工作台</a></li><li><a href='../Config/SiteOption.aspx'>系统设置</a></li><li><a href='FlowManager.aspx'>流程管理</a></li><li><a href='FlowProcessManager.aspx?id=" + Request.QueryString["id"] + "&name=" + Request.QueryString["name"] + "'>" + Request.QueryString["name"] + "</a></li><li class='active'>添加步骤</li>");
        }
示例#3
0
 private void BindCheckBoxList(string roles)
 {
     cblRole.DataSource     = br.GetRoleAll();
     cblRole.DataTextField  = "RoleName";
     cblRole.DataValueField = "RoleID";
     cblRole.DataBind();
     if (string.IsNullOrEmpty(roles))
     {
         return;
     }
     else
     {
         roles = "," + roles;
     }
     for (int i = 0; i < cblRole.Items.Count; i++)
     {
         string value = "," + cblRole.Items[i].Value + ",";
         if (roles.Contains(value))
         {
             cblRole.Items[i].Selected = true;
         }
     }
 }