Beispiel #1
0
 private void SaveBDData(string PD_PROJECT_CODE)
 {
     TB_PROJECT_BZ_Bll bll = new TB_PROJECT_BZ_Bll();
     TB_PROJECT_BZ_Model model = bll.GetModel(PD_PROJECT_CODE);
     model.PD_PROJECT_JGJL = this.jgjlText_H.Value;
     if (bll.Update(model))
     {
         PageShowText.ShowMessage("保存成功!", this.Page);
     }
     else
     {
         PageShowText.ShowMessage("保存失败!", this.Page);
     }
 }
Beispiel #2
0
 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);
     }
 }
 protected void ShowData_Input()
 {
     string showText = null;
     try
     {
         string s = base.Server.UrlDecode(this.FilePostCtr1.getFileName);
         string path = null;
         DataSet set = null;
         if ((s != null) && (s.Trim() != ""))
         {
             set = new DataSet();
             XmlTextReader reader = new XmlTextReader(new StringReader(s));
             set.ReadXml(reader);
             path = base.Server.MapPath("~/temp/" + set.Tables[0].Rows[0]["FileSysName"]);
         }
         else
         {
             showText = "请先选择需要导入的Excel文件";
         }
         if ((set != null) && File.Exists(path))
         {
             DataSet dataSet = ExcelToDataset.GetDataSet(path);
             showText = new TB_PROJECT_BZ_Bll().InputData(dataSet);
             if (showText != "")
             {
                 showText = "以下记录未导入成功:" + showText;
             }
             else
             {
                 showText = "导入成功!";
             }
             File.Delete(path);
         }
         else
         {
             showText = "请先选择需要导入的Excel文件";
         }
     }
     catch (Exception exception)
     {
         this.el = new ExceptionLog.ExceptionLog();
         this.el.ErrClassName = base.GetType().ToString();
         this.el.ErrMessage = exception.Message.ToString();
         this.el.ErrMethod = "bind()";
         this.el.WriteExceptionLog(true);
         showText = "导入出现异常:" + exception;
     }
     this.FilePostCtr1.getFileName = "";
     this.JS_BindShow(showText);
 }
Beispiel #4
0
 private void ShowInfo(string PD_PROJECT_CODE)
 {
     TB_PROJECT_BZ_Model modelName = new TB_PROJECT_BZ_Bll().GetModelName(PD_PROJECT_CODE);
     this.lblPD_PROJECT_FILENO_ZB.Text = modelName.PD_PROJECT_FILENO_ZB;
     this.txtPD_PROJECT_FILENO_ZB.Value = modelName.PD_PROJECT_FILENO_ZB_CODE;
     this.lblPD_PROJECT_CODE.Value = modelName.PD_PROJECT_CODE;
     this.txtPD_PROJECT_NAME.Text = modelName.PD_PROJECT_NAME;
     this.ddlPD_YEAR.SelectedValue = modelName.PD_YEAR.ToString();
     this.ddlPD_PROJECT_TYPE.SelectedValue = modelName.PD_PROJECT_TYPE;
     this.ddlPD_GK_DEPART.SelectedValue = modelName.PD_GK_DEPART;
     this.ddlPD_FOUND_XZ.SelectedValue = modelName.PD_FOUND_XZ;
     this.ddlPD_PROJECT_IFGS.SelectedValue = modelName.PD_PROJECT_IFGS.ToString();
     this.ddlPD_PROJECT_IFGS_BEFORE.SelectedValue = modelName.PD_PROJECT_IFGS_BEFORE.ToString();
     this.txtPD_PROJECT_OPEN_BODY.Text = modelName.PD_PROJECT_OPEN_BODY;
     this.ddlPD_PROJECT_STATUS.SelectedValue = modelName.PD_PROJECT_STATUS;
     this.txtPD_PROJECT_FILENO_JG.Text = modelName.PD_PROJECT_FILENO_JG;
     this.txtPD_PROJECT_INPUT_COMPANY.Text = modelName.PD_PROJECT_INPUT_COMPANY;
     this.txtPD_PROJECT_INPUT_MAN.Text = modelName.PD_PROJECT_INPUT_MAN;
     this.txtPD_PROJECT_INPUT_DATE.Text = modelName.PD_PROJECT_INPUT_DATE;
     this.txtPD_PROJECT_BZYJ.Text = modelName.PD_PROJECT_BZYJ;
     this.txtPD_PROJECT_BZFW.Text = modelName.PD_PROJECT_BZFW;
     this.txtPD_PROJECT_BZDX.Text = modelName.PD_PROJECT_BZDX;
     this.txtPD_PROJECT_BZNUM.Text = modelName.PD_PROJECT_BZNUM.ToString();
     this.txtPD_PROJECT_BZSTAND_NUM.Text = modelName.PD_PROJECT_BZSTAND_NUM.ToString();
     this.txtPD_PROJECT_BZMONEY.Text = Convert.ToDecimal(!modelName.PD_PROJECT_BZMONEY.HasValue ? 0 : modelName.PD_PROJECT_BZMONEY).ToString("F2");
     this.txtPD_PROJECT_BZFF_DATE.Text = modelName.PD_PROJECT_BZFF_DATE.ToString();
     this.txtPD_PROJECT_SJFF_DATE.Text = modelName.PD_PROJECT_SJFF_DATE.ToString();
     this.ddlPD_PROJECT_IFFF.SelectedValue = modelName.PD_PROJECT_IFFF.ToString();
     this.txtPD_PROJECT_JGYQ.Text = modelName.PD_PROJECT_JGYQ;
     this.txtPD_PROJECT_JGJL.Text = modelName.PD_PROJECT_JGJL;
     this.txtPD_PROJECT_JG_RESULT.Text = modelName.PD_PROJECT_JG_RESULT;
 }