private void LstMedDetails_DoubleClick(object sender, EventArgs e) { var medDetail = medicineDetails[lstMedDetails.SelectedIndices[0]]; var medDetailForm = new D_MedicineDetailForm(MedicineDetailDAO, md => { MedicineDetailDAO.Update(md); LoadMedicineDetails(); }, medDetail: medDetail); medDetailForm.ShowDialog(this); }
private void BtnAddInvoice_Click(object sender, EventArgs e) { var medicine = medicines[lstMedicine.SelectedIndices[0]]; var medDetailForm = new D_MedicineDetailForm(MedicineDetailDAO, md => { MedicineDetailDAO.Add(md); LoadMedicineDetails(); }, medicine); medDetailForm.ShowDialog(this); }