protected void Page_Load(object sender, EventArgs e) { ButtonsModel model = null; this.ListPageLoad(this.Page, out model, base.Request["code"]); this.Buttons1_1.BM = model; ButtonsHandler handler = new ButtonsHandler(this.Buttons); handler(this.ibtid.Value); this.ibtid.Value = ""; if (!this.Page.IsPostBack) { DataSet set = new PD_PROJECT_INSPECTION_Bll().HeDuiData(base.Request["code"]); if ((set != null) && (set.Tables[0].Columns.Count > 0)) { this.gvResult.DataKeyNames = new string[] { set.Tables[0].Columns[0].ColumnName }; for (int i = 0; i < set.Tables[0].Columns.Count; i++) { BoundField field = new BoundField { DataField = set.Tables[0].Columns[i].ColumnName, HeaderText = set.Tables[0].Columns[i].ColumnName, SortExpression = set.Tables[0].Columns[i].ColumnName }; field.ItemStyle.HorizontalAlign = HorizontalAlign.Center; this.gvResult.Columns.Add(field); } this.gvResult.DataSource = set; if (set.Tables[0].Rows.Count == 0) { set.Tables[0].Columns[0].DataType = typeof(string); set.Tables[0].Rows.Add(set.Tables[0].NewRow()); set.Tables[0].Rows[0][0] = "无数据"; this.gvResult.DataSource = set; this.gvResult.DataBind(); this.gvResult.Rows[0].Cells[0].ColumnSpan = set.Tables[0].Columns.Count; int num2 = 1; while (num2 < this.gvResult.Rows[0].Cells.Count) { this.gvResult.Rows[0].Cells.Remove(this.gvResult.Rows[0].Cells[num2]); } } else { set.Tables[0].DefaultView.RowFilter = "是否完全符合<>'是'"; DataView defaultView = set.Tables[0].DefaultView; string str = ""; for (int j = 0; j < defaultView.Count; j++) { for (int k = 0; k < set.Tables[0].Columns.Count; k++) { object obj2 = str; str = string.Concat(new object[] { obj2, "【", set.Tables[0].Columns[k].ColumnName, ":", defaultView[j][set.Tables[0].Columns[k].ToString()], "】" }); if (k < (set.Tables[0].Columns.Count - 1)) { str = str + "、"; } } if (j < (defaultView.Count - 1)) { str = str + "\r\n"; } } this.jgjlText_H.Value = str; this.gvResult.DataBind(); } } } }
private void Save() { PD_PROJECT_INSPECTION_Bll bll = new PD_PROJECT_INSPECTION_Bll(); if (base.Request["CCXCDoType"] != null) { if (base.Request["CCXCDoType"] == "update") { if (PublicDal.PageValidate.IsDecimal(this.txtPD_PROJECT_CODE.Value)) { PD_PROJECT_INSPECTION_Model model = bll.GetModel(int.Parse(this.lblAUTO_NO.Text)); this.getModel(model); if (bll.Update(model)) { this.AddImgMethod(model); Const.DoSuccessNoClose("修改成功", this.Page.Request.Url.LocalPath + "?CCXCDoType=look&UpdatePK=" + base.Request["UpdatePK"].ToString(), this.Page); } else { Const.DoSuccessNoClose("修改失败", this.Page.Request.Url.LocalPath + "?CCXCDoType=look&UpdatePK=" + base.Request["UpdatePK"].ToString(), this.Page); } } } else if (base.Request["CCXCDoType"] == "add") { if (base.Request["UpdatePK"] != null) { PD_PROJECT_INSPECTION_Model model2 = new PD_PROJECT_INSPECTION_Model { PD_DB_LOOP = "1", PD_NOW_SERVERPK = PublicDal.SetCreateServiceStream(this.Page) }; this.getModel(model2); this.txt_file.Text.ToString(); if (bll.Add(model2)) { this.AddImgMethod(model2); Const.DoSuccessNoClose("添加成功", this.Page.Request.Url.LocalPath + "?CCXCDoType=look&UpdatePK=" + model2.PD_PROJECT_CODE + "&strTitle=" + base.Request["strTitle"].ToString(), this.Page); } else { Const.DoSuccessNoClose("添加失败", this.Page.Request.Url.LocalPath + "?CCXCDoType=look&UpdatePK=" + base.Request["UpdatePK"].ToString(), this.Page); } } else { PageShowText.Refurbish("主项目信息不明确", this.Page); } } } }
private void ShowInfo(int AUTO_NO_XC) { this.Session["PrintId"] = AUTO_NO_XC.ToString(); PD_PROJECT_INSPECTION_Model model = new PD_PROJECT_INSPECTION_Bll().GetModel(AUTO_NO_XC); if (model != null) { TB_PROJECT_Model model2 = new TB_PROJECT_Bll().GetModel(model.PD_PROJECT_CODE); this.lblAUTO_NO.Text = model.AUTO_NO.ToString(); str_MXID = this.lblAUTO_NO.Text; this.txtPD_PROJECT_CODE.Value = model.PD_PROJECT_CODE; this.txtPD_PROJECT_Name.Value = model2.PD_PROJECT_NAME; this.txtPD_INSPECTION_PROCESS.SelectedValue = model.PD_INSPECTION_PROCESS; this.txtPD_INSPECTION_DATE.Value = model.PD_INSPECTION_DATE.ToString(); this.txtPD_INSPECTION_MANS.Text = model.PD_INSPECTION_MANS; this.txtPD_INSPECTION_ADDR.Text = model.PD_INSPECTION_ADDR; this.txtPD_INSPECTION_CONTENT.Text = model.PD_INSPECTION_CONTENT; this.txtPD_INSPECTION_SUGGEST.Text = model.PD_INSPECTION_SUGGEST; this.txtPD_INSPECTION_CONCLUSION.Text = model.PD_INSPECTION_CONCLUSION; this.txtPD_INSPECTION_PEASANT.Text = model.PD_INSPECTION_PEASANT; this.txtPD_INSPECTION_IDNO.Text = model.PD_INSPECTION_IDNO; this.txtPD_INSPECTION_FFNUM.Text = model.PD_INSPECTION_FFNUM.ToString(); this.txtPD_INSPECTION_FFSTAND.Text = Convert.ToDecimal(!model.PD_INSPECTION_FFSTAND.HasValue ? 0 : model.PD_INSPECTION_FFSTAND).ToString("F2"); this.txtPD_INSPECTION_FFMONEY.Text = Convert.ToDecimal(!model.PD_INSPECTION_FFMONEY.HasValue ? 0 : model.PD_INSPECTION_FFMONEY).ToString("F2"); this.txtPD_INSPECTION_ACCOUNTNO.Text = model.PD_INSPECTION_ACCOUNTNO; this.txtPD_INSPECTION_PEASANT_ADDR.Text = model.PD_INSPECTION_PEASANT_ADDR; this.txtPD_MONITOR_TOTAL_MONEY_PAY.Text = model.PD_MONITOR_TOTAL_MONEY_PAY.Value.ToString(); if (model.PD_BZFFLIST_DATE.HasValue) { this.txtPD_DB_LOOP.Text = model.PD_DB_LOOP; } this.ddlPD_YEAR.SelectedValue = model.PD_YEAR; DataSet ds = new DataSet(); ds.Tables.Add(); ds.Tables[0].Columns.Add("AUTO_NO"); ds.Tables[0].Columns.Add("FILE_NAME"); ds.Tables[0].Columns.Add("FILE_SYSNAME"); if (((model != null) && (model.PD_INSPECTION_FILENAME_SYSTEM != null)) && (model.PD_INSPECTION_FILENAME_SYSTEM.Trim() != "")) { DataRow row = ds.Tables[0].NewRow(); row["AUTO_NO"] = model.AUTO_NO; row["FILE_NAME"] = model.PD_INSPECTION_FILENAME; row["FILE_SYSNAME"] = model.PD_INSPECTION_FILENAME_SYSTEM; ds.Tables[0].Rows.Add(row); } this.json_btData.Value = PublicDal.DataToJSON(ds); this.BindImg(); } }
private void ShowInfo(int AUTO_NO_XC) { this.Session["PrintId"] = AUTO_NO_XC.ToString(); PD_PROJECT_INSPECTION_Model model = new PD_PROJECT_INSPECTION_Bll().GetModel(AUTO_NO_XC); TB_PROJECT_Model model2 = new TB_PROJECT_Bll().GetModel(model.PD_PROJECT_CODE); this.txtPD_PROJECT_CODE.Value = model.PD_PROJECT_CODE; this.txtPD_PROJECT_Name.Value = model2.PD_PROJECT_NAME; this.ddlPD_YEAR.SelectedValue = model.PD_YEAR; this.txtPD_PROJECT_TOTAL_MONEY.Value = model2.PD_PROJECT_MONEY_TOTAL.ToString(); this.Pk = AUTO_NO_XC; this.lblAUTO_NO.Text = model.AUTO_NO; str_MXID = model.AUTO_NO; this.txtPD_PROJECT_CODE.Value = model.PD_PROJECT_CODE; this.txtPD_PROJECT_Name.Value = model2.PD_PROJECT_NAME; this.txtPD_INSPECTION_PROCESS.SelectedValue = model.PD_INSPECTION_PROCESS; this.txtPD_INSPECTION_DATE.Value = model.PD_INSPECTION_DATE.ToString(); this.txtPD_INSPECTION_MANS.Text = model.PD_INSPECTION_MANS; this.txtPD_INSPECTION_ADDR.Text = model.PD_INSPECTION_ADDR; this.txtPD_INSPECTION_CONTENT.Text = model.PD_INSPECTION_CONTENT; this.txtPD_INSPECTION_SUGGEST.Text = model.PD_INSPECTION_SUGGEST; this.txtPD_INSPECTION_CONCLUSION.Text = model.PD_INSPECTION_CONCLUSION; this.txtPD_MONITOR_PROCEED_WCL.Value = model.PD_MONITOR_PROCEED_WCL.ToString(); this.txtPD_DB_LOOP.Text = model.PD_DB_LOOP; this.ddlPD_YEAR.SelectedValue = model.PD_YEAR; DataSet set = DbHelperOra.Query(" select * from pd_found_out where pd_project_code=" + model.PD_PROJECT_CODE + " "); if ((set != null) && (set.Tables[0].Rows.Count > 0)) { this.txtPD_MONITOR_TOTAL_MONEY_PAY.Value = set.Tables[0].Rows[0]["PD_FOUND_MONEY_TOTAL"].ToString(); this.txtPD_MONITOR_TOTAL_MONEY_WCL.Value = set.Tables[0].Rows[0]["PD_FOUND_MONEY_WCL"].ToString(); } DataSet ds = new DataSet(); ds.Tables.Add(); ds.Tables[0].Columns.Add("AUTO_NO"); ds.Tables[0].Columns.Add("FILE_NAME"); ds.Tables[0].Columns.Add("FILE_SYSNAME"); if (((model != null) && (model.PD_INSPECTION_FILENAME_SYSTEM != null)) && (model.PD_INSPECTION_FILENAME_SYSTEM.Trim() != "")) { DataRow row = ds.Tables[0].NewRow(); row["AUTO_NO"] = model.AUTO_NO; row["FILE_NAME"] = model.PD_INSPECTION_FILENAME; row["FILE_SYSNAME"] = model.PD_INSPECTION_FILENAME_SYSTEM; ds.Tables[0].Rows.Add(row); } this.json_btData.Value = PublicDal.DataToJSON(ds); this.BindImg(); }
private void UpdataData(string PD_PROJECT_CODE, string CCXC) { string strErr = ""; if (!this.Panduan(ref strErr)) { this.TabContainer1.ActiveTabIndex = 0; } else { TB_PROJECT_BZ_Bll bll = new TB_PROJECT_BZ_Bll(); TB_PROJECT_BZ_Model model = this.GetModel(bll.GetModel(PD_PROJECT_CODE)); model.PD_PROJECT_CODE = PD_PROJECT_CODE; bll.Update(model); PD_PROJECT_ATTACH_BZ_Bll bll2 = new PD_PROJECT_ATTACH_BZ_Bll(); List<PD_PROJECT_ATTACH_BZ_Model> modelList = this.GetATTACH_BZ_Model(model.PD_PROJECT_CODE); bll2.Delete(model.PD_PROJECT_CODE); bll2.AddList(modelList); PD_PROJECT_INSPECTION_Bll bll3 = new PD_PROJECT_INSPECTION_Bll(); List<PD_PROJECT_INSPECTION_Model> inspectionModel = this.GetInspectionModel(model.PD_PROJECT_CODE); bll3.Delete(model.PD_PROJECT_CODE, " and PD_DB_LOOP=0 "); bll3.AddList(inspectionModel); PageShowText.Refurbish("修改成功", this.Page); } }
private void CreateData(string CCXC) { string strErr = ""; if (!this.Panduan(ref strErr)) { this.TabContainer1.ActiveTabIndex = 0; } else { TB_PROJECT_BZ_Model model = this.GetModel(null); model.PD_PROJECT_SERVERPK = PublicDal.SetCreateServiceStream(this.Page); new TB_PROJECT_BZ_Bll().Add(model); PD_PROJECT_ATTACH_BZ_Bll bll2 = new PD_PROJECT_ATTACH_BZ_Bll(); List<PD_PROJECT_ATTACH_BZ_Model> modelList = this.GetATTACH_BZ_Model(model.PD_PROJECT_CODE); bll2.AddList(modelList); PD_PROJECT_INSPECTION_Bll bll3 = new PD_PROJECT_INSPECTION_Bll(); List<PD_PROJECT_INSPECTION_Model> inspectionModel = this.GetInspectionModel(model.PD_PROJECT_CODE); bll3.AddList(inspectionModel); Const.DoSuccessNoClose("添加成功", this.Page.Request.Url.LocalPath + "?UpdatePK=" + model.PD_PROJECT_CODE, this.Page); } }
private void Bind(string PD_PROJECT_CODE, string CCXC) { DataSet ds = null; PD_PROJECT_INSPECTION_Bll bll = new PD_PROJECT_INSPECTION_Bll(); string strWhere = " 1=0 "; if ((PD_PROJECT_CODE != null) && (PD_PROJECT_CODE != "")) { strWhere = " PD_PROJECT_CODE='" + PD_PROJECT_CODE.Trim() + "'"; } if ((CCXC != null) && (CCXC.Trim() == "1")) { ds = bll.GetList(strWhere); this.json_BzGGXX_Data = PublicDal.DataToJSON(ds); if (ds.Tables[0].Rows.Count > 0) { ds.Tables[0].Rows.Clear(); } DataRow row = ds.Tables[0].NewRow(); ds.Tables[0].Rows.Add(row); this.json_BzGGXX = PublicDal.DataToJSON(ds); } ds = new PD_PROJECT_ATTACH_BZ_Bll().GetList(strWhere); this.json_BzXmzl_Data = PublicDal.DataToJSON(ds); if (ds.Tables[0].Rows.Count > 0) { ds.Tables[0].Rows.Clear(); } DataRow row2 = ds.Tables[0].NewRow(); ds.Tables[0].Rows.Add(row2); this.json_BzXmzl = PublicDal.DataToJSON(ds); }
private void Bind(string PD_PROJECT_CODE) { DataSet list = new PD_CONTRACT_CHANGE_Bll().GetList(" PD_PROJECT_CODE='" + PD_PROJECT_CODE + "'"); this.jsonData_htbggl = PublicDal.DataToJSON(list); if (list.Tables[0].Rows.Count > 0) { list.Tables[0].Rows.Clear(); } DataRow row = list.Tables[0].NewRow(); row["PD_PROJECT_CODE"] = PD_PROJECT_CODE; list.Tables[0].Rows.Add(row); this.json_htbggl = PublicDal.DataToJSON(list); DataSet ds = new PD_PROJECT_CONTRACT_Bll().GetList(" PD_PROJECT_CODE='" + PD_PROJECT_CODE + "'"); this.jsonData_htgl = PublicDal.DataToJSON(ds); if (ds.Tables[0].Rows.Count > 0) { ds.Tables[0].Rows.Clear(); } DataRow row2 = ds.Tables[0].NewRow(); ds.Tables[0].Rows.Add(row2); this.json_htgl = PublicDal.DataToJSON(ds); DataSet set3 = new PD_PROJECT_ATTACH_SS_Bll().GetList(" PD_PROJECT_CODE='" + PD_PROJECT_CODE + "'"); this.jsonData_xmsszl = PublicDal.DataToJSON(set3); if (set3.Tables[0].Rows.Count > 0) { set3.Tables[0].Rows.Clear(); } DataRow row3 = set3.Tables[0].NewRow(); row3[1] = PD_PROJECT_CODE; set3.Tables[0].Rows.Add(row3); this.json_xmsszl = PublicDal.DataToJSON(set3); DataSet set4 = new PD_PROJECT_INSPECTION_Bll().GetList(" PD_PROJECT_CODE='" + PD_PROJECT_CODE + "'"); this.jsonData_xmccxc = PublicDal.DataToJSON(set4); if (set4.Tables[0].Rows.Count > 0) { set4.Tables[0].Rows.Clear(); } DataRow row4 = set4.Tables[0].NewRow(); row4[1] = PD_PROJECT_CODE; set4.Tables[0].Rows.Add(row4); this.json_xmccxc = PublicDal.DataToJSON(set4); }