示例#1
0
        private void BtnAddMed_Click(object sender, EventArgs e)
        {
            var medicineForm = new D_MedicineForm(MedicineDAO, m =>
            {
                txtSearch.Text = "";
                MedicineDAO.Add(m);
                LoadMedicines();
            });

            medicineForm.ShowDialog(this);
        }
示例#2
0
        private void LstMedicine_DoubleClick(object sender, EventArgs e)
        {
            var medicine     = medicines[lstMedicine.SelectedIndices[0]];
            var medicineForm = new D_MedicineForm(MedicineDAO, m =>
            {
                txtSearch.Text = "";
                MedicineDAO.Update(m);
                LoadMedicines();
            }, medicine);

            medicineForm.ShowDialog(this);
        }