public List<PD_CONTRACT_CHANGE_Model> DataTableToList(DataTable dt)
 {
     List<PD_CONTRACT_CHANGE_Model> list = new List<PD_CONTRACT_CHANGE_Model>();
     int count = dt.Rows.Count;
     if (count > 0)
     {
         for (int i = 0; i < count; i++)
         {
             PD_CONTRACT_CHANGE_Model item = new PD_CONTRACT_CHANGE_Model {
                 AUTO_NO = dt.Rows[i]["AUTO_NO"].ToString(),
                 PD_PROJECT_CODE = dt.Rows[i]["PD_PROJECT_CODE"].ToString()
             };
             if (dt.Rows[i]["PD_CONTRACT_CHANGE_DATE"].ToString() != "")
             {
                 item.PD_CONTRACT_CHANGE_DATE = new DateTime?(DateTime.Parse(dt.Rows[i]["PD_CONTRACT_CHANGE_DATE"].ToString()));
             }
             item.PD_CONTRACT_CHANGE_TYPE = dt.Rows[i]["PD_CONTRACT_CHANGE_TYPE"].ToString();
             item.PD_CONTRACT_CHANGE_REASON = dt.Rows[i]["PD_CONTRACT_CHANGE_REASON"].ToString();
             item.PD_CONTRACT_TYPE = dt.Rows[i]["PD_CONTRACT_TYPE"].ToString();
             item.PD_CONTRACT_NO = dt.Rows[i]["PD_CONTRACT_NO"].ToString();
             if (dt.Rows[i]["PD_CONTRACT_MONEY"].ToString() != "")
             {
                 item.PD_CONTRACT_MONEY = new decimal?(int.Parse(dt.Rows[i]["PD_CONTRACT_MONEY"].ToString()));
             }
             item.PD_CONTRACT_CHANGE_ZJ = dt.Rows[i]["PD_CONTRACT_CHANGE_ZJ"].ToString();
             if (dt.Rows[i]["PD_CONTRACT_CHANGE_MONEY"].ToString() != "")
             {
                 item.PD_CONTRACT_CHANGE_MONEY = new decimal?(int.Parse(dt.Rows[i]["PD_CONTRACT_CHANGE_MONEY"].ToString()));
             }
             item.PD_CONTRACT_CHANGE_FILENAME_SQ = dt.Rows[i]["PD_CONTRACT_CHANGE_FILENAME_SQ"].ToString();
             item.PD_CONTRACT_FILENAME_SYSTEM_SQ = dt.Rows[i]["PD_CONTRACT_FILENAME_SYSTEM_SQ"].ToString();
             item.PD_CONTRACT_FILENO_PF = dt.Rows[i]["PD_CONTRACT_FILENO_PF"].ToString();
             item.PD_CONTRACT_FILENAME_PF = dt.Rows[i]["PD_CONTRACT_FILENAME_PF"].ToString();
             item.PD_CONTRACT_FILENAME_SYS_PF = dt.Rows[i]["PD_CONTRACT_FILENAME_SYS_PF"].ToString();
             if (dt.Rows[i]["PD_CONTRACT_PICI"].ToString() != "")
             {
                 item.PD_CONTRACT_PICI = new int?(int.Parse(dt.Rows[i]["PD_CONTRACT_PICI"].ToString()));
             }
             if (dt.Rows[i]["PD_CONTRACT_STATE"].ToString() != "")
             {
                 item.PD_CONTRACT_STATE = new int?(int.Parse(dt.Rows[i]["PD_CONTRACT_STATE"].ToString()));
             }
             list.Add(item);
         }
     }
     return list;
 }
 public void Add(PD_CONTRACT_CHANGE_Model model)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("insert into PD_CONTRACT_CHANGE(");
     builder.Append("AUTO_NO,PD_PROJECT_CODE,PD_CONTRACT_CHANGE_DATE,PD_CONTRACT_CHANGE_TYPE,PD_CONTRACT_CHANGE_REASON,PD_CONTRACT_TYPE,PD_CONTRACT_NO,PD_CONTRACT_MONEY,PD_CONTRACT_CHANGE_ZJ,PD_CONTRACT_CHANGE_MONEY,PD_CONTRACT_CHANGE_FILENAME_SQ,PD_CONTRACT_FILENAME_SYSTEM_SQ,PD_CONTRACT_FILENO_PF,PD_CONTRACT_FILENAME_PF,PD_CONTRACT_FILENAME_SYS_PF,PD_CONTRACT_PICI,PD_CONTRACT_STATE,PD_CONTRACT_CHANGE_WH,PD_YEAR,PD_NOW_SERVERPK,CONTR_CHANGE_MIAN_ID)");
     builder.Append(" values (");
     builder.Append(":AUTO_NO,:PD_PROJECT_CODE,:PD_CONTRACT_CHANGE_DATE,:PD_CONTRACT_CHANGE_TYPE,:PD_CONTRACT_CHANGE_REASON,:PD_CONTRACT_TYPE,:PD_CONTRACT_NO,:PD_CONTRACT_MONEY,:PD_CONTRACT_CHANGE_ZJ,:PD_CONTRACT_CHANGE_MONEY,:PD_CONTRACT_CHANGE_FILENAME_SQ,:PD_CONTRACT_FILENAME_SYSTEM_SQ,:PD_CONTRACT_FILENO_PF,:PD_CONTRACT_FILENAME_PF,:PD_CONTRACT_FILENAME_SYS_PF,:PD_CONTRACT_PICI,:PD_CONTRACT_STATE,:PD_CONTRACT_CHANGE_WH,:PD_YEAR,:PD_NOW_SERVERPK,:CONTR_CHANGE_MIAN_ID)");
     builder.Append(" RETURNING AUTO_NO INTO :R_Auto_No ");
     OracleParameter[] cmdParms = new OracleParameter[] {
         new OracleParameter(":AUTO_NO", OracleType.Number, 20), new OracleParameter(":PD_PROJECT_CODE", OracleType.VarChar, 0x24), new OracleParameter(":PD_CONTRACT_CHANGE_DATE", OracleType.DateTime), new OracleParameter(":PD_CONTRACT_CHANGE_TYPE", OracleType.VarChar, 30), new OracleParameter(":PD_CONTRACT_CHANGE_REASON", OracleType.VarChar, 200), new OracleParameter(":PD_CONTRACT_TYPE", OracleType.VarChar, 100), new OracleParameter(":PD_CONTRACT_NO", OracleType.VarChar, 100), new OracleParameter(":PD_CONTRACT_MONEY", OracleType.Number, 4), new OracleParameter(":PD_CONTRACT_CHANGE_ZJ", OracleType.VarChar, 200), new OracleParameter(":PD_CONTRACT_CHANGE_MONEY", OracleType.Number, 4), new OracleParameter(":PD_CONTRACT_CHANGE_FILENAME_SQ", OracleType.VarChar, 0xff), new OracleParameter(":PD_CONTRACT_FILENAME_SYSTEM_SQ", OracleType.VarChar, 50), new OracleParameter(":PD_CONTRACT_FILENO_PF", OracleType.VarChar, 50), new OracleParameter(":PD_CONTRACT_FILENAME_PF", OracleType.VarChar, 50), new OracleParameter(":PD_CONTRACT_FILENAME_SYS_PF", OracleType.VarChar, 50), new OracleParameter(":PD_CONTRACT_PICI", OracleType.Number, 4),
         new OracleParameter(":PD_CONTRACT_STATE", OracleType.Number, 4), new OracleParameter(":PD_CONTRACT_CHANGE_WH", OracleType.VarChar, 100), new OracleParameter(":PD_YEAR", OracleType.VarChar, 4), new OracleParameter(":PD_NOW_SERVERPK", OracleType.VarChar, 100), new OracleParameter(":CONTR_CHANGE_MIAN_ID", OracleType.Number, 20), new OracleParameter(":R_Auto_No", OracleType.Number, 20)
      };
     cmdParms[0].Value = model.AUTO_NO;
     cmdParms[1].Value = model.PD_PROJECT_CODE;
     cmdParms[2].Value = model.PD_CONTRACT_CHANGE_DATE;
     cmdParms[3].Value = model.PD_CONTRACT_CHANGE_TYPE;
     cmdParms[4].Value = model.PD_CONTRACT_CHANGE_REASON;
     cmdParms[5].Value = model.PD_CONTRACT_TYPE;
     cmdParms[6].Value = model.PD_CONTRACT_NO;
     cmdParms[7].Value = model.PD_CONTRACT_MONEY;
     cmdParms[8].Value = model.PD_CONTRACT_CHANGE_ZJ;
     cmdParms[9].Value = model.PD_CONTRACT_CHANGE_MONEY;
     cmdParms[10].Value = model.PD_CONTRACT_CHANGE_FILENAME_SQ;
     cmdParms[11].Value = model.PD_CONTRACT_FILENAME_SYSTEM_SQ;
     cmdParms[12].Value = model.PD_CONTRACT_FILENO_PF;
     cmdParms[13].Value = model.PD_CONTRACT_FILENAME_PF;
     cmdParms[14].Value = model.PD_CONTRACT_FILENAME_SYS_PF;
     cmdParms[15].Value = model.PD_CONTRACT_PICI;
     cmdParms[0x10].Value = model.PD_CONTRACT_STATE;
     cmdParms[0x11].Value = model.PD_CONTRACT_CHANGE_WH;
     cmdParms[0x12].Value = model.PD_YEAR;
     cmdParms[0x13].Value = model.PD_NOW_SERVERPK;
     cmdParms[20].Value = model.CONTR_CHANGE_MIAN_ID;
     cmdParms[0x15].Direction = ParameterDirection.Output;
     DbHelperOra.ExecuteSql(builder.ToString(), cmdParms);
     model.AUTO_NO = cmdParms[0x15].Value.ToString();
 }
예제 #3
0
 private void Save()
 {
     PD_CONTRACT_CHANGE_Bll bll = new PD_CONTRACT_CHANGE_Bll();
     if (base.Request["UpdatePK"] != null)
     {
         if (PublicDal.PageValidate.IsDecimal(base.Request["UpdatePK"]))
         {
             PD_CONTRACT_CHANGE_Model model = bll.GetModel(int.Parse(base.Request["UpdatePK"].ToString()));
             this.getModel(model);
             bll.Update(model);
             PageShowText.Refurbish("修改成功", this.Page);
         }
     }
     else if (this.txtPD_PROJECT_CODE.Value != null)
     {
         PD_CONTRACT_CHANGE_Model model2 = new PD_CONTRACT_CHANGE_Model
         {
             PD_DB_LOOP = "1",
             PD_NOW_SERVERPK = PublicDal.SetCreateServiceStream(this.Page)
         };
         this.getModel(model2);
         bll.Add(model2);
         Const.DoSuccessNoClose("添加成功", this.Page.Request.Url.LocalPath + "?UpdatePK=" + model2.AUTO_NO, this.Page);
     }
 }
예제 #4
0
 private void GetQUOTA(PD_CONTRACT_CHANGE_Model model)
 {
     DataSet set = null;
     DataView defaultView = null;
     string s = base.Server.UrlDecode(this.FilePostCtr1.getFileName);
     if ((s != null) && (s.Trim() != ""))
     {
         set = new DataSet();
         XmlTextReader reader = new XmlTextReader(new StringReader(s));
         set.ReadXml(reader);
     }
     if ((set != null) && (set.Tables.Count > 0))
     {
         defaultView = set.Tables[0].DefaultView;
     }
     if (defaultView != null)
     {
         defaultView.RowFilter = " tableID='zxzb_bt' ";
         if (defaultView.Count > 0)
         {
             model.PD_CONTRACT_CHANGE_FILENAME_SQ = defaultView[0]["FileName"].ToString();
             model.PD_CONTRACT_FILENAME_SYSTEM_SQ = defaultView[0]["FileSysName"].ToString();
         }
     }
 }
예제 #5
0
 private void getModel(PD_CONTRACT_CHANGE_Model model)
 {
     model.PD_PROJECT_CODE = this.txtPD_PROJECT_CODE.Value;
     model.PD_CONTRACT_CHANGE_TYPE = this.txtPD_CONTRACT_CHANGE_TYPE.SelectedValue;
     model.PD_CONTRACT_CHANGE_REASON = this.txtPD_CONTRACT_CHANGE_REASON.Text;
     model.PD_CONTRACT_TYPE = this.txtPD_CONTRACT_TYPE.SelectedValue;
     model.PD_CONTRACT_NO = this.txtPD_CONTRACT_NO.Value;
     model.PD_CONTRACT_CHANGE_ZJ = this.txtPD_CONTRACT_CHANGE_ZJ.Value;
     model.PD_CONTRACT_CHANGE_WH = this.txtPD_CONTRACT_CHANGE_WH.Value;
     model.PD_YEAR = this.ddlPD_YEAR.SelectedValue;
     if (PublicDal.PageValidate.IsDateTime(this.txtPD_CONTRACT_CHANGE_DATE.Value))
     {
         model.PD_CONTRACT_CHANGE_DATE = new DateTime?(DateTime.Parse(this.txtPD_CONTRACT_CHANGE_DATE.Value));
     }
     else
     {
         model.PD_CONTRACT_CHANGE_DATE = new DateTime();
     }
     if (PublicDal.PageValidate.IsDecimal(this.txtPD_CONTRACT_MONEY.Value))
     {
         model.PD_CONTRACT_MONEY = new decimal?(decimal.Parse(this.txtPD_CONTRACT_MONEY.Value));
     }
     if (PublicDal.PageValidate.IsDecimal(this.txtPD_CONTRACT_CHANGE_MONEY.Value))
     {
         model.PD_CONTRACT_CHANGE_MONEY = new decimal?(decimal.Parse(this.txtPD_CONTRACT_CHANGE_MONEY.Value));
     }
     this.GetQUOTA(model);
 }
예제 #6
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);
     }
 }
예제 #7
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);
     }
 }
예제 #8
0
 private void getModel_BG(PD_CONTRACT_CHANGE_Model c_model, PD_PROJECT_CONTRACT_Model model)
 {
     if (PublicDal.PageValidate.IsDateTime(this.txtPD_CONTRACT_CHANGE_DATE.Value))
     {
         c_model.PD_CONTRACT_CHANGE_DATE = new DateTime?(Convert.ToDateTime(this.txtPD_CONTRACT_CHANGE_DATE.Value.ToString()));
     }
     if (PublicDal.PageValidate.IsDecimal(this.txtPD_CONTRACT_MOENY.Value))
     {
         c_model.PD_CONTRACT_CHANGE_MONEY = new decimal?(Convert.ToDecimal(this.txtPD_CONTRACT_MOENY.Value));
     }
     c_model.PD_CONTRACT_CHANGE_REASON = this.txtPD_CONTRACT_CHANGE_REASON.Value;
     c_model.PD_CONTRACT_CHANGE_TYPE = this.txtPD_CONTRACT_CHANGE_TYPE.SelectedValue;
     c_model.PD_CONTRACT_CHANGE_WH = this.txtPD_CONTRACT_CHANGE_WH.Value;
     c_model.PD_PROJECT_CODE = model.PD_PROJECT_CODE;
     c_model.PD_CONTRACT_NO = model.PD_CONTRACT_NO;
 }
예제 #9
0
 private void getModel(PD_PROJECT_CONTRACT_Model model, PD_CONTRACT_CHANGE_Model c_model)
 {
     model.PD_PROJECT_CODE = this.txtPD_PROJECT_CODE.Value;
     model.PD_CONTRACT_TYPE = this.txtPD_CONTRACT_TYPE.SelectedValue;
     model.PD_CONTRACT_NO = this.txtPD_CONTRACT_NO.Value;
     model.PD_CONTRACT_COMPANY = this.txtPD_CONTRACT_COMPANY.Text;
     model.PD_CONTRACT_ASK_LIMIT = this.txtPD_CONTRACT_ASK_LIMIT.Text;
     model.PD_CONTRACT_ASK_PROCEED = this.txtPD_CONTRACT_ASK_PROCEED.Value;
     model.PD_CONTRACT_ASK_PAYMENT = this.txtPD_CONTRACT_ASK_PAYMENT.Text;
     model.PD_CONTRACT_NOTE = this.txtPD_CONTRACT_NOTE.Text;
     model.PD_CONTRACT_NAME = this.txtPD_CONTRACT_NAME.Text;
     model.PD_YEAR = this.ddlPD_YEAR.SelectedValue;
     if (PublicDal.PageValidate.IsDateTime(this.txtPD_CONTRACT_DATE.Value))
     {
         model.PD_CONTRACT_DATE = DateTime.Parse(this.txtPD_CONTRACT_DATE.Value);
     }
     if (PublicDal.PageValidate.IsDecimal(this.txtPD_CONTRACT_MOENY.Value))
     {
         decimal? nullable = model.PD_CONTRACT_MOENY;
         decimal num = decimal.Parse(this.txtPD_CONTRACT_MOENY.Value);
         c_model.PD_CONTRACT_CHANGE_MONEY = nullable.HasValue ? new decimal?(nullable.GetValueOrDefault() - num) : null;
         model.PD_CONTRACT_MOENY = new decimal?(decimal.Parse(this.txtPD_CONTRACT_MOENY.Value));
     }
     this.GetQUOTA(model);
     if (PublicDal.PageValidate.IsDateTime(this.txtPD_CONTRACT_CHANGE_DATE.Value))
     {
         c_model.PD_CONTRACT_CHANGE_DATE = new DateTime?(Convert.ToDateTime(this.txtPD_CONTRACT_CHANGE_DATE.Value.ToString()));
     }
     if (PublicDal.PageValidate.IsDecimal(this.txtPD_CONTRACT_MOENY.Value))
     {
         c_model.PD_CONTRACT_CHANGE_MONEY = new decimal?(Convert.ToDecimal(this.txtPD_CONTRACT_MOENY.Value));
     }
     c_model.PD_CONTRACT_NO = this.txtPD_CONTRACT_NO.Value;
     c_model.PD_CONTRACT_CHANGE_REASON = this.txtPD_CONTRACT_CHANGE_REASON.Value;
     c_model.PD_CONTRACT_CHANGE_TYPE = this.txtPD_CONTRACT_CHANGE_TYPE.SelectedValue;
     c_model.PD_CONTRACT_CHANGE_WH = this.txtPD_CONTRACT_CHANGE_WH.Value;
     c_model.PD_CONTRACT_TYPE = this.txtPD_CONTRACT_TYPE.SelectedValue;
     c_model.PD_PROJECT_CODE = model.PD_PROJECT_CODE;
     c_model.PD_CONTRACT_NO = model.PD_CONTRACT_NO;
     this.GetQUOTA(c_model);
 }
 public void Add(PD_CONTRACT_CHANGE_Model model)
 {
     this.dal.Add(model);
 }
 public bool Update(PD_CONTRACT_CHANGE_Model model)
 {
     return this.dal.Update(model);
 }
 public bool Update(PD_CONTRACT_CHANGE_Model model)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("update PD_CONTRACT_CHANGE set ");
     builder.Append("PD_PROJECT_CODE=:PD_PROJECT_CODE,");
     builder.Append("PD_CONTRACT_CHANGE_DATE=:PD_CONTRACT_CHANGE_DATE,");
     builder.Append("PD_CONTRACT_CHANGE_TYPE=:PD_CONTRACT_CHANGE_TYPE,");
     builder.Append("PD_CONTRACT_CHANGE_REASON=:PD_CONTRACT_CHANGE_REASON,");
     builder.Append("PD_CONTRACT_TYPE=:PD_CONTRACT_TYPE,");
     builder.Append("PD_CONTRACT_NO=:PD_CONTRACT_NO,");
     builder.Append("PD_CONTRACT_MONEY=:PD_CONTRACT_MONEY,");
     builder.Append("PD_CONTRACT_CHANGE_ZJ=:PD_CONTRACT_CHANGE_ZJ,");
     builder.Append("PD_CONTRACT_CHANGE_MONEY=:PD_CONTRACT_CHANGE_MONEY,");
     builder.Append("PD_CONTRACT_CHANGE_FILENAME_SQ=:PD_CONTRACT_CHANGE_FILENAME_SQ,");
     builder.Append("PD_CONTRACT_FILENAME_SYSTEM_SQ=:PD_CONTRACT_FILENAME_SYSTEM_SQ,");
     builder.Append("PD_CONTRACT_FILENO_PF=:PD_CONTRACT_FILENO_PF,");
     builder.Append("PD_CONTRACT_FILENAME_PF=:PD_CONTRACT_FILENAME_PF,");
     builder.Append("PD_CONTRACT_FILENAME_SYS_PF=:PD_CONTRACT_FILENAME_SYS_PF,");
     builder.Append("PD_CONTRACT_PICI=:PD_CONTRACT_PICI,");
     builder.Append("PD_CONTRACT_STATE=:PD_CONTRACT_STATE,");
     builder.Append("PD_CONTRACT_CHANGE_WH=:PD_CONTRACT_CHANGE_WH,");
     builder.Append("PD_YEAR=:PD_YEAR,");
     builder.Append("CONTR_CHANGE_MIAN_ID=:CONTR_CHANGE_MIAN_ID");
     builder.Append(" where AUTO_NO=:AUTO_NO ");
     OracleParameter[] cmdParms = new OracleParameter[] {
         new OracleParameter(":PD_PROJECT_CODE", OracleType.VarChar, 0x24), new OracleParameter(":PD_CONTRACT_CHANGE_DATE", OracleType.DateTime), new OracleParameter(":PD_CONTRACT_CHANGE_TYPE", OracleType.VarChar, 30), new OracleParameter(":PD_CONTRACT_CHANGE_REASON", OracleType.VarChar, 200), new OracleParameter(":PD_CONTRACT_TYPE", OracleType.VarChar, 100), new OracleParameter(":PD_CONTRACT_NO", OracleType.VarChar, 100), new OracleParameter(":PD_CONTRACT_MONEY", OracleType.Number, 4), new OracleParameter(":PD_CONTRACT_CHANGE_ZJ", OracleType.VarChar, 200), new OracleParameter(":PD_CONTRACT_CHANGE_MONEY", OracleType.Number, 4), new OracleParameter(":PD_CONTRACT_CHANGE_FILENAME_SQ", OracleType.VarChar, 0xff), new OracleParameter(":PD_CONTRACT_FILENAME_SYSTEM_SQ", OracleType.VarChar, 50), new OracleParameter(":PD_CONTRACT_FILENO_PF", OracleType.VarChar, 50), new OracleParameter(":PD_CONTRACT_FILENAME_PF", OracleType.VarChar, 50), new OracleParameter(":PD_CONTRACT_FILENAME_SYS_PF", OracleType.VarChar, 50), new OracleParameter(":PD_CONTRACT_PICI", OracleType.Number, 4), new OracleParameter(":PD_CONTRACT_STATE", OracleType.Number, 4),
         new OracleParameter(":PD_CONTRACT_CHANGE_WH", OracleType.VarChar, 100), new OracleParameter(":PD_YEAR", OracleType.VarChar, 4), new OracleParameter(":CONTR_CHANGE_MIAN_ID", OracleType.Number, 20), new OracleParameter(":AUTO_NO", OracleType.Number, 20)
      };
     cmdParms[0].Value = model.PD_PROJECT_CODE;
     cmdParms[1].Value = model.PD_CONTRACT_CHANGE_DATE;
     cmdParms[2].Value = model.PD_CONTRACT_CHANGE_TYPE;
     cmdParms[3].Value = model.PD_CONTRACT_CHANGE_REASON;
     cmdParms[4].Value = model.PD_CONTRACT_TYPE;
     cmdParms[5].Value = model.PD_CONTRACT_NO;
     cmdParms[6].Value = model.PD_CONTRACT_MONEY;
     cmdParms[7].Value = model.PD_CONTRACT_CHANGE_ZJ;
     cmdParms[8].Value = model.PD_CONTRACT_CHANGE_MONEY;
     cmdParms[9].Value = model.PD_CONTRACT_CHANGE_FILENAME_SQ;
     cmdParms[10].Value = model.PD_CONTRACT_FILENAME_SYSTEM_SQ;
     cmdParms[11].Value = model.PD_CONTRACT_FILENO_PF;
     cmdParms[12].Value = model.PD_CONTRACT_FILENAME_PF;
     cmdParms[13].Value = model.PD_CONTRACT_FILENAME_SYS_PF;
     cmdParms[14].Value = model.PD_CONTRACT_PICI;
     cmdParms[15].Value = model.PD_CONTRACT_STATE;
     cmdParms[0x10].Value = model.PD_CONTRACT_CHANGE_WH;
     cmdParms[0x11].Value = model.PD_YEAR;
     cmdParms[0x12].Value = model.CONTR_CHANGE_MIAN_ID;
     cmdParms[0x13].Value = model.AUTO_NO;
     return (DbHelperOra.ExecuteSql(builder.ToString(), cmdParms) > 0);
 }
 public PD_CONTRACT_CHANGE_Model GetModel(int AUTO_NO)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("select t.AUTO_NO,t.PD_PROJECT_CODE,PD_CONTRACT_CHANGE_DATE,PD_CONTRACT_CHANGE_TYPE,PD_CONTRACT_CHANGE_REASON,t.PD_CONTRACT_TYPE,t.PD_CONTRACT_NO,PD_CONTRACT_MONEY,PD_CONTRACT_CHANGE_ZJ,PD_CONTRACT_CHANGE_MONEY,PD_CONTRACT_CHANGE_FILENAME_SQ,PD_CONTRACT_FILENAME_SYSTEM_SQ,PD_CONTRACT_FILENO_PF,PD_CONTRACT_FILENAME_PF,PD_CONTRACT_FILENAME_SYS_PF,PD_CONTRACT_PICI,PD_CONTRACT_STATE,PD_CONTRACT_CHANGE_WH,t.PD_YEAR,contract.pd_contract_name PD_CONTRACT_NO_Name,CONTR_CHANGE_MIAN_ID ");
     builder.Append(" from PD_CONTRACT_CHANGE t  ");
     builder.Append(" left join PD_PROJECT_CONTRACT contract on contract.PD_CONTRACT_NO=t.PD_CONTRACT_NO ");
     builder.Append(" where t.AUTO_NO=:AUTO_NO ");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":AUTO_NO", OracleType.Number, 20) };
     cmdParms[0].Value = AUTO_NO;
     PD_CONTRACT_CHANGE_Model model = new PD_CONTRACT_CHANGE_Model();
     DataSet set = DbHelperOra.Query(builder.ToString(), cmdParms);
     if (set.Tables[0].Rows.Count <= 0)
     {
         return null;
     }
     model.AUTO_NO = set.Tables[0].Rows[0]["AUTO_NO"].ToString();
     model.PD_PROJECT_CODE = set.Tables[0].Rows[0]["PD_PROJECT_CODE"].ToString();
     if (set.Tables[0].Rows[0]["PD_CONTRACT_CHANGE_DATE"].ToString() != "")
     {
         model.PD_CONTRACT_CHANGE_DATE = new DateTime?(DateTime.Parse(set.Tables[0].Rows[0]["PD_CONTRACT_CHANGE_DATE"].ToString()));
     }
     model.PD_CONTRACT_CHANGE_TYPE = set.Tables[0].Rows[0]["PD_CONTRACT_CHANGE_TYPE"].ToString();
     model.PD_CONTRACT_CHANGE_REASON = set.Tables[0].Rows[0]["PD_CONTRACT_CHANGE_REASON"].ToString();
     model.PD_CONTRACT_TYPE = set.Tables[0].Rows[0]["PD_CONTRACT_TYPE"].ToString();
     model.PD_CONTRACT_NO = set.Tables[0].Rows[0]["PD_CONTRACT_NO"].ToString();
     model.PD_CONTRACT_NO_Name = set.Tables[0].Rows[0]["PD_CONTRACT_NO_Name"].ToString();
     if (set.Tables[0].Rows[0]["PD_CONTRACT_MONEY"].ToString() != "")
     {
         model.PD_CONTRACT_MONEY = new decimal?(decimal.Parse(set.Tables[0].Rows[0]["PD_CONTRACT_MONEY"].ToString()));
     }
     model.PD_CONTRACT_CHANGE_ZJ = set.Tables[0].Rows[0]["PD_CONTRACT_CHANGE_ZJ"].ToString();
     if (set.Tables[0].Rows[0]["PD_CONTRACT_CHANGE_MONEY"].ToString() != "")
     {
         model.PD_CONTRACT_CHANGE_MONEY = new decimal?(decimal.Parse(set.Tables[0].Rows[0]["PD_CONTRACT_CHANGE_MONEY"].ToString()));
     }
     model.PD_CONTRACT_CHANGE_FILENAME_SQ = set.Tables[0].Rows[0]["PD_CONTRACT_CHANGE_FILENAME_SQ"].ToString();
     model.PD_CONTRACT_FILENAME_SYSTEM_SQ = set.Tables[0].Rows[0]["PD_CONTRACT_FILENAME_SYSTEM_SQ"].ToString();
     model.PD_CONTRACT_FILENO_PF = set.Tables[0].Rows[0]["PD_CONTRACT_FILENO_PF"].ToString();
     model.PD_CONTRACT_FILENAME_PF = set.Tables[0].Rows[0]["PD_CONTRACT_FILENAME_PF"].ToString();
     model.PD_CONTRACT_FILENAME_SYS_PF = set.Tables[0].Rows[0]["PD_CONTRACT_FILENAME_SYS_PF"].ToString();
     if (set.Tables[0].Rows[0]["PD_CONTRACT_PICI"].ToString() != "")
     {
         model.PD_CONTRACT_PICI = new int?(int.Parse(set.Tables[0].Rows[0]["PD_CONTRACT_PICI"].ToString()));
     }
     if (set.Tables[0].Rows[0]["PD_CONTRACT_STATE"].ToString() != "")
     {
         model.PD_CONTRACT_STATE = new int?(int.Parse(set.Tables[0].Rows[0]["PD_CONTRACT_STATE"].ToString()));
     }
     model.PD_CONTRACT_CHANGE_WH = set.Tables[0].Rows[0]["PD_CONTRACT_CHANGE_WH"].ToString();
     model.PD_YEAR = set.Tables[0].Rows[0]["PD_YEAR"].ToString();
     if (set.Tables[0].Rows[0]["CONTR_CHANGE_MIAN_ID"].ToString() != "")
     {
         model.CONTR_CHANGE_MIAN_ID = decimal.Parse(set.Tables[0].Rows[0]["CONTR_CHANGE_MIAN_ID"].ToString());
     }
     return model;
 }
예제 #14
0
 private List<PD_CONTRACT_CHANGE_Model> GetChangeModel(string PD_PROJECT_CODE, ref string strErr)
 {
     List<PD_CONTRACT_CHANGE_Model> list = new List<PD_CONTRACT_CHANGE_Model>();
     if (base.Request.Form["htbggl_PD_PROJECT_CODE"] != null)
     {
         string[] strArray = base.Request.Form["htbggl_PD_CONTRACT_PICI"].Split(new char[] { ',' });
         base.Request.Form["htbggl_AUTO_NO"].Split(new char[] { ',' });
         string[] strArray2 = base.Request.Form["htbggl_PD_CONTRACT_NO"].Split(new char[] { ',' });
         string[] strArray3 = base.Request.Form["htbggl_PD_PROJECT_CODE"].Split(new char[] { ',' });
         string[] strArray4 = base.Request.Form["htbggl_PD_CONTRACT_CHANGE_DATE"].Split(new char[] { ',' });
         string[] strArray5 = base.Request.Form["htbggl_PD_CONTRACT_CHANGE_REASON"].Split(new char[] { ',' });
         string[] strArray6 = base.Request.Form["htbggl_PD_CONTRACT_MONEY"].Split(new char[] { ',' });
         string[] strArray7 = base.Request.Form["htbggl_PD_CONTRACT_CHANGE_ZJ"].Split(new char[] { ',' });
         string[] strArray8 = base.Request.Form["htbggl_PD_CONTRACT_CHANGE_MONEY"].Split(new char[] { ',' });
         string[] strArray9 = base.Request.Form["htbggl_PD_CONTRACT_STATE"].Split(new char[] { ',' });
         DataSet set = null;
         DataView defaultView = null;
         string s = base.Server.UrlDecode(this.FilePostCtr1.getFileName);
         if ((s != null) && (s.Trim() != ""))
         {
             set = new DataSet();
             XmlTextReader reader = new XmlTextReader(new StringReader(s));
             set.ReadXml(reader);
         }
         if ((set != null) && (set.Tables.Count > 0))
         {
             defaultView = set.Tables[0].DefaultView;
         }
         for (int i = 0; i < strArray3.Length; i++)
         {
             PD_CONTRACT_CHANGE_Model item = new PD_CONTRACT_CHANGE_Model
             {
                 PD_CONTRACT_PICI = new int?(int.Parse(strArray[i])),
                 PD_PROJECT_CODE = PD_PROJECT_CODE,
                 AUTO_NO = i.ToString(),
                 PD_CONTRACT_NO = strArray2[i],
                 PD_CONTRACT_CHANGE_DATE = new DateTime?(DateTime.Parse(strArray4[i])),
                 PD_CONTRACT_CHANGE_REASON = strArray5[i],
                 PD_CONTRACT_MONEY = new decimal?(int.Parse(strArray6[i])),
                 PD_CONTRACT_CHANGE_ZJ = strArray7[i],
                 PD_CONTRACT_CHANGE_MONEY = new decimal?(int.Parse(strArray8[i])),
                 PD_CONTRACT_STATE = new int?(int.Parse(strArray9[i]))
             };
             if (defaultView != null)
             {
                 defaultView.RowFilter = " tableID='table_htbggl' and rowIndex=" + (i + 1);
                 if (defaultView.Count > 0)
                 {
                     item.PD_CONTRACT_CHANGE_FILENAME_SQ = defaultView[0]["FileName"].ToString();
                     item.PD_CONTRACT_FILENAME_SYSTEM_SQ = defaultView[0]["FileSysName"].ToString();
                 }
             }
             list.Add(item);
         }
     }
     return list;
 }