//**************************************************************************************************** //加载 private void FrmDepartmentEdit_Load(object sender, EventArgs e) { if (intId == 0) { this.Text = "添加" + this.Text; ParseCombobox.setHospital(cmbHospitalId); ParseCombobox.setDepartmentType(cmbDepartmentTypeId); } else { this.Text = "修改" + this.Text; DataRow dr = new ModDepartment().setWhere("id > 0", true).getFind(intId); if (dr == null) { Function.showMessage("记录为空"); this.Close(); } else { txtDepartmentCode.Text = dr["departmentCode"].ToString(); txtDepartmentName.Text = dr["departmentName"].ToString(); txtSpell.Text = dr["spell"].ToString(); chkIsPass.Checked = Convert.ToBoolean(dr["isPass"]); ParseCombobox.setHospital(cmbHospitalId, dr["hospitalId"]); ParseCombobox.setDepartmentType(cmbDepartmentTypeId, dr["departmentTypeId"]); } } }
//**************************************************************************************************** //加载 private void FrmReserverEdit_Load(object sender, EventArgs e) { if (intId == 0) { ParseCombobox.setWorker(cmbReserverWorkerId); ParseCombobox.setDepartment(cmbReserverDepartmentId); ParseCombobox.setSex(cmbSex); ParseCombobox.setUserSource(cmbUserSourceId); ParseCombobox.setSmsTemplate(cmbSmsTemplateId); ParseCombobox.setRemarkTemplate(cmbRemarkTemplateId); } else { DataRow dr = new ModReserver().getFind(intId); if (dr == null) { Function.showMessage("记录为空"); } else { txtRealname.Text = dr["realname"].ToString(); txtTel.Text = dr["tel"].ToString(); txtReserverCode.Text = dr["ReserverCode"].ToString(); nudAge.Value = Convert.ToInt32(dr["age"]); txtWechat.Text = dr["wechat"].ToString(); txtReserverContent.Text = dr["reserverContent"].ToString(); txtRemark.Text = dr["remark"].ToString(); txtVisitContent.Text = dr["visitContent"].ToString(); dtpReserverDate.Value = Function.getDate(dr["reserverDate"]); dtpVisitDate.Value = Function.getDate(dr["visitDate"]); ParseCombobox.setWorker(cmbReserverWorkerId, dr["reserverWorkerId"]); ParseCombobox.setDepartment(cmbReserverDepartmentId, dr["reserverDepartmentId"]); ParseCombobox.setSex(cmbSex, dr["sex"]); ParseCombobox.setUserSource(cmbUserSourceId, dr["userSourceId"]); ParseCombobox.setSmsTemplate(cmbSmsTemplateId, dr["smsTemplateId"]); ParseCombobox.setRemarkTemplate(cmbRemarkTemplateId, dr["remarkTemplateId"]); } } }
//**************************************************************************************************** //加载 private void FrmWorkerEdit_Load(object sender, EventArgs e) { if (intId == 0) { this.Text = "添加" + this.Text; ParseCombobox.setDepartment(cmbDepartmentId); ParseCombobox.setWorkerType(cmbWorkerTypeId); ParseCombobox.setSex(cmbSex); } else { this.Text = "修改" + this.Text; DataRow dr = new ModWorker().setWhere("id > 0", true).getFind(intId); if (dr == null) { Function.showMessage("记录为空"); this.Close(); } else { txtUsername.Enabled = false; chkIsPass.Checked = Convert.ToBoolean(dr["isPass"]); txtUsername.Text = dr["username"].ToString(); txtPassword.Text = dr["password"].ToString(); txtWorkerCode.Text = dr["workerCode"].ToString(); txtRealname.Text = dr["realname"].ToString(); txtTel.Text = dr["tel"].ToString(); txtSpell.Text = dr["spell"].ToString(); ParseCombobox.setDepartment(cmbDepartmentId, dr["departmentId"]); ParseCombobox.setWorkerType(cmbWorkerTypeId, dr["workerTypeId"]); ParseCombobox.setSex(cmbSex, dr["sex"].ToString()); } } }
//**************************************************************************************************** //加载 private void FrmCardEdit_Load(object sender, EventArgs e) { if (intId == 0) { ParseCombobox.setUserLevel(cmbUserLevelId); ParseCombobox.setRegisterType(cmbRegisterTypeId); ParseCombobox.setSex(cmbSex); ParseCombobox.setCertificateType(cmbCertificateTypeId); ParseCombobox.setNation(cmbNation); ParseCombobox.setUserType(cmbUserTypeId); ParseCombobox.setJobType(cmbJobTypeId); ParseCombobox.setBlood(cmbBlood); ParseCombobox.setMarital(cmbMarital); ParseCombobox.setRelation(cmbLinkmanRelationId); ParseCombobox.setUserSource(cmbUserSourceId); ParseCombobox.setWorker(cmbHospitalWorkerId); ParseCombobox.setWorker(cmbReserverWorkerId); ParseCombobox.setDepartment(cmbReserverDepartmentId); } else { DataRow dr = new ModCard().getFind(intId); if (dr == null) { Function.showMessage("记录为空"); } else { txtCardCode.Text = dr["cardCode"].ToString(); txtUserCode.Text = dr["userCode"].ToString(); txtRealname.Text = dr["realname"].ToString(); txtCertificateCode.Text = dr["certificateCode"].ToString(); dtpBirthday.Value = Function.getDate(dr["birthday"]); nudAge.Value = Convert.ToInt32(dr["age"].ToString()); txtTel.Text = dr["tel"].ToString(); txtPost.Text = dr["post"].ToString(); txtLinkman.Text = dr["linkman"].ToString(); txtLinkmanTel.Text = dr["linkmanTel"].ToString(); //Province //City //County txtAddress.Text = dr["address"].ToString(); txtHospitalWorkerContent.Text = dr["hospitalWorkerContent"].ToString(); txtReserverCode.Text = dr["reserverCode"].ToString(); txtAllergicHistory.Text = dr["allergicHistory"].ToString(); txtContent.Text = dr["content"].ToString(); ParseCombobox.setUserLevel(cmbUserLevelId, dr["userLevelId"]); ParseCombobox.setRegisterType(cmbRegisterTypeId, dr["registerTypeId"]); ParseCombobox.setSex(cmbSex, dr["sex"]); ParseCombobox.setCertificateType(cmbCertificateTypeId, dr["certificateTypeId"]); ParseCombobox.setNation(cmbNation, dr["nation"]); ParseCombobox.setUserType(cmbUserTypeId, dr["userTypeId"]); ParseCombobox.setJobType(cmbJobTypeId, dr["jobTypeId"]); ParseCombobox.setBlood(cmbBlood, dr["blood"]); ParseCombobox.setMarital(cmbMarital, dr["marital"]); ParseCombobox.setRelation(cmbLinkmanRelationId, dr["linkmanRelationId"]); ParseCombobox.setUserSource(cmbUserSourceId, dr["userSourceId"]); ParseCombobox.setWorker(cmbHospitalWorkerId, dr["hospitalWorkerId"]); ParseCombobox.setWorker(cmbReserverWorkerId, dr["reserverWorkerId"]); ParseCombobox.setDepartment(cmbReserverDepartmentId, dr["reserverDepartmentId"]); } } }