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.
128 lines
3.4 KiB
128 lines
3.4 KiB
using NFine.Application.SRM;
|
|
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.SRM.Controllers
|
|
{
|
|
public class ICSSrmportAlnoticeController : ControllerBase
|
|
{
|
|
ICSSrmportAlnoticeApp App = new ICSSrmportAlnoticeApp();
|
|
//
|
|
// GET: /SRM/ICSSrmportAlnotice/
|
|
/// <summary>
|
|
/// 查询界面
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public ActionResult AnnouncementIssued()
|
|
{
|
|
return View();
|
|
}
|
|
/// <summary>
|
|
/// 新增修改界面
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public ActionResult AnnouncementIssuedAdd()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult AnnouncementIssuedUpdate()
|
|
{
|
|
return View();
|
|
}
|
|
[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="WorkPoint"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetNOTICETYPE()
|
|
{
|
|
DataTable dt = App.GetNOTICETYPE();
|
|
return Content(dt.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 保存公告
|
|
/// </summary>
|
|
/// <param name="keyValue"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult SubmitSrmportAlnotice(string keyValue, string ID)
|
|
{
|
|
try
|
|
{
|
|
App.SubmitSrmportAlnotice(keyValue, ID);
|
|
return Success("保存成功!");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
}
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DeleteSrmportAlnotice(string keyValue)
|
|
{
|
|
string msg = App.DeleteSrmportAlnotice(keyValue);
|
|
if (string.IsNullOrWhiteSpace(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error("删除失败");
|
|
}
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult ICSSrmportAlnoticeByCreate(string NoticeID)
|
|
{
|
|
DataTable ListData = App.ICSSrmportAlnoticeByCreate(NoticeID);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
public ActionResult ImportOrder()
|
|
{
|
|
try
|
|
{
|
|
App.ImportOrder();
|
|
return Success("成功");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
|
|
return Success(ex.Message);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|