private void UpdataData(string auto_no) { if (this.PanDuan()) { PD_FOUND_OUT_Bll bll = new PD_FOUND_OUT_Bll(); if (bll.Exists(long.Parse(auto_no))) { PD_FOUND_OUT_Model model = this.GetModel(bll.GetModel(long.Parse(auto_no))); bll.Update(model); bll.UpdateLJMoney(model.PD_PROJECT_CODE); PageShowText.Refurbish("修改成功", this.Page); } } }
private void BindList() { DataSet list = new PD_FOUND_OUT_Bll().GetList(""); if ((list != null) && (list.Tables.Count > 0)) { this.gvResult.DataSource = list.Tables[0]; this.gvResult.DataBind(); } }
private void ShowInfo(string _AUTO_ID) { if (!string.IsNullOrEmpty(_AUTO_ID)) { this.AUTO_NO = long.Parse(_AUTO_ID); PD_FOUND_OUT_Bll bll = new PD_FOUND_OUT_Bll(); if (bll.Exists(this.AUTO_NO)) { PD_FOUND_OUT_Model modelName = bll.GetModelName(this.AUTO_NO); this.txtAUTO_NO.Text = modelName.AUTO_NO.ToString(); this.ddlPD_YEAR.SelectedValue = modelName.PD_YEAR.ToString(); this.txtPD_FOUND_DATE.Text = modelName.PD_FOUND_DATE.ToString(); this.ddlPD_IF_HAVE.SelectedValue = modelName.PD_IF_HAVE.ToString(); this.txtPD_PROJECT_CODE.Text = modelName.PD_PROJECT_CODE; this.txtPD_PROJECT_NAME.Text = modelName.PD_PROJECT_NAME; this.txtPD_CONTRACT_COMPANY.Text = modelName.PD_CONTRACT_COMPANY; this.txtPD_FOUND_COMPANY.Text = modelName.PD_FOUND_COMPANY; this.txtPD_CONTRACT_MONEY.Text = modelName.PD_CONTRACT_MONEY.ToString(); this.ddlPD_FOUND_SOURCES.SelectedValue = modelName.PD_FOUND_SOURCES; this.ddlPD_FOUND_TYPE.SelectedValue = modelName.PD_FOUND_TYPE; this.ddlPD_FOUND_STYLE.SelectedValue = modelName.PD_FOUND_STYLE; this.txtPD_FOUND_ACC_TYPE.Text = modelName.PD_FOUND_ACC_TYPE; this.txtPD_FOUND_VOUNO.Text = modelName.PD_FOUND_VOUNO; this.txtPD_FOUND_MONEY.Text = modelName.PD_FOUND_MONEY.ToString(); this.txtPD_FOUND_MONEY_TOTAL.Text = modelName.PD_FOUND_MONEY_TOTAL.Value.ToString("0.00"); if ((modelName.PD_FOUND_MONEY_WCL != null) && (modelName.PD_FOUND_MONEY_WCL.Trim().Length != 0)) { this.txtPD_FOUND_MONEY_WCL.Text = modelName.PD_FOUND_MONEY_WCL + "%"; } else { this.txtPD_FOUND_MONEY_WCL.Text = "0%"; } this.txtPD_FOUND_FILENAME.Text = modelName.PD_FOUND_FILENAME; this.txtPD_FOUND_SYS_FILENAME.Text = modelName.PD_FOUND_SYS_FILENAME; this.txtPD_PROJECT_CONTRACT.Text = modelName.PD_PROJECT_CONTRACT; this.txtPD_PROJECT_MONEY_TOTAL.Text = modelName.PD_PROJECT_MONEY_TOTAL; this.txtPD_FOUND_ACC_TYPE.Text = modelName.PD_PROJECT_GNFL; this.txtPD_FOUND_SYS_JJFL.Text = modelName.PD_PROJECT_JJFL; this.ddlyear.SelectedValue = modelName.PD_PZ_YEAR.ToString(); this.ddlmonth.SelectedValue = modelName.PD_PZ_MONTH.ToString(); this.ddlPD_CONTRACT_TYPE.SelectedValue = modelName.PD_CONTRACT_TYPE.ToString(); this.txtPD_PROJECT_CONTRACT.Text = modelName.PD_PROJECT_CONTRACT; this.txtcontract_name.Text = modelName.PD_PROJECT_CONTRACT_NAME; } } }
private PD_FOUND_OUT_Model GetModel(PD_FOUND_OUT_Model model) { if (model == null) { model = new PD_FOUND_OUT_Model(); PD_FOUND_OUT_Bll bll = new PD_FOUND_OUT_Bll(); decimal num = bll.getProjectJSZJE(this.txtPD_PROJECT_CODE.Text); DateTime? nullable = null; if (PublicDal.PageValidate.IsDateTime(this.txtPD_FOUND_DATE.Text)) { nullable = new DateTime?(DateTime.Parse(this.txtPD_FOUND_DATE.Text)); } decimal num2 = bll.getLJMoney(this.txtPD_PROJECT_CODE.Text, -1L, nullable) + decimal.Parse(this.txtPD_FOUND_MONEY.Text); model.PD_FOUND_MONEY_TOTAL = new decimal?(num2); model.PD_FOUND_MONEY_WCL = ((model.PD_FOUND_MONEY_TOTAL.Value / num) * 100M).ToString("0.00"); } else { PD_FOUND_OUT_Bll bll2 = new PD_FOUND_OUT_Bll(); decimal num3 = bll2.getProjectJSZJE(this.txtPD_PROJECT_CODE.Text); DateTime? nullable2 = null; if (PublicDal.PageValidate.IsDateTime(this.txtPD_FOUND_DATE.Text)) { nullable2 = new DateTime?(DateTime.Parse(this.txtPD_FOUND_DATE.Text)); } decimal num4 = bll2.getLJMoney(this.txtPD_PROJECT_CODE.Text, model.AUTO_NO, nullable2) + decimal.Parse(this.txtPD_FOUND_MONEY.Text); model.PD_FOUND_MONEY_TOTAL = new decimal?(num4); model.PD_FOUND_MONEY_WCL = ((model.PD_FOUND_MONEY_TOTAL.Value / num3) * 100M).ToString("0.00"); } if (PublicDal.PageValidate.IsInt(this.ddlPD_YEAR.SelectedValue)) { model.PD_YEAR = new int?(int.Parse(this.ddlPD_YEAR.SelectedValue)); } if (PublicDal.PageValidate.IsInt(this.ddlmonth.SelectedValue)) { model.PD_PZ_MONTH = new int?(int.Parse(this.ddlmonth.SelectedValue)); } if (PublicDal.PageValidate.IsDateTime(this.txtPD_FOUND_DATE.Text)) { model.PD_FOUND_DATE = new DateTime?(DateTime.Parse(this.txtPD_FOUND_DATE.Text)); } if (PublicDal.PageValidate.IsInt(this.ddlPD_IF_HAVE.SelectedValue)) { model.PD_IF_HAVE = new int?(int.Parse(this.ddlPD_IF_HAVE.SelectedValue)); } model.PD_PROJECT_CODE = this.txtPD_PROJECT_CODE.Text; model.PD_PROJECT_NAME = this.txtPD_PROJECT_NAME.Text; model.PD_CONTRACT_COMPANY = this.txtPD_CONTRACT_COMPANY.Text; model.PD_FOUND_COMPANY = this.txtPD_FOUND_COMPANY.Text; if (PublicDal.PageValidate.IsDecimal(this.txtPD_CONTRACT_MONEY.Text)) { model.PD_CONTRACT_MONEY = new decimal?(decimal.Parse(this.txtPD_CONTRACT_MONEY.Text)); } model.PD_FOUND_SOURCES = this.ddlPD_FOUND_SOURCES.SelectedValue; model.PD_FOUND_TYPE = this.ddlPD_FOUND_TYPE.SelectedValue; model.PD_FOUND_STYLE = this.ddlPD_FOUND_STYLE.SelectedValue; model.PD_FOUND_ACC_TYPE = this.txtPD_FOUND_ACC_TYPE.Text; model.PD_FOUND_VOUNO = this.txtPD_FOUND_VOUNO.Text; if (PublicDal.PageValidate.IsDecimal(this.txtPD_FOUND_MONEY.Text)) { model.PD_FOUND_MONEY = new decimal?(decimal.Parse(this.txtPD_FOUND_MONEY.Text)); } model.PD_FOUND_FILENAME = this.txtPD_FOUND_FILENAME.Text; model.PD_FOUND_SYS_FILENAME = this.txtPD_FOUND_SYS_FILENAME.Text; model.PD_PROJECT_CONTRACT = this.txtPD_PROJECT_CONTRACT.Text; model.PD_CONTRACT_TYPE = this.ddlPD_CONTRACT_TYPE.SelectedValue; model.PD_CONTRACT_NO = this.txtPD_PROJECT_CONTRACT.Text; model.PD_PZ_YEAR = new int?(int.Parse(this.ddlyear.SelectedValue)); return model; }
private void CreateData() { if (this.PanDuan()) { PD_FOUND_OUT_Model model = this.GetModel(null); PD_FOUND_OUT_Bll bll = new PD_FOUND_OUT_Bll(); model.PD_NOW_SERVERPK = PublicDal.SetCreateServiceStream(this.Page); bll.Add(model); bll.UpdateLJMoney(model.PD_PROJECT_CODE); Const.DoSuccessNoClose("添加成功", this.Page.Request.Url.LocalPath + "?UpdatePK=" + model.AUTO_NO, this.Page); } }
public void OutPut_PingZheng(string auto_no) { PD_FOUND_OUT_Bll bll = new PD_FOUND_OUT_Bll(); string str = this.txt_kjkmDB_JF.Value.Trim(); string str2 = this.txt_kjkmDB_DF.Value.Trim(); string fzhs = this.txt_fzhs_DB.Value.Trim(); string databaseName = this.db_name.Value.Trim(); string str5 = bll.OutPut_PingZheng(auto_no, databaseName, str, str2, fzhs); if (str5 == null) { str5 = "拨付成功,已导入凭证"; } PageShowText.Refurbish(str5, this.Page); }
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(); } }