2016-11-06 00:48:08 +08:00
|
|
|
|
using Bootstrap.Admin.Models;
|
|
|
|
|
using Bootstrap.DataAccess;
|
|
|
|
|
using System.Web.Http;
|
|
|
|
|
|
|
|
|
|
namespace Bootstrap.Admin.Controllers
|
|
|
|
|
{
|
|
|
|
|
public class MenusController : ApiController
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="value"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
public QueryData<Menu> Get([FromUri]QueryMenuOption value)
|
|
|
|
|
{
|
|
|
|
|
return value.RetrieveData();
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="value"></param>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public bool Post([FromBody]Menu value)
|
|
|
|
|
{
|
|
|
|
|
return MenuHelper.SaveMenu(value);
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
[HttpDelete]
|
|
|
|
|
public bool Delete([FromBody]string value)
|
|
|
|
|
{
|
|
|
|
|
return MenuHelper.DeleteMenu(value);
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-10-25 18:54:20 +08:00
|
|
|
|
}
|