Example #1
0
        /// <summary>
        /// GetListForProduct
        /// Calls [usp_selectAll_DutyRate_for_Product]
        /// </summary>
        public static List <DutyRate> GetListForGlobalProduct(System.Int32?productId)
        {
            List <DutyRateDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.DutyRate.GetListForGlobalProduct(productId);

            if (lstDetails == null)
            {
                return(new List <DutyRate>());
            }
            else
            {
                List <DutyRate> lst = new List <DutyRate>();
                foreach (DutyRateDetails objDetails in lstDetails)
                {
                    Rebound.GlobalTrader.BLL.DutyRate obj = new Rebound.GlobalTrader.BLL.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;
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }
Example #2
0
        private static DutyRate PopulateFromDBDetailsObject(DutyRateDetails obj)
        {
            DutyRate objNew = new DutyRate();

            objNew.DutyRateId    = obj.DutyRateId;
            objNew.DutyDate      = obj.DutyDate;
            objNew.DutyRateValue = obj.DutyRateValue;
            objNew.ProductNo     = obj.ProductNo;
            objNew.UpdatedBy     = obj.UpdatedBy;
            objNew.DLUP          = obj.DLUP;
            return(objNew);
        }
Example #3
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);
     }
 }
Example #4
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);
     }
 }