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.
78 lines
2.1 KiB
78 lines
2.1 KiB
using NFine.Code;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using NFine.Application.SRM;
|
|
|
|
namespace NFine.Web.Areas.SRM.Controllers
|
|
{
|
|
public class PurchugController : ControllerBase
|
|
{
|
|
PurchugApp App = new PurchugApp();
|
|
//
|
|
// GET: /SRM/Purchug/
|
|
public ActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult PuchugAdd()
|
|
{
|
|
return View();
|
|
}
|
|
[HttpPost]
|
|
public ActionResult SubmitPURCHUGCODE(string keyValue)
|
|
{
|
|
try
|
|
{
|
|
App.SubmitPURCHUGCODE(keyValue);
|
|
return Success("保存成功!");
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPurchug(string PURCHUGCODE, string WorkPoint)
|
|
{
|
|
try
|
|
{
|
|
DataRow dr = App.GetPurchug(PURCHUGCODE, WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
PURCHUGCODE = dr["PURCHUGCODE"].ToString(),
|
|
PURCHUGNAME = dr["PURCHUGNAME"].ToString(),
|
|
PURCHUGCONECT = dr["PURCHUGCONECT"].ToString(),
|
|
WorkPoint = dr["WorkPoint"].ToString()
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
}
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DeletePurchug(string keyValue, string WorkPoint)
|
|
{
|
|
string msg = App.DeletePurchug(keyValue, WorkPoint);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|