bklLiudl
2024-07-23 277bbae216debe7e6c04e8cc6ee6e1ba9763e14b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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();
        }
    }
}