public ActionResult SearchAttribute(List <int> attributes = null) { ViewBag.Attributes = attributes; var attrs = _attributeService.FindBy(x => x.Status == (int)Status.Enable); return(PartialView(attrs)); }
public ActionResult GetAttributeSearchBox(List <int> attributes = null) { ViewBag.Attributes = attributes; var ieAttributes = _attributeService.FindBy(x => x.Status == 1); return(PartialView(ieAttributes)); }
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; } } }