Ejemplo n.º 1
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();
     }
 }
Ejemplo n.º 2
0
 private void ShowInfo(string PD_PROJECT_CODE)
 {
     TB_PROJECT_Model modelName = new TB_PROJECT_Bll().GetModelName(PD_PROJECT_CODE);
     this.lblPD_PROJECT_CODE.Text = modelName.PD_PROJECT_CODE;
     this.lblPD_PROJECT_NAME.Text = modelName.PD_PROJECT_NAME;
     this.lblPD_YEAR.Text = modelName.PD_YEAR.ToString();
     this.lblPD_YEAR.Attributes.Add("Code", modelName.PD_YEAR.ToString());
     this.lblPD_PROJECT_TYPE.Text = modelName.PD_PROJECT_TYPE_NAME;
     this.lblPD_YEAR.Attributes.Add("Code", modelName.PD_PROJECT_TYPE.ToString());
     this.lblPD_GK_DEPART.Text = "dfd";
     this.lblPD_YEAR.Attributes.Add("Code", modelName.PD_GK_DEPART_ID.ToString());
     this.lblPD_FOUND_XZ.Text = modelName.PD_FOUND_XZ_Name;
     this.lblPD_PROJECT_MONEY_ADDR.Text = modelName.PD_PROJECT_MONEY_ADDR;
     this.lblPD_PROJECT_CONTENT.Text = modelName.PD_PROJECT_CONTENT;
     this.lblPD_PROJECT_XMYT.Text = modelName.PD_PROJECT_XMYT;
     this.lblPD_PROJECT_IFXZGL.Text = (modelName.PD_PROJECT_IFXZGL.ToString() == "1") ? "是" : "否";
     this.lblPD_PROJECT_IFGS.Text = (modelName.PD_PROJECT_IFGS.ToString() == "1") ? "是" : "否";
     this.lblPD_PROJECT_IFGS_BEFORE.Text = (modelName.PD_PROJECT_IFGS_BEFORE.ToString() == "1") ? "是" : "否";
     this.lblPD_PROJECT_OPEN_BODY.Text = modelName.PD_PROJECT_OPEN_BODY;
     this.lblPD_PROJECT_FZR.Text = modelName.PD_PROJECT_FZR;
     this.lblPD_PROJECT_CWFZR.Text = modelName.PD_PROJECT_CWFZR;
     this.lblPD_PROJECT_SYRS.Text = modelName.PD_PROJECT_SYRS.ToString();
     this.lblPD_PROJECT_STATUS.Text = modelName.PD_PROJECT_STATUS_Name;
     this.lblPD_PROJECT_STATUS.Attributes.Add("Code", modelName.PD_PROJECT_STATUS);
     this.lblPD_PROJECT_BEGIN_DATE.Text = modelName.PD_PROJECT_BEGIN_DATE.Value.ToShortDateString();
     this.lblPD_PROJECT_END_DATE.Text = modelName.PD_PROJECT_END_DATE.Value.ToShortDateString();
     this.lblPD_PROJECT_YEARS.Text = modelName.PD_PROJECT_YEARS.ToString() + "月";
     this.lblPD_PROJECT_FILENO_JG.Text = modelName.PD_PROJECT_FILENO_JG;
     this.lblPD_PROJECT_INPUT_COMPANY.Text = modelName.PD_PROJECT_INPUT_COMPANY_Name;
     this.lblPD_PROJECT_INPUT_MAN.Text = modelName.PD_PROJECT_INPUT_MAN;
     this.lblPD_PROJECT_INPUT_DATE.Text = modelName.PD_PROJECT_INPUT_DATE;
     this.lblPD_PROJECT_REPLY_COMPANY.Text = modelName.PD_PROJECT_REPLY_COMPANY_Name;
     this.lblPD_PROJECT_REPLY_MAN2.Text = modelName.PD_PROJECT_REPLY_MAN2;
     this.lblPD_PROJECT_REPLY_DATE.Text = modelName.PD_PROJECT_REPLY_DATE;
     this.lblPD_PROJECT_COUNTRY.Text = modelName.PD_PROJECT_COUNTRY_Name;
     this.lblPD_PROJECT_COUNTRY.Attributes.Add("Code", modelName.PD_PROJECT_COUNTRY);
     this.lblPD_PROJECT_REPLY_COMPANY.Text = modelName.PD_PROJECT_REPLY_COMPANY_Name;
     this.lblPD_PROJECT_FILENO_PF.Text = modelName.PD_PROJECT_FILENO_PF.ToString();
     this.PD_PROJECT_JGJL.Text = modelName.PD_PROJECT_JGJL;
     this.PD_PROJECT_JG_RESULT.Text = modelName.PD_PROJECT_JG_RESULT;
     this.PD_PROJECT_JG_SUGGEST.Text = modelName.PD_PROJECT_JG_SUGGEST;
     this.lblPD_PROJECT_ZJLY.Text = modelName.PD_PROJECT_ZJLY;
     this.lblPD_PROJECT_ZGKJ.Text = modelName.PD_PROJECT_ZGKJ;
     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();
         this.ddlPD_PROJECT_ZTB_IF_ZTB.SelectedValue = modelPROJECT.PD_PROJECT_ZTB_IF_ZTB.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;
     }
 }
Ejemplo n.º 3
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);
 }
Ejemplo n.º 4
0
 private void UpdataData(string PD_PROJECT_CODE)
 {
     List<PD_CONTRACT_CHANGE_Model> list = null;
     List<PD_PROJECT_ATTACH_SS_Model> list2 = null;
     List<PD_PROJECT_CONTRACT_Model> list3 = null;
     List<PD_PROJECT_INSPECTION_Model> list4 = null;
     List<PD_PROJECT_MONITOR_Model> list5 = null;
     PD_PROJECT_ZTB_Model model = new PD_PROJECT_ZTB_Model();
     string errText = "";
     if (!this.GetModel(PD_PROJECT_CODE, ref list, ref list2, ref list3, ref list4, ref list5, ref model, ref errText))
     {
         this.hy_File(list2, list3, list, list5, list4, errText);
     }
     else
     {
         PD_PROJECT_ATTACH_SS_Bll bll = new PD_PROJECT_ATTACH_SS_Bll();
         bll.Delete(PD_PROJECT_CODE);
         bll.AddList(list2);
         PD_PROJECT_ZTB_Bll bll2 = new PD_PROJECT_ZTB_Bll();
         bll2.DeletePROJECT(PD_PROJECT_CODE);
         bll2.Add(model);
         TB_PROJECT_Bll bll3 = new TB_PROJECT_Bll();
         TB_PROJECT_Model model2 = new TB_PROJECT_Model
         {
             PD_PROJECT_CODE = PD_PROJECT_CODE,
             PD_PROJECT_JGJL = this.PD_PROJECT_JGJL.Text,
             PD_PROJECT_JG_RESULT = this.PD_PROJECT_JG_RESULT.Text,
             PD_PROJECT_JG_SUGGEST = this.PD_PROJECT_JG_SUGGEST.Text
         };
         bll3.UpdateJGJL(model2);
         PageShowText.Refurbish("修改成功", this.Page);
     }
 }