public static void UpdateAccessModifiedFlags(DB.SEC_Role secRole) { //TODO : Make this work again //secRole.AccessModifiedOn = DateTime.Now; //secRole.AccessModifiedBy = ApplicationDataContext.Instance.LoggedInUser.DisplayName; //dataContext.EntityContext.SaveChanges(); }
internal static String Save(DB.SEC_Role entry, DataContext dataContext) { try { if (dataContext.EntitySecurityContext.GetEntityState(entry) == EntityState.Detached) { dataContext.EntitySecurityContext.SEC_Role.Add(entry); } Validation.ValidateEntity(dataContext.EntitySecurityContext, entry); } catch (Validation.EntityValidationException ex) { return(dataContext.PackageValidationException()); } return("Success"); }
public static DB.SEC_Role GetPreviousItem(DB.SEC_Role sec_role, DataContext dataContext) { return(dataContext.EntitySecurityContext.SEC_Role.OrderByDescending(o => o.Code).FirstOrDefault(n => n.Code.CompareTo(sec_role.Code) < 0 && n.Code.CompareTo(sec_role.Code) != 0)); }