/// <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; } }
/// <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; } }
/// <summary> /// 根据用户质控权限初始化窗口 add by wyt 2012-12-06 /// </summary> private void InitQCManager() { try { bool haveRole = false; m_auth = Authority.DEPTQC; //默认科室质控员 string deptid = m_App.User.CurrentDeptId; string userid = m_App.User.DoctorId; //质控科质控员 string configvalue = m_SqlManger.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_auth = Authority.QC; haveRole = true; break; } } } } else { foreach (string item in userJobid) //取出 { if (item == configvalue) //当前登录人的jobid在系统配置中,可以查看全院质控 { m_auth = Authority.QC; haveRole = true; break; } } } } # region 王运涛 注释 //string gwcodes = m_App.User.GWCodes; //string[] gwcode = gwcodes.Split(','); //foreach (string code in gwcode) //{ // if (code == "88") // { // m_auth = Authority.QC; // break; // } //} //string qcuserid = GetConfigValueByKey("RHQCMangesConfig"); //string[] qcuserids = qcuserid.Split(','); //foreach (string id in qcuserids) //{ // if (m_App.User.DoctorId == id) // { // m_auth = Authority.QC; // break; // } //} //if (m_App.User.CurrentDeptId == "5117") //{ // m_auth = Authority.QC; //} #endregion if (haveRole == false) { DataTable deptmanager = m_SqlManger.GetDirectorDoc(deptid); foreach (DataRow dr in deptmanager.Rows) { if (dr["ID"].ToString() == userid) { m_auth = Authority.DEPTMANAGER; break; } } } switch (m_auth) { case Authority.DEPTQC: this.simpleButtonAddQC.Visible = true; this.simpleButtonSubmit.Visible = true; this.simpleButtonCheckIn.Visible = false; this.simpleButtonCheckOut.Visible = false; this.simpleButtonDel.Visible = true; break; case Authority.DEPTMANAGER: this.simpleButtonAddQC.Visible = false; this.simpleButtonSubmit.Visible = false; this.simpleButtonCheckIn.Visible = true; this.simpleButtonCheckOut.Visible = true; this.simpleButtonDel.Visible = false; break; case Authority.QC: this.simpleButtonAddQC.Visible = true; this.simpleButtonSubmit.Visible = false; this.simpleButtonCheckIn.Visible = false; this.simpleButtonCheckOut.Visible = false; this.simpleButtonDel.Visible = true; break; } }