Ejemplo n.º 1
0
        /// <summary>
        /// Returns a new TaxRateDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual GlobalTaxRateDetails GetTaxRateFromReader(DbDataReader reader)
        {
            GlobalTaxRateDetails taxRate = new GlobalTaxRateDetails();

            if (reader.HasRows)
            {
                taxRate.TaxRateId      = GetReaderValue_Int32(reader, "TaxRateId", 0);                  //From: [Table]
                taxRate.TaxDate        = GetReaderValue_DateTime(reader, "TaxDate", DateTime.MinValue); //From: [Table]
                taxRate.TaxNo          = GetReaderValue_Int32(reader, "TaxNo", 0);                      //From: [Table]
                taxRate.Rate1          = GetReaderValue_NullableDouble(reader, "Rate1", null);          //From: [Table]
                taxRate.Rate2          = GetReaderValue_NullableDouble(reader, "Rate2", null);          //From: [Table]
                taxRate.UpdatedBy      = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);       //From: [Table]
                taxRate.DLUP           = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);    //From: [Table]
                taxRate.CurrentTaxRate = GetReaderValue_NullableDouble(reader, "CurrentTaxRate", null); //From: [usp_select_TaxRate_2_for_Tax_and_Date]
            }
            return(taxRate);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_TaxRate]
 /// </summary>
 public static GlobalTaxRate Get(System.Int32?taxRateId)
 {
     Rebound.GlobalTrader.DAL.GlobalTaxRateDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.GlobalTaxRate.Get(taxRateId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         GlobalTaxRate obj = new GlobalTaxRate();
         obj.TaxRateId = objDetails.TaxRateId;
         obj.TaxDate   = objDetails.TaxDate;
         obj.TaxNo     = objDetails.TaxNo;
         obj.Rate1     = objDetails.Rate1;
         obj.Rate2     = objDetails.Rate2;
         obj.UpdatedBy = objDetails.UpdatedBy;
         obj.DLUP      = objDetails.DLUP;
         objDetails    = null;
         return(obj);
     }
 }