Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 public static void Delete(SystemGroup selectedItem)
 {
     throw new NotImplementedException();
 }
Beispiel #4
0
 public static void Delete(SystemGroup systemGroup)
 {
     database.SystemGroupings.Remove(systemGroup);
     database.SaveChanges();
     LoadSystemsList();
 }