Ejemplo n.º 1
0
        public static Equipment AddNewEquipment(EquipmentGroup selectedEquipmentGroup, string title, string description)
        {
            var newEquipment = new Equipment()
            {
                Nomenclature = title,
                Description  = description
            };

            selectedEquipmentGroup.Equipment.Add(newEquipment);

            database.SaveChanges();
            ESB2UserEventLog.LogUserEvent(CurrentUserNotifications.CurrentUser.Username, EventLoggerEvents.EquipmentAdded);

            LoadSystemsList();

            return(newEquipment);
        }
Ejemplo n.º 2
0
 public static void Delete(EquipmentGroup equipmentGroup)
 {
     database.EquipmentGroupings.Remove(equipmentGroup);
     database.SaveChanges();
     LoadSystemsList();
 }