Beispiel #1
0
        public Model.Manager.NonConsumableEquipment NewEquipment(Model.Manager.NonConsumableEquipment equipment)
        {
            List <NonConsumableEquipment> nonConsumableEquipment = ReadFromFile();
            NonConsumableEquipment        searchEquipment        = GetEquipment(equipment.Id);

            if (searchEquipment != null)
            {
                return(null);
            }

            nonConsumableEquipment.Add(equipment);
            WriteInFile(nonConsumableEquipment);
            return(equipment);
        }
Beispiel #2
0
        public Model.Manager.NonConsumableEquipment SetEquipment(Model.Manager.NonConsumableEquipment equipment)
        {
            List <NonConsumableEquipment> nonConsumableEquipment = ReadFromFile();

            foreach (NonConsumableEquipment e in nonConsumableEquipment)
            {
                if (e.Id.Equals(equipment.Id))
                {
                    e.Type = equipment.Type;
                    break;
                }
            }
            WriteInFile(nonConsumableEquipment);
            return(equipment);
        }
 public Model.Manager.NonConsumableEquipment EditNonConsumableEquipment(Model.Manager.NonConsumableEquipment equipment)
 {
     return(nonConsumableEquipmentService.EditNonConsumableEquipment(equipment));
 }
 public Model.Manager.NonConsumableEquipment EditNonConsumableEquipment(Model.Manager.NonConsumableEquipment equipment)
 {
     return(nonConsumableEquipmentRepository.SetEquipment(equipment));
 }
 public Model.Manager.NonConsumableEquipment AddNonConsumableEqipment(Model.Manager.NonConsumableEquipment equipment)
 {
     return(nonConsumableEquipmentRepository.NewEquipment(equipment));
 }
Beispiel #6
0
 public NonConsumableEquipment(NonConsumableEquipment nonConsumableEquipment)
 {
     this.Id   = nonConsumableEquipment.Id;
     this.Type = nonConsumableEquipment.Type;
 }