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.
97 lines
2.6 KiB
97 lines
2.6 KiB
using NFine.Application.SRM;
|
|
using NFine.Code;
|
|
using NFine.Domain._03_Entity.SRM;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
|
|
namespace NFine.Web.Areas.SRM.Controllers
|
|
{
|
|
public class ICSSrmMessageController : ControllerBase
|
|
{
|
|
ICSSrmMessageApp App = new ICSSrmMessageApp();
|
|
//
|
|
// GET: /SRM/ICSSrmMessage/
|
|
public ActionResult MessageManagement()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult MessageManagementAdd()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult MessageManagementUpdate()
|
|
{
|
|
return View();
|
|
}
|
|
/// <summary>
|
|
/// 查询消息信息
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJson(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetGridJson(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 删除消息信息
|
|
/// </summary>
|
|
/// <param name="keyValue"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DeleteICSSrmMessage(string keyValue)
|
|
{
|
|
string msg = App.DeleteICSSrmMessage(keyValue);
|
|
if (string.IsNullOrWhiteSpace(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("删除失败");
|
|
}
|
|
}
|
|
|
|
[HttpPost]
|
|
public ActionResult SubmitICSSrmMessage(string keyValue)
|
|
{
|
|
try
|
|
{
|
|
App.SaveDetail(keyValue);
|
|
return Success("保存成功!");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult ICSICSSrmMessageByCreate(string MESSAGEID)
|
|
{
|
|
DataTable ListData = App.ICSICSSrmMessageByCreate(MESSAGEID);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
}
|
|
}
|