private void ddlNextPatients_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlNextPatients.SelectedIndex > 0)
            {
                //LookupModel m = (LookupModel);
                List <OPDHistoryModel> list = service.GetByStatus(OPD_STATUS.Pending.ToString());
                service.UpdateStatus(list, OPD_STATUS.Complete);
                UserDetailSession.NumberPatientCount = Convert.ToInt32(ddlNextPatients.SelectedValue);
                ChangeToken();
                Patients.TokenList frm = Patients.TokenList.Instance;
                frm.setNextPatients();

                refreshPage();
            }
            else
            {
                UserDetailSession.NumberPatientCount = 0;
                for (int i = 0; i < 6; i++)
                {
                    RoundedButton tbx = this.Controls.Find("lbl" + (i + 1), true).FirstOrDefault() as RoundedButton;
                    tbx.Visible = false;
                    tbx.Update();
                }
            }
        }
        private void firstLoad()
        {
            List <OPDHistoryModel> list = service.GetByStatus(OPD_STATUS.Pending.ToString());

            if (list.Count > 0)
            {
                ChangeToken(false);
                Patients.TokenList frm = Patients.TokenList.Instance;
                frm.setNextPatients(false);
            }
        }
        private void btnTokenPageRefresh_Click(object sender, EventArgs e)
        {
            List <OPDHistoryModel> list = service.GetByStatus(OPD_STATUS.Pending.ToString());

            service.UpdateStatus(list, OPD_STATUS.Complete);
            ChangeToken();
            Patients.TokenList frm = Patients.TokenList.Instance;
            frm.setNextPatients();

            refreshPage();
        }
Exemple #4
0
        private void btnMenuTokenList_Click(object sender, EventArgs e)
        {
            try
            {
                Patients.TokenList f = Patients.TokenList.Instance;

                //Patients.TokenList frm = new Patients.TokenList();
                f.Show();
            }
            catch (Exception ex)
            {
                Utility.ErrorLog.Logging("Dashboard", ex.Message.ToString(), ex.StackTrace.ToString());
            }
        }
        private bool saveData()
        {
            try
            {
                bool            isSave = false;
                OPDHistoryModel model  = assignModel();
                if (model != null)
                {
                    isSave = service.Update(assignModel());
                    if (isSave)
                    {
                        //if (isStatusHasInProgress)
                        //{
                        if (sequence != null)
                        {
                            TokenList frm = TokenList.Instance;
                            frm.removeSequence(sequence.Value);
                        }

                        //}
                        return(isSave);
                    }
                    else
                    {
                        return(isSave);
                    }
                }
                else
                {
                    return(isSave);
                }
            }
            catch (Exception ex)
            {
                Utility.ErrorLog.Logging("OPD History", ex.Message.ToString(), ex.StackTrace.ToString());
                return(false);
            }
        }
 private void TokenList_FormClosed(object sender, FormClosedEventArgs e)
 {
     instance = null;
 }