Exemplo n.º 1
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            string szCheckerID = string.Empty;

            if (this.cboUserList.Text != string.Empty &&
                this.cboUserList.SelectedItem != null)
            {
                UserInfo user = this.cboUserList.SelectedItem as UserInfo;
                szCheckerID = user.USER_ID;
            }
            GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
            this.ShowStatusMessage("正在统计工作量,请稍候...");
            this.dataGridView1.Rows.Clear();
            //质检问题没有保存质检者ID导致工作量统计时,重名的工作量统计错误
            //现在加入质检者ID,但是直接改为根据ID统计时老数据统计错误
            //根据配置配置先通过姓名统计,当老数据不再需要统计时,按照ID统计更为准确
            List <EMRDBLib.QCWorkloadStatInfo> lstQCWorkloadStatInfos = null;
            short shRet = MedQCAccess.Instance.GetQCStatisticsByWorkload(szCheckerID, DateTime.Parse(dtpStatTimeBegin.Value.ToString("yyyy-M-d 00:00:00")),
                                                                         DateTime.Parse(dtpStatTimeEnd.Value.ToString("yyyy-M-d 23:59:59")), ref lstQCWorkloadStatInfos);

            if (shRet != SystemData.ReturnValue.OK
                &&
                shRet != SystemData.ReturnValue.RES_NO_FOUND
                )
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("查询数据失败!");
                return;
            }
            if (lstQCWorkloadStatInfos == null || lstQCWorkloadStatInfos.Count <= 0)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("没有符合条件的数据!", MessageBoxIcon.Information);
                return;
            }
            for (int index = 0; index < lstQCWorkloadStatInfos.Count; index++)
            {
                EMRDBLib.QCWorkloadStatInfo qcWorkloadStatInfo = lstQCWorkloadStatInfos[index];
                if (string.IsNullOrEmpty(qcWorkloadStatInfo.CheckerID))
                {
                    continue;
                }
                int             nRowIndex = this.dataGridView1.Rows.Add();
                DataGridViewRow row       = this.dataGridView1.Rows[nRowIndex];
                this.SetRowData(row, qcWorkloadStatInfo);
            }

            this.ShowStatusMessage(null);
            GlobalMethods.UI.SetCursor(this, Cursors.Default);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 将数据信息加载到DataGridView中
        /// </summary>
        /// <param name="row"></param>
        /// <param name="qcWorkloadStatInfo"></param>
        private void SetRowData(DataGridViewRow row, EMRDBLib.QCWorkloadStatInfo qcWorkloadStatInfo)
        {
            if (row == null || qcWorkloadStatInfo == null)
            {
                return;
            }
            if (row.DataGridView == null)
            {
                return;
            }

            row.Cells[this.colDeptName.Index].Value      = qcWorkloadStatInfo.DeptName;
            row.Cells[this.colNumOfCheck.Index].Value    = qcWorkloadStatInfo.NumOfCheck;
            row.Cells[this.colNumOfDoc.Index].Value      = qcWorkloadStatInfo.NumOfDoc;
            row.Cells[this.colNumOfQuestion.Index].Value = qcWorkloadStatInfo.NumOfQuestion;
        }
Exemplo n.º 3
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            DeptInfo deptInfo   = this.cboDeptName.SelectedItem as  DeptInfo;
            string   szDeptCode = null;

            if (deptInfo != null)
            {
                szDeptCode = deptInfo.DEPT_CODE;
            }
            if (string.IsNullOrEmpty(this.cboDeptName.Text))
            {
                szDeptCode = null;
            }

            GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
            this.ShowStatusMessage("正在统计工作量,请稍候...");
            this.dataGridView1.Rows.Clear();

            List <EMRDBLib.QCWorkloadStatInfo> lstQCWorkloadStatInfos = null;
            short shRet = MedQCAccess.Instance.GetQCStatisticsByDeptWorkload(szDeptCode, DateTime.Parse(dtpStatTimeBegin.Value.ToString("yyyy-M-d 00:00:00")),
                                                                             DateTime.Parse(dtpStatTimeEnd.Value.ToString("yyyy-M-d 23:59:59"))
                                                                             , ref lstQCWorkloadStatInfos);

            if (shRet != SystemData.ReturnValue.OK &&
                shRet != SystemData.ReturnValue.RES_NO_FOUND)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("查询数据失败!");
                return;
            }
            if (lstQCWorkloadStatInfos == null || lstQCWorkloadStatInfos.Count <= 0)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
                MessageBoxEx.Show("没有符合条件的数据!", MessageBoxIcon.Information);
                return;
            }
            for (int index = 0; index < lstQCWorkloadStatInfos.Count; index++)
            {
                EMRDBLib.QCWorkloadStatInfo qcWorkloadStatInfo = lstQCWorkloadStatInfos[index];
                int             nRowIndex = this.dataGridView1.Rows.Add();
                DataGridViewRow row       = this.dataGridView1.Rows[nRowIndex];
                this.SetRowData(row, qcWorkloadStatInfo);
            }

            this.ShowStatusMessage(null);
            GlobalMethods.UI.SetCursor(this, Cursors.Default);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 将数据信息加载到DataGridView中
        /// </summary>
        /// <param name="row"></param>
        /// <param name="qcWorkloadStatInfo"></param>
        private void SetRowData(DataGridViewRow row, EMRDBLib.QCWorkloadStatInfo qcWorkloadStatInfo)
        {
            if (row == null || qcWorkloadStatInfo == null)
            {
                return;
            }
            if (row.DataGridView == null)
            {
                return;
            }

            row.Cells[this.numOfCheckDataGridViewTextBoxColumn.Index].Value    = qcWorkloadStatInfo.NumOfCheck;
            row.Cells[this.numOfDocDataGridViewTextBoxColumn.Index].Value      = qcWorkloadStatInfo.NumOfDoc;
            row.Cells[this.numOfQuestionDataGridViewTextBoxColumn.Index].Value = qcWorkloadStatInfo.NumOfQuestion;

            UserInfo userInfo = null;

            UserAccess.Instance.GetUserInfo(qcWorkloadStatInfo.CheckerID, ref userInfo);
            row.Cells[this.colCheckID.Index].Value = userInfo != null ? userInfo.USER_ID : "";
            row.Cells[this.checkerDataGridViewTextBoxColumn.Index].Value = userInfo != null ? userInfo.USER_NAME : "";
            row.Cells[this.colDeptName.Index].Value = userInfo != null ? userInfo.DEPT_NAME : "";
        }