Ejemplo n.º 1
0
		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);
			//}
		}
Ejemplo n.º 2
0
		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;
		}
Ejemplo n.º 3
0
		public void UpdateGroupPermissions(BEGroups dsGroups)
		{
			DAGroupPermissions daGroupPerm = new DAGroupPermissions();

			daGroupPerm.Update( dsGroups.tbl_GroupPermissions);
		}