private void frmUserAuthority_Load(object sender, EventArgs e) { flgLoading = true; objRightsList = new UserRightsList(); FillUserList(); // Create Nodes in TreeView (Start) tvwRights.Nodes.Add("Rights", "Rights"); DefinitionMenu(); TransactionMenu(); UtilitiesMenu(); // Create Nodes in TreeView (End) //if (objUIRights.ViewRight) // grbUserList.Enabled = true; //else // grbUserList.Enabled = false; //if (objUIRights.AddRight) // grbSave.Enabled = true; //else // grbSave.Enabled = false; flgLoading = false; }
public static bool Save(UserRightsList objList) { bool flgSave; try { using (TransactionScope objTScope = new TransactionScope(TransactionScopeOption.RequiresNew)) { UserRightsDAL.Delete(objList[0].UserID); foreach (UserRights objRight in objList) { UserRightsDAL.Save(objRight); } flgSave = true; objTScope.Complete(); } } catch (Exception ex) { throw new Exception(ex.Message); } return(flgSave); }