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.
 
 
 
 
 

166 lines
4.6 KiB

using NFine.Application.DHAY;
using NFine.Code;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection.Emit;
using System.Web;
using System.Web.Mvc;
namespace NFine.Web.Areas.DHAY.Controllers
{
public class ICSCustomerSuppliedInController : ControllerBase
{
ICSCustomerSuppliedInApp App = new ICSCustomerSuppliedInApp();
// 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 DeleteICSOtherIn(string keyValue)
{
string msg = App.DeleteICSOtherIn(keyValue);
if (string.IsNullOrEmpty(msg))
{
return Success("删除成功!");
}
else
{
return Error(msg);
}
}
[HttpPost]
[HandlerAjaxOnly]
public ActionResult SaveICSOtherIn(string ICSASN)
{
string msg = App.SaveICSOtherIn(ICSASN);
if (!string.IsNullOrEmpty(msg))
{
return Error(msg);
}
else
{
return Success("添加成功!");
}
}
[HttpGet]
public ActionResult GetICSOtherIn(Pagination pagination,string queryJson)
{
DataTable ListData = App.GetICSOtherIn(ref pagination, queryJson);
var JsonData = new
{
total = pagination.total,
page = pagination.page,
records = pagination.records,
rows = ListData,
};
return Content(JsonData.ToJson());
}
[HttpGet]
public ActionResult GetICSOtherInByInCode(string InCode)
{
DataTable ListData = App.GetICSOtherInByInCode(InCode);
var JsonData = new
{
rows = ListData,
};
return Content(JsonData.ToJson());
}
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetICSOtherInDetail(string InCode, string queryJson, Pagination pagination)
{
DataTable ListData = App.GetICSOtherInDetail(InCode, 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 DeleteICSOtherInByCode(string keyValue)
{
string msg = App.DeleteICSOtherInByCode(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 UpdateICSOtherIn(string ICSASN)
{
string msg = App.UpdateICSOtherIn(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());
}
}
}