public static SystemGroup AddNewSystemGroup(string nomenclature, string description) { var newSystemsGroup = new SystemGroup() { Nomenclature = nomenclature, Description = description }; database.SystemGroupings.Add(newSystemsGroup); database.SaveChanges(); ESB2UserEventLog.LogUserEvent(CurrentUserNotifications.CurrentUser.Username, EventLoggerEvents.SystemGroupAdded); LoadSystemsList(); return(newSystemsGroup); }
public static EquipmentGroup AddNewEquipmentGroup(SystemGroup selectedSystemGroup, string title, string description) { var newEquipmentGroup = new EquipmentGroup() { Title = title, Description = description }; selectedSystemGroup.EquipmentGroups.Add(newEquipmentGroup); database.SaveChanges(); ESB2UserEventLog.LogUserEvent(CurrentUserNotifications.CurrentUser.Username, EventLoggerEvents.EquipmentGroupAdded); LoadSystemsList(); return(newEquipmentGroup); }
public static void Delete(SystemGroup selectedItem) { throw new NotImplementedException(); }
public static void Delete(SystemGroup systemGroup) { database.SystemGroupings.Remove(systemGroup); database.SaveChanges(); LoadSystemsList(); }