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
using Lib;
using System.Web.Mvc;
using wms;
using Common;
using BLL;
using Model;
using System.Web.Script.Serialization;
using System.Collections;
 
namespace WMS.Areas.BasicInfo.Controllers
{
    public class GoodsPosController : MasterPage
    {
        [LoginFilter]
        public ActionResult GoodsPos()
        {
 
            ViewBag.paiList = LocalHelper.GetPaiList(string.Empty);
            ViewBag.lieList = LocalHelper.GetlieList(string.Empty);
            ViewBag.cengList = LocalHelper.GetCengList(string.Empty);
            ViewBag.PropertyList = LocalHelper.GetPropertyList(string.Empty);
            ViewBag.StatuList = LocalHelper.GetStatuList(string.Empty);
            ViewBag.LockList = LocalHelper.GetALockList(string.Empty);
            ViewBag.AreaList = LocalHelper.GetAreaList(string.Empty);
            return View();
        }
 
        /// <summary>
        /// 编辑页面视图加载
        /// </summary>
        /// <returns></returns>
        public ActionResult AddGoods()
        {
            string Addre = Request.QueryString.Get("Addre");
            try
            {
                IDALGoodsPos provider = new DALGoodsPos();
                GoodsPos entity = provider.GetModel(Addre);
                string StorageNo = Addre.Substring(0, 2);
 
                if (entity != null) 
                {
                    ViewBag.paiList = LocalHelper.GetPLCList(entity.pai,"Pai", StorageNo);
                    ViewBag.lieList = LocalHelper.GetPLCList(entity.lie, "Lie", StorageNo);
                    ViewBag.cengList = LocalHelper.GetPLCList(entity.ceng, "Ceng", StorageNo);
                    ViewBag.PropertyList = LocalHelper.GetPropertyList(entity.property);
                    ViewBag.StatuList = LocalHelper.GetStatuList(entity.statu);
                    ViewBag.LockList = LocalHelper.GetALockList(entity.ALock);
                    ViewBag.AreaList = LocalHelper.GetAreaList(StorageNo);
                    ViewBag.Admin = entity;
                }
                
                return View();
                // selected="selected" 默认值选项
                //ViewBag.paiList = string.Format("<option value='{0}' {1}>{2}</option>", entity.pai, "selected='selected'", entity.pai);
            }
            catch (System.Exception)
            {
                return View();
            }
        }
 
        public ActionResult SetProperty()
        {
            ViewBag.PropertyList = LocalHelper.GetPropertyList(string.Empty);          
            return View();
        }
 
        public ActionResult Dialog()
        {        
            return View();
        }
    }
}