예제 #1
0
        private void frmIntoQueue_Load(object sender, EventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(_applyId))
                {
                    return;
                }

                _applyInfo = _qm.GetApplyByID(_applyId);

                InitQueueName(_applyInfo.执行科室ID, _applyId);

                _departmentName = _qm.GetDepartmentName(_applyInfo.执行科室ID);

                txtName.Text = _applyInfo.申请信息.姓名;
                txtSex.Text  = _applyInfo.申请信息.性别;
                txtAge.Text  = _applyInfo.申请信息.年龄;

                dtpIntoQueue.Value = DateTime.Now.Date;

                txtItem.Text = _qm.GetExamItemName(_applyInfo.申请信息.申请项目ID);

                if (cbxQueueName.SelectedItem != null)
                {
                    //产生排队号码
                    QueueData queueData = (cbxQueueName.SelectedItem as ItemBind).Tag as QueueData;

                    int queueNo = GetQueueNo(queueData.队列ID, dtpIntoQueue.Value);
                    txtQueueNo.Text = queueData.队列信息.号码前缀 + queueNo;
                    txtQueueNo.Tag  = queueNo;
                }
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }