private void Save()
 {
     PD_PROJECT_CONTRACT_Bll bll = new PD_PROJECT_CONTRACT_Bll();
     if (base.Request["UpdatePK"] != null)
     {
         if (PublicDal.PageValidate.IsDecimal(base.Request["UpdatePK"]))
         {
             PD_PROJECT_CONTRACT_Model model = bll.GetModel(base.Request["UpdatePK"].ToString());
             this.getModel(model);
             bll.Update(model);
             PageShowText.Refurbish("修改成功", this.Page);
         }
     }
     else if (this.txtPD_PROJECT_CODE.Value != null)
     {
         PD_PROJECT_CONTRACT_Model model2 = new PD_PROJECT_CONTRACT_Model
         {
             PD_DB_LOOP = "1"
         };
         this.getModel(model2);
         model2.PD_NOW_SERVERPK = PublicDal.SetCreateServiceStream(this.Page);
         bll.Add(model2);
         Const.DoSuccessNoClose("添加成功", this.Page.Request.Url.LocalPath + "?UpdatePK=" + model2.AUTO_NO, this.Page);
     }
 }
 private void ShowInfo(string AUTO_NO)
 {
     PD_PROJECT_CONTRACT_Model model = new PD_PROJECT_CONTRACT_Bll().GetModel(AUTO_NO);
     TB_PROJECT_Model model2 = new TB_PROJECT_Bll().GetModel(model.PD_PROJECT_CODE);
     this.txtPD_PROJECT_Name.Value = model2.PD_PROJECT_NAME;
     this.lblAUTO_NO.Text = model.AUTO_NO;
     this.txtPD_PROJECT_CODE.Value = model.PD_PROJECT_CODE;
     this.txtPD_CONTRACT_TYPE.SelectedValue = model.PD_CONTRACT_TYPE;
     this.txtPD_CONTRACT_NO.Value = model.PD_CONTRACT_NO;
     this.txtPD_CONTRACT_DATE.Value = model.PD_CONTRACT_DATE.ToString();
     this.txtPD_CONTRACT_COMPANY.Text = model.PD_CONTRACT_COMPANY;
     this.txtPD_CONTRACT_MOENY.Value = model.PD_CONTRACT_MOENY.ToString();
     this.txtPD_CONTRACT_MOENY_CHANGE.Value = model.PD_CONTRACT_MOENY_CHANGE.ToString();
     this.txtPD_CONTRACT_ASK_LIMIT.Text = model.PD_CONTRACT_ASK_LIMIT;
     this.txtPD_CONTRACT_ASK_PROCEED.Value = model.PD_CONTRACT_ASK_PROCEED;
     this.txtPD_CONTRACT_ASK_PAYMENT.Text = model.PD_CONTRACT_ASK_PAYMENT;
     this.txtPD_CONTRACT_NOTE.Text = model.PD_CONTRACT_NOTE;
     this.txtPD_CONTRACT_NAME.Text = model.PD_CONTRACT_NAME;
     this.txtPD_CONTRACT_TYPE.SelectedValue = model.PD_CONTRACT_TYPE;
     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_CONTRACT_FILENAME_SYSTEM != null)) && (model.PD_CONTRACT_FILENAME_SYSTEM.Trim() != ""))
     {
         DataRow row = ds.Tables[0].NewRow();
         row["AUTO_NO"] = model.AUTO_NO;
         row["FILE_NAME"] = model.PD_CONTRACT_FILENAME;
         row["FILE_SYSNAME"] = model.PD_CONTRACT_FILENAME_SYSTEM;
         ds.Tables[0].Rows.Add(row);
     }
     this.json_btData.Value = PublicDal.DataToJSON(ds);
 }
 private void Save()
 {
     PD_PROJECT_CONTRACT_Bll bll = new PD_PROJECT_CONTRACT_Bll();
     PD_CONTRACT_CHANGE_Bll bll2 = new PD_CONTRACT_CHANGE_Bll();
     if (base.Request["UpdatePK"] != null)
     {
         if (PublicDal.PageValidate.IsDecimal(base.Request["UpdatePK"]))
         {
             PD_PROJECT_CONTRACT_Model model = bll.GetModel(base.Request["UpdatePK"].ToString());
             PD_CONTRACT_CHANGE_Model model2 = new PD_CONTRACT_CHANGE_Model();
             PD_PROJECT_CONTRACT_BAK_Bll bll3 = new PD_PROJECT_CONTRACT_BAK_Bll();
             this.getModel(model, model2);
             if (bll.Update(model))
             {
                 decimal? maxID = bll3.GetMaxID(model.PD_CONTRACT_NO);
                 if (maxID.HasValue)
                 {
                     model2.CONTR_CHANGE_MIAN_ID = maxID.Value;
                 }
                 bll2.Add(model2);
             }
             Const.DoSuccessNoClose("合同变更成功", this.Page.Request.Url.LocalPath + "?UpdatePK=" + base.Request["UpdatePK"].ToString() + "&doType=look&strTitle=" + base.Request["strTitle"].ToString(), this.Page);
             this.Master.btModel.IfUpdate = true;
         }
     }
     else if (this.txtPD_PROJECT_CODE.Value != null)
     {
         PD_PROJECT_CONTRACT_Model model3 = new PD_PROJECT_CONTRACT_Model
         {
             PD_DB_LOOP = "1"
         };
         PD_CONTRACT_CHANGE_Model model4 = new PD_CONTRACT_CHANGE_Model();
         PD_PROJECT_CONTRACT_BAK_Bll bll4 = new PD_PROJECT_CONTRACT_BAK_Bll();
         this.getModel(model3, model4);
         model3.PD_NOW_SERVERPK = PublicDal.SetCreateServiceStream(this.Page);
         bll.Add(model3);
         model4.PD_NOW_SERVERPK = PublicDal.SetCreateServiceStream(this.Page);
         this.getModel_BG(model4, model3);
         decimal? nullable2 = bll4.GetMaxID(model3.PD_CONTRACT_NO);
         if (nullable2.HasValue)
         {
             model4.CONTR_CHANGE_MIAN_ID = nullable2.Value;
         }
         bll2.Add(model4);
         Const.DoSuccessNoClose("添加成功", this.Page.Request.Url.LocalPath + "?UpdatePK=" + model3.AUTO_NO + "&doType=look&strTitle=", this.Page);
     }
 }
 private void UpdateSave()
 {
     PD_PROJECT_CONTRACT_Bll bll = new PD_PROJECT_CONTRACT_Bll();
     PD_CONTRACT_CHANGE_Bll bll2 = new PD_CONTRACT_CHANGE_Bll();
     if ((base.Request["UpdatePK"] != null) && PublicDal.PageValidate.IsDecimal(base.Request["UpdatePK"]))
     {
         PD_PROJECT_CONTRACT_Model model = bll.GetModel(base.Request["UpdatePK"].ToString());
         model.PD_DB_LOOP = "1";
         PD_CONTRACT_CHANGE_Model model2 = new PD_CONTRACT_CHANGE_Model();
         PD_PROJECT_CONTRACT_BAK_Bll bll3 = new PD_PROJECT_CONTRACT_BAK_Bll();
         this.getModel(model, model2);
         model.PD_NOW_SERVERPK = PublicDal.SetCreateServiceStream(this.Page);
         bll.Update(model);
         model2.PD_NOW_SERVERPK = PublicDal.SetCreateServiceStream(this.Page);
         this.getModel_BG(model2, model);
         decimal? maxID = bll3.GetMaxID(model.PD_CONTRACT_NO);
         if (maxID.HasValue)
         {
             model2.CONTR_CHANGE_MIAN_ID = maxID.Value;
         }
         model2.AUTO_NO = auto_nos;
         bll2.Update(model2);
         Const.DoSuccessNoClose("修改成功", this.Page.Request.Url.LocalPath + "?UpdatePK=" + model.AUTO_NO + "&doType=look&strTitle=", this.Page);
     }
 }
 private void DataDelete(string strPK)
 {
     try
     {
         PD_PROJECT_CONTRACT_Bll bll = new PD_PROJECT_CONTRACT_Bll();
         new PD_CONTRACT_CHANGE_Bll().DeletePROJECT(bll.GetModel(base.Request["UpdatePK"].ToString()).PD_PROJECT_CODE);
         bll.Delete(strPK);
         Const.DoSuccessNoClose("删除成功", this.Page.Request.Url.LocalPath + "?UpdatePK=" + strPK + "&doType=look&strTitle=", this.Page);
     }
     catch (Exception exception)
     {
         this.el = new ExceptionLog.ExceptionLog();
         this.el.ErrClassName = base.GetType().ToString();
         this.el.ErrMessage = exception.Message.ToString();
         this.el.ErrMethod = "DataDelete()";
         this.el.WriteExceptionLog(true);
         Const.OpenErrorPage("操作失败,请联系系统管理员!", this.Page);
     }
 }
 private void BindBGList()
 {
     if (base.Request["UpdatePK"] != null)
     {
         DataSet list = new PD_PROJECT_CONTRACT_Bll().GetList(" pd_contract_no='" + Convert.ToInt32(base.Request["UpdatePK"]) + "'");
         if (list != null)
         {
             this.gvResult.DataSource = list.Tables[0];
             this.gvResult.DataBind();
         }
     }
 }
 public void Deleted(string auto_no)
 {
     PD_PROJECT_CONTRACT_Bll bll = new PD_PROJECT_CONTRACT_Bll();
     new PD_CONTRACT_CHANGE_Bll();
     PD_CONTRACT_CHANGE_Bll bll2 = new PD_CONTRACT_CHANGE_Bll();
     if (bll2.Delete(long.Parse(auto_no)))
     {
         string sQLString = "  select   * from PD_PROJECT_CONTRACT_BAK    ORDER by id desc ";
         DataTable table = DbHelperOra.Query(sQLString).Tables[0];
         PD_PROJECT_CONTRACT_Model model = bll.GetModel(base.Request["UpdatePK"].ToString());
         model.PD_DB_LOOP = "1";
         new PD_CONTRACT_CHANGE_Model();
         model.PD_CONTRACT_ASK_PROCEED = table.Rows[0]["PD_CONTRACT_ASK_PROCEED"].ToString();
         model.PD_CONTRACT_ASK_PAYMENT = table.Rows[0]["PD_CONTRACT_ASK_PAYMENT"].ToString();
         model.PD_CONTRACT_NAME = table.Rows[0]["PD_CONTRACT_NAME"].ToString();
         model.PD_CONTRACT_MOENY = new decimal?(decimal.Parse(table.Rows[0]["PD_CONTRACT_MOENY"].ToString()));
         model.PD_CONTRACT_MOENY_CHANGE = new decimal?(decimal.Parse(table.Rows[0]["PD_CONTRACT_MOENY_CHANGE"].ToString()));
         model.PD_CONTRACT_ASK_LIMIT = table.Rows[0]["PD_CONTRACT_ASK_LIMIT"].ToString();
         model.PD_CONTRACT_ASK_PROCEED = table.Rows[0]["PD_CONTRACT_ASK_PROCEED"].ToString();
         model.PD_CONTRACT_ASK_PAYMENT = table.Rows[0]["PD_CONTRACT_ASK_PAYMENT"].ToString();
         model.PD_CONTRACT_NOTE = table.Rows[0]["PD_CONTRACT_NOTE"].ToString();
         bll.Update(model);
         Const.DoSuccessNoClose("删除成功", this.Page.Request.Url.LocalPath + "?UpdatePK=" + model.AUTO_NO + "&doType=look&strTitle=", this.Page);
     }
 }
 private void DataDelete(string strPK)
 {
     try
     {
         PD_PROJECT_CONTRACT_Bll bll = new PD_PROJECT_CONTRACT_Bll();
         new PD_CONTRACT_CHANGE_Bll().DeletePROJECT(bll.GetModel(strPK).PD_PROJECT_CODE);
         bll.Delete(strPK);
         if (this.Master.PageIndex > 1)
         {
             this.pageind = this.Master.PageIndex;
         }
         this.ShowData(this.Master.StrSelect);
     }
     catch (Exception exception)
     {
         this.el = new ExceptionLog.ExceptionLog();
         this.el.ErrClassName = base.GetType().ToString();
         this.el.ErrMessage = exception.Message.ToString();
         this.el.ErrMethod = "DataDelete()";
         this.el.WriteExceptionLog(true);
         Const.OpenErrorPage("操作失败,请联系系统管理员!", this.Page);
     }
 }
Exemple #9
0
 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);
 }