Exemple #1
0
        private void UpdateOneMedicineQuantity(MedicineInformation medicineWithQuantity)
        {
            MedicineInformation medicine = GetAll().SingleOrDefault(medicineName => medicineName.MedicineDescription.Name == medicineWithQuantity.MedicineDescription.Name);

            if (medicine != null)
            {
                MedicineWithQuantityRepository.UpdateQuantity(medicine.Id, medicineWithQuantity.Quantity);
            }
            else
            {
                Create(MedicineInformationAdapter.MedicineWithQuantityToMedicineWithQuantityDto(medicineWithQuantity));
            }
        }
Exemple #2
0
 public void UpdateQuantity(int medicineId, int quantity)
 {
     MedicineWithQuantityRepository.UpdateQuantity(medicineId, quantity);
 }