コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            roles = MADRoles.GetAllRoles();

            RoleRepeater.DataSource = roles;
            RoleRepeater.DataBind();
        }
コード例 #2
0
ファイル: AC0101.aspx.cs プロジェクト: ManigandanS/supexlms
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         RoleRepeater.DataSource = UserService.LoadActiveRolls(SessionVariable.Current.Company.Id);
         RoleRepeater.DataBind();
     }
 }
コード例 #3
0
 protected void RoleRepeater_ItemCommand(object source, RepeaterCommandEventArgs e)
 {
     if (e.CommandName == "Delete")
     {
         Role role = roles[e.Item.ItemIndex];
         if (MADRoles.ExistUsersWithRole(role.RoleID))
         {
             ErrorLabel.Text = "There are exist users with this role. Delete this references< first.";
         }
         else
         {
             MADRoles.DeleteRole(role.RoleID);
             roles = MADRoles.GetAllRoles();
             RoleRepeater.DataSource = roles;
             RoleRepeater.DataBind();
         }
     }
 }