Пример #1
0
 /// <summary>
 /// GetForTaxAndDate
 /// Calls [usp_select_TaxRate_for_Tax_and_Date]
 /// </summary>
 public static TaxRate GetForTaxAndDate(System.Int32?taxNo, System.Int32?clientNo, System.DateTime?taxPoint)
 {
     Rebound.GlobalTrader.DAL.TaxRateDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.TaxRate.GetForTaxAndDate(taxNo, clientNo, taxPoint);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         TaxRate obj = new TaxRate();
         obj.CurrentTaxRate = objDetails.CurrentTaxRate;
         objDetails         = null;
         return(obj);
     }
 }
Пример #2
0
        /// <summary>
        /// Returns a new TaxRateDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual TaxRateDetails GetTaxRateFromReader(DbDataReader reader)
        {
            TaxRateDetails taxRate = new TaxRateDetails();

            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);
        }
Пример #3
0
 /// <summary>
 /// Get
 /// Calls [usp_select_TaxRate]
 /// </summary>
 public static TaxRate Get(System.Int32?taxRateId)
 {
     Rebound.GlobalTrader.DAL.TaxRateDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.TaxRate.Get(taxRateId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         TaxRate obj = new TaxRate();
         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);
     }
 }