Git.Storage.Web/Areas/Storage/Controllers/LocationController.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using Git.Storage.Web.Lib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Git.Framework.Controller;
using Git.Framework.DataTypes;
using Git.Framework.DataTypes.ExtensionMethods;
using Git.Storage.Provider.Store;
using Git.Storage.Entity.Store;
using Git.Framework.Json;
using Git.Storage.Provider;
using Git.Framework.Controller.Mvc;
using Git.Framework.ORM;
using Git.Storage.Common;
using Git.Storage.Web.Lib.Filter;
using Git.Framework.Resource;
using System.Text;
namespace Git.Storage.Web.Areas.Storage.Controllers
{
    public class LocationController : MasterPage
    {
        /// <summary>
        /// 页面加载
        /// </summary>
        /// <returns></returns>
        [LoginFilter]
        public ActionResult List()
        {
            ViewBag.StorageNumList = LocalHelper.GetStorageNumList(string.Empty);
            ViewBag.LocalTypeList = EnumHelper.GetOptions<ELocalType>(string.Empty);
            return View();
        }

        /// <summary>
        /// 添加
        /// </summary>
        /// <returns></returns>
        [LoginFilter]
        public ActionResult Add()
        {
            string LocalNum = WebUtil.GetQueryStringValue<string>("LocalNum");
            if (LocalNum.IsEmpty())
            {
                ViewBag.Storage = LocalHelper.GetStorageNumList(string.Empty);
                ViewBag.LocalTypeList = EnumHelper.GetOptions<ELocalType>(string.Empty, "请选择库位类型");
                ViewBag.IsDefault = EnumHelper.GetOptions<EBool>(string.Empty, "请选择");
                ViewBag.Location = new LocationEntity();
            }
            else
            {
                LocationProvider provider = new LocationProvider();
                LocationEntity entity = provider.GetSingleByNum(LocalNum);
                entity = entity == null ? new LocationEntity() : entity;
                ViewBag.StorageType = EnumHelper.GetOptions<EStorageType>(entity.StorageType, "请选择仓库类型");
                ViewBag.IsDefault = EnumHelper.GetOptions<EBool>(entity.IsDefault, "请选择");
                ViewBag.Storage = LocalHelper.GetStorageNumList(entity.StorageNum);
                ViewBag.LocalTypeList = EnumHelper.GetOptions<ELocalType>(entity.LocalType, "请选择仓库类型");
                ViewBag.Location = entity;
后面还有 17 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。