Ejemplo n.º 1
0
 /// <summary>
 /// Get List of Vendors
 /// </summary>
 /// <returns>IList of Vendors</returns>
 public IList <Vendor> GetAll()
 {
     return(VendorDao.GetVendors());
 }
        /// <summary>
        /// Gets the vendors.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns></returns>
        public VendorResponse GetVendors(VendorRequest request)
        {
            var response = new VendorResponse();

            if (request.LoadOptions.Contains("Vendors"))
            {
                response.Vendors = request.LoadOptions.Contains("IsActive") ? VendorDao.GetVendorByActives(request.IsActive) : VendorDao.GetVendors();
            }
            if (request.LoadOptions.Contains("Vendor"))
            {
                response.Vendor = VendorDao.GetVendorById(request.VendorId);
            }

            return(response);
        }