Beispiel #1
0
        protected override int SaveItem()
        {
            d.Role role = new d.Role(GetId());
            role.Name = tbxRole.Text.Trim();

            if (role.Update() < 0)
            {
                valUnique.IsValid = false;
                return(0);
            }
            return(1);
        }
Beispiel #2
0
        private void BindData()
        {
            arrExistingPermIds    = roleData.GetPermissions(roleId); //must reload
            rptTopCats.DataSource = permissionData.TopCategories;
            rptTopCats.DataBind();

            if (catId > 0)
            {
                d.Role role = new d.Role(roleId);
                cc.PermissionCategory cat = permissionData.GetCategory(catId);
                pnlPermissions.Visible  = true;
                ltrPermissionTitle.Text = "Select <b>" + cat.Name + "</b> permissions for the <b>" + role.Name + "</b> role:";
                rptCats.DataSource      = permissionData.GetCategories(catId);
                rptCats.DataBind();
            }
            else
            {
                pnlPermissions.Visible = false;
            }
        }
Beispiel #3
0
 private void BindData()
 {
     d.Role role = new d.Role(GetId());
     tbxRole.Text = role.Name;
 }