Exemplo n.º 1
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            Form diag = new Diagnosis2();

            diag.Show();

            /*
             * using (var con = new MySqlConnection(conClass.connectionString))
             * {
             *  con.Open();
             *  using (var com = new MySqlCommand("UPDATE registration SET patient_Lname = @patient_Lname WHERE registration_id = @registration_id", con))
             *  {
             *      //com.Parameters.AddWithValue("@registration_id", txtID.Text);
             *      //com.Parameters.AddWithValue("@patient_Lname", txtLname.Text);
             *
             *
             *      DialogResult r = MessageBox.Show("Mark appointment as done?", "", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
             *
             *      if (r == DialogResult.OK)
             *      {
             *          com.ExecuteNonQuery();
             *      }
             *      else
             *      {
             *          MessageBox.Show("Cancelled");
             *      }
             *
             *  }
             *  con.Close();
             *
             *
             * }
             */
        }
Exemplo n.º 2
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            selectID = int.Parse(dataGridView1.Rows[e.RowIndex].Cells["registration_id"].Value.ToString());
            string firstname  = dataGridView1.Rows[e.RowIndex].Cells["patient_Fname"].Value.ToString();
            string middlename = dataGridView1.Rows[e.RowIndex].Cells["patient_Mname"].Value.ToString();
            string lastname   = dataGridView1.Rows[e.RowIndex].Cells["patient_Lname"].Value.ToString();

            string lab_crea               = dataGridView1.Rows[e.RowIndex].Cells["lab_crea"].Value.ToString();
            string lab_sgpt               = dataGridView1.Rows[e.RowIndex].Cells["lab_sgpt"].Value.ToString();
            string lab_FBS                = dataGridView1.Rows[e.RowIndex].Cells["lab_FBS"].Value.ToString();
            string lab_acid               = dataGridView1.Rows[e.RowIndex].Cells["lab_acid"].Value.ToString();
            string chest_XrayResult       = dataGridView1.Rows[e.RowIndex].Cells["chest_XrayResult"].Value.ToString();
            string sputum_month           = dataGridView1.Rows[e.RowIndex].Cells["sputum_month"].Value.ToString();
            string sputum_due             = dataGridView1.Rows[e.RowIndex].Cells["sputum_due"].Value.ToString();
            string sputum_examDate        = dataGridView1.Rows[e.RowIndex].Cells["sputum_examDate"].Value.ToString();
            string sputum_result          = dataGridView1.Rows[e.RowIndex].Cells["sputum_result"].Value.ToString();
            string sputum_appearance      = dataGridView1.Rows[e.RowIndex].Cells["sputum_appearance"].Value.ToString();
            string doctors_order          = dataGridView1.Rows[e.RowIndex].Cells["doctors_order"].Value.ToString();
            string exam_reason            = dataGridView1.Rows[e.RowIndex].Cells["exam_reason"].Value.ToString();
            string hist_treatment         = dataGridView1.Rows[e.RowIndex].Cells["hist_treatment"].Value.ToString();
            string specimen_type          = dataGridView1.Rows[e.RowIndex].Cells["specimen_type"].Value.ToString();
            string specimen_date1         = dataGridView1.Rows[e.RowIndex].Cells["specimen_date1"].Value.ToString();
            string speciman_date2         = dataGridView1.Rows[e.RowIndex].Cells["speciman_date2"].Value.ToString();
            string test_request           = dataGridView1.Rows[e.RowIndex].Cells["test_request"].Value.ToString();
            string prepared_by            = dataGridView1.Rows[e.RowIndex].Cells["prepared_by"].Value.ToString();
            string staff_position         = dataGridView1.Rows[e.RowIndex].Cells["staff_position"].Value.ToString();
            string visual_appearance1     = dataGridView1.Rows[e.RowIndex].Cells["visual_appearance1"].Value.ToString();
            string visual_appearance2     = dataGridView1.Rows[e.RowIndex].Cells["visual_appearance2"].Value.ToString();
            string visual_appearanceXpert = dataGridView1.Rows[e.RowIndex].Cells["visual_appearanceXpert"].Value.ToString();
            string reading1               = dataGridView1.Rows[e.RowIndex].Cells["reading1"].Value.ToString();
            string reading2               = dataGridView1.Rows[e.RowIndex].Cells["reading2"].Value.ToString();
            string readingX               = dataGridView1.Rows[e.RowIndex].Cells["readingX"].Value.ToString();
            string LabDiag                = dataGridView1.Rows[e.RowIndex].Cells["LabDiag"].Value.ToString();
            string LabX        = dataGridView1.Rows[e.RowIndex].Cells["LabX"].Value.ToString();
            string tbdc_rec    = dataGridView1.Rows[e.RowIndex].Cells["tbdc_rec"].Value.ToString();
            string suggestions = dataGridView1.Rows[e.RowIndex].Cells["suggestions"].Value.ToString();
            var    diag        = new Diagnosis2(selectID, firstname, middlename, lastname, lab_crea, lab_sgpt, lab_FBS,
                                                lab_acid, chest_XrayResult, sputum_month, sputum_due, sputum_examDate, sputum_result, sputum_appearance,
                                                doctors_order, exam_reason, hist_treatment, specimen_type, specimen_date1, speciman_date2, test_request,
                                                prepared_by, staff_position, visual_appearance1, visual_appearance2, visual_appearanceXpert, reading1,
                                                reading2, readingX, LabDiag, LabX, tbdc_rec, suggestions);

            diag.ref_To_Main = this;
            diag.ShowDialog();
        }