Exemple #1
0
 public Boolean CheckData()
 {
     try
     {
         Control[] controls = new Control[] {
             ucPalsyDate1
         };
         foreach (var item in controls)
         {
             IZymosisReport  iZymosisReport  = item as IZymosisReport;
             XtraUserControl xtraUserControl = item as XtraUserControl;
             if (iZymosisReport != null && xtraUserControl != null)
             {
                 if (string.IsNullOrEmpty(iZymosisReport.GetValue()))
                 {
                     MyMessageBox.Show(xtraUserControl.AccessibleName + " 不能为空!请填写完整");
                     iZymosisReport.SetFocus();
                     return(false);
                 }
             }
         }
         return(true);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #2
0
 public Boolean CheckData()
 {
     try
     {
         Control[] controls = new Control[] {
             ucMaritalStatus1, ucNation1, ucEducationLevel1, ucContactHistory1, ucXinBingShi1,
             ucInfactway1, ucSamplesource1, ucDetectionconclusion1, ucAffirmdate1,
             ucAffirmDept1
         };
         foreach (var item in controls)
         {
             IZymosisReport  iZymosisReport  = item as IZymosisReport;
             XtraUserControl xtraUserControl = item as XtraUserControl;
             if (iZymosisReport != null && xtraUserControl != null)
             {
                 //if (xtraUserControl.Tag.ToString() != "HOUSEHOLDSCOPE"
                 //    && xtraUserControl.Tag.ToString() != "HOUSEHOLDADDRESS"
                 //    && xtraUserControl.Tag.ToString() != "ADDRESS"
                 //    && xtraUserControl.Tag.ToString() != "REMARK")
                 //{
                 //测试
                 //if (xtraUserControl.Tag.ToString() == "CONTACTHISTORY") { }
                 //
                 if (string.IsNullOrEmpty(iZymosisReport.GetValue()))
                 {
                     MyMessageBox.Show(xtraUserControl.AccessibleName + " 不能为空!请填写完整");
                     iZymosisReport.SetFocus();
                     return(false);
                 }
                 //}
             }
         }
         return(true);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemple #3
0
 public Boolean CheckData()
 {
     try
     {
         Control[] controls = new Control[] {
             ucCaseType1, ucHospitalStatus1, ucIsCure1, ucIsOverseas1
         };
         foreach (var item in controls)
         {
             IZymosisReport  iZymosisReport  = item as IZymosisReport;
             XtraUserControl xtraUserControl = item as XtraUserControl;
             if (iZymosisReport != null && xtraUserControl != null)
             {
                 if (xtraUserControl.Tag.ToString() == "HOSPITALSTATUS")
                 {
                     if (iZymosisReport.GetValue().Contains("空"))
                     {
                         MyMessageBox.Show("住院日期 不能为空!请填写完整");
                         return(false);
                     }
                 }
                 if (string.IsNullOrEmpty(iZymosisReport.GetValue()))
                 {
                     MyMessageBox.Show(xtraUserControl.AccessibleName + " 不能为空!请填写完整");
                     iZymosisReport.SetFocus();
                     return(false);
                 }
             }
         }
         return(true);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }