Example #1
0
 private void BindRoles()
 {
     try
     {
         List <SysRole> roleList = SysRole.GetRoleList();
         if (roleList != null && roleList.Count > 0)
         {
             this.grvRole.DataSource = roleList;
             this.grvRole.DataBind();
         }
     }
     catch
     {
         this.PrintfError("数据访问失败!");
         return;
     }
 }
Example #2
0
 private void BindRoles()
 {
     try
     {
         List <SysRole> roleList = SysRole.GetRoleList();
         if (roleList != null)
         {
             this.drpRole.DataSource = roleList;
             this.drpRole.DataBind();
             this.drpRole.Items.Insert(0, "--请选择--");
         }
     }
     catch
     {
         this.PrintfError("数据错");
         return;
     }
 }