Exemple #1
0
        public void RefButtomWaitNumber()
        {
            var client = new QueueClientSoapClient();
            do
            {
                if (StopRef)
                    return;

                foreach (RefButtomText obj in ListQH)
                {
                    try
                    {
                        if (obj.QHOR.LabelCaption.IndexOf("#wait") >= 0 || obj.QHOR.EnlabelCaption.IndexOf("#wait") >= 0 || obj.QHOR.TagCaption.IndexOf("#wait") >= 0)
                        {
                            int UserNum = 0;
                            if (!string.IsNullOrEmpty(obj.QHOR.LabelJobno))
                            {
                                UserNum = client.GetBussinessWiatUser(obj.QHOR.LabelJobno);
                            }
                            else
                            {
                                UserNum = 0;
                            }

                            if (obj.BtnKJ != null)
                            {
                                obj.BtnKJ.SetText(obj.QHOR.LabelCaption.Replace("#wait", UserNum.ToString()));
                            }

                            if (obj.BtnEn != null)
                            {
                                obj.BtnEn.SetText(obj.QHOR.EnlabelCaption.Replace("#wait", UserNum.ToString()));
                            }

                            if (obj.BtnTag != null)
                            {
                                obj.BtnTag.SetText(obj.QHOR.TagCaption.Replace("#wait", UserNum.ToString()));
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        ErrorLog.WriteLog("RefButtomText:#wait", ex.Message);
                    }
                }
                Thread.Sleep(10 * 1000);

            } while (true);
        }