55 lines
1.5 KiB
C#
55 lines
1.5 KiB
C#
using NX.ERP.Model.Sale;
|
|
using NX.ERP.U8.Sale;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Http;
|
|
|
|
namespace NX.ERP.WebAPi.Controllers.Sale
|
|
{
|
|
public class DispatchController : ApiController
|
|
{
|
|
[Obsolete]
|
|
[Route("api/Dispatch/List")]
|
|
// GET api/values
|
|
[HttpGet]
|
|
public IEnumerable<Model.Sale.DispatchList> List()
|
|
{
|
|
var customerDAL = new DispatchListDAL();
|
|
return customerDAL.GetList();
|
|
}
|
|
[Obsolete]
|
|
[HttpGet]
|
|
public Model.Sale.DispatchList Model(int id)
|
|
{
|
|
var customerDAL = new DispatchListDAL();
|
|
return customerDAL.GetModel(id);
|
|
}
|
|
[Obsolete]
|
|
[Route("api/Dispatch/{Code}")]
|
|
[HttpGet]
|
|
public Model.Sale.DispatchList ModelByCode(string Code)
|
|
{
|
|
var customerDAL = new DispatchListDAL();
|
|
return customerDAL.GetModel(Code);
|
|
}
|
|
[Obsolete]
|
|
[Route("api/Dispatch/List/{id}")]
|
|
[HttpGet]
|
|
public IEnumerable<Model.Sale.DispatchList> GetListByLastID(int id)
|
|
{
|
|
var customerDAL = new DispatchListDAL();
|
|
return customerDAL.GetListByLastID(id);
|
|
}
|
|
|
|
[Route("api/Dispatch/Query")]
|
|
[HttpPost]
|
|
public IEnumerable<Model.Sale.DispatchList> Query(NX.ERP.Model.Request.Dispatch dispatch)
|
|
{
|
|
var customerDAL = new DispatchListDAL();
|
|
return customerDAL.GetList(dispatch);
|
|
}
|
|
|
|
}
|
|
} |