コード例 #1
0
ファイル: FrmReserverEdit.cs プロジェクト: zanderzhg/His
 //****************************************************************************************************
 //加载
 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"]);
         }
     }
 }
コード例 #2
0
        //****************************************************************************************************
        //加载
        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"]);
                }
            }
        }