Exemplo n.º 1
0
 public JsonResult UpdateMenu(MenuHdr menu)
 {
     if (ModelState.IsValid)
     {
         try
         {
             if (RoleManagementTables.UpdateMenu(new MenuHdr {
                 menuID = menu.menuID, Link = menu.Link, MenuText = menu.MenuText
             }) > 0)
             {
                 return(Json(new { isError = "F", message = "Menu has been Updated!" }));
             }
             else
             {
                 return(Json(new { isError = "T", message = "Menu already exist." }));
             }
         }
         catch (Exception ex)
         {
             return(Json(new { isError = "T", message = "Could not insert data." }));
         }
     }
     else
     {
         return(Json(new { isError = "T", message = "Could not insert data." }));
     }
 }