예제 #1
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            var supplierForm = new D_MedicineSupplierForm(SupplierDAO, ms =>
            {
                txtSearch.Text = "";
                SupplierDAO.Add(ms);
                LoadSuppliers();
            });

            supplierForm.ShowDialog(this);
        }
예제 #2
0
        private void LstSupplier_DoubleClick(object sender, EventArgs e)
        {
            if (lstSupplier.SelectedIndices.Count < 1)
            {
                return;
            }

            var supplier     = suppliers[lstSupplier.SelectedIndices[0]];
            var supplierForm = new D_MedicineSupplierForm(SupplierDAO, ms =>
            {
                txtSearch.Text = "";
                SupplierDAO.Update(ms);
                LoadSuppliers();
            }, supplier);

            supplierForm.ShowDialog(this);
        }