Exemplo n.º 1
0
        public void TapSmartCardOnQueueSucceed(string queueId)
        {
            DAL_QueueNumber dalQueue    = new DAL_QueueNumber();
            var             queueDetail = dalQueue.GetQueueInfoByQueueID(new Guid(queueId));

            if (queueDetail != null)
            {
                string resultUT = GetResultUT(queueDetail.NRIC, queueDetail.Date);

                if (resultUT == EnumUTResult.NEG)
                {
                    var drugResult = new DAL_DrugResults().GetByNRICAndUploadedDate(queueDetail.NRIC, queueDetail.Date);
                    if (drugResult != null && drugResult.IsSealed.Value)
                    {
                        this._web.InvokeScript("openPopupOutcome", queueId);
                    }
                    else
                    {
                        dalQueue.UpdateQueueStatusByUserId(queueDetail.UserId, EnumStation.DUTYOFFICER, EnumQueueStatuses.Finished, EnumStation.DUTYOFFICER, EnumQueueStatuses.Finished, "", EnumQueueOutcomeText.UnconditionalRelease);

                        // Re-load queue
                        this._web.InvokeScript("reloadDataQueues");
                    }
                }
                else
                {
                    this._web.InvokeScript("openPopupOutcome", queueId);
                }
            }
        }
Exemplo n.º 2
0
        public void LoadPopupQueue(string queue_ID)
        {
            var dalQueue = new DAL_QueueNumber();

            Trinity.BE.QueueInfo queueInfo = dalQueue.GetQueueInfoByQueueID(new Guid(queue_ID));
            if (queueInfo.CurrentStation == EnumStation.UT)
            {
                if (queueInfo.Status == EnumQueueStatuses.Finished || queueInfo.Status == EnumQueueStatuses.SelectSealOrDiscard)
                {
                    queueInfo.Status = GetResultUT(queueInfo.NRIC, queueInfo.Date.Date);
                }
                else if (queueInfo.Status != EnumQueueStatuses.Errors)
                {
                    queueInfo.Status = string.Empty;
                }
            }
            this._web.LoadPopupHtml("QueuePopupDetail.html", queueInfo);
        }