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
using BLL;
using Common;
using Lib;
using Model;
using System;
using System.Web.Mvc;
 
namespace wms.Areas.BasicInfo.Controllers
{
    public class TrayManageController : MasterPage
    {
        // GET: BasicInfo/TrayManage
        [LoginFilter]
        public ActionResult TrayList()
        {
            ViewBag.LockList = LocalHelper.GetALockList(string.Empty);
            return View();
        }
 
        /// <summary>
        /// 编辑新增视图加载时触发
        /// </summary>
        /// <returns>直接给视图变量赋值</returns>
        public ActionResult AddTray()
        {
            try
            {
                string Palno = Request.QueryString.Get("Palno");
                DALTray provider = new DALTray();
 
                if (Palno != null)
                {
                    Tray trayModel = provider.GetTrayModel(Palno);
                    ViewBag.LockList = LocalHelper.GetALockList(trayModel.ALockNo);
                    ViewBag.CreateTime = trayModel.CreateTime;
                    ViewBag.TrayList = trayModel;
                }
                else 
                {
                    // 绑定锁定属性下拉框
                    ViewBag.LockList = LocalHelper.GetALockList("N");
                    ViewBag.CreateTime = DateTime.Now.ToString();
                    ViewBag.TrayList = new Tray();
                }
 
                return View();
            }
            catch (System.Exception)
            {
                return View();
            }
        }
 
        public ActionResult DeleteTray()
        {
            return View();
        }
    }
}