Esempio n. 1
0
 /// <summary>
 /// 窗体加载事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OutMedicalScore_Load(object sender, EventArgs e)
 {
     try
     {
         //"ZKSFXTJZongFen"
         //xll 2013-02-26 临时 通过配置是否显示总分
         string conID = m_SqlManager.GetConfigValueByKey("ZKSFXTJZongFen");
         if (conID == string.Empty || conID == "0")
         {
             gcZongFeng.Visible = false;
         }
         else
         {
             gcZongFeng.Visible = true;
         }
         InitDepartment();//绑定科室下拉框
         InitlookUpEditParents();
         InitlookUpEditChild();
         InitInTime();//绑定时间
         InitDoctor();
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 判断当前登录人的身份(是科室质控员还是质控科的)
        /// QCDepart质控科人员  QCMANAGER 为科室指控员 CHIEF为科主任
        /// </summary>
        /// <param name="p"></param>
        /// <returns>QCDepart质控科人员  QCMANAGER 为科室指控员 CHIEF为科主任 </returns>
        internal string JudgeIdentity(string userid, SqlManger m_SqlManger)
        {
            string        Ident        = string.Empty;
            string        configvalue  = m_SqlManger.GetConfigValueByKey("RHQCMangesConfig");
            List <string> configIDList = new List <string>();

            if (!String.IsNullOrEmpty(configvalue))
            {
                configIDList = (configvalue.Split(',')).ToList();
            }
            bool hasUserQC = false; //人员是否是质控科人员

            foreach (var item in configIDList)
            {
                if (item == userid)
                {
                    hasUserQC = true;
                }
            }
            if (hasUserQC)
            {
                Ident = "QCDepart";
            }
            else
            {
                string sql = string.Format("select * from emr_ConfigCheckPointUser where qcmanagerid='{0}' and valid='1'", userid);
                if (m_app.SqlHelper.ExecuteDataTable(sql).Rows.Count > 0)//是科室质控员
                {
                    Ident = "QCMANAGER";
                }
                string sql1 = string.Format("select * from emr_ConfigCheckPointUser where chiefdoctorid='{0}' and valid='1'", userid);
                if (m_app.SqlHelper.ExecuteDataTable(sql1).Rows.Count > 0)//是主任
                {
                    Ident = "CHIEF";
                }
            }
            return(Ident);
        }
Esempio n. 3
0
 /// <summary>
 /// 根据用户质控权限初始化窗口 add by wyt 2012-12-12
 /// </summary>
 private void InitQCManager()
 {
     try
     {
         bool haveRole = false;
         m_qcAuth = Authority.DEPTQC;  //默认科室质控员
         lookUpEditorDepartment.Enabled = false;
         lookUpEditorStatus.Enabled     = false;
         string deptid = m_app.User.CurrentDeptId;
         string userid = m_app.User.DoctorId;
         //质控科质控员
         string   configvalue = m_SqlManager.GetConfigValueByKey("ShowAllDeptQuality");
         string   c_UserJobId = m_app.User.GWCodes;              //当前登录人的jobid标识
         string[] userJobid   = c_UserJobId.Split(',');
         if (!string.IsNullOrEmpty(configvalue))
         {
             if (configvalue.Contains(","))                      //配置了多个角色可查看
             {
                 string[] configjobid = configvalue.Split(',');  //配置里的多个角色jobid
                 for (int i = 0; i < configjobid.Length; i++)    //先循环配置里所有jobid
                 {
                     if (haveRole == true)
                     {
                         break;
                     }
                     for (int j = 0; j < userJobid.Length; j++)  //再循环登录人的多个jobid
                     {
                         if (configjobid[i] == userJobid[j])
                         {
                             m_qcAuth = Authority.QC;
                             haveRole = true;
                             lookUpEditorDepartment.Enabled = true;
                             lookUpEditorStatus.Enabled     = true;
                             break;
                         }
                     }
                 }
             }
             else
             {
                 foreach (string item in userJobid) //取出
                 {
                     if (item == configvalue)       //当前登录人的jobid在系统配置中,可以查看全院质控
                     {
                         m_qcAuth = Authority.QC;
                         haveRole = true;
                         lookUpEditorDepartment.Enabled = true;
                         lookUpEditorStatus.Enabled     = true;
                         break;
                     }
                 }
             }
         }
         if (haveRole == false)
         {
             DataTable deptmanager = m_SqlManager.GetDirectorDoc(deptid);
             foreach (DataRow dr in deptmanager.Rows)
             {
                 if (dr["ID"].ToString() == userid)
                 {
                     m_qcAuth = Authority.DEPTMANAGER;
                     lookUpEditorDepartment.Enabled = false;
                     lookUpEditorStatus.Enabled     = false;
                     break;
                 }
             }
         }
     }
     catch
     {
         throw;
     }
 }