Esempio n. 1
0
        int ii_chk = 0;       ///// for Lab Test Through Get Medicine Check  (0 --> for direct lab test  1 --> for through btnNext_Click)      ////--------- Asif - 20-04-19
        private void btnNext_Click(object sender, EventArgs e)
        {
            ii_chk = 1;                                     //
            btnDoTest_Click(sender, e);                     ////--------- Asif - 13-04-19

            if (MessageBox.Show("Do You want to see the Next Patient", "See Next", MessageBoxButtons.YesNo) == DialogResult.No)
            {
                return;
            }

            HideShowLoading(true);
            //System.Threading.Thread.Sleep(2000);
            //Application.DoEvents();
            List <LabTest>  meds = new List <LabTest>();
            frmdoctorchange fdcr = new frmdoctorchange();

            for (int i = 0; i < lstLabTestId.Items.Count; i++)
            {
                LabTest med = new LabTest();
                med.LabTestId = Convert.ToInt32(lstLabTestId.Items[i].ToString().Split(',').GetValue(0).ToString());
                med.TimesADay = Convert.ToDecimal(lstLabTestId.Items[i].ToString().Split(',').GetValue(1).ToString());
                meds.Add(med);
            }
            counter++;
            //sw = new StreamWriter("C:\\"+this.name+".txt",false);
            //sw.Write(counter);
            //sw.Close();
            pbll.PatientChecked(pr, meds);
            LoadRoomTokens();
            NextTokenData();
            HideShowLoading(false);
            ii_chk = 0;                     //// Reset flag             ////--------- Asif - 20-04-19
        }
Esempio n. 2
0
        private void frmDoctorCheckup_Load(object sender, EventArgs e)
        {
            try
            {
                frmdoctorchange fdcr = new frmdoctorchange();
                fdcr.ShowDialog();
                if (fdcr.frmname == null)
                {
                    this.Close();
                    return;
                }
                string[] an   = fdcr.frmname.Split(' ');
                string[] room = fdcr.frmname.Split('-');
                name  = an[0] + " " + an[1];
                rname = room[0].Trim();
                dname = room[1].Trim();
                fr.s  = name;
                if (name.Contains('/'))
                {
                    string[] array = name.Split('/');
                    name = array[0] + "-" + array[1];
                }
                if (fdcr.show)
                {
                    this.Text = name;
                    LoadRoomTokens();
                    //load medicines
                    labtests = new LabTestBLL().GetAvailabeMedicines();
                    cbxLabTest.DataSource    = labtests;
                    cbxLabTest.DisplayMember = "TestName";
                    cbxLabTest.ValueMember   = "LabTestId";
                    //load pathology test
                    pathology = new LabTestBLL().GetLabTest();
                    cbxPathologyTest.DataSource    = pathology;
                    cbxPathologyTest.DisplayMember = "TestName";
                    cbxPathologyTest.ValueMember   = "LabTestId";

                    txtRoomDr.Text = fdcr.frmname;
                }
                else
                {
                    this.Close();
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Doctor Checup Load");
            }

            try
            {
                NextTokenData();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Connecting L E D");
            }
        }