public BEGroups SelectByIDWithUserGroups(int GroupID) { DAGroups da = new DAGroups(); BEGroups ds = new BEGroups(); da.SelectByID(GroupID.ToString(), ds.tbl_Groups); return ds; }
public BEGroups SelectAllAdminGroups() { DAGroups da = new DAGroups(); BEGroups ds = new BEGroups(); da.SelectAllAdminGroups( ds.tbl_Groups); return ds; }
public BEGroups SelectGroupsByUserID(int UserID) { DAGroups da = new DAGroups(); BEGroups ds = new BEGroups(); ds.EnforceConstraints = false; da.SelectGroupsByUserID(UserID, ds.tbl_Groups); return ds; }
public BEGroups SelectGroupPermissionsByGroupID(int GroupID) { DAGroups daGroups = new DAGroups(); DAGroupPermissions daGroupPerms = new DAGroupPermissions(); DAPermissions daPerms = new DAPermissions(); DAPermissionValues daPermValues = new DAPermissionValues(); BEGroups ds = new BEGroups(); //ds.EnforceConstraints = false; daGroups.SelectByID(GroupID.ToString(), ds.tbl_Groups); daPerms.SelectAll(ds.tbl_Permissions); daGroupPerms.SelectByID(GroupID.ToString(), ds.tbl_GroupPermissions); daPermValues.SelectAll(ds.tbl_PermissionValues); return ds; }
public BEUsers SelectByIDWithUserGroups(int UserID) { DAUsers da = new DAUsers(); DAUserGroups daUserGroups = new DAUserGroups(); DAGroups daGroups = new DAGroups(); BEUsers ds = new BEUsers(); da.SelectByID(UserID.ToString(),ds.tbl_Users); daGroups.SelectGroupsByUserID(UserID, ds.tbl_Groups); daUserGroups.SelectByID(UserID.ToString(), ds.tbl_UserGroups); return ds; }
public void Update(BEGroups dsGroups) { DAGroups da = new DAGroups(); DAUserGroups daUserGroups = new DAUserGroups(); DAGroupPermissions daGroupPerms = new DAGroupPermissions(); //delete has be be called before if a usergroup is being deleted DataTable deletedUserGroups = dsGroups.tbl_UserGroups.GetChanges(DataRowState.Deleted); DataTable modifiedUserGroups = dsGroups.tbl_UserGroups.GetChanges(DataRowState.Modified); DataTable addUserGroups = dsGroups.tbl_UserGroups.GetChanges(DataRowState.Added); if (deletedUserGroups!= null) { daUserGroups.Update(deletedUserGroups); } daGroupPerms.Update( dsGroups.tbl_GroupPermissions); da.Update( dsGroups.tbl_Groups); if (modifiedUserGroups!= null) { daUserGroups.Update(modifiedUserGroups); } if (addUserGroups!= null) { daUserGroups.Update(addUserGroups); } //if (dsGroups.tbl_Groups.Count > 0) //{ //cache the first user record incase update groups is called. // _UpdateUserInfo(dsGroups); //} }