Пример #1
0
        public ActionResult SearchAttribute(List <int> attributes = null)
        {
            ViewBag.Attributes = attributes;

            var attrs = _attributeService.FindBy(x => x.Status == (int)Status.Enable);

            return(PartialView(attrs));
        }
Пример #2
0
        public ActionResult GetAttributeSearchBox(List <int> attributes = null)
        {
            ViewBag.Attributes = attributes;

            var ieAttributes = _attributeService.FindBy(x => x.Status == 1);

            return(PartialView(ieAttributes));
        }
Пример #3
0
        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (filterContext.RouteData.Values["action"].Equals("edit") || filterContext.RouteData.Values["action"].Equals("create"))
            {
                var manufacturers = _manufacturerService.FindBy(x => x.Status == 1);
                if (manufacturers.IsAny())
                {
                    ViewBag.Manufacturers = manufacturers;
                }

                var attributes = _attributeService.FindBy(x => x.Status == 1);
                if (attributes.IsAny())
                {
                    ViewBag.Attributes = attributes;
                }
            }
        }