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);
     }
 }
Exemplo n.º 2
0
 private void ShowInfo(string PD_PROJECT_CODE)
 {
     TB_PROJECT_Model model = new TB_PROJECT_Bll().GetModel(PD_PROJECT_CODE);
     this.txtPD_PROJECT_CODE.Enabled = false;
     this.txtPD_PROJECT_NAME.Enabled = false;
     this.imgSearch.Attributes.Remove("onclick");
     this.txtPD_PROJECT_NAME.Attributes.Remove("QiPao");
     this.txtPD_PROJECT_CODE.Text = model.PD_PROJECT_CODE;
     this.txtPD_PROJECT_NAME.Text = model.PD_PROJECT_NAME;
     this.ddlPD_YEAR.SelectedValue = model.PD_YEAR.ToString();
     this.ddlPD_PROJECT_TYPE.SelectedValue = model.PD_PROJECT_TYPE;
     this.ddlPD_FOUND_XZ.SelectedValue = model.PD_FOUND_XZ;
     this.ddlPD_PROJECT_COUNTRY.Text = model.PD_PROJECT_COUNTRY;
     this.ddlPD_PROJECT_VILLAGE.Value = model.PD_PROJECT_VILLAGE;
     this.ddlPD_PROJECT_GROUP.Value = model.PD_PROJECT_GROUP;
     this.txtPD_PROJECT_CONTENT.Text = model.PD_PROJECT_CONTENT;
     this.txtPD_PROJECT_XMYT.Text = model.PD_PROJECT_XMYT;
     this.ddlPD_PROJECT_IFXZGL.SelectedValue = model.PD_PROJECT_IFXZGL.ToString();
     this.ddlPD_PROJECT_IFGS.SelectedValue = model.PD_PROJECT_IFGS.ToString();
     this.ddlPD_PROJECT_IFGS_BEFORE.SelectedValue = model.PD_PROJECT_IFGS_BEFORE.ToString();
     this.txtPD_PROJECT_OPEN_BODY.Text = model.PD_PROJECT_OPEN_BODY;
     this.txtPD_PROJECT_FZR.Text = model.PD_PROJECT_FZR;
     this.txtPD_PROJECT_CWFZR.Text = model.PD_PROJECT_CWFZR;
     this.txtPD_PROJECT_SYRS.Text = model.PD_PROJECT_SYRS.ToString();
     this.ddlPD_PROJECT_STATUS.SelectedValue = model.PD_PROJECT_STATUS;
     this.txtPD_PROJECT_BEGIN_DATE.Text = model.PD_PROJECT_BEGIN_DATE.ToString();
     this.txtPD_PROJECT_END_DATE.Text = model.PD_PROJECT_END_DATE.ToString();
     this.txtPD_PROJECT_YEARS.Text = model.PD_PROJECT_YEARS.ToString();
     this.txtPD_PROJECT_FILENO_LX.Text = model.PD_PROJECT_FILENO_LX;
     this.ShowPD_PROJECT_INPUT_COMPANY.Text = model.ShowPD_PROJECT_INPUT_COMPANY;
     this.ShowPD_PROJECT_INPUT_MAN.Text = model.ShowPD_PROJECT_INPUT_MAN;
     this.txtPD_PROJECT_INPUT_COMPANY.Text = model.PD_PROJECT_INPUT_COMPANY;
     this.txtPD_PROJECT_INPUT_MAN.Text = model.PD_PROJECT_INPUT_MAN;
     this.txtPD_PROJECT_INPUT_DATE.Text = model.PD_PROJECT_INPUT_DATE;
     this.ddlPD_PROJECT_COUNTRY.Text = model.PD_PROJECT_COUNTRY;
     this.txtPD_PROJECT_MONEY_TOTAL.Text = model.PD_PROJECT_MONEY_TOTAL.ToString();
     this.txtPD_PROJECT_MONEY_CZ_TOTAL.Text = model.PD_PROJECT_MONEY_CZ_TOTAL.ToString();
     this.txtPD_PROJECT_MONEY_CZ_SJ.Value = model.PD_PROJECT_MONEY_CZ_SJ.ToString();
     this.txtPD_PROJECT_MONEY_CZ_BJ.Value = model.PD_PROJECT_MONEY_CZ_BJ.ToString();
     this.txtPD_PROJECT_MONEY_ZC.Value = model.PD_PROJECT_MONEY_ZC.ToString();
     this.txtPD_PROJECT_MONEY_QT.Value = model.PD_PROJECT_MONEY_QT.ToString();
     this.lblPD_PROJECT_FILENO_PF.Value = model.PD_PROJECT_FILENO_PF;
     this.txtPD_PROJECT_FILENO_PF.Value = model.PD_PROJECT_FILENO_PF_CODE;
     this.txtPD_PROJECT_SSFW.Text = model.PD_PROJECT_SSFW;
     this.HdFree1.Value = model.Free1;
     this.pd_project_cm.Text = model.Free2;
     this.FREE8.Text = model.Free8.ToString();
     decimal num = new PD_FOUND_OUT_Bll().getLJMoney(model.PD_PROJECT_CODE, -1L);
     if (model.Free8 != 0M)
     {
         this.pd_project_jsje.Text = (((num / model.Free8) * 100M)).ToString("0.00") + "%";
     }
     else
     {
         this.pd_project_jsje.Text = "0%";
     }
     PD_PROJECT_ZTB_Model modelPROJECT = new PD_PROJECT_ZTB_Bll().GetModelPROJECT(PD_PROJECT_CODE);
     if (modelPROJECT != null)
     {
         this.ddlPD_PROJECT_ZTB_IF_SSFA.SelectedValue = modelPROJECT.PD_PROJECT_ZTB_IF_SSFA.ToString();//黄文华加tostring()
         this.ddlPD_PROJECT_ZTB_IF_ZTB.SelectedValue = modelPROJECT.PD_PROJECT_ZTB_IF_ZTB.ToString();//黄文华加tostring()
         this.ddlPD_PROJECT_ZTB_STYLE.SelectedValue = modelPROJECT.PD_PROJECT_ZTB_STYLE;
         this.ddlPD_PROJECT_ISCONTRACT.SelectedValue = modelPROJECT.PD_PROJECT_ISCONTRACT;
         this.txtPD_PROJECT_XXJD.Text = modelPROJECT.PD_PROJECT_XXJD;
         this.txtPD_PROJECT_FCXMGCL.Text = modelPROJECT.PD_PROJECT_FCXMGCL;
         this.txtPD_PROJECT_GCZLQK.Text = modelPROJECT.PD_PROJECT_GCZLQK;
     }
     this.BindImg();
     PD_PROJECT_JGYS_Model modelByProCode = new PD_PROJECT_JGYS_Bll().GetModelByProCode(PD_PROJECT_CODE);
     if (modelByProCode != null)
     {
         if (PublicDal.PageValidate.IsDateTime(modelByProCode.PD_PROJECT_COMPLETE_DATE))
         {
             this.txtPD_PROJECT_COMPLETE_DATE.Value = modelByProCode.PD_PROJECT_COMPLETE_DATE.ToString();
         }
         if (PublicDal.PageValidate.IsDateTime(modelByProCode.PD_PROJECT_YSSQ_DATE))
         {
             this.txtPD_PROJECT_YSSQ_DATE.Value = modelByProCode.PD_PROJECT_YSSQ_DATE.Value.ToShortDateString();
         }
         if (PublicDal.PageValidate.IsDateTime(modelByProCode.PD_PROJECT_YS_DATE))
         {
             this.txtPD_PROJECT_YS_DATE.Value = modelByProCode.PD_PROJECT_YS_DATE.Value.ToShortDateString();
         }
         this.ddlPD_PROJECT_YS_COMPANY.SelectedValue = modelByProCode.PD_PROJECT_YS_COMPANY;
         this.txtPD_PROJECT_YS_ZRR.Text = modelByProCode.PD_PROJECT_YS_ZRR;
         this.txtPD_PROJECT_YS_NAME.Text = modelByProCode.PD_PROJECT_YS_NAME;
         this.txtPD_PROJECT_YS_SUGGEST.Text = modelByProCode.PD_PROJECT_YS_SUGGEST;
         this.ddlPD_PROJECT_YS_RESULT.SelectedValue = modelByProCode.PD_PROJECT_YS_RESULT;
         this.txtPD_PROJECT_YS_CONDITION.Text = modelByProCode.PD_PROJECT_YS_CONDITION;
     }
     PD_PROJECT_APPRAISE_Model modelByProjectCode = new PD_PROJECT_APPRAISE_Bll().GetModelByProjectCode(PD_PROJECT_CODE);
     if (modelByProjectCode != null)
     {
         this.txtAUTO_NO_APPRAISE.Text = modelByProjectCode.AUTO_NO.ToString();
         if (PublicDal.PageValidate.IsDateTime(modelByProjectCode.PD_PROJECT_APP_DATE))
         {
             this.txtPD_PROJECT_APP_DATE.Value = modelByProjectCode.PD_PROJECT_APP_DATE.Value.ToShortDateString();
         }
         this.txtPD_PROJECT_APP_COMPANY.Text = modelByProjectCode.PD_PROJECT_APP_COMPANY;
         this.txtPD_PROJECT_APP_COMPANY_LIST.Text = modelByProjectCode.PD_PROJECT_APP_COMPANY_LIST;
         this.txtPD_PROJECT_APP_MAN_LIST.Text = modelByProjectCode.PD_PROJECT_APP_MAN_LIST;
         this.txtPD_PROJECT_APPRAISE_FILENO.Text = modelByProjectCode.PD_PROJECT_APPRAISE_FILENO.ToString();
     }
     if (this.ddlPD_PROJECT_STATUS.SelectedValue.Trim() == "05")
     {
         DataSet ds = DbHelperOra.Query("select * from  view_pd_project_gkgs where PD_Project_Code = '" + PD_PROJECT_CODE + "'  order by pd_project_code,auto_no desc ");
         if ((ds != null) && (ds.Tables[0].Rows.Count > 0))
         {
             this.gvResult_gkgs.DataSource = ds.Tables[0];
             this.gvResult_gkgs.DataBind();
         }
         else
         {
             DataTable table = new DataTable();
             table = ds.Tables[0];
             DataRow row = table.NewRow();
             table.Rows.Add(row);
             this.gvResult_gkgs.DataSource = table.DefaultView;
             this.gvResult_gkgs.DataBind();
         }
         ds = DbHelperOra.Query("select * from view_inspection_list where PD_Project_Code = '" + PD_PROJECT_CODE + "' order by pd_project_code,auto_no desc ");
         if ((ds != null) && (ds.Tables[0].Rows.Count > 0))
         {
             DataView defaultView = ds.Tables[0].DefaultView;
             if ((this.ViewState["SortOrder"] != null) && (this.ViewState["OrderDire"] != null))
             {
                 string str2 = ((string)this.ViewState["SortOrder"]) + " " + ((string)this.ViewState["OrderDire"]);
                 defaultView.Sort = str2;
             }
             this.gvResult_xmxc.DataSource = defaultView;
             this.gvResult_xmxc.DataBind();
         }
         else
         {
             DataTable table2 = new DataTable();
             table2 = ds.Tables[0];
             DataRow row2 = table2.NewRow();
             table2.Rows.Add(row2);
             this.gvResult_xmxc.DataSource = table2.DefaultView;
             this.gvResult_xmxc.DataBind();
         }
         ds = DbHelperOra.Query("select * from view_contract_change_list where pd_project_code='" + PD_PROJECT_CODE + "' order by auto_no  ");
         if ((ds != null) && (ds.Tables[0].Rows.Count > 0))
         {
             this.gvResult_HeTong.DataSource = ds;
             this.gvResult_HeTong.DataBind();
         }
         else
         {
             DataTable table3 = new DataTable();
             table3 = ds.Tables[0];
             DataRow row3 = table3.NewRow();
             table3.Rows.Add(row3);
             this.gvResult_HeTong.DataSource = table3.DefaultView;
             this.gvResult_HeTong.DataBind();
         }
         ds = DbHelperOra.Query("select * from v_pd_found_out_xmlist where pd_project_code='" + PD_PROJECT_CODE + "' order by auto_no  ");
         if (this.gvResult_zjbf.Columns.Count == 0)
         {
             PublicDal.setGViewColumns(ds, this.gvResult_zjbf);
         }
         if ((ds != null) && (ds.Tables[0].Rows.Count > 0))
         {
             this.gvResult_zjbf.DataSource = ds;
             this.gvResult_zjbf.DataBind();
         }
         else
         {
             DataTable table4 = new DataTable();
             table4 = ds.Tables[0];
             DataRow row4 = table4.NewRow();
             table4.Rows.Add(row4);
             this.gvResult_zjbf.DataSource = table4.DefaultView;
             this.gvResult_zjbf.DataBind();
         }
     }
     else
     {
         this.RemoveTab();
     }
 }
 private void ShowJGYS(string PD_PROJECT_CODE)
 {
     PD_PROJECT_JGYS_Model modelByProCode = new PD_PROJECT_JGYS_Bll().GetModelByProCode(PD_PROJECT_CODE);
     if (modelByProCode != null)
     {
         this.lblAUTO_NO_JGYS.Text = modelByProCode.AUTO_NO.ToString();
         this.txtPD_PROJECT_COMPLETE_DATE.Value = modelByProCode.PD_PROJECT_COMPLETE_DATE.ToString();
         this.txtPD_PROJECT_YSSQ_DATE.Value = modelByProCode.PD_PROJECT_YSSQ_DATE.Value.ToShortDateString();
         this.txtPD_PROJECT_YS_DATE.Value = modelByProCode.PD_PROJECT_YS_DATE.Value.ToShortDateString();
         this.ddlPD_PROJECT_YS_COMPANY.SelectedValue = modelByProCode.PD_PROJECT_YS_COMPANY;
         this.txtPD_PROJECT_YS_ZRR.Text = modelByProCode.PD_PROJECT_YS_ZRR;
         this.txtPD_PROJECT_YS_NAME.Text = modelByProCode.PD_PROJECT_YS_NAME;
         this.txtPD_PROJECT_YS_SUGGEST.Text = modelByProCode.PD_PROJECT_YS_SUGGEST;
         this.ddlPD_PROJECT_YS_RESULT.SelectedValue = modelByProCode.PD_PROJECT_YS_RESULT;
         this.txtPD_PROJECT_YS_CONDITION.Text = modelByProCode.PD_PROJECT_YS_CONDITION;
     }
 }
Exemplo n.º 4
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);
 }