Example #1
0
 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);
     }
 }
Example #2
0
 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);
     }
 }
Example #3
0
 private void ShowInfo(int AUTO_NO, int AUTO_NO_BG)
 {
     decimal iD = -1M;
     if (AUTO_NO_BG != -1)
     {
         PD_CONTRACT_CHANGE_Model model = new PD_CONTRACT_CHANGE_Bll().GetModel(AUTO_NO_BG);
         if (model == null)
         {
             return;
         }
         iD = model.CONTR_CHANGE_MIAN_ID;
         if (model.PD_CONTRACT_CHANGE_DATE.HasValue)
         {
             this.txtPD_CONTRACT_CHANGE_DATE.Value = model.PD_CONTRACT_CHANGE_DATE.Value.ToString("yyyy/MM/dd");
         }
         if (model.PD_CONTRACT_CHANGE_TYPE == null)
         {
             this.txtPD_CONTRACT_CHANGE_TYPE.SelectedIndex = 0;
         }
         else
         {
             this.txtPD_CONTRACT_CHANGE_TYPE.SelectedValue = model.PD_CONTRACT_CHANGE_TYPE;
         }
         this.txtPD_CONTRACT_CHANGE_REASON.Value = model.PD_CONTRACT_CHANGE_REASON;
         this.txtPD_CONTRACT_TYPE.SelectedValue = model.PD_CONTRACT_TYPE;
         this.txtPD_CONTRACT_NO.Value = model.PD_CONTRACT_NO;
         this.txtPD_CONTRACT_CHANGE_WH.Value = model.PD_CONTRACT_CHANGE_WH.ToString();
         if (model.PD_YEAR != "")
         {
             this.ddlPD_YEAR.SelectedValue = model.PD_YEAR.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_CONTRACT_FILENAME_SYSTEM_SQ != null)) && (model.PD_CONTRACT_FILENAME_SYSTEM_SQ.Trim() != ""))
         {
             DataRow row = ds.Tables[0].NewRow();
             row["AUTO_NO"] = model.AUTO_NO;
             row["FILE_NAME"] = model.PD_CONTRACT_CHANGE_FILENAME_SQ;
             row["FILE_SYSNAME"] = model.PD_CONTRACT_FILENAME_SYSTEM_SQ;
             ds.Tables[0].Rows.Add(row);
         }
         this.json_btData2.Value = base.Server.UrlEncode(PublicDal.DataToJSON(ds));
     }
     PD_PROJECT_CONTRACT_BAK_Model model2 = new PD_PROJECT_CONTRACT_BAK_Bll().GetModel(iD);
     TB_PROJECT_Bll bll3 = new TB_PROJECT_Bll();
     if (model2 != null)
     {
         TB_PROJECT_Model model3 = bll3.GetModel(model2.PD_PROJECT_CODE);
         this.txtPD_PROJECT_Name.Value = model3.PD_PROJECT_NAME;
         this.lblAUTO_NO.Text = model2.ID.ToString("0");
         this.txtPD_PROJECT_CODE.Value = model2.PD_PROJECT_CODE;
         this.txtPD_CONTRACT_TYPE.SelectedValue = model2.PD_CONTRACT_TYPE;
         this.txtPD_CONTRACT_NO.Value = model2.PD_CONTRACT_NO;
         this.txtPD_CONTRACT_DATE.Value = model2.PD_CONTRACT_DATE.ToString();
         this.txtPD_CONTRACT_COMPANY.Text = model2.PD_CONTRACT_COMPANY;
         this.txtPD_CONTRACT_MOENY.Value = model2.PD_CONTRACT_MOENY.ToString();
         this.txtPD_CONTRACT_ASK_LIMIT.Text = model2.PD_CONTRACT_ASK_LIMIT;
         this.txtPD_CONTRACT_ASK_PROCEED.Value = model2.PD_CONTRACT_ASK_PROCEED;
         this.txtPD_CONTRACT_ASK_PAYMENT.Text = model2.PD_CONTRACT_ASK_PAYMENT;
         this.txtPD_CONTRACT_NOTE.Text = model2.PD_CONTRACT_NOTE;
         this.txtPD_CONTRACT_NAME.Text = model2.PD_CONTRACT_NAME;
         this.txtPD_CONTRACT_TYPE.SelectedValue = model2.PD_CONTRACT_TYPE;
         if (model2.PD_YEAR.HasValue)
         {
             this.ddlPD_YEAR.SelectedValue = model2.PD_YEAR.Value.ToString();
         }
         DataSet set2 = new DataSet();
         set2.Tables.Add();
         set2.Tables[0].Columns.Add("AUTO_NO");
         set2.Tables[0].Columns.Add("FILE_NAME");
         set2.Tables[0].Columns.Add("FILE_SYSNAME");
         if (((model2 != null) && (model2.PD_CONTRACT_FILENAME_SYSTEM != null)) && (model2.PD_CONTRACT_FILENAME_SYSTEM.Trim() != ""))
         {
             DataRow row2 = set2.Tables[0].NewRow();
             row2["AUTO_NO"] = model2.ID;
             row2["FILE_NAME"] = model2.PD_CONTRACT_FILENAME;
             row2["FILE_SYSNAME"] = model2.PD_CONTRACT_FILENAME_SYSTEM;
             set2.Tables[0].Rows.Add(row2);
         }
         this.json_btData.Value = base.Server.UrlEncode(PublicDal.DataToJSON(set2));
     }
 }
Example #4
0
 public static bool PanDuanHeTongJinE(string PD_PROJECT_CODE, string PD_CONTRACT_MOENY, string Contract_Code)
 {
     PD_PROJECT_CONTRACT_BAK_Bll bll = new PD_PROJECT_CONTRACT_BAK_Bll();
     return bll.GetPd_Contract_Moeny_Total(PD_PROJECT_CODE, PD_CONTRACT_MOENY, Contract_Code);
 }