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.
216 lines
5.9 KiB
216 lines
5.9 KiB
using NFine.Application.DHAY;
|
|
using NFine.Code;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Reflection.Emit;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
|
|
namespace NFine.Web.Areas.DHAY.Controllers
|
|
{
|
|
public class ICSMOIssueController : ControllerBase
|
|
{
|
|
ICSMOIssueAPP App = new ICSMOIssueAPP();
|
|
// GET: DHAY/ICSCustomerSuppliedReturn
|
|
public ActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult Create()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult GetInvCode()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult Update()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult GetWHCode()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DeleteICSMOIssue(string keyValue)
|
|
{
|
|
string msg = App.DeleteICSMOIssue(keyValue);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult SaveICSMOIssue(string ICSASN)
|
|
{
|
|
|
|
string msg = App.SaveICSMOIssue(ICSASN);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("添加成功!");
|
|
}
|
|
}
|
|
[HttpGet]
|
|
public ActionResult GetICSMOIssue(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetICSMOIssue(ref pagination, queryJson);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
public ActionResult GetICSMOIssueByIssueCode(string IssueCode)
|
|
{
|
|
DataTable ListData = App.GetICSMOIssueByIssueCode(IssueCode);
|
|
var JsonData = new
|
|
{
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetICSMOIssueDetail(string IssueCode, string queryJson, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetICSMOIssueDetail(IssueCode, queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
[ValidateAntiForgeryToken]
|
|
public ActionResult DeleteICSMOIssueByCode(string keyValue)
|
|
{
|
|
string msg = App.DeleteICSMOIssueByCode(keyValue);
|
|
if (string.IsNullOrEmpty(msg))
|
|
{
|
|
return Success("删除成功!");
|
|
}
|
|
else
|
|
{
|
|
return Error(msg);
|
|
}
|
|
}
|
|
|
|
|
|
public ActionResult GetBidCode(string WorkPoint)
|
|
{
|
|
try
|
|
{
|
|
string Code = App.GetBidCode(WorkPoint);
|
|
var JsonData = new
|
|
{
|
|
Code = Code,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
return Error(ex.Message);
|
|
}
|
|
}
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult UpdateICSMOIssue(string ICSASN)
|
|
{
|
|
|
|
string msg = App.UpdateICSMOIssue(ICSASN);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("修改成功!");
|
|
}
|
|
}
|
|
public ActionResult GetICSReturnTemporary(string rfqno, Pagination pagination)
|
|
{
|
|
DataTable table = App.GetICSReturnTemporary(rfqno);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = table
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetU9CodeType(string type)
|
|
{
|
|
string dt = App.GetU9CodeType(type);
|
|
return Content(dt);
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetItemList(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetItemList(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetItemListCount(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = App.GetItemListCount(queryJson,ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
|
|
public ActionResult GetLYDep()
|
|
{
|
|
DataTable dt = App.GetLYDep();
|
|
return Content(dt.ToJson());
|
|
}
|
|
|
|
|
|
}
|
|
}
|