示例#1
0
        private void procedureToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmProcedure frm = new frmProcedure();

            frm.lblUser.Text = lblUser.Text;
            //frm.Reset();
            frm.Show();
        }
示例#2
0
        private void dgw_MouseClick(object sender, MouseEventArgs e)
        {
            try
            {
                if (lblOperation.Text == "Paciente Master")
                {
                    DataGridViewRow dr = dgw.SelectedRows[0];
                    this.Hide();
                    frmPatient frm = new frmPatient();
                    frm.Show();
                    frm.txtID.Text          = dr.Cells[0].Value.ToString();
                    frm.txtPatientID.Text   = dr.Cells[1].Value.ToString();
                    frm.txtPatientName.Text = dr.Cells[2].Value.ToString();
                    if (dr.Cells[3].Value.ToString() == "Male")
                    {
                        frm.rbMale.Checked = true;
                    }
                    else
                    {
                        frm.rbFemale.Checked = true;
                    }

                    frm.dtpDOB.Text          = dr.Cells[4].Value.ToString();
                    frm.txtEmailID.Text      = dr.Cells[5].Value.ToString();
                    frm.txtContactNo.Text    = dr.Cells[6].Value.ToString();
                    frm.txtAlgumaDoenca.Text = dr.Cells[7].Value.ToString();
                    frm.txtMedicamento.Text  = dr.Cells[8].Value.ToString();
                    frm.txtFumante.Text      = dr.Cells[9].Value.ToString();
                    frm.txtObs.Text          = dr.Cells[10].Value.ToString();

                    frm.btnUpdate.Enabled = true;
                    frm.btnDelete.Enabled = true;
                    frm.btnSave.Enabled   = false;
                    frm.lblUser.Text      = lblUser.Text;
                    lblOperation.Text     = "";
                }

                if (lblOperation.Text == "Procedimento")
                {
                    DataGridViewRow dr = dgw.SelectedRows[0];
                    this.Hide();
                    frmProcedure frm = new frmProcedure();
                    frm.Show();
                    frm.txtP_ID.Text        = dr.Cells[0].Value.ToString();
                    frm.txtPatientID.Text   = dr.Cells[1].Value.ToString();
                    frm.txtPatientName.Text = dr.Cells[2].Value.ToString();
                    frm.lblUser.Text        = lblUser.Text;
                    lblOperation.Text       = "";
                    frm.auto();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }