Esempio n. 1
0
 /// <summary>
 /// GetCurrentForProduct
 /// Calls [usp_select_DutyRate_Current_for_Product]
 /// </summary>
 public static DutyRate GetCurrentForProduct(System.Int32?productNo, System.DateTime?datePoint)
 {
     Rebound.GlobalTrader.DAL.DutyRateDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.DutyRate.GetCurrentForProduct(productNo, datePoint);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         DutyRate obj = new DutyRate();
         obj.DutyRateValue = objDetails.DutyRateValue;
         objDetails        = null;
         return(obj);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Returns a new DutyRateDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual DutyRateDetails GetDutyRateFromReader(DbDataReader reader)
        {
            DutyRateDetails dutyRate = new DutyRateDetails();

            if (reader.HasRows)
            {
                dutyRate.DutyRateId    = GetReaderValue_Int32(reader, "DutyRateId", 0);                //From: [Table]
                dutyRate.DutyDate      = GetReaderValue_NullableDateTime(reader, "DutyDate", null);    //From: [Table]
                dutyRate.DutyRateValue = GetReaderValue_NullableDouble(reader, "DutyRateValue", null); //From: [Table]
                dutyRate.ProductNo     = GetReaderValue_Int32(reader, "ProductNo", 0);                 //From: [usp_selectAll_Allocation]
                dutyRate.UpdatedBy     = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);      //From: [Table]
                dutyRate.DLUP          = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);   //From: [Table]
            }
            return(dutyRate);
        }
Esempio n. 3
0
 /// <summary>
 /// Get
 /// Calls [usp_select_DutyRate]
 /// </summary>
 public static DutyRate Get(System.Int32?dutyRateId)
 {
     Rebound.GlobalTrader.DAL.DutyRateDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.DutyRate.Get(dutyRateId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         DutyRate obj = new DutyRate();
         obj.DutyRateId    = objDetails.DutyRateId;
         obj.DutyDate      = objDetails.DutyDate;
         obj.DutyRateValue = objDetails.DutyRateValue;
         obj.ProductNo     = objDetails.ProductNo;
         obj.UpdatedBy     = objDetails.UpdatedBy;
         obj.DLUP          = objDetails.DLUP;
         objDetails        = null;
         return(obj);
     }
 }