Ejemplo n.º 1
0
 private void tsmAddDetail_Click(object sender, EventArgs e)
 {
     try
     {
         if (grdTestInfo.CurrentRow == null | tabTestInfo.SelectedTab.Name != "tabResult") return;
         var obj = new frmTestTypeRegistration();
         obj.LoadType = "ForResultDetail";
         obj.currentTest_ID = Utility.Int32Dbnull(grdTestInfo.GetValue("Test_ID"));
         obj.currentTestType_ID = Utility.Int32Dbnull(grdTestInfo.GetValue("TestType_ID"));
         if (Utility.Int32Dbnull(grdPatients.GetValue("Patient_ID")) <= 0)
         {
             Utility.ShowMsg("Mã loại xét nghiệm không đúng !");
             obj.Dispose();
             return;
         }
         obj.patientId = Utility.Int32Dbnull(grdPatients.GetValue("Patient_ID"));
         obj.dtResultDetail = m_dtResultDetail;
         obj.ShowDialog();
         FocusColumnResult();
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
     //btnParaEntry.PerformClick();
 }
Ejemplo n.º 2
0
        private void LoadTestTypeRegForm(int patient_ID)
        {
            try
            {
                if (grdPatients.CurrentRow == null) return;
                var obj = new frmTestTypeRegistration();
                if (grdTestTypeRegList.GetValue("Test_ID") != null)
                {
                    obj.currentTest_ID = Utility.Int32Dbnull(grdTestTypeRegList.GetValue("Test_ID"));
                }

                obj.patientId = patient_ID;
                obj.dtTestTypeList = dtTestType;
                obj.grdPatients = grdPatients;
               // obj.PrintbarcodeInstance = PrintBarcode;
                obj.ShowDialog();
                tsmRefresh.PerformClick();
            }
            catch (Exception ex)
            {
                Utility.ShowMsg(ex.Message);
            }
        }