private static SaleType PopulateFromDBDetailsObject(SaleTypeDetails obj) { SaleType objNew = new SaleType(); objNew.SaleTypeId = obj.SaleTypeId; objNew.Name = obj.Name; return(objNew); }
/// <summary> /// Get /// Calls [usp_select_SaleType] /// </summary> public static SaleType Get(System.Int32?saleTypeId) { Rebound.GlobalTrader.DAL.SaleTypeDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.SaleType.Get(saleTypeId); if (objDetails == null) { return(null); } else { SaleType obj = new SaleType(); obj.SaleTypeId = objDetails.SaleTypeId; obj.Name = objDetails.Name; objDetails = null; return(obj); } }
/// <summary> /// GetList /// Calls [usp_selectAll_SaleType] /// </summary> public static List <SaleType> GetList() { List <SaleTypeDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.SaleType.GetList(); if (lstDetails == null) { return(new List <SaleType>()); } else { List <SaleType> lst = new List <SaleType>(); foreach (SaleTypeDetails objDetails in lstDetails) { Rebound.GlobalTrader.BLL.SaleType obj = new Rebound.GlobalTrader.BLL.SaleType(); obj.SaleTypeId = objDetails.SaleTypeId; obj.Name = objDetails.Name; lst.Add(obj); obj = null; } lstDetails = null; return(lst); } }