Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        public ActionResult EditForm(int?id)
        {
            var obj = new ProductLabelItem();

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

            if (id.HasValue)
            {
                obj = productLabelRepository.GetItemById <ProductLabelItem>(id.Value);
            }

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