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 InvAddController : ControllerBase { // GET: SRM/InvAdd RFQManagerApp app = new RFQManagerApp(); public ActionResult Index() { return View(); } public ActionResult Invmes() { return View(); } [HttpGet] public ActionResult GetINv(string invcode,Pagination pagination,string workpoint, string InvName) { DataTable ListData = app.Getinv(invcode, ref pagination,workpoint, InvName); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = ListData, }; return Content(JsonData.ToJson()); } public void AddInvtoTemp(string json) { app.AddinvtoTemp(json); } [HttpGet] public ActionResult GetInvTab(string rfqno,Pagination pagination) { DataTable table=app.GetInvTable(rfqno); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = table }; return Content(JsonData.ToJson()); } public void ClearInvTemp() { app.ClearTempTab(); } public ActionResult GetInvRow(string id) { return Content(app.GetInvRow(id).ToJson()); } public ActionResult DeleteInvRow(string keyValue) { string msg = app.DeleteInvTab(keyValue); if (string.IsNullOrEmpty(msg)) { return Success("删除成功!"); } else { return Error(msg); } //return Content(app.DeleteInvTab(json)); } } }