public int ColorFilterItemCount(string Colors) { Procedure.Procedure procedure = new Procedure.Procedure(); var Color = procedure.ColorFilters(Colors); return(Color.Count()); }
public ActionResult ColorFilter(string Colors) { Procedure.Procedure procedure = new Procedure.Procedure(); ViewData["color"] = procedure.ColorFilters(Colors); var cookie = Request.Cookies[FormsAuthentication.FormsCookieName]; if (cookie == null) { ViewBag.IsAuthenticated = false; return(View()); } var ticket = FormsAuthentication.Decrypt(cookie.Value); ViewBag.IsAuthenticated = true; ViewBag.UserName = ticket.UserData; var repository = new ShoppingCartRepository(); var Data = repository.FindByMemberID(ticket.UserData); ViewData["count"] = Data.Count().ToString(); return(View()); }