Ejemplo n.º 1
0
        public ActionResult Save(FormCollection form)
        {
            string navSortOrderPrefix = "nav-";

            foreach (string key in form.Keys)
            {
                if (key.StartsWith(navSortOrderPrefix) && !string.IsNullOrEmpty(form[key]) && form[key].All(c => Char.IsNumber(c)))
                {
                    var nav = navigateService.GetNavigate(Convert.ToInt32(key.TrimStart(navSortOrderPrefix)));
                    nav.SortOrder = Convert.ToInt32(form[key]);
                    navigateService.Update(nav);
                }
            }
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit(string moudleId, string menuId, string btnId, NavigateDto dto)
 {
     SetMenuType(ref dto);
     service.Update(dto);
     return(RedirectToAction("Index", RouteData.Values));
 }