Exemplo n.º 1
0
        public void UpdatePersonalProtectiveEquipmentCategoryType(PersonalProtectiveEquipmentCategoryType personalProtectiveEquipmentCategoryType)
        {
            //prevent duplicates saving
            //better implementation needed by the data access layer
            personalProtectiveEquipmentCategoryType.PersonalProtectiveEquipmentCategory = null;

            var repository = new PersonalProtectiveEquipmentCategoryTypeRepository(_db);
            repository.Edit(personalProtectiveEquipmentCategoryType);
            repository.Save();
        }
Exemplo n.º 2
0
 public void CreatePersonalProtectiveEquipmentCategoryType(PersonalProtectiveEquipmentCategoryType personalProtectiveEquipmentCategoryType)
 {
     var repository = new PersonalProtectiveEquipmentCategoryTypeRepository(_db);
     repository.Add(personalProtectiveEquipmentCategoryType);
     repository.Save();
 }
Exemplo n.º 3
0
 public PersonalProtectiveEquipmentCategoryType GetPersonalProtectiveEquipmentCategoryType(int Id)
 {
     var repository = new PersonalProtectiveEquipmentCategoryTypeRepository(_db);
     return repository.FindBy(c => c.Id == Id).FirstOrDefault();
 }
Exemplo n.º 4
0
 public ICollection<PersonalProtectiveEquipmentCategoryType> GetPersonalProtectiveEquipmentCategoryTypes()
 {
     var repository = new PersonalProtectiveEquipmentCategoryTypeRepository(_db);
     return repository.GetAll().ToList();
 }
Exemplo n.º 5
0
 public void DeletePersonalProtectiveEquipmentCategoryType(int personalProtectiveEquipmentCategoryTypeId)
 {
     var repository = new PersonalProtectiveEquipmentCategoryTypeRepository(_db);
     repository.Delete(personalProtectiveEquipmentCategoryTypeId);
     repository.Save();
 }