You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

170 lines
3.8 KiB

using NFine.Application.OMAY;
using NFine.Code;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace NFine.Web.Areas.OMAY.Controllers
{
public class OMAYKPIController : ControllerBase
{
OMAYApp App = new OMAYApp();
// GET: OMAY/OMAYKPI
public ActionResult OMAYKPIIndex()
{
return View();
}
public ActionResult OMAYMaintain()
{
return View();
}
public ActionResult OMAYMaintainAdd()
{
return View();
}
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetYLAndPC(string Type, string Group, string TimeFrom, string TimeArrive)
{
DataTable ListData = App.GetYLAndPC(Type, Group, TimeFrom, TimeArrive);
var JsonData = new
{
rows = ListData,
};
return Content(JsonData.ToJson());
}
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetYLAndPCLRK(string Type, string Group, string TimeFrom, string TimeArrive)
{
DataTable ListData = App.GetYLAndPCLRK(Type, Group, TimeFrom, TimeArrive);
var JsonData = new
{
rows = ListData,
};
return Content(JsonData.ToJson());
}
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetCC(string Type, string Group, string TimeFrom, string TimeArrive)
{
DataTable ListData = App.GetCC(Type, Group, TimeFrom, TimeArrive);
var JsonData = new
{
rows = ListData,
};
return Content(JsonData.ToJson());
}
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetCCL7(string Type, string Group, string TimeFrom, string TimeArrive)
{
DataTable ListData = App.GetCCL7(Type, Group, TimeFrom, TimeArrive);
var JsonData = new
{
rows = ListData,
};
return Content(JsonData.ToJson());
}
[HttpPost]
[HandlerAjaxOnly]
public ActionResult UpdateKPIMaintain(string keyValue)
{
string msg = App.UpdateKPIMaintain(keyValue);
if (!string.IsNullOrEmpty(msg))
{
return Error(msg);
}
else
{
return Success("修改成功!");
}
}
[HttpPost]
[HandlerAjaxOnly]
public ActionResult CreateKPIMaintain(string keyValue)
{
string msg = App.CreateKPIMaintain(keyValue);
if (!string.IsNullOrEmpty(msg))
{
return Error(msg);
}
else
{
return Success("添加成功!");
}
}
[HttpPost]
[HandlerAjaxOnly]
[ValidateAntiForgeryToken]
public ActionResult DeleteOMAYMaintain(string keyValue)
{
string msg = App.DeleteOMAYMaintain(keyValue);
if (string.IsNullOrEmpty(msg))
{
return Success("删除成功!");
}
else
{
return Error(msg);
}
}
[HttpGet]
public ActionResult GetZB(string TimeFrom, string TimeArrive)
{
var data = App.GetZB(TimeFrom, TimeArrive);
return Content(data.ToJson());
}
[HttpGet]
public ActionResult GetYFFJ(string TimeFrom, string TimeArrive)
{
var data = App.GetYFFJ(TimeFrom, TimeArrive);
return Content(data.ToJson());
}
}
}