Beispiel #1
0
 public EditCase(Form frm, int id)
 {
     InitializeComponent();
     prevForm = frm;
     mc       = new ManageCase();
     mp       = new ManagePrescription();
     c        = mc.GetCase(id);
     if (c.ClosingDate == null)
     {
         description.Text                = c.Description;
         closing                         = false;
         searchGridView.DataSource       = this.PopulateSearchGridView();
         prescriptionGridView.DataSource = this.PopulatePrescriptionGridView();
     }
     else
     {
         searchGridView.Visible = false;
         searchBox.Visible      = false;
         label1.Visible         = false;
         description_label.Text = "Closing Summary";
         close_button.Visible   = false;
         edit_button.Visible    = false;
         description.Text       = c.ClosingSummary;
         description.ReadOnly   = true;
     }
     patient_id.Text = c.PatientId.ToString();
     title.Text      = c.Title;
     disease.Text    = c.Disease;
 }
Beispiel #2
0
        private void checkout_Click(object sender, EventArgs e)
        {
            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                if (row.Cells["Id"].Value != null)
                {
                    if (Convert.ToBoolean(row.Cells["Give"].Value))
                    {
                        ManagePrescription mp = new ManagePrescription();
                        mp.giveMedicine(Int32.Parse(row.Cells["Id"].Value.ToString()), Int32.Parse(patient_id.Text));
                    }
                }
            }
            PharmacistHome pharmacistHome = new PharmacistHome();

            this.Hide();
            pharmacistHome.Show();
        }