using HH.WMS.Entitys;
|
using HH.WMS.WebUI.Controllers;
|
using Newtonsoft.Json;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Web;
|
using System.Web.Mvc;
|
|
namespace HH.WMS.WebUI.Areas.Sys.Controllers
|
{
|
public class PageSetController : BaseController
|
{
|
public ActionResult Index()
|
{
|
return View();
|
}
|
|
public ActionResult Edit(string id, string power)
|
{
|
TN_WM_POWER_ENABLED_DTLEntity entity = new TN_WM_POWER_ENABLED_DTLEntity()
|
{
|
CN_S_PARENTID = power
|
};
|
if (!string.IsNullOrEmpty(id))
|
{
|
string result = HttpWMS_Get("api/PageSet/GetById?id=" + id);
|
var resultEntity = JsonConvert.DeserializeObject<OperateResult>(result);
|
entity = resultEntity.GetData<TN_WM_POWER_ENABLED_DTLEntity>();
|
}
|
return View(entity);
|
}
|
|
[HttpPost]
|
public string Edit(TN_WM_POWER_ENABLED_DTLEntity entity)
|
{
|
var data = new
|
{
|
TokenId = ViewConstants.TokenId,
|
PostData = entity
|
};
|
return HttpWMS_Post("api/PageSet/Edit", JsonConvert.SerializeObject(data));
|
}
|
|
public string Delete(string id)
|
{
|
return HttpWMS_Get("api/PageSet/Delete?id=" + id);
|
}
|
|
public string GetPowerEnabled(string power, string code, string name)
|
{
|
return HttpWMS_Get("api/PageSet/GetPowerEnabled?power=" + power + "&code=" + code + "&name=" + name);
|
}
|
|
public string SetEnabled(TN_WM_POWER_ENABLED_DTLEntity entity)
|
{
|
var data = new
|
{
|
TokenId = ViewConstants.TokenId,
|
PostData = entity
|
};
|
return HttpWMS_Post("api/PageSet/SetEnabled", JsonConvert.SerializeObject(data));
|
}
|
|
public string GetPageSetList()
|
{
|
return HttpWMS_Get("api/PageSet/GetPageSetList");
|
}
|
|
public string GetPowerType()
|
{
|
return HttpWMS_Get("api/PageSet/GetPowerType");
|
}
|
}
|
}
|