コード例 #1
0
ファイル: ProductController.cs プロジェクト: jumker388/rd2018
        public ActionResult GetPropertyFilter()
        {
            var listType = productTypeRepository.GetListForTree <object>();

            var listDistributor = distributorRepository.GetListForTree <object>();

            var listManufacturer = manufacturerRepository.GetListForTree <object>();

            var listStatus = productStatusRepository.GetListForTree <object>();

            var listLabel = productLabelRepository.GetListForTree <object>();

            return(Json(new
            {
                listType = listType,
                listDistributor = listDistributor,
                listManufacturer = listManufacturer,
                listStatus = listStatus,
                listLabel = listLabel
            }, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        public ActionResult EditForm(int?id)
        {
            var obj = new ProductManufacturerItem();

            var listProductType = manufacturerRepository.GetListForTree <object>();

            if (id.HasValue)
            {
                obj = manufacturerRepository.GetItemById <ProductManufacturerItem>(id.Value);
            }

            return(Json(new
            {
                data = obj,
                listType = listProductType
            }, JsonRequestBehavior.AllowGet));
        }