using NFine.Application; using NFine.Application.ProductManage; using NFine.Application.SRM; using NFine.Code; using NFine.Domain.Entity.ProductManage; using System.Collections.Generic; using System.Data; using System.Linq; using System.Web.Mvc; namespace NFine.Web.Areas.SRM.Controllers { public class TakeEffectPriceController : ControllerBase { TakeEffApp App = new TakeEffApp(); // // GET: /SRM/TakeEffectPrice/ public ActionResult Index() { return View(); } //返回视图 public ActionResult TakeEffDetails() { return View(); } public ActionResult TakeEffList() { return View(); } /// /// 获取采购组织 /// /// /// /// [HttpGet] [HandlerAjaxOnly] public ActionResult GetWorkPint() { DataTable dt = App.GetWorkPint(); return Content(dt.ToJson()); } /// /// 获取采购组织 /// /// /// /// [HttpGet] [HandlerAjaxOnly] public ActionResult GetMaterials() { DataTable dt = App.GetMaterials(); return Content(dt.ToJson()); } /// /// 获取物料 /// /// /// /// [HttpGet] [HandlerAjaxOnly] public ActionResult GetInvCode() { DataTable dt = App.GetInvCode(); return Content(dt.ToJson()); } /// /// 获取供应商 /// /// /// /// [HttpGet] [HandlerAjaxOnly] public ActionResult GetVendor() { DataTable dt = App.GetVendor(); return Content(dt.ToJson()); } /// /// 获取物料名称、单位、规格型号 /// /// /// [HttpGet] [HandlerAjaxOnly] public ActionResult GetInvNameType(string InvCode) { DataTable ListData = App.GetInvNameType(InvCode); var JsonData = new { INVTYpe = ListData.Rows[0][0].ToString(), INVName = ListData.Rows[0][1].ToString(), INVUom = ListData.Rows[0][2].ToString(), }; return Content(JsonData.ToJson()); } /// /// 获取供应商名称 /// /// /// [HttpGet] [HandlerAjaxOnly] public ActionResult GetVenName(string VenCode) { string VenCodeName = App.GetVenName(VenCode); var JsonData = new { VenCodeName = VenCodeName, //VenCode = NFine.Code.OperatorProvider.Provider.GetCurrent().VenCode }; return Content(JsonData.ToJson()); } } }