private void m_cmdOK_Click(object sender, System.EventArgs e) { this.Cursor = Cursors.WaitCursor; clsLoginContext objLogin = clsLoginContext.s_ObjLoginContext; m_lngRes = objLogin.m_lngLogin(m_txtLoginName.Text, m_txtPSW.Text); if (m_lngRes > 0) { //初始化信息失败 if (clsLoginContext.s_ObjLoginContext.m_ObjPrincial == null || clsLoginContext.s_ObjLoginContext.m_ObjRoleArr == null || clsLoginContext.s_ObjLoginContext.m_StrEmployeeID == null) { clsPublicFunction.ShowInformationMessageBox("初始化信息失败,请重新启动系统。"); clsLoginContext.s_ObjLoginContext.m_mthClear(); m_lngRes = -100; clsLoginContext.s_ObjLoginContext.m_mthClear(); this.Close(); return; } //非住院医生登录 if (clsSystemContext.s_ObjCurrentContext.m_ObjDepartment == null) { clsPublicFunction.ShowInformationMessageBox("没有权限使用本系统,请退出。"); clsLoginContext.s_ObjLoginContext.m_lngLogout(); clsLoginContext.s_ObjLoginContext.m_lngLogout(); m_lngRes = -110; clsLoginContext.s_ObjLoginContext.m_mthClear(); this.Close(); return; } //登录成功 this.Close(); } else { switch ((enmOperationResult)m_lngRes) { case enmOperationResult.DB_Fail: clsPublicFunction.ShowInformationMessageBox("不能连接服务器。"); break; case enmOperationResult.Not_permission: clsPublicFunction.ShowInformationMessageBox("用户信息不正确。"); break; } m_txtPSW.Text = ""; m_txtLoginName.Focus(); } this.Cursor = Cursors.Default; }
private void m_cmdOK_Click(object sender, System.EventArgs e) { this.Cursor = Cursors.WaitCursor; clsLoginContext objLogin = clsLoginContext.s_ObjLoginContext; m_lngRes = objLogin.m_lngCheckEmployeeSign(m_strEmployeeID, m_txtPSW.Text, out m_blnIsPass); this.Close(); this.Cursor = Cursors.Default; }
public void m_mthInit(Form p_frmMDI, com.digitalwave.iCare.ValueObject.clsLoginInfo p_objLoginInfo) { s_frmMDI = p_frmMDI; m_objLoginInfo = p_objLoginInfo; clsLoginContext objLogin = clsLoginContext.s_ObjLoginContext; objLogin.m_StrEmployeeID = p_objLoginInfo.m_strEmpNo; MDIParent.m_mthClearAll(); m_objCurDeptOfEmpArr = null; new clsForWholeHosInfoManager().m_lngGetDepartmentByUserID(p_objLoginInfo.m_strEmpID, out m_objCurDeptOfEmpArr); m_mthGetCurrentHospitalInfo(); #region 设置全局员工变量,新员工类,该静态类会被外部其他模块调用到,要保证正确赋值 tfzhang 2006-04-07 iCareData.clsEmrEmployeeBase_VO m_objEmployeeTemp; com.digitalwave.emr.BEDExplorer.clsHospitalManagerDomain objsrv = new com.digitalwave.emr.BEDExplorer.clsHospitalManagerDomain(); long lngRes = objsrv.m_lngGetEmpByID(m_objLoginInfo.m_strEmpID, out m_objEmployeeTemp); //未保存状态 用于签名集合 m_objEmployeeTemp.m_intSTATUS_INT = 0; com.digitalwave.emr.BEDExplorer.frmHRPExplorer.objpCurrentEmployee = m_objEmployeeTemp; #endregion iCare.CustomForm.clsExteriorFunctionInterface.m_ObjUserInfo = p_objLoginInfo; iCare.CustomForm.clsExteriorFunctionInterface.m_ObjCurDeptOfEmpArr = m_objCurDeptOfEmpArr; //获取修改时限 小时 if (clsEMR_StaticObject.s_IntCanModifyTime <= 0) { com.digitalwave.PublicMiddleTier.clsPublicMiddleTier objPM = (com.digitalwave.PublicMiddleTier.clsPublicMiddleTier)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.PublicMiddleTier.clsPublicMiddleTier)); objPM.m_lngGetRTBChangeTime("3001", out strCanModifyTime); } else { strCanModifyTime = clsEMR_StaticObject.s_IntCanModifyTime.ToString(); } m_strDoctorID = p_objLoginInfo.m_strEmpNo; }