Example #1
0
 private void RptBind(string _strWhere)
 {
     this.txtKeywords.Text = this.keywords;
     var bll = new ManagerRoleService();
     this.rptList.DataSource = bll.GetList(_strWhere);
     this.rptList.DataBind();
 }
Example #2
0
        private void RoleBind(DropDownList ddl, int managerId)
        {
            var bll = new ManagerRoleService();
         //   DataTable dt = bll.GetList("agentId=" + managerId).Tables[0];
            DataTable dt = new DataTable();
            if (isAgent)
            {
                dt = bll.GetList("id!=1 and id!=3 ").Tables[0];
            }
            else
            {
                dt = bll.GetList("agentId=" + managerId).Tables[0];
            }

            ddl.Items.Clear();
            ddl.Items.Add(new ListItem("请选择角色...", ""));
            foreach (DataRow dr in dt.Rows)
            {
                
            ddl.Items.Add(new ListItem(dr["role_name"].ToString(), dr["id"].ToString()));
                 
            }
        }