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 frmDoctorTemplateFirstPage_Load(object sender, System.EventArgs e) { TreeNode trdMainItem = new TreeNode(); trdMainItem.Text = "医生模板---按八大系统分类"; this.trvEightSystem.Nodes.Add(trdMainItem); TreeNode trdItem = new TreeNode(); trdItem.Text = "消化系统"; trdMainItem.Nodes.Add(trdItem); trdItem = new TreeNode(); trdItem.Text = "心血管系统"; trdMainItem.Nodes.Add(trdItem); trdItem = new TreeNode(); trdItem.Text = "内分泌系统"; trdMainItem.Nodes.Add(trdItem); trdItem = new TreeNode(); trdItem.Text = "血液淋巴系统"; trdMainItem.Nodes.Add(trdItem); trdItem = new TreeNode(); trdItem.Text = "神经系统"; trdMainItem.Nodes.Add(trdItem); // trdItem=new TreeNode(); // trdItem.Text="生殖系统"; // trdMainItem.Nodes.Add(trdItem); trdItem = new TreeNode(); trdItem.Text = "泌尿生殖系统"; trdMainItem.Nodes.Add(trdItem); trdItem = new TreeNode(); trdItem.Text = "呼吸系统"; trdMainItem.Nodes.Add(trdItem); trdItem = new TreeNode(); trdItem.Text = "骨关节系统"; trdMainItem.Nodes.Add(trdItem); this.trvEightSystem.ExpandAll(); this.m_lblItem1.Text = ""; this.m_lblItem2.Text = ""; this.m_lblItem3.Text = ""; this.m_lblItem4.Text = ""; this.m_lblItem5.Text = ""; this.m_lblItem6.Text = ""; this.m_lblItem7.Text = ""; this.m_lblItem8.Text = ""; this.m_lblItem9.Text = ""; this.m_lblItem10.Text = ""; this.m_lblItem11.Text = ""; this.m_lblItem12.Text = ""; this.m_lblItem13.Text = ""; this.m_lblItem14.Text = ""; this.m_lblItem15.Text = ""; this.m_lblItem16.Text = ""; this.m_lblItem17.Text = ""; this.m_lblItem18.Text = ""; this.m_lblItem19.Text = ""; m_objHighLight.m_mthAddControlInContainer(this); m_txtTempName.Focus(); // trvEightSystem.Focus(); }
private void m_cmdOK_Click(object sender, System.EventArgs e) { if (m_txtLoginName.Text == "") { clsPublicFunction.ShowInformationMessageBox("用户账号不能为空。"); m_txtLoginName.Focus(); return; } if (m_txtPSW.Text != m_txtPSWConfirm.Text) { clsPublicFunction.ShowInformationMessageBox("新密码的确认与新密码不一致。"); m_txtPSW.Focus(); return; } this.Cursor = Cursors.WaitCursor; long lngRes = clsLoginContext.s_ObjLoginContext.m_lngUpdateLoginInfo(m_txtLoginName.Text, m_txtPSW.Text); if (lngRes > 0) { this.Close(); } else { if ((iCareData.enmOperationResult)lngRes == iCareData.enmOperationResult.Record_Already_Exist) { clsPublicFunction.ShowInformationMessageBox("用户名已经被使用。"); m_txtLoginName.SelectAll(); m_txtLoginName.Focus(); } else { clsPublicFunction.ShowInformationMessageBox("不能修改登录信息。"); } } this.Cursor = Cursors.Default; }
private void frmEquipmentType_Load(object sender, System.EventArgs e) { int rows = 0; try { clsEquipmentTypeInfo[] EquipmentTypeInfo = objDomain.m_clsGetXMLTable(ref rows); ListViewItem tempItem; for (int i = 0; i < rows; i++) { tempItem = new ListViewItem(new string[] { EquipmentTypeInfo[i].strEquipmentTypeID, EquipmentTypeInfo[i].strEquipmentTypeName }); tempItem.Tag = (clsEquipmentTypeInfo)EquipmentTypeInfo[i]; lsvEquipmentType.Items.Add(tempItem); } m_objHighLight.m_mthAddControlInContainer(this); txtEquimentName.Focus(); } catch {} }
private void frmCheckSign_Load(object sender, System.EventArgs e) { m_txtPSW.Focus(); }
/// <summary> /// 从界面获取记录的值。如果界面值出错,返回null。 /// </summary> /// <returns></returns> private clsDept_Desc m_objGetContentFromGUI() { //界面参数校验 if (this.m_txtDeptID.Text.Length > 7) { clsPublicFunction.ShowInformationMessageBox("对不起,科室编号不能大于7!"); m_txtDeptID.Focus(); return(null); } if (this.m_txtDeptID.Text.Trim() == "") { clsPublicFunction.ShowInformationMessageBox("对不起,请填写完整科室编号!"); m_txtDeptID.Focus(); return(null); } else if (this.m_txtDeptName.Text.Trim() == "") { clsPublicFunction.ShowInformationMessageBox("对不起,请填写完整科室名称!"); m_txtDeptName.Focus(); return(null); } else if (m_cboCategory.SelectedIndex == -1) { clsPublicFunction.ShowInformationMessageBox("对不起,请选择科室种类!"); m_cboCategory.Focus(); return(null); } else if (m_cboInPatientOrOutPatient.SelectedIndex == -1) { clsPublicFunction.ShowInformationMessageBox("对不起,请选择科室性质!"); m_cboInPatientOrOutPatient.Focus(); return(null); } //从界面获取表单值 clsDept_Desc objContent = new clsDept_Desc(); if (m_objDept_Desc == null) { objContent.m_dtmCreateDate = DateTime.Parse(new clsPublicDomain().m_strGetServerTime()); objContent.m_dtmModifyDate = objContent.m_dtmCreateDate; } else { objContent.m_dtmCreateDate = m_objDept_Desc.m_dtmCreateDate; objContent.m_dtmModifyDate = DateTime.Parse(new clsPublicDomain().m_strGetServerTime()); } objContent.m_strAddress = m_txtAddress.Text.Trim(); objContent.m_strCategory = m_cboCategory.SelectedIndex.ToString(); objContent.m_strInPatientOrOutPatient = m_cboInPatientOrOutPatient.SelectedIndex.ToString(); objContent.m_strDeptID = m_txtDeptID.Text.Trim(); objContent.m_strDeptName = m_txtDeptName.Text.Trim(); objContent.m_strPYCode = m_txtPYCode.Text.Trim(); objContent.m_strShortNO = m_txtShortNO.Text.Trim(); objContent.m_strDeActivedOperatorID = ""; m_objDept_Desc = objContent; return(objContent); }