コード例 #1
0
 public override void Update(TatRate package)
 {
     try
     {
         string sql = String.Format("update {0}.TAT_RATE set "
                                    + "  PENALTY = :PENALTY "
                                    + "  ,ALT_PENALTY = :ALT_PENALTY "
                                    //+ "  ,TIER = :TIER"  - Presume this would be taboo!
                                    + "where TAT_SCHED_ID = :TAT_SCHED_ID AND TIER=:TIER"
                                    , SchemaName);
         List <OracleParameter> parameters = new List <OracleParameter>();
         parameters.Add(OracleHelper.CreateParameter(":PENALTY", package.PENALTY, OracleType.VarChar, ParameterDirection.Input));
         parameters.Add(OracleHelper.CreateParameter(":ALT_PENALTY", package.ALT_PENALTY, OracleType.Number, ParameterDirection.Input));
         parameters.Add(OracleHelper.CreateParameter(":TAT_SCHED_ID", package.TAT_SCHED_ID, OracleType.Number, ParameterDirection.Input));
         parameters.Add(OracleHelper.CreateParameter(":TIER", package.TIER, OracleType.Number, ParameterDirection.Input));
         OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
     }
     catch (OracleException ex)
     {
         throw ex;
     }
 }
コード例 #2
0
        public override void Remove(VolumeEvtRate package)
        {
            string sql;

            try
            {
                sql = String.Format("DELETE FROM {0}.VOLUME_EVT_RATE WHERE "
                                    + " TIER = :TIER"
                                    + " and CONTRACT_VOLUME_EVT_ID = :CONTRACT_VOLUME_EVT_ID"
                                    , SchemaName);
                List <OracleParameter> parameters = new List <OracleParameter>();
                parameters.Add(OracleHelper.CreateParameter(":TIER", package.TIER, OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":CONTRACT_VOLUME_EVT_ID", package.CONTRACT_VOLUME_EVT_ID, OracleType.Number, ParameterDirection.Input));

                OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
                package.Modified = false;
            }
            catch (OracleException ex)
            {
                throw ex;
            }
        }
コード例 #3
0
        public override void Add(BatchJobType r)
        {
            string sql = String.Format("insert into {0}.BATCH_JOB_TYPE "
                                       + "("
                                       + "  BATCH_JOB_TYPE"
                                       + ", DESCR"
                                       + ", PLATFORM"
                                       + " ) "
                                       + "values "
                                       + " ( "
                                       + "  :BATCH_JOB_TYPE"
                                       + ", :DESCR"
                                       + ", :PLATFORM"
                                       + " ) "
                                       + " returning BATCH_JOB_TYPE into :BATCH_JOB_TYPE "
                                       , SchemaName);

            try
            {
                List <OracleParameter> parameters = new List <OracleParameter>();

                parameters.Add(OracleHelper.CreateParameter(":BATCH_JOB_TYPE", CheckNull(r.BATCH_JOB_TYPE), OracleType.DateTime, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":DESCR", CheckNull(r.DESCR), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":PLATFORM", CheckNull(r.PLATFORM), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":BATCH_JOB_TYPE", OracleType.Int32, ParameterDirection.InputOutput));

                OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
                //r.BATCH_JOB_TYPE = parameters[parameters.Count - 1].Value.ToString();
            }
            catch (OracleException ex)
            {
                throw ex;
            }
            catch (Exception x)
            {
                throw x;
            }
        }
コード例 #4
0
        public override void Add(ContractNote item)
        {
            string sql = String.Format("insert into {0}.contract_note "
                                       + "  (contract_note_id "
                                       + "  ,contract_id                        ,added_dt "
                                       + "  ,added_by                           ,note) "
                                       + "values "
                                       + "  ({0}.contract_note_id.nextval "
                                       + "  ,:contract_id                       ,:added_dt"
                                       + "  ,:added_by                               ,:note) "
                                       + "returning contract_note_id into :contract_note_id"
                                       , SchemaName);
            List <OracleParameter> parameters = new List <OracleParameter>();

            parameters.Add(OracleHelper.CreateParameter(":contract_note_id", null, OracleType.Int32, ParameterDirection.InputOutput));
            parameters.Add(OracleHelper.CreateParameter(":contract_id", item.ContractID, OracleType.Int32, ParameterDirection.Input));
            parameters.Add(OracleHelper.CreateParameter(":added_dt", item.DateAdded, OracleType.Timestamp, ParameterDirection.Input));
            parameters.Add(OracleHelper.CreateParameter(":added_by", item.AddedBy, OracleType.NVarChar, ParameterDirection.Input));
            parameters.Add(OracleHelper.CreateParameter(":note", item.Note, OracleType.VarChar, ParameterDirection.Input));
            OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());

            item.ID = int.Parse(parameters[0].Value.ToString());
        }
コード例 #5
0
        public override void Remove(ContractRate package)
        {
            string sql;

            try
            {
                //string sql = String.Format("DELETE FROM {0}.CONTRACT_RATE WHERE CONTRACT_RATE_ID = :CONTRACT_RATE_ID", SchemaName);
                sql = String.Format("DELETE FROM {0}.CONTRACT_RATE_ALT WHERE CONTRACT_RATE_ID = :CONTRACT_RATE_ID", SchemaName);
                List <OracleParameter> parameters = new List <OracleParameter>();
                parameters.Add(OracleHelper.CreateParameter(":CONTRACT_RATE_ID", package.CONTRACT_RATE_ID, OracleType.Int32, ParameterDirection.Input));
                OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());

                sql        = String.Format("DELETE FROM {0}.CONTRACT_RATE WHERE CONTRACT_RATE_ID = :CONTRACT_RATE_ID", SchemaName);
                parameters = new List <OracleParameter>();
                parameters.Add(OracleHelper.CreateParameter(":CONTRACT_RATE_ID", package.CONTRACT_RATE_ID, OracleType.Int32, ParameterDirection.Input));
                outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
            }
            catch (OracleException ex)
            {
                throw ex;
                //throw ex;
            }
        }
コード例 #6
0
        public override void Add(AdjType r)
        {
            string sql = String.Format("insert into {0}.ADJ_TYPE "
                                       + "("
                                       + " ADJ_TYPE"
                                       + ", APPLY_AFTER_FINAL_COST "
                                       + ", DESCR "
                                       + " ) "
                                       + "values "
                                       + " ( "
                                       + "  :ADJ_TYPE"
                                       + ", :APPLY_AFTER_FINAL_COST"
                                       + ", :DESCR"
                                       + " ) "
                                       , SchemaName);

            try
            {
                List <OracleParameter> parameters = new List <OracleParameter>();

                parameters.Add(OracleHelper.CreateParameter(":ADJ_TYPE", CheckNull(r.ADJ_TYPE), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":APPLY_AFTER_FINAL_COST", (r.APPLY_AFTER_FINAL_COST == true)?'Y':'N', OracleType.Char, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":DESCR", CheckNull(r.DESCR), OracleType.VarChar, ParameterDirection.Input));


                OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
                r.Modified = false;
            }
            catch (OracleException ex)
            {
                throw ex;
            }
            catch (Exception x)
            {
                throw x;
            }
        }
コード例 #7
0
        public override void Add(TatSched r)
        {
            string sql = String.Format("insert into {0}.TAT_SCHED"
                                       + "("
                                       + "  TAT_SCHED_ID"
                                       + ", DESCR"
                                       + ", TAT_COMP_METHOD"
                                       + " ) "
                                       + "values "
                                       + " ( "
                                       + ", {0}.TAT_SCHED_ID.nextval "
                                       + ", :DESCR"
                                       + ", :TAT_COMP_METHOD"
                                       + " ) "
                                       + " returning TAT_SCHED_ID into :NEWID "
                                       , SchemaName);

            try
            {
                List <OracleParameter> parameters = new List <OracleParameter>();

                parameters.Add(OracleHelper.CreateParameter(":NEWID", OracleType.Number, ParameterDirection.InputOutput));
                parameters.Add(OracleHelper.CreateParameter(":DESCR", CheckNull(r.DESCR), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":TAT_COMP_METHOD", CheckNull(r.TAT_COMP_METHOD), OracleType.VarChar, ParameterDirection.Input));

                OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
                r.TAT_SCHED_ID = int.Parse(parameters[0].Value.ToString());
            }
            catch (OracleException ex)
            {
                throw ex;
            }
            catch (Exception x)
            {
                throw x;
            }
        }
コード例 #8
0
        public override void Add(AddOnChgType r)
        {
            string sql = String.Format("insert into {0}.ADD_ON_CHG_TYPE "
                                       + "("
                                       + " ADD_ON_CHG_TYPE_ID"
                                       + " ,DESCR"
                                       + " ) "
                                       + "values "
                                       + " ( "
                                       + "  {0}.ADD_ON_CHG_TYPE_ID.NextVal"
                                       + "  ,:DESCR"
                                       + " ) "
                                       + " returning ADD_ON_CHG_TYPE_ID into :ADD_ON_CHG_TYPE_ID "
                                       , SchemaName);

            try
            {
                List <OracleParameter> parameters = new List <OracleParameter>();

                parameters.Add(OracleHelper.CreateParameter(":DESCR", CheckNull(r.DESCR), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":ADD_ON_CHG_TYPE_ID", OracleType.Number, ParameterDirection.Output));


                OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
                r.ADD_ON_CHG_TYPE_ID = int.Parse(parameters[parameters.Count - 1].Value.ToString());
                r.Modified           = false;
            }
            catch (OracleException ex)
            {
                throw ex;
            }
            catch (Exception x)
            {
                throw x;
            }
        }
コード例 #9
0
        public override void Add(InvoiceGrpOverride r)
        {
            string sql = String.Format("insert into {0}.INVOICE_GRP_OVERRIDE "
                                       + "("
                                       + " DEFAULT_INVOICE_GRP_ID"
                                       + ", OVERRIDE_KEY "
                                       + ",  SEND_TO_INVOICE_GRP_ID"
                                       + " ) "
                                       + "values "
                                       + " ( "
                                       + "  :DEFAULT_INVOICE_GRP_ID "
                                       + ", :OVERRIDE_KEY"
                                       + ", :SEND_TO_INVOICE_GRP_ID"
                                       + " ) "
                                       , SchemaName);

            try
            {
                List <OracleParameter> parameters = new List <OracleParameter>();

                parameters.Add(OracleHelper.CreateParameter(":DEFAULT_INVOICE_GRP_ID", CheckNull(r.DEFAULT_INVOICE_GRP_ID), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":OVERRIDE_KEY", CheckNull(r.OVERRIDE_KEY), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":SEND_TO_INVOICE_GRP_ID", CheckNull(r.SEND_TO_INVOICE_GRP_ID), OracleType.Number, ParameterDirection.Input));

                OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
                r.Modified = false;
            }
            catch (OracleException ex)
            {
                throw ex;
            }
            catch (Exception x)
            {
                throw x;
            }
        }
コード例 #10
0
 public override ClientLocation UnassignLocation(ClientLocation loc)
 {
     try
     {
         string sql = String.Format("update {0}.EXT_CLIENT set "
                                    + "  DEFAULT_INVOICE_GRP_ID = :id "
                                    + " where ext_sys = :ext_sys and ext_client_key = :extclientkey"
                                    , SchemaName);
         List <OracleParameter> parameters = new List <OracleParameter>();
         parameters.Add(OracleHelper.CreateParameter(":id", DBNull.Value, OracleType.Number, ParameterDirection.Input));
         parameters.Add(OracleHelper.CreateParameter(":ext_sys", loc.ExtSys, OracleType.VarChar, 20, ParameterDirection.Input));
         parameters.Add(OracleHelper.CreateParameter(":extclientkey", loc.ExtClientKey, OracleType.VarChar, 20, ParameterDirection.Input));
         OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
         return(loc);
     }
     catch (OracleException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #11
0
        public override void Add(Contract entity)
        {
            string sql = String.Format("insert into {0}.contract "
                                       + "  ( "
                                       /* 0 */ + " CONTRACT_ID "
                                       /* 1 */ + " ,CHANGED_BY "
                                       /* 2 */ + " ,CHANGED_ON "
                                       /* 3 */ + " ,DESCR "
                                       /* 4 */ + " ,DISPLAY_STD_RATE_ON_INVOICE "
                                       /* 5 */ + " ,PAYMENT_GRACE_PERIOD "
                                       /* 6 */ + " ,PAYMENT_TERMS "
                                       + " ) "
                                       + " VALUES             "
                                       + " ( "
                                       /* 0 */ + " {0}.CONTRACT_ID.NEXTVAL "
                                       /* 1 */ + " ,:CHANGED_BY   "
                                       /* 2 */ + " ,:CHANGED_ON    "
                                       /* 3 */ + " ,:DESCR    "
                                       /* 4 */ + " ,:DISPLAY_STD_RATE_ON_INVOICE	 "
                                       /* 5 */ + " ,:PAYMENT_GRACE_PERIOD	  "
                                       /* 6 */ + " ,:PAYMENT_TERMS	         "
                                       + ")  returning CONTRACT_ID into :CONTRACT_ID", SchemaName);
            List <OracleParameter> parameters = new List <OracleParameter>();

            /* 0 */ parameters.Add(OracleHelper.CreateParameter(":CONTRACT_ID", OracleType.Number, ParameterDirection.InputOutput));
            /* 1 */ parameters.Add(OracleHelper.CreateParameter(":CHANGED_BY", CheckNull(entity.CHANGED_BY), OracleType.VarChar, ParameterDirection.Input));
            /* 2 */ parameters.Add(OracleHelper.CreateParameter(":CHANGED_ON", CheckNull(entity.CHANGED_ON), OracleType.DateTime, ParameterDirection.Input));
            /* 3 */ parameters.Add(OracleHelper.CreateParameter(":DESCR", CheckNull(entity.DESCR), OracleType.VarChar, ParameterDirection.Input));
            /* 4 */ parameters.Add(OracleHelper.CreateParameter(":DISPLAY_STD_RATE_ON_INVOICE", (entity.DISPLAY_STD_RATE_ON_INVOICE == true) ? 'Y':'N', OracleType.Char, ParameterDirection.Input));
            /* 5 */ parameters.Add(OracleHelper.CreateParameter(":PAYMENT_GRACE_PERIOD", CheckNull(entity.PAYMENT_GRACE_PERIOD), OracleType.Number, ParameterDirection.Input));
            /* 6 */ parameters.Add(OracleHelper.CreateParameter(":PAYMENT_TERMS", CheckNull(entity.PAYMENT_TERMS), OracleType.VarChar, ParameterDirection.Input));

            OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());

            entity.CONTRACT_ID = int.Parse(parameters[0].Value.ToString());
        }
コード例 #12
0
        public override void Add(InvoiceGrpReport entity)
        {
            {
                // INVOICE_GRP_ID  NUMBER
                // REPORT_TYPE_ID  INTEGER
                // TAB_ORDER       INTEGER
                // FILE_TYPE       CHAR 4
                string sql = String.Format("insert into {0}.invoice_grp_report "
                                           + "  (INVOICE_GRP_ID"
                                           + "  ,REPORT_TYPE_ID"
                                           + "  ,TAB_ORDER"
                                           + "  ,FILE_TYPE) "
                                           + "values "
                                           + "  (:INVOICE_GRP_ID"
                                           + "  ,:REPORT_TYPE_ID"
                                           + "  ,:TAB_ORDER"
                                           + "  ,:FILE_TYPE)"
                                           , SchemaName);
                try
                {
                    List <OracleParameter> parameters = new List <OracleParameter>();
                    parameters.Add(OracleHelper.CreateParameter(":INVOICE_GRP_ID", entity.INVOICE_GRP_ID, OracleType.Number, ParameterDirection.Input));
                    parameters.Add(OracleHelper.CreateParameter(":REPORT_TYPE_ID", entity.REPORT_TYPE_ID, OracleType.Int32, ParameterDirection.Input));
                    parameters.Add(OracleHelper.CreateParameter(":TAB_ORDER", entity.TAB_ORDER, OracleType.Int32, ParameterDirection.Input));
                    parameters.Add(OracleHelper.CreateParameter(":FILE_TYPE", entity.FILE_TYPE, OracleType.NVarChar, ParameterDirection.Input));

                    OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value,
                                                                                       sql,
                                                                                       parameters.ToArray <OracleParameter>());
                }
                catch (OracleException ex)
                {
                    throw ex;
                }
            }
        }
コード例 #13
0
        public override void Remove(ContractTatSched package)
        {
            string sql;

            try
            {
                sql = String.Format("DELETE FROM {0}.CONTRACT_TAT_SCHED WHERE "
                                    + " CONTRACT_ID = :CONTRACT_ID"
                                    + " and TAT_SCHED_ID = :TAT_SCHED_ID"
                                    + " and BEGIN_ON = :BEGIN_ON"
                                    , SchemaName);
                List <OracleParameter> parameters = new List <OracleParameter>();
                parameters.Add(OracleHelper.CreateParameter(":CONTRACT_ID", package.CONTRACT_ID, OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":TAT_SCHED_ID", package.TAT_SCHED_ID, OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":BEGIN_ON", package.BEGIN_ON, OracleType.DateTime, ParameterDirection.Input));

                OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
                package.Modified = false;
            }
            catch (OracleException ex)
            {
                throw ex;
            }
        }
コード例 #14
0
        public override void Add(ContractRateAlt r)
        {
            string sql = String.Format("insert into {0}.CONTRACT_RATE_ALT"
                                       + "("
                                       + "  CONTRACT_RATE_ID"
                                       + ", DESCR"
                                       + ", INHOUSE_SR_RATE"
                                       + ", INHOUSE_SR_RATE_DELTA "
                                       + ", INHOUSE_TR_RATE "
                                       + ", INHOUSE_TR_RATE_DELTA "
                                       + ", OFFSHORE_RATE "
                                       + ", OFFSHORE_RATE_DELTA "
                                       + ", RATE_NBR "
                                       + ", SR_OFFSHORE_RATE "
                                       + ", SR_OFFSHORE_RATE_DELTA "
                                       + ", SR_RATE "
                                       + ", SR_RATE_DELTA "
                                       + ", STD_RATE "
                                       + ", STD_RATE_DELTA "
                                       + " ) "
                                       + "values "
                                       + " ( "
                                       + "  :CONTRACT_RATE_ID"
                                       + ", :DESCR"
                                       + ", :INHOUSE_SR_RATE"
                                       + ", :INHOUSE_SR_RATE_DELTA "
                                       + ", :INHOUSE_TR_RATE "
                                       + ", :INHOUSE_TR_RATE_DELTA "
                                       + ", :OFFSHORE_RATE "
                                       + ", :OFFSHORE_RATE_DELTA "
                                       + ", :RATE_NBR "
                                       + ", :SR_OFFSHORE_RATE "
                                       + ", :SR_OFFSHORE_RATE_DELTA "
                                       + ", :SR_RATE "
                                       + ", :SR_RATE_DELTA "
                                       + ", :STD_RATE "
                                       + ", :STD_RATE_DELTA "
                                       + " ) "
                                       // + " returning RATE_NBR into :RATE_NBR "
                                       , SchemaName);

            try
            {
                List <OracleParameter> parameters = new List <OracleParameter>();

                parameters.Add(OracleHelper.CreateParameter(":CONTRACT_RATE_ID", CheckNull(r.CONTRACT_RATE_ID), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":DESCR", CheckNull(r.DESCR), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":INHOUSE_SR_RATE", CheckNull(r.INHOUSE_SR_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":INHOUSE_SR_RATE_DELTA", CheckNull(r.INHOUSE_SR_RATE_DELTA), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":INHOUSE_TR_RATE", CheckNull(r.INHOUSE_TR_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":INHOUSE_TR_RATE_DELTA", CheckNull(r.INHOUSE_TR_RATE_DELTA), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":OFFSHORE_RATE", CheckNull(r.OFFSHORE_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":OFFSHORE_RATE_DELTA", CheckNull(r.OFFSHORE_RATE_DELTA), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":RATE_NBR", CheckNull(r.RATE_NBR), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":SR_OFFSHORE_RATE", CheckNull(r.SR_OFFSHORE_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":SR_OFFSHORE_RATE_DELTA", r.SR_OFFSHORE_RATE_DELTA, OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":SR_RATE", CheckNull(r.SR_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":SR_RATE_DELTA", CheckNull(r.SR_RATE_DELTA), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":STD_RATE", CheckNull(r.STD_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":STD_RATE_DELTA", CheckNull(r.STD_RATE_DELTA), OracleType.Number, ParameterDirection.Input));
                // parameters.Add(OracleHelper.CreateParameter(":RATE_NBR", OracleType.Int32, ParameterDirection.InputOutput));
                OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
            }
            catch (OracleException ex)
            {
                throw ex;
            }
            catch (Exception x)
            {
                throw x;
            }
        }
コード例 #15
0
        public override void Update(InvoiceGroup item)
        {
            try
            {
                string sql = string.Format("UPDATE {0}.INVOICE_GRP "
                                           + "SET     DESCR = :I_DESCR "
                                           + "       ,BILLING_FREQ = :I_BILLING_FREQ "
                                           + "       ,GL_DISTR_NBR = :I_GL_DISTR_NBR "
                                           + "       ,BILL_SPECIALIST_ID = :I_BILL_SPECIALIST_ID "
                                           + "       ,LEGACY_CUSTOMER_NBR = :I_LEGACY_CUSTOMER_NBR "
                                           + "       ,CONTRACT_ID = :I_CONTRACT_ID "
                                           + "       ,INVOICE_STYLE = :I_INVOICE_STYLE "
                                           + "       ,BRAND = :I_BRAND "
                                           + "       ,DEFAULT_BILL_FILE_PATH = :I_DEFAULT_BILL_FILE_PATH "
                                           + "       ,INVOICE_GRP_STATUS = :I_INVOICE_GRP_STATUS "
                                           + "       ,GP_CUSTOMER_NBR = :I_GP_CUSTOMER_NBR "
                                           + "       ,ATTN_LINE_HEADING = :I_ATTN_LINE_HEADING "
                                           + "       ,ATTN_LINE = :I_ATTN_LINE "
                                           + "       ,REMIT_TO_ID = :I_REMIT_TO_ID "
                                           + "       ,INVOICE_GRP_ID = :I_INVOICE_GRP_ID "
                                           + "       ,PRIMARY_PLATFORM = :I_PRIMARY_PLATFORM "
                                           + "       ,BILL_EMAIL = :I_BILL_EMAIL "
                                           + "       ,DELIVERY_METHOD = :I_DELIVERY_METHOD "
                                           + "       ,BW_INVOICE_STYLE = :I_BW_INVOICE_STYLE "
                                           + "       ,ENCRYPTION_OPTOUT = :I_ENCRYPTION_OPTOUT "
                                           + "WHERE  INVOICE_GRP_ID = :I_INVOICE_GRP_ID", SchemaName);


                List <OracleParameter> parameters = new List <OracleParameter>();
                /* 1 */
                parameters.Add(OracleHelper.CreateParameter(":I_DESCR", CheckNull(item.Description), OracleType.VarChar, ParameterDirection.Input));                          //  VARCHAR2(150 Byte)
                /* 2 */
                parameters.Add(OracleHelper.CreateParameter(":I_BILLING_FREQ", CheckNull(item.BillingFrequency), OracleType.Char, ParameterDirection.Input));                 //  CHAR(4 Byte)
                /* 3 */
                parameters.Add(OracleHelper.CreateParameter(":I_GL_DISTR_NBR", CheckNull(item.GLDistributionNumber), OracleType.VarChar, ParameterDirection.Input));          //  VARCHAR2(15 Byte)
                /* 4 */
                parameters.Add(OracleHelper.CreateParameter(":I_BILL_SPECIALIST_ID", item.BillingSpecialistID, OracleType.Number, ParameterDirection.Input));                 //  NUMBER	    0
                /* 5 */
                parameters.Add(OracleHelper.CreateParameter(":I_LEGACY_CUSTOMER_NBR", CheckNull(item.LegacyCustomerNumber), OracleType.VarChar, ParameterDirection.Input));   //  VARCHAR2(10 Byte)
                /* 6 */
                parameters.Add(OracleHelper.CreateParameter(":I_CONTRACT_ID", CheckNull(item.ContractID), OracleType.Number, ParameterDirection.Input));                      //  NUMBER
                /* 7 */
                parameters.Add(OracleHelper.CreateParameter(":I_INVOICE_STYLE", CheckNull(item.InvoiceStyle), OracleType.Char, ParameterDirection.Input));                    //  CHAR(4 Byte)
                /* 8 */
                parameters.Add(OracleHelper.CreateParameter(":I_BRAND", item.Brand, OracleType.Char, ParameterDirection.Input));                                              //  CHAR(5 Byte)
                /* 9 */
                parameters.Add(OracleHelper.CreateParameter(":I_DEFAULT_BILL_FILE_PATH", CheckNull(item.DefaultBillFilePath), OracleType.VarChar, ParameterDirection.Input)); //  VARCHAR2(255 Byte)
                /* 10*/
                parameters.Add(OracleHelper.CreateParameter(":I_INVOICE_GRP_STATUS", item.InvoiceGroupStatus, OracleType.Char, ParameterDirection.Input));                    //  CHAR(4 Byte)
                /* 11*/
                parameters.Add(OracleHelper.CreateParameter(":I_GP_CUSTOMER_NBR", CheckNull(item.GPCustomerNumber), OracleType.VarChar, ParameterDirection.Input));           //  VARCHAR2(15 Byte)
                /* 12*/
                parameters.Add(OracleHelper.CreateParameter(":I_ATTN_LINE_HEADING", CheckNull(item.AttnLineHeading), OracleType.VarChar, ParameterDirection.Input));          //  VARCHAR2(20 Byte)
                /* 13*/
                parameters.Add(OracleHelper.CreateParameter(":I_ATTN_LINE", CheckNull(item.AttnLine), OracleType.VarChar, ParameterDirection.Input));                         //  VARCHAR2(44 Byte)
                /* 14*/
                parameters.Add(OracleHelper.CreateParameter(":I_REMIT_TO_ID", item.RemitToID, OracleType.Number, ParameterDirection.Input));                                  //  NUMBER
                /* 15*/
                parameters.Add(OracleHelper.CreateParameter(":I_PRIMARY_PLATFORM", CheckNull(item.PrimaryPlatform), OracleType.VarChar, ParameterDirection.Input));           //  VARCHAR2(5 Byte)
                /* 16*/
                parameters.Add(OracleHelper.CreateParameter(":I_DELIVERY_METHOD", CheckNull(item.DeliveryMethod), OracleType.Char, ParameterDirection.Input));                //  CHAR(5 Byte)
                /* 17*/
                parameters.Add(OracleHelper.CreateParameter(":I_BILL_EMAIL", CheckNull(item.BillEmail), OracleType.VarChar, ParameterDirection.Input));                       //  VARCHAR2(256 Byte)
                /* 18*/
                parameters.Add(OracleHelper.CreateParameter(":I_BW_INVOICE_STYLE", (item.IsBWInvoiceStyle) ? 'Y' : 'N', OracleType.Char, ParameterDirection.Input));          //  CHAR(1 Byte)
                /* 19*/
                parameters.Add(OracleHelper.CreateParameter(":I_ENCRYPTION_OPTOUT", (item.EncryptionOptout) ? 'Y' : 'N', OracleType.Char, ParameterDirection.Input));         //  CHAR(1 Byte)

                parameters.Add(OracleHelper.CreateParameter(":I_INVOICE_GRP_ID", item.InvoiceGrpId, OracleType.Number, ParameterDirection.Input));                            //  NUMBER	    0

                OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
            }
            catch (OracleException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #16
0
        /// <summary>
        /// Table: INVOICE_GRP
        ///
        ///                        pk  null?   type                 Default
        /// ---------------------------------------------------------------------
        /// InvoiceGrpId        INVOICE_GRP_ID      1	1	N	NUMBER
        /// Description         DESCR	            2		N	VARCHAR2(150 Byte)
        /// ChangedOn           CHANGED_ON	        3		N	DATE	                SYSDATE
        /// ChangedBy           CHANGED_BY	        4		N	VARCHAR2(255 Byte)	    SYS_CONTEXT('USERENV', 'OS_USER')
        /// UseDst              USE_DST	            5		N	CHAR(1 Byte)	        'Y'
        /// BillingFrequency    BILLING_FREQ	    6		N	CHAR(4 Byte)	        'MNTH'
        /// TimeZONE            TIMEZONE	        7		N	VARCHAR2(4 Byte)	    'CST'
        /// GLDistributionNumbe GL_DISTR_NBR	    8		N	VARCHAR2(15 Byte)	    '?'
        /// BillingSpecialistID BILL_SPECIALIST_ID	9		N	NUMBER	    0
        /// LegacyCustomerNumbe LEGACY_CUSTOMER_NBR	10		Y	VARCHAR2(10 Byte)
        /// ContractID          CONTRACT_ID	        11		Y	NUMBER
        /// InvoiceStyle        INVOICE_STYLE	    12		Y	CHAR(4 Byte)	        'DEFM'
        /// Brand               BRAND	            13		Y	CHAR(5 Byte)	        'MEDQ'
        /// DefaultBillFilePath DEFAULT_BILL_FILE_PATH 14	Y	VARCHAR2(255 Byte)
        /// InvoiceGroupStatus  INVOICE_GRP_STATUS	15		N	CHAR(4 Byte)	        'ACTV'
        /// GPCustomerNumber    GP_CUSTOMER_NBR	    16		N	VARCHAR2(15 Byte)	    '?'
        /// DoNotBillBefore     DO_NOT_BILL_BEFORE	17		Y	DATE
        /// AttnLineHeading     ATTN_LINE_HEADING	18		Y	VARCHAR2(20 Byte)
        /// AttnLine            ATTN_LINE	        19		Y	VARCHAR2(44 Byte)
        /// RemitToID           REMIT_TO_ID	        20		N	NUMBER	                2
        /// PrimaryPlatform     PRIMARY_PLATFORM	21		Y	VARCHAR2(5 Byte)
        /// DeliveryMethod      DELIVERY_METHOD	    22		N	CHAR(5 Byte)	        'PAPER'
        /// BillEmail           BILL_EMAIL	        23		Y	VARCHAR2(256 Byte)
        /// IsBWInvoiceStyle    BW_INVOICE_STYLE	24		N	CHAR(1 Byte)	        'N'
        /// EncryptionOptout    ENCRYPTION_OPTOUT	25		N	CHAR(1 Byte)	        'N'
        ///
        /// </summary>
        public override void Add(InvoiceGroup item)
        {
            item.ChangedOn = DateTime.Now;
            try
            {
                string sql = String.Format("insert into {0}.invoice_grp "
                                           + "  ( "
                                           /* 0 */ + " INVOICE_GRP_ID  ,     "   // InvoiceGrpId
                                           /* 1 */ + " DESCR,	            "    // Description
                                           /* 2 */ + " BILLING_FREQ,	     "   // BillingFrequency
                                           /* 3 */ + " GL_DISTR_NBR,	     "   // GLDistributionNumbe
                                           /* 4 */ + " BILL_SPECIALIST_ID,	 "   // BillingSpecialistID
                                           /* 5 */ + " LEGACY_CUSTOMER_NBR,	 "   // LegacyCustomerNumbe
                                           /* 6 */ + " CONTRACT_ID	         ,"  // ContractID
                                           /* 7 */ + " INVOICE_STYLE	     ,"  // InvoiceStyle
                                           /* 8 */ + " BRAND	             ,"  // Brand
                                           /* 9 */ + " DEFAULT_BILL_FILE_PATH ," // DefaultBillFilePath
                                           /* 10*/ + " INVOICE_GRP_STATUS	 ,"  // InvoiceGroupStatus
                                           /* 11*/ + " GP_CUSTOMER_NBR	     ,"  // GPCustomerNumber
                                           /* 12*/ + " ATTN_LINE_HEADING	 ,"  // AttnLineHeading
                                           /* 13*/ + " ATTN_LINE	         ,"  // AttnLine
                                           /* 14*/ + " REMIT_TO_ID	         ,"  // RemitToID
                                           /* 15*/ + " PRIMARY_PLATFORM	 ,"      // PrimaryPlatform
                                           /* 16*/ + " DELIVERY_METHOD	     ,"  // DeliveryMethod
                                           /* 17*/ + " BILL_EMAIL	         ,"  // BillEmail
                                           /* 18*/ + " BW_INVOICE_STYLE	 ,"      // IsBWInvoiceStyle
                                           /* 19*/ + " ENCRYPTION_OPTOUT	 "   // EncryptionOptout
                                           + " )                  "
                                           + " VALUES             "
                                           + " ( "
                                           /* 0 */ + " {0}.INVOICE_GRP_ID.NEXTVAL, "
                                           /* 1 */ + " :I_DESCR,   "
                                           /* 2 */ + " :I_BILLING_FREQ,    "
                                           /* 3 */ + " :I_GL_DISTR_NBR,    "
                                           /* 4 */ + " :I_BILL_SPECIALIST_ID,	 "
                                           /* 5 */ + " :I_LEGACY_CUSTOMER_NBR,	  "
                                           /* 6 */ + " :I_CONTRACT_ID	         ,"
                                           /* 7 */ + " :I_INVOICE_STYLE	     ,"
                                           /* 8 */ + " :I_BRAND	             ,"
                                           /* 9 */ + " :I_DEFAULT_BILL_FILE_PATH,"
                                           /* 10*/ + " :I_INVOICE_GRP_STATUS	, "
                                           /* 11*/ + " :I_GP_CUSTOMER_NBR	    , "
                                           /* 12*/ + " :I_ATTN_LINE_HEADING	, "
                                           /* 13*/ + " :I_ATTN_LINE	        , "
                                           /* 14*/ + " :I_REMIT_TO_ID	        , "
                                           /* 15*/ + " :I_PRIMARY_PLATFORM	 ,"
                                           /* 16*/ + " :I_DELIVERY_METHOD	  ,   "
                                           /* 17*/ + " :I_BILL_EMAIL	      ,   "
                                           /* 18*/ + " :I_BW_INVOICE_STYLE	 ,"
                                           /* 19*/ + " :I_ENCRYPTION_OPTOUT	 "
                                           + ")  returning INVOICE_GRP_ID into :NEWID"
                                           , SchemaName);

                List <OracleParameter> parameters = new List <OracleParameter>();
                /* 0 */ parameters.Add(OracleHelper.CreateParameter(":NEWID", OracleType.Number, ParameterDirection.InputOutput));
                /* 1 */ parameters.Add(OracleHelper.CreateParameter(":I_DESCR", CheckNull(item.Description), OracleType.VarChar, ParameterDirection.Input));                          //  VARCHAR2(150 Byte)
                /* 2 */ parameters.Add(OracleHelper.CreateParameter(":I_BILLING_FREQ", CheckNull(item.BillingFrequency), OracleType.Char, ParameterDirection.Input));                 //  CHAR(4 Byte)
                /* 3 */ parameters.Add(OracleHelper.CreateParameter(":I_GL_DISTR_NBR", CheckNull(item.GLDistributionNumber), OracleType.VarChar, ParameterDirection.Input));          //  VARCHAR2(15 Byte)
                /* 4 */ parameters.Add(OracleHelper.CreateParameter(":I_BILL_SPECIALIST_ID", item.BillingSpecialistID, OracleType.Number, ParameterDirection.Input));                 //  NUMBER	    0
                /* 5 */ parameters.Add(OracleHelper.CreateParameter(":I_LEGACY_CUSTOMER_NBR", CheckNull(item.LegacyCustomerNumber), OracleType.VarChar, ParameterDirection.Input));   //  VARCHAR2(10 Byte)
                /* 6 */ parameters.Add(OracleHelper.CreateParameter(":I_CONTRACT_ID", CheckNull(item.ContractID), OracleType.Number, ParameterDirection.Input));                      //  NUMBER
                /* 7 */ parameters.Add(OracleHelper.CreateParameter(":I_INVOICE_STYLE", CheckNull(item.InvoiceStyle), OracleType.Char, ParameterDirection.Input));                    //  CHAR(4 Byte)
                /* 8 */ parameters.Add(OracleHelper.CreateParameter(":I_BRAND", item.Brand, OracleType.Char, ParameterDirection.Input));                                              //  CHAR(5 Byte)
                /* 9 */ parameters.Add(OracleHelper.CreateParameter(":I_DEFAULT_BILL_FILE_PATH", CheckNull(item.DefaultBillFilePath), OracleType.VarChar, ParameterDirection.Input)); //  VARCHAR2(255 Byte)
                /* 10*/ parameters.Add(OracleHelper.CreateParameter(":I_INVOICE_GRP_STATUS", item.InvoiceGroupStatus, OracleType.Char, ParameterDirection.Input));                    //  CHAR(4 Byte)
                /* 11*/ parameters.Add(OracleHelper.CreateParameter(":I_GP_CUSTOMER_NBR", CheckNull(item.GPCustomerNumber), OracleType.VarChar, ParameterDirection.Input));           //  VARCHAR2(15 Byte)
                /* 12*/ parameters.Add(OracleHelper.CreateParameter(":I_ATTN_LINE_HEADING", CheckNull(item.AttnLineHeading), OracleType.VarChar, ParameterDirection.Input));          //  VARCHAR2(20 Byte)
                /* 13*/ parameters.Add(OracleHelper.CreateParameter(":I_ATTN_LINE", CheckNull(item.AttnLine), OracleType.VarChar, ParameterDirection.Input));                         //  VARCHAR2(44 Byte)
                /* 14*/ parameters.Add(OracleHelper.CreateParameter(":I_REMIT_TO_ID", item.RemitToID, OracleType.Number, ParameterDirection.Input));                                  //  NUMBER
                /* 15*/ parameters.Add(OracleHelper.CreateParameter(":I_PRIMARY_PLATFORM", CheckNull(item.PrimaryPlatform), OracleType.VarChar, ParameterDirection.Input));           //  VARCHAR2(5 Byte)
                /* 16*/ parameters.Add(OracleHelper.CreateParameter(":I_DELIVERY_METHOD", CheckNull(item.DeliveryMethod), OracleType.Char, ParameterDirection.Input));                //  CHAR(5 Byte)
                /* 17*/ parameters.Add(OracleHelper.CreateParameter(":I_BILL_EMAIL", CheckNull(item.BillEmail), OracleType.VarChar, ParameterDirection.Input));                       //  VARCHAR2(256 Byte)
                /* 18*/ parameters.Add(OracleHelper.CreateParameter(":I_BW_INVOICE_STYLE", (item.IsBWInvoiceStyle) ? 'Y' : 'N', OracleType.Char, ParameterDirection.Input));          //  CHAR(1 Byte)
                /* 19*/ parameters.Add(OracleHelper.CreateParameter(":I_ENCRYPTION_OPTOUT", (item.EncryptionOptout) ? 'Y' : 'N', OracleType.Char, ParameterDirection.Input));         //  CHAR(1 Byte)


                OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
                item.InvoiceGrpId = int.Parse(parameters[0].Value.ToString());
            }
            catch (OracleException ex)
            {
                throw ex;
            }
            catch (Exception sysEx)
            {
                string err = sysEx.ToString();
                throw sysEx;
            }
        }
コード例 #17
0
        public override void Update(ContractRate r)
        {
            //r.BEGIN_ON =                   :BEGIN_ON =
            //r.CHAR_COMP_METHOD =           :CHAR_COMP_METHOD =
            //r.CONTRACT_ID =                :CONTRACT_ID =
            //r.CONTRACT_RATE_ID =           :CONTRACT_RATE_ID =
            //r.DICTATOR_SR_THRESHOLD =      :DICTATOR_SR_THRESHOLD =
            //r.DOCUMENT_SR_THRESHOLD =      :DOCUMENT_SR_THRESHOLD =
            //r.END_AFTER =                  :END_AFTER =
            //r.FAX_COMP_METHOD =            :FAX_COMP_METHOD =
            //r.FAX_RATE =                   :FAX_RATE =
            //r.FRONTEND_SR_RATE =           :FRONTEND_SR_RATE =
            //r.HOLIDAY_RATE_DELTA =         :HOLIDAY_RATE_DELTA =
            //r.INCLUDE_INHOUSE_IN_TAT_CALC =:INCLUDE_INHOUSE_IN_TAT_CALC =
            //r.INHOUSE_SR_RATE =            :INHOUSE_SR_RATE =
            //r.INHOUSE_TR_RATE =            :INHOUSE_TR_RATE =
            //r.OFFSHORE_RATE =              :OFFSHORE_RATE =
            //r.SR_OFFSHORE_RATE =           :SR_OFFSHORE_RATE =
            //r.SR_RATE =                    :SR_RATE =
            //r.STAT_COMP_METHOD =           :STAT_COMP_METHOD =
            //r.STAT_PREMIUM =               :STAT_PREMIUM =
            //r.STAT_THRESHOLD =             :STAT_THRESHOLD =
            //r.STD_RATE =                   :STD_RATE =
            //r.SYLCOUNT =                   :SYLCOUNT =
            //r.TECHNOLOGY_CHG =             :TECHNOLOGY_CHG
            //                               :

            if (r.CONTRACT_RATE_ID == 0)
            {
                throw new ArgumentNullException("Item.InvoiceGrpId", "An item InvoiceGrpId was provided for the update.");
            }
            try
            {
                string sql = String.Format("update {0}.CONTRACT_RATE set "
                                           + " BEGIN_ON = :BEGIN_ON "
                                           + " ,CHAR_COMP_METHOD = :CHAR_COMP_METHOD "
                                           + " ,CONTRACT_ID = :CONTRACT_ID "
                                           + " ,DICTATOR_SR_THRESHOLD = :DICTATOR_SR_THRESHOLD "
                                           + " ,DOCUMENT_SR_THRESHOLD = :DOCUMENT_SR_THRESHOLD "
                                           + " ,END_AFTER = :END_AFTER "
                                           + " ,FAX_COMP_METHOD = :FAX_COMP_METHOD "
                                           + " ,FAX_RATE = :FAX_RATE "
                                           + " ,FRONTEND_SR_RATE = :FRONTEND_SR_RATE "
                                           + " ,HOLIDAY_RATE_DELTA = :HOLIDAY_RATE_DELTA "
                                           + " ,INCLUDE_INHOUSE_IN_TAT_CALC = :INCLUDE_INHOUSE_IN_TAT_CALC"
                                           + " ,INHOUSE_SR_RATE = :INHOUSE_SR_RATE "
                                           + " ,INHOUSE_TR_RATE = :INHOUSE_TR_RATE "
                                           + " ,OFFSHORE_RATE = :OFFSHORE_RATE "
                                           + " ,SR_OFFSHORE_RATE = :SR_OFFSHORE_RATE "
                                           + " ,SR_RATE = :SR_RATE "
                                           + " ,STAT_COMP_METHOD = :STAT_COMP_METHOD "
                                           + " ,STAT_PREMIUM = :STAT_PREMIUM "
                                           + " ,STAT_THRESHOLD = :STAT_THRESHOLD "
                                           + " ,STD_RATE = :STD_RATE "
                                           + " ,SYLCOUNT = :SYLCOUNT "
                                           + " ,TECHNOLOGY_CHG = :TECHNOLOGY_CHG "
                                           + " ,EER_SR_THRESHOLD = :EER_SR_THRESHOLD "
                                           + " where CONTRACT_RATE_ID = :CONTRACT_RATE_ID", SchemaName);
                List <OracleParameter> parameters = new List <OracleParameter>();
                parameters.Add(OracleHelper.CreateParameter(":BEGIN_ON", CheckNull(r.BEGIN_ON), OracleType.DateTime, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":CHAR_COMP_METHOD", CheckNull(r.CHAR_COMP_METHOD), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":CONTRACT_ID", CheckNull(r.CONTRACT_ID), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":DICTATOR_SR_THRESHOLD", CheckNull(r.DICTATOR_SR_THRESHOLD), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":DOCUMENT_SR_THRESHOLD", CheckNull(r.DOCUMENT_SR_THRESHOLD), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":END_AFTER", CheckNull(r.END_AFTER), OracleType.DateTime, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":FAX_COMP_METHOD", CheckNull(r.FAX_COMP_METHOD), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":FAX_RATE", CheckNull(r.FAX_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":FRONTEND_SR_RATE", CheckNull(r.FRONTEND_SR_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":HOLIDAY_RATE_DELTA", CheckNull(r.HOLIDAY_RATE_DELTA), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":INCLUDE_INHOUSE_IN_TAT_CALC", (r.INCLUDE_INHOUSE_IN_TAT_CALC) ? 'Y' : 'N', OracleType.Char, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":INHOUSE_SR_RATE", CheckNull(r.INHOUSE_SR_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":INHOUSE_TR_RATE", CheckNull(r.INHOUSE_TR_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":OFFSHORE_RATE", CheckNull(r.OFFSHORE_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":SR_OFFSHORE_RATE", CheckNull(r.SR_OFFSHORE_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":SR_RATE", CheckNull(r.SR_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":STAT_COMP_METHOD", CheckNull(r.STAT_COMP_METHOD), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":STAT_PREMIUM", CheckNull(r.STAT_PREMIUM), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":STAT_THRESHOLD", CheckNull(r.STAT_THRESHOLD), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":STD_RATE", CheckNull(r.STD_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":SYLCOUNT", CheckNull(r.SYLCOUNT), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":TECHNOLOGY_CHG", CheckNull(r.TECHNOLOGY_CHG), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":EER_SR_THRESHOLD", CheckNull(r.EER_SR_THRESHOLD), OracleType.Number, ParameterDirection.Input));

                parameters.Add(OracleHelper.CreateParameter(":CONTRACT_RATE_ID", CheckNull(r.CONTRACT_RATE_ID), OracleType.Number, ParameterDirection.Input));

                OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
            }
            catch (OracleException ex)
            {
                throw ex;
            }
            catch (Exception x)
            {
                throw x;
            }
        }
コード例 #18
0
        public override void Add(ContractRate r)
        {
            string sql = String.Format("insert into {0}.CONTRACT_RATE "
                                       + "("
                                       + "  BEGIN_ON"
                                       + ", CHAR_COMP_METHOD"
                                       + ", CONTRACT_ID"
                                       + ", CONTRACT_RATE_ID "
                                       + ", DICTATOR_SR_THRESHOLD "
                                       + ", DOCUMENT_SR_THRESHOLD "
                                       + ", END_AFTER "
                                       + ", FAX_COMP_METHOD "
                                       + ", FAX_RATE "
                                       + ", FRONTEND_SR_RATE "
                                       + ", HOLIDAY_RATE_DELTA "
                                       + ", INCLUDE_INHOUSE_IN_TAT_CALC "
                                       + ", INHOUSE_SR_RATE "
                                       + ", INHOUSE_TR_RATE "
                                       + ", OFFSHORE_RATE "
                                       + ", SR_OFFSHORE_RATE "
                                       + ", SR_RATE "
                                       + ", STAT_COMP_METHOD "
                                       + ", STAT_PREMIUM "
                                       + ", STAT_THRESHOLD "
                                       + ", STD_RATE "
                                       + ", SYLCOUNT "
                                       + ", TECHNOLOGY_CHG "
                                       + ", EER_SR_THRESHOLD "
                                       + " ) "
                                       + "values "
                                       + " ( "
                                       + "  :BEGIN_ON"
                                       + ", :CHAR_COMP_METHOD"
                                       + ", :CONTRACT_ID"
                                       + ", {0}.CONTRACT_RATE_ID.nextval "
                                       + ", :DICTATOR_SR_THRESHOLD "
                                       + ", :DOCUMENT_SR_THRESHOLD "
                                       + ", :END_AFTER "
                                       + ", :FAX_COMP_METHOD "
                                       + ", :FAX_RATE "
                                       + ", :FRONTEND_SR_RATE "
                                       + ", :HOLIDAY_RATE_DELTA "
                                       + ", :INCLUDE_INHOUSE_IN_TAT_CALC "
                                       + ", :INHOUSE_SR_RATE "
                                       + ", :INHOUSE_TR_RATE "
                                       + ", :OFFSHORE_RATE "
                                       + ", :SR_OFFSHORE_RATE "
                                       + ", :SR_RATE "
                                       + ", :STAT_COMP_METHOD "
                                       + ", :STAT_PREMIUM "
                                       + ", :STAT_THRESHOLD "
                                       + ", :STD_RATE "
                                       + ", :SYLCOUNT "
                                       + ", :TECHNOLOGY_CHG "
                                       + ", :EER_SR_THRESHOLD "
                                       + " ) "
                                       + " returning CONTRACT_RATE_ID into :RATEID "
                                       , SchemaName);

            try
            {
                List <OracleParameter> parameters = new List <OracleParameter>();

                parameters.Add(OracleHelper.CreateParameter(":BEGIN_ON", CheckNull(r.BEGIN_ON), OracleType.DateTime, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":CHAR_COMP_METHOD", CheckNull(r.CHAR_COMP_METHOD), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":CONTRACT_ID", CheckNull(r.CONTRACT_ID), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":DICTATOR_SR_THRESHOLD", CheckNull(r.DICTATOR_SR_THRESHOLD), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":DOCUMENT_SR_THRESHOLD", CheckNull(r.DOCUMENT_SR_THRESHOLD), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":END_AFTER", CheckNull(r.END_AFTER), OracleType.DateTime, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":FAX_COMP_METHOD", CheckNull(r.FAX_COMP_METHOD), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":FAX_RATE", CheckNull(r.FAX_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":FRONTEND_SR_RATE", CheckNull(r.FRONTEND_SR_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":HOLIDAY_RATE_DELTA", CheckNull(r.HOLIDAY_RATE_DELTA), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":INCLUDE_INHOUSE_IN_TAT_CALC", (r.INCLUDE_INHOUSE_IN_TAT_CALC) ? 'Y' : 'N', OracleType.Char, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":INHOUSE_SR_RATE", CheckNull(r.INHOUSE_SR_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":INHOUSE_TR_RATE", CheckNull(r.INHOUSE_TR_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":OFFSHORE_RATE", CheckNull(r.OFFSHORE_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":SR_OFFSHORE_RATE", CheckNull(r.SR_OFFSHORE_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":SR_RATE", CheckNull(r.SR_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":STAT_COMP_METHOD", CheckNull(r.STAT_COMP_METHOD), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":STAT_PREMIUM", CheckNull(r.STAT_PREMIUM), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":STAT_THRESHOLD", CheckNull(r.STAT_THRESHOLD), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":STD_RATE", CheckNull(r.STD_RATE), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":SYLCOUNT", CheckNull(r.SYLCOUNT), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":TECHNOLOGY_CHG", CheckNull(r.TECHNOLOGY_CHG), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":EER_SR_THRESHOLD", CheckNull(r.EER_SR_THRESHOLD), OracleType.Number, ParameterDirection.Input));

                parameters.Add(OracleHelper.CreateParameter(":RATEID", OracleType.Int32, ParameterDirection.InputOutput));

                OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
                r.CONTRACT_RATE_ID = int.Parse(parameters[parameters.Count - 1].Value.ToString());
            }
            catch (OracleException ex)
            {
                throw ex;
            }
            catch (Exception x)
            {
                throw x;
            }
        }
コード例 #19
0
        public override void Add(AddOnChgSched r)
        {
            string sql = String.Format("insert into {0}.ADD_ON_CHG_SCHED "
                                       + "("
                                       + " ADD_ON_CHG_SCHED_ID"
                                       + ", ADD_ON_CHG_TYPE_ID "
                                       + ", ADDED_BY "
                                       + ", AMT_EACH "
                                       + ", COMMENTS_FOR_BILLPRINT "
                                       + ", STARTS_ON "
                                       + ", ENDS_AFTER "
                                       + ", INVOICE_GRP_ID"
                                       + ", NOTES "
                                       + ", QTY "
                                       + ", QTY_RULE "
                                       + ", FREQ "
                                       + " ) "
                                       + "values "
                                       + " ( "
                                       + "  {0}.ADD_ON_CHG_SCHED_ID.nextval"
                                       + ", :ADD_ON_CHG_TYPE_ID"
                                       + ", :ADDED_BY"
                                       + ", :AMT_EACH"
                                       + ", :COMMENTS_FOR_BILLPRINT"
                                       + ", :STARTS_ON "
                                       + ", :ENDS_AFTER"
                                       + ", :INVOICE_GRP_ID"
                                       + ", :NOTES "
                                       + ", :QTY "
                                       + ", :QTY_RULE "
                                       + ", :FREQ "
                                       + " ) "
                                       + "returning ADD_ON_CHG_SCHED_ID into :ADD_ON_CHG_SCHED_ID"
                                       , SchemaName);

            try
            {
                List <OracleParameter> parameters = new List <OracleParameter>();

                parameters.Add(OracleHelper.CreateParameter(":ADD_ON_CHG_SCHED_ID", OracleType.Number, ParameterDirection.InputOutput));

                parameters.Add(OracleHelper.CreateParameter(":ADD_ON_CHG_TYPE_ID", CheckNull(r.ADD_ON_CHG_TYPE_ID), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":ADDED_BY", CheckNull(r.ADDED_BY), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":AMT_EACH", CheckNull(r.AMT_EACH), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":COMMENTS_FOR_BILLPRINT", CheckNull(r.COMMENTS_FOR_BILLPRINT), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":STARTS_ON", CheckNull(r.STARTS_ON), OracleType.DateTime, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":ENDS_AFTER", CheckNull(r.ENDS_AFTER), OracleType.DateTime, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":FREQ", CheckNull(r.FREQ), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":INVOICE_GRP_ID", CheckNull(r.INVOICE_GRP_ID), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":NOTES", CheckNull(r.NOTES), OracleType.VarChar, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":QTY", CheckNull(r.QTY), OracleType.Number, ParameterDirection.Input));
                parameters.Add(OracleHelper.CreateParameter(":QTY_RULE", CheckNull(r.QTY_RULE), OracleType.VarChar, ParameterDirection.Input));



                OracleParameterCollection outParams = OracleHelper.ExecuteNonQuery(base.ConnectionString.Value, sql, parameters.ToArray <OracleParameter>());
                r.ADD_ON_CHG_SCHED_ID = int.Parse(parameters[0].Value.ToString());
                r.Modified            = false;
            }
            catch (OracleException ex)
            {
                throw ex;
            }
            catch (Exception x)
            {
                throw x;
            }
        }