Beispiel #1
0
        public JsonpResult GetTypicalInfoByName(string typicalName)
        {
            using (TypicalRepository tRepo = new TypicalRepository())
            {
                var theData = tRepo.GetTypicalInfo(typicalName: typicalName);

                return(new JsonpResult()
                {
                    Data = theData,
                    JsonRequestBehavior = JsonRequestBehavior.AllowGet
                });
            }
        }
Beispiel #2
0
        public JsonpResult SearchTypicals(string searchText)
        {
            using (TypicalRepository tRepo = new TypicalRepository())
            {
                var theData = tRepo.Search(searchText);

                return(new JsonpResult()
                {
                    Data = theData,
                    JsonRequestBehavior = JsonRequestBehavior.AllowGet
                });
            }
        }
Beispiel #3
0
        public JsonpResult GetTypicalInfo(int id)
        {
            using (TypicalRepository tRepo = new TypicalRepository())
            {
                var theData = tRepo.GetTypicalInfo(id: id);

                return(new JsonpResult()
                {
                    Data = theData,
                    JsonRequestBehavior = JsonRequestBehavior.AllowGet
                });
            }
        }
Beispiel #4
0
        public JsonpResult GetTypicalCoverList(string category, int?seriesId, string fpSize, string shape, string keywords,
                                               int?minPrice, int?maxPrice, bool?in2Only,
                                               string sortBy, int?typicalId, string itemList)
        {
            using (TypicalRepository tRepo = new TypicalRepository())
            {
                var theList = tRepo.GetTypicalCoverData(category, seriesId, fpSize, shape, keywords,
                                                        minPrice, maxPrice, in2Only,
                                                        sortBy, typicalId, itemList);

                return(new JsonpResult()
                {
                    Data = theList,
                    JsonRequestBehavior = JsonRequestBehavior.AllowGet
                });
            }
        }
Beispiel #5
0
        public JsonpResult GetTypicalDetailList(string category, int?seriesId, string fpSize, string shape, string keywords,
                                                int?minPrice, int?maxPrice, bool?in2Only,
                                                string sortBy, int?pageNum = 1, int?pageSize = 28)
        {
            using (TypicalRepository tRepo = new TypicalRepository())
            {
                var theList = tRepo.GetTypicalDetailData(category, seriesId, fpSize, shape, keywords,
                                                         minPrice, maxPrice, in2Only,
                                                         sortBy, pageNum.Value, pageSize.Value);

                return(new JsonpResult()
                {
                    Data = theList,
                    JsonRequestBehavior = JsonRequestBehavior.AllowGet
                });
            }
        }