public bool Add(PD_PROJECT_CONTRACT_BAK_Model model)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("insert into PD_PROJECT_CONTRACT_BAK(");
     builder.Append("ID,PD_PROJECT_CODE,PD_CONTRACT_TYPE,PD_CONTRACT_NO,PD_CONTRACT_DATE,PD_CONTRACT_COMPANY,PD_CONTRACT_MOENY,PD_CONTRACT_MOENY_CHANGE,PD_CONTRACT_ASK_LIMIT,PD_CONTRACT_ASK_PROCEED,PD_CONTRACT_ASK_PAYMENT,PD_CONTRACT_NOTE,PD_CONTRACT_FILENAME,PD_CONTRACT_FILENAME_SYSTEM,PD_CONTRACT_NAME,PD_DB_LOOP,PD_YEAR,PD_NOW_SERVERPK)");
     builder.Append(" values (");
     builder.Append(":ID,:PD_PROJECT_CODE,:PD_CONTRACT_TYPE,:PD_CONTRACT_NO,:PD_CONTRACT_DATE,:PD_CONTRACT_COMPANY,:PD_CONTRACT_MOENY,:PD_CONTRACT_MOENY_CHANGE,:PD_CONTRACT_ASK_LIMIT,:PD_CONTRACT_ASK_PROCEED,:PD_CONTRACT_ASK_PAYMENT,:PD_CONTRACT_NOTE,:PD_CONTRACT_FILENAME,:PD_CONTRACT_FILENAME_SYSTEM,:PD_CONTRACT_NAME,:PD_DB_LOOP,:PD_YEAR,:PD_NOW_SERVERPK)");
     OracleParameter[] cmdParms = new OracleParameter[] {
         new OracleParameter(":ID", OracleType.Number, 20), new OracleParameter(":PD_PROJECT_CODE", OracleType.VarChar, 0x24), new OracleParameter(":PD_CONTRACT_TYPE", OracleType.VarChar, 30), new OracleParameter(":PD_CONTRACT_NO", OracleType.VarChar, 30), new OracleParameter(":PD_CONTRACT_DATE", OracleType.DateTime), new OracleParameter(":PD_CONTRACT_COMPANY", OracleType.VarChar, 50), new OracleParameter(":PD_CONTRACT_MOENY", OracleType.Number, 0x12), new OracleParameter(":PD_CONTRACT_MOENY_CHANGE", OracleType.Number, 0x12), new OracleParameter(":PD_CONTRACT_ASK_LIMIT", OracleType.VarChar, 500), new OracleParameter(":PD_CONTRACT_ASK_PROCEED", OracleType.VarChar, 500), new OracleParameter(":PD_CONTRACT_ASK_PAYMENT", OracleType.VarChar, 500), new OracleParameter(":PD_CONTRACT_NOTE", OracleType.VarChar, 500), new OracleParameter(":PD_CONTRACT_FILENAME", OracleType.VarChar, 50), new OracleParameter(":PD_CONTRACT_FILENAME_SYSTEM", OracleType.VarChar, 50), new OracleParameter(":PD_CONTRACT_NAME", OracleType.VarChar, 100), new OracleParameter(":PD_DB_LOOP", OracleType.Char, 1),
         new OracleParameter(":PD_YEAR", OracleType.Number, 4), new OracleParameter(":PD_NOW_SERVERPK", OracleType.VarChar, 50)
      };
     cmdParms[0].Value = model.ID;
     cmdParms[1].Value = model.PD_PROJECT_CODE;
     cmdParms[2].Value = model.PD_CONTRACT_TYPE;
     cmdParms[3].Value = model.PD_CONTRACT_NO;
     cmdParms[4].Value = model.PD_CONTRACT_DATE;
     cmdParms[5].Value = model.PD_CONTRACT_COMPANY;
     cmdParms[6].Value = model.PD_CONTRACT_MOENY;
     cmdParms[7].Value = model.PD_CONTRACT_MOENY_CHANGE;
     cmdParms[8].Value = model.PD_CONTRACT_ASK_LIMIT;
     cmdParms[9].Value = model.PD_CONTRACT_ASK_PROCEED;
     cmdParms[10].Value = model.PD_CONTRACT_ASK_PAYMENT;
     cmdParms[11].Value = model.PD_CONTRACT_NOTE;
     cmdParms[12].Value = model.PD_CONTRACT_FILENAME;
     cmdParms[13].Value = model.PD_CONTRACT_FILENAME_SYSTEM;
     cmdParms[14].Value = model.PD_CONTRACT_NAME;
     cmdParms[15].Value = model.PD_DB_LOOP;
     cmdParms[0x10].Value = model.PD_YEAR;
     cmdParms[0x11].Value = model.PD_NOW_SERVERPK;
     return (DbHelperOra.ExecuteSql(builder.ToString(), cmdParms) > 0);
 }
 public PD_PROJECT_CONTRACT_BAK_Model DataRowToModel(DataRow row)
 {
     PD_PROJECT_CONTRACT_BAK_Model model = new PD_PROJECT_CONTRACT_BAK_Model();
     if (row != null)
     {
         if ((row["ID"] != null) && (row["ID"].ToString() != ""))
         {
             model.ID = decimal.Parse(row["ID"].ToString());
         }
         if (row["PD_PROJECT_CODE"] != null)
         {
             model.PD_PROJECT_CODE = row["PD_PROJECT_CODE"].ToString();
         }
         if (row["PD_CONTRACT_TYPE"] != null)
         {
             model.PD_CONTRACT_TYPE = row["PD_CONTRACT_TYPE"].ToString();
         }
         if (row["PD_CONTRACT_NO"] != null)
         {
             model.PD_CONTRACT_NO = row["PD_CONTRACT_NO"].ToString();
         }
         if ((row["PD_CONTRACT_DATE"] != null) && (row["PD_CONTRACT_DATE"].ToString() != ""))
         {
             model.PD_CONTRACT_DATE = new DateTime?(DateTime.Parse(row["PD_CONTRACT_DATE"].ToString()));
         }
         if (row["PD_CONTRACT_COMPANY"] != null)
         {
             model.PD_CONTRACT_COMPANY = row["PD_CONTRACT_COMPANY"].ToString();
         }
         if ((row["PD_CONTRACT_MOENY"] != null) && (row["PD_CONTRACT_MOENY"].ToString() != ""))
         {
             model.PD_CONTRACT_MOENY = new decimal?(decimal.Parse(row["PD_CONTRACT_MOENY"].ToString()));
         }
         if ((row["PD_CONTRACT_MOENY_CHANGE"] != null) && (row["PD_CONTRACT_MOENY_CHANGE"].ToString() != ""))
         {
             model.PD_CONTRACT_MOENY_CHANGE = new decimal?(decimal.Parse(row["PD_CONTRACT_MOENY_CHANGE"].ToString()));
         }
         if (row["PD_CONTRACT_ASK_LIMIT"] != null)
         {
             model.PD_CONTRACT_ASK_LIMIT = row["PD_CONTRACT_ASK_LIMIT"].ToString();
         }
         if (row["PD_CONTRACT_ASK_PROCEED"] != null)
         {
             model.PD_CONTRACT_ASK_PROCEED = row["PD_CONTRACT_ASK_PROCEED"].ToString();
         }
         if (row["PD_CONTRACT_ASK_PAYMENT"] != null)
         {
             model.PD_CONTRACT_ASK_PAYMENT = row["PD_CONTRACT_ASK_PAYMENT"].ToString();
         }
         if (row["PD_CONTRACT_NOTE"] != null)
         {
             model.PD_CONTRACT_NOTE = row["PD_CONTRACT_NOTE"].ToString();
         }
         if (row["PD_CONTRACT_FILENAME"] != null)
         {
             model.PD_CONTRACT_FILENAME = row["PD_CONTRACT_FILENAME"].ToString();
         }
         if (row["PD_CONTRACT_FILENAME_SYSTEM"] != null)
         {
             model.PD_CONTRACT_FILENAME_SYSTEM = row["PD_CONTRACT_FILENAME_SYSTEM"].ToString();
         }
         if (row["PD_CONTRACT_NAME"] != null)
         {
             model.PD_CONTRACT_NAME = row["PD_CONTRACT_NAME"].ToString();
         }
         if (row["PD_DB_LOOP"] != null)
         {
             model.PD_DB_LOOP = int.Parse(row["PD_DB_LOOP"].ToString());
         }
         if ((row["PD_YEAR"] != null) && (row["PD_YEAR"].ToString() != ""))
         {
             model.PD_YEAR = new int?(int.Parse(row["PD_YEAR"].ToString()));
         }
         if (row["PD_NOW_SERVERPK"] != null)
         {
             model.PD_NOW_SERVERPK = row["PD_NOW_SERVERPK"].ToString();
         }
     }
     return model;
 }
 public bool Add(PD_PROJECT_CONTRACT_BAK_Model model)
 {
     return this.dal.Add(model);
 }
 public bool Update(PD_PROJECT_CONTRACT_BAK_Model model)
 {
     return this.dal.Update(model);
 }