예제 #1
0
 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);
     }
 }
예제 #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);
     }
 }
예제 #3
0
 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);
 }