public IHttpActionResult AddMenu(MenuEntity menu) { bool isAddSuccess = false; ResultEntity result = new ResultEntity(); try { isAddSuccess = dal.AddMenu(menu.ToMENU()); result.Data = menu; } catch (Exception e) { result.Message = e.Message; NtripProxyLogger.LogExceptionIntoFile("调用接口api/Menu/AddMenu异常,异常信息为:" + e.Message); } result.IsSuccess = isAddSuccess; return(Json <ResultEntity>(result)); }
/// <summary> /// 添加菜单 /// </summary> /// <param name="MenuItem">Menus 实体</param> /// <returns></returns> public int AddMenu(MenuInfo MenuItem) { return(MenuDAL.AddMenu(MenuItem)); }