Beispiel #1
0
        public void DeleteMedicine_WithValidId_DeleteMedicineInList()
        {
            int id = 1;

            _sut.Delete(id);

            Assert.IsTrue(!_sut.GetAll().Contains(_stubMedicineList.ToList()[0]));
        }
Beispiel #2
0
 private void deleteIfMedicinesAreEqual(Medicine firstMedicine, Medicine secondMedicine)
 {
     if (firstMedicine.id == secondMedicine.id)
     {
         medicineRepository.Delete(firstMedicine.id);
     }
 }
Beispiel #3
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if ((lblID.Text == "") || (lblID.Text == "0"))
            {
                MessageBox.Show("Bạn hãy chọn bản thuốc cần xóa!");
                return;
            }
            DialogResult dr = MessageBox.Show("Bạn có muốn xóa thuốc này không?", "Xóa thuốc", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);

            if (dr == DialogResult.OK)
            {
                medicineRepository.Delete(int.Parse(lblID.Text.Trim()));
                FillToGrid();
            }
        }
 public void Delete(Medicine entity)
 => _medicineRepository.Delete(entity);
Beispiel #5
0
 public int DeleteMed(int id)
 {
     return(medRepo.Delete(id));
 }