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