コード例 #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 == "Procedure")
         {
             DataGridViewRow dr = dgw.SelectedRows[0];
             this.Hide();
             frmProcedure frm = new frmProcedure();
             frm.Show();
             frm.txtID.Text            = dr.Cells[0].Value.ToString();
             frm.txtPaymentID.Text     = dr.Cells[1].Value.ToString();
             frm.dtpDate.Text          = dr.Cells[2].Value.ToString();
             frm.txtP_ID.Text          = dr.Cells[3].Value.ToString();
             frm.txtPatientID.Text     = dr.Cells[4].Value.ToString();
             frm.txtPatientName.Text   = dr.Cells[5].Value.ToString();
             frm.txtStaffID.Text       = dr.Cells[6].Value.ToString();
             frm.cmbStaffName.Text     = dr.Cells[7].Value.ToString();
             frm.txtDesignation.Text   = dr.Cells[8].Value.ToString();
             frm.txtProcedureType.Text = dr.Cells[9].Value.ToString();
             frm.txtDescription.Text   = dr.Cells[10].Value.ToString();
             frm.txtToothInvolved.Text = dr.Cells[11].Value.ToString();
             frm.txtCopayAmount.Text   = dr.Cells[12].Value.ToString();
             frm.txtCharges.Text       = dr.Cells[13].Value.ToString();
             frm.txtGrandTotal.Text    = dr.Cells[14].Value.ToString();
             frm.txtTotalPaid.Text     = dr.Cells[15].Value.ToString();
             frm.txtPaymentDue.Text    = dr.Cells[16].Value.ToString();
             frm.dtpDate.Enabled       = false;
             frm.btnUpdate.Enabled     = true;
             frm.btnDelete.Enabled     = true;
             frm.btnSave.Enabled       = false;
             frm.lblUser.Text          = lblUser.Text;
             lblOperation.Text         = "";
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #3
0
        private void dgw_MouseClick(object sender, MouseEventArgs e)
        {
            try
            {
                if (lblOperation.Text == "Patient 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.txtInsuranceCompany.Text     = dr.Cells[7].Value.ToString();
                    frm.txtAddress.Text              = dr.Cells[8].Value.ToString();
                    frm.txtBillingContactPerson.Text = dr.Cells[9].Value.ToString();
                    frm.txtTelephoneNo.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 == "Procedure")
                {
                    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();
                }
                if (lblOperation.Text == "Invoice")
                {
                    DataGridViewRow dr = dgw.SelectedRows[0];
                    this.Hide();
                    frmInvoice frm = new frmInvoice();
                    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);
            }
        }