Example #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));
        }
Example #2
0
        public ActionResult GetAttributeSearchBox(List <int> attributes = null)
        {
            ViewBag.Attributes = attributes;

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

            return(PartialView(ieAttributes));
        }
Example #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;
                }
            }
        }