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.
83 lines
2.1 KiB
83 lines
2.1 KiB
using Newtonsoft.Json;
|
|
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 SupplierAddController : ControllerBase
|
|
{
|
|
// GET: SRM/SupplierAdd
|
|
RFQManagerApp app = new RFQManagerApp();
|
|
public ActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult CustomerMes() {
|
|
return View();
|
|
}
|
|
public ActionResult GetSupplier(string queryJson, Pagination pagination)
|
|
{
|
|
DataTable ListData = app.GetSup(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
|
|
|
|
}
|
|
|
|
|
|
public void AddSuptoTemp(string json) {
|
|
app.AddSuptoTemp(json);
|
|
}
|
|
|
|
[HttpGet]
|
|
public ActionResult GetSupTable(string rfqno, Pagination pagination) {
|
|
DataTable table = app.GetSupTable(rfqno);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = table
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
|
|
}
|
|
public ActionResult Delete(string keyValue) {
|
|
|
|
string msg = app.DeleteSupTab(keyValue);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
//return Content(app.DeleteSupTab(json));
|
|
|
|
}
|
|
|
|
public ActionResult GetSupRow(string Id) {
|
|
return Content(app.GetSuprow(Id).ToJson());
|
|
|
|
}
|
|
public ActionResult GetCurrency()
|
|
{
|
|
return Content(JsonConvert.SerializeObject(app.GetCurrencty()));
|
|
|
|
}
|
|
|
|
}
|
|
}
|