Пример #1
0
 private void TileTC_Click_1(object sender, EventArgs e)
 {
     if (dgv.RowCount > 0)
     {
         frmTreatment treat = new frmTreatment();
         treat.lblID.Text = dgv.CurrentRow.Cells[0].Value.ToString();
         treat.ShowDialog();
     }
 }
Пример #2
0
 private void btnTreatment_Click(object sender, EventArgs e)
 {
     if (dgv.RowCount > 0)
     {
         frmTreatment treat = new frmTreatment();
         treat.lblID.Text = dgv.CurrentRow.Cells["ID Number"].Value.ToString();
         treat.ShowDialog();
     }
 }
Пример #3
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (listCC.Items.Count > 0 && txtDiag.Text != "" && txtIC.Text != "")
     {
         pc.studentId = id;
         int    ind = listCC.Items.Count;
         string cc  = "";
         for (int c = 0; c < ind; c++)
         {
             if (ind > 1)
             {
                 cc += listCC.Items[c].ToString() + ",";
             }
             else
             {
                 cc += listCC.Items[c].ToString();
             }
         }
         cc       = cc.Remove(cc.Length - 1);
         pc.tCC   = cc;
         pc.tDiag = txtDiag.Text;
         pc.dic   = txtIC.Text;
         pc.bp    = txtBP.Text;
         pc.pr    = txtPR.Text;
         pc.rr    = txtRR.Text;
         pc.spo2  = txtSPo2.Text;
         pc.temp  = txtTemp.Text;
         pc.refe  = txtRefe.Text;
         if (pc.addTreatment())
         {
             MetroMessageBox.Show(this, "Saved!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.Close();
             frmTreatment fr = new frmTreatment();
             fr.lblID.Text = id;
             fr.ShowDialog();
         }
         else
         {
             MetroMessageBox.Show(this, "Failed!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
     }
     else
     {
         MetroMessageBox.Show(this, "Input important fields!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }