예제 #1
0
        //it will get the list of products on list page
        public JsonResult GetProductsList()
        {
            var data = service.GetProductsList();

            //var ProductModel = new ProductDetailModel
            //{
            //    ProductId = data.ProductId,
            //    ProductName = data.ProductName,
            //    SellingPrice = data.SellingPrice,
            //    MarketPrice = data.MarketPrice,
            //    Stock = data.Stock,
            //    Description = data.Description,
            //    DateOfInsert = data.DateOfInsert,
            //    Rating = data.Rating,
            //    OperatingSystem = data.OperatingSystem,
            //    Color = data.Color,
            //    IsAvailable = data.IsAvailable,
            //    FirstImage = data.FirstImage,
            //    SecondImage = data.SecondImage,
            //    ThirdImage = data.ThirdImage
            //};
            return(Json(data));
        }
        //it will get the list of products on list page
        public JsonResult GetProductsList()
        {
            var data = service.GetProductsList();

            return(Json(data));
        }