private void UpdateDateJGYS(string PD_OROHECT_CODE)
 {
     string strErr = "";
     if (!this.Panduan_JGYS(ref strErr))
     {
         this.hy_File(null, strErr);
     }
     else
     {
         string text = this.lblPD_PROJECT_CODE.Text;
         DateTime time = DateTime.Parse(this.txtPD_PROJECT_COMPLETE_DATE.Value);
         DateTime time2 = DateTime.Parse(this.txtPD_PROJECT_YSSQ_DATE.Value);
         DateTime time3 = DateTime.Parse(this.txtPD_PROJECT_YS_DATE.Value);
         string selectedValue = this.ddlPD_PROJECT_YS_COMPANY.SelectedValue;
         string str4 = this.txtPD_PROJECT_YS_ZRR.Text;
         string str5 = this.txtPD_PROJECT_YS_NAME.Text;
         string str6 = this.txtPD_PROJECT_YS_SUGGEST.Text;
         string str7 = this.ddlPD_PROJECT_YS_RESULT.SelectedItem.Text;
         string str8 = this.txtPD_PROJECT_YS_CONDITION.Text;
         PD_PROJECT_JGYS_Model model = new PD_PROJECT_JGYS_Model
         {
             PD_PROJECT_CODE = text,
             PD_PROJECT_COMPLETE_DATE = new DateTime?(time),
             PD_PROJECT_YSSQ_DATE = new DateTime?(time2),
             PD_PROJECT_YS_DATE = new DateTime?(time3),
             PD_PROJECT_YS_COMPANY = selectedValue,
             PD_PROJECT_YS_ZRR = str4,
             PD_PROJECT_YS_NAME = str5,
             PD_PROJECT_YS_SUGGEST = str6,
             PD_PROJECT_YS_RESULT = str7,
             PD_PROJECT_YS_CONDITION = str8
         };
         PD_PROJECT_APPRAISE_Model model2 = new PD_PROJECT_APPRAISE_Model();
         string str9 = this.txtAUTO_NO_APPRAISE.Text;
         string str10 = this.txtPD_PROJECT_APP_COMPANY.Text;
         string str11 = this.txtPD_PROJECT_APP_COMPANY_LIST.Text;
         string str12 = this.txtPD_PROJECT_APP_MAN_LIST.Text;
         string str13 = this.txtPD_PROJECT_APPRAISE_FILENO.Text;
         if (!PublicDal.PageValidate.IsNumber(str9))
         {
             str9 = "-1";
         }
         model2.AUTO_NO = int.Parse(str9);
         model2.PD_PROJECT_CODE = text;
         model2.PD_PROJECT_APP_COMPANY = str10;
         model2.PD_PROJECT_APP_COMPANY_LIST = str11;
         model2.PD_PROJECT_APP_MAN_LIST = str12;
         model2.PD_PROJECT_APPRAISE_FILENO = str13;
         PD_PROJECT_JGYS_Bll bll = new PD_PROJECT_JGYS_Bll();
         if (bll.Exists(text))
         {
             bll.Update(model);
         }
         else
         {
             bll.Add(model);
         }
         PD_PROJECT_APPRAISE_Bll bll2 = new PD_PROJECT_APPRAISE_Bll();
         if (bll2.Exists(text))
         {
             bll2.Update(model2);
         }
         else
         {
             bll2.Add(model2);
         }
         this.UpdateDateXMPJ(PD_OROHECT_CODE);
         PageShowText.Refurbish("修改成功", this.Page);
     }
 }
Beispiel #2
0
 private void UpdataData(string PD_PROJECT_CODE)
 {
     TB_PROJECT_Bll bll = new TB_PROJECT_Bll();
     TB_PROJECT_Model model = bll.GetModel(PD_PROJECT_CODE);
     string text1 = model.PD_PROJECT_STATUS;
     TB_PROJECT_Model model2 = this.GetModel(model);
     model2.PD_PROJECT_CODE = PD_PROJECT_CODE;
     bll.Update(model2);
     PD_PROJECT_ATTACH_SB_Bll bll2 = new PD_PROJECT_ATTACH_SB_Bll();
     bll2.Delete(PD_PROJECT_CODE);
     List<PD_PROJECT_ATTACH_SB_Model> modelList = this.GetAttach_SBModel(PD_PROJECT_CODE);
     bll2.AddList(modelList);
     PD_PROJECT_JGYS_Bll bll3 = new PD_PROJECT_JGYS_Bll();
     PD_PROJECT_JGYS_Model model3 = bll3.GetModel(PD_PROJECT_CODE);
     if (model3 != null)
     {
         model3 = this.getModer_jgys(model3, PD_PROJECT_CODE);
         bll3.Update(model3);
     }
     else
     {
         model3 = this.getModer_jgys(model3, PD_PROJECT_CODE);
         bll3.Add(model3);
     }
     PD_PROJECT_APPRAISE_Bll bll4 = new PD_PROJECT_APPRAISE_Bll();
     PD_PROJECT_APPRAISE_Model modelByProjectCode = bll4.GetModelByProjectCode(PD_PROJECT_CODE);
     if (modelByProjectCode != null)
     {
         modelByProjectCode = this.getModer_jgys_pj(modelByProjectCode, PD_PROJECT_CODE);
         bll4.Update(modelByProjectCode);
     }
     else
     {
         modelByProjectCode = this.getModer_jgys_pj(modelByProjectCode, PD_PROJECT_CODE);
         bll4.Add(modelByProjectCode);
     }
     PD_PROJECT_ZTB_Bll bll5 = new PD_PROJECT_ZTB_Bll();
     PD_PROJECT_ZTB_Model modelPROJECT = bll5.GetModelPROJECT(PD_PROJECT_CODE);
     if (modelPROJECT != null)
     {
         modelPROJECT = this.GetModel_Ztb(modelPROJECT, PD_PROJECT_CODE);
         bll5.Update(modelPROJECT);
     }
     else
     {
         modelPROJECT = this.GetModel_Ztb(modelPROJECT, PD_PROJECT_CODE);
         bll5.Add(modelPROJECT);
     }
     this.AddImgMethod(model2);
     PD_PROJECT_TZJGC_Bll bll6 = new PD_PROJECT_TZJGC_Bll();
     bll6.DeleteAll(PD_PROJECT_CODE);
     List<PD_PROJECT_TZJGC_Model> listModel = this.getTZJGCModel(PD_PROJECT_CODE);
     bll6.Add(listModel);
     new PD_FOUND_OUT_Bll().UpdateLJMoney(PD_PROJECT_CODE);
     PageShowText.Refurbish("修改成功", this.Page);
 }