修正代码

This commit is contained in:
admin
2021-01-13 10:21:56 +08:00
parent 6001b690ed
commit be6ed7aec9
23 changed files with 214 additions and 38 deletions

View File

@@ -0,0 +1,27 @@
using NX.ERP.U8;
using NX.ERP.U8.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace NX.ERP.WebAPi.Controllers
{
public class CustomerController : ApiController
{
// GET api/values
[HttpGet]
public IEnumerable<Model.Customer> List()
{
var customerDAL = new CustomerDAL();
return customerDAL.GetList();
}
// GET api/values/5
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace NX.ERP.WebAPi.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Title = "Home Page";
return View();
}
}
}

View File

@@ -0,0 +1,21 @@
using NX.ERP.Model;
using NX.ERP.U8;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
namespace NX.ERP.WebAPi.Controllers
{
public class MaterielController : ApiController
{
[HttpGet]
public IEnumerable<Materiel> List()
{
var materielDAL = new MaterielDAL();
return materielDAL.GetList();
}
}
}

View File

@@ -0,0 +1,21 @@
using NX.ERP.Model;
using NX.ERP.U8;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
namespace NX.ERP.WebAPi.Controllers
{
public class MaterielTypeController:ApiController
{
[HttpGet]
public IEnumerable<MaterielType> List()
{
var materielType = new MaterielTypeDAL();
return materielType.GetList();
}
}
}

View File

@@ -0,0 +1,28 @@
using NX.ERP.U8.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
namespace NX.ERP.WebAPi.Controllers
{
public class PositionController : ApiController
{
[HttpGet]
public IEnumerable<Model.Bin> List()
{
var binDAL = new BinDAL();
return binDAL.GetList();
}
[HttpGet]
public IEnumerable<Model.Bin> GetList(string Code)
{
var binDAL = new BinDAL();
return binDAL.GetListByWhCode(Code);
}
}
}

View File

@@ -0,0 +1,21 @@
using NX.ERP.Model;
using NX.ERP.U8;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
namespace NX.ERP.WebAPi.Controllers
{
public class SupplierController : ApiController
{
[HttpGet]
public IEnumerable<Supplier> List()
{
var supplierDAL = new SupplierDAL();
return supplierDAL.GetList();
}
}
}

View File

@@ -0,0 +1,20 @@
using NX.ERP.U8;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
namespace NX.ERP.WebAPi.Controllers
{
public class UnitController: ApiController
{
[HttpGet]
public IEnumerable<Model.Unit> List()
{
var supplierDAL = new UnitDAL();
return supplierDAL.GetList();
}
}
}

View File

@@ -0,0 +1,19 @@
using NX.ERP.U8;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
namespace NX.ERP.WebAPi.Controllers
{
public class WarehouseController:ApiController
{
[HttpGet]
public IEnumerable<Model.Warehouse> List()
{
var warehouseDAL = new WarehouseDAL();
return warehouseDAL.GetList();
}
}
}