internal static String Save(DB.SEC_RoleAccess entry, DataContext dataContext) { try { if (dataContext.EntitySystemContext.GetEntityState(entry) == EntityState.Detached) { dataContext.EntitySecurityContext.SEC_RoleAccess.Add(entry); } Validation.ValidateEntity(dataContext.EntitySecurityContext, entry); } catch (Validation.EntityValidationException ex) { return(dataContext.PackageValidationException()); } return("Success"); }
public static void DeleteRoleAccess(DB.SEC_RoleAccess sec_roleaccess, DataContext dataContext) { dataContext.EntitySecurityContext.SEC_RoleAccess.Remove(sec_roleaccess); }