using BLL;
|
using Model;
|
using System.Collections.Generic;
|
using Lib;
|
using System.Web.Mvc;
|
using System.Data;
|
using Common;
|
|
namespace WMS.Areas.Business.Controllers
|
{
|
public class CheckDataController : MasterPage
|
{
|
// GET: Business/MovePos
|
[LoginFilter]
|
public ActionResult Index()
|
{
|
ViewBag.Title = "库存盘点";
|
//ViewBag.StatuList = LocalHelper.GetDictionaryHtml("CDStatu");
|
ViewBag.StatuList = LocalHelper.GetDictionaryCodeHtml("CDStatu");
|
ViewBag.AccessCode = LocalHelper.GetDictionaryCodeHtml("Access", this.LoginAccessCode);
|
return View();
|
}
|
|
// GET: Business/MovePos
|
|
public ActionResult SelectPos()
|
{
|
return View();
|
}
|
|
// GET: Business/MovePos
|
[LoginFilter]
|
public ActionResult Add()
|
{
|
string OrdNo = Request.QueryString.Get("CDNo");
|
string Demo = Request.QueryString.Get("Demo");
|
string AccessCode = Request.QueryString.Get("AccessCode");
|
Session["TEMPDATA_CACHE_CHECKDATADETAIL"] = null;
|
ViewBag.AccessCode = LocalHelper.GetDictionaryCodeHtml("Access", this.LoginAccessCode);
|
if (string.IsNullOrEmpty(OrdNo))
|
{
|
ViewBag.Title = "新增盘点单";
|
ViewBag.Admin = new CheckData();
|
}
|
else
|
{
|
ViewBag.Title = "编辑盘点单";
|
DALCheckData provider = new DALCheckData();
|
IList<CheckMat> erpMats = new List<CheckMat>();
|
CheckData entity = provider.GetModel(OrdNo, ref erpMats);
|
Session["TEMPDATA_CACHE_CHECKDATADETAIL"] = erpMats;
|
entity = entity == null ? new CheckData() : entity;
|
|
ViewBag.Admin = entity;
|
@ViewBag.Demo = Demo;
|
}
|
|
return View();
|
}
|
|
// GET: Business/MovePos
|
public ActionResult AddPalno()
|
{
|
return View();
|
}
|
|
|
// GET: Business/MovePos
|
public ActionResult Detail(string CDNo)
|
{
|
|
if (!string.IsNullOrEmpty(CDNo))
|
{
|
DALCheckData provider = new DALCheckData();
|
CheckData entity = provider.GetModel(CDNo);
|
DataTable dt = provider.GetCheckData(CDNo);
|
|
if (dt.Rows.Count > 0)
|
{
|
ViewBag.CDNo = dt.Rows[0]["CDNo"];
|
ViewBag.Statu = dt.Rows[0]["Statu"];
|
ViewBag.CreateUser = dt.Rows[0]["CreatUser"];
|
ViewBag.CreateTime = dt.Rows[0]["CreatTime"].ToString().Replace('/', '-');
|
ViewBag.Demo = dt.Rows[0]["Demo"];
|
ViewBag.AccessCode = entity.AccessCode;
|
}
|
}
|
return View();
|
}
|
}
|
}
|