public ActionResult Edit(FrameworkMenuVM vm)
 {
     if (!ModelState.IsValid)
     {
         vm.IconSelectItems = !string.IsNullOrEmpty(vm.IconFont) && IconFontsHelper
                              .IconFontDicItems
                              .ContainsKey(vm.IconFont)
                 ? IconFontsHelper
                              .IconFontDicItems[vm.IconFont]
                              .Select(x => new ComboSelectListItem()
         {
             Text  = x.Text,
             Value = x.Value,
             Icon  = x.Icon
         }).ToList()
                 : new List <ComboSelectListItem>();
         return(PartialView(vm));
     }
     else
     {
         vm.DoEdit();
         if (!ModelState.IsValid)
         {
             vm.DoReInit();
             return(PartialView(vm));
         }
         else
         {
             return(FFResult().CloseDialog().RefreshGrid());
         }
     }
 }
 public ActionResult Create(FrameworkMenuVM vm)
 {
     if (!ModelState.IsValid)
     {
         return(PartialView(vm));
     }
     else
     {
         vm.DoAdd();
         if (!ModelState.IsValid)
         {
             vm.DoReInit();
             return(PartialView(vm));
         }
         else
         {
             return(FFResult().CloseDialog().RefreshGrid());
         }
     }
 }
 public ActionResult BatchCreate(FrameworkMenuVM vm, IFormCollection fc)
 {
     if (!ModelState.IsValid)
     {
         return(PartialView("BatchCreate", vm));
     }
     else
     {
         vm.DoBatchAdd();
         if (!ModelState.IsValid)
         {
             vm.DoReInit();
             return(PartialView("BatchCreate", vm));
         }
         else
         {
             return(FFResult().CloseDialog().RefreshGrid());
         }
     }
 }