예제 #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 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);
        }
        private void BtnAddPatient_Click(object sender, EventArgs e)
        {
            var patientForm = new D_PatientForm(PatientDAO, p =>
            {
                txtSearch.Text = "";
                PatientDAO.Add(p); // TODO: Validate
                LoadPatients();
            });

            patientForm.ShowDialog(this);
        }
예제 #4
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);
        }
예제 #5
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            var form = new D_EmployeeForm(EmployeeDAO, ms =>
            {
                txtSearch.Text = "";
                EmployeeDAO.Add(ms);
                LoadEmployees();
            });

            form.ShowDialog(this);
        }
        private void BtnOK_Click(object sender, EventArgs e)
        {
            var receipt = new SellReceipt()
            {
                Id           = txtId.Text,
                EmployeeId   = Employee.Id,
                Price        = decimal.Parse(txtSum.Text),
                CreationDate = DateTime.Now,
            };

            ReceiptDAO.Add(receipt);
            foreach (var detail in details)
            {
                ReceiptDetailsDAO.Add(detail);
            }

            Close();
            OnOK(receipt);
        }
        private void BtnOk_Click(object sender, EventArgs e)
        {
            var prescription = new PatientPrescription()
            {
                Id          = txtPrescriptionId.Text,
                DiseaseName = txtDiesease.Text,
                PatientId   = Patient.EntityId
            };

            if (prescription == null)
            {
                PrescriptionDAO.Add(prescription);
                foreach (var detail in details)
                {
                    PrescriptionDetailDAO.Add(detail);
                }
            }
            else
            {
                PrescriptionDAO.Update(prescription);
            }
            OnOK(prescription);
            Close();
        }