Example #1
0
 private void frmListDoctor_Load(object sender, System.EventArgs e)
 {
     if (DoctorID.Trim() != "")
     {
         txtDoctor.Tag  = DoctorID.Trim();
         txtDoctor.Text = DoctorName.Trim();
         PatientID      = "";
         PatientName    = "";
     }
     else
     {
         DoctorID    = "";
         DoctorName  = "";
         PatientID   = "";
         PatientName = "";
     }
     if (this.LoginInfo != null)
     {
         txtDoctor.Tag  = this.LoginInfo.m_strEmpID;
         txtDoctor.Text = this.LoginInfo.m_strEmpName;
         PatientID      = "";
         PatientName    = "";
         txtPatient_KeyDown(null, new KeyEventArgs(Keys.Enter));
     }
 }
Example #2
0
 private void lsvDoctor_DoubleClick(object sender, EventArgs e)
 {
     if (lsvDoctor.SelectedItems.Count > 0)
     {
         int CurrIndex = lsvDoctor.SelectedItems[0].Index;
         DoctorID       = ((DataTable)lsvDoctor.Tag).Rows[CurrIndex]["EMPID_CHR"].ToString().Trim();
         DoctorName     = ((DataTable)lsvDoctor.Tag).Rows[CurrIndex]["LASTNAME_VCHR"].ToString().Trim();
         txtDoctor.Text = DoctorName.Trim();
         txtDoctor.Tag  = DoctorID.Trim();
         lsvDoctor.Hide();
         txtPatient_KeyDown(null, new KeyEventArgs(Keys.Enter));
     }
 }
Example #3
0
        private void txtPatient_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (DoctorID != null && DoctorID.Trim() != "")
                {
                    m_lngGetPatientByDoctor("", DoctorID.Trim());
//					if(txtPatient.Text.Trim()=="")
//					{
//						m_lngGetPatientByDoctor("",DoctorID.Trim());
//					}
//					else
//					{
//						m_lngGetPatientByDoctor(" A.INPATIENTID_CHR LIKE '"+txtPatient.Tag.ToString().Trim()+"%' ",DoctorID.Trim());
//					}
                }
                lsvPatient.Show();
                lsvPatient.Focus();
                if (lsvPatient.Items.Count > 0)
                {
//					lsvPatient.Items[0].Selected=true;
                }
            }
        }