public JsonResult InsertNewMenu(MenuHdr menu)
 {
     if (ModelState.IsValid)
     {
         try
         {
             if (RoleManagementTables.InsertNewMenu(new MenuHdr {
                 MenuText = menu.MenuText, ParentID = (menu.ParentID == null ? 0 : menu.ParentID), Link = menu.Link == null ? "" : menu.Link
             }) > 0)
             {
                 return(Json(new { isError = "F", message = "New menu has been added!" }));
             }
             else
             {
                 return(Json(new { isError = "T", message = "Menu already exist." }));
             }
         }
         catch (Exception ex)
         {
             Console.WriteLine(ex.Message);
             return(Json(new { isError = "T", message = "Could not insert data." }));
         }
     }
     else
     {
         return(Json(new { isError = "T", message = "Could not insert data." }));
     }
 }