Example #1
0
        public ActionResult Detail(string snNum)
        {
            ProductEntity entity = null;

            if (!snNum.IsEmpty())
            {
                ProductProvider provider = new ProductProvider();
                entity           = provider.GetProductBySn(snNum);
                ViewBag.Category = BaseHelper.GetProductCategory(entity.CateNum);
                ViewBag.Storage  = LocalHelper.GetStorageNumList(entity.StorageNum);
                ViewBag.Local    = LocalHelper.GetLocalNumList(entity.StorageNum, entity.DefaultLocal);
                ViewBag.Customer = BaseHelper.GetCustomerList(entity.CusNum);
                ViewBag.Goods    = entity;
                ViewBag.Unit     = BaseHelper.GetMeasureNameList(entity.UnitNum);
            }
            else
            {
                ViewBag.Goods    = new ProductEntity();
                ViewBag.Category = BaseHelper.GetProductCategory(string.Empty);
                ViewBag.Storage  = LocalHelper.GetStorageNumList(string.Empty);
                ViewBag.Local    = LocalHelper.GetLocalNumList(string.Empty, string.Empty);
                ViewBag.Customer = BaseHelper.GetCustomerList(string.Empty);
                ViewBag.Unit     = BaseHelper.GetMeasureNameList(string.Empty);
            }
            return(View());
        }
Example #2
0
        public ActionResult GoodsDetail(string snNum)
        {
            ProductEntity   entity   = new ProductEntity();
            ProductProvider provider = new ProductProvider();

            entity           = provider.GetProductBySn(snNum);
            ViewBag.Category = BaseHelper.GetProductCategory(entity.CateNum);
            ViewBag.Storage  = LocalHelper.GetStorageNumList(entity.StorageNum);
            ViewBag.Local    = LocalHelper.GetLocalNumList(entity.StorageNum, entity.DefaultLocal);
            ViewBag.Customer = BaseHelper.GetCustomerList(entity.CusNum);
            ViewBag.Goods    = entity;
            //ViewBag.Unit = EnumHelper.GetOptions<EUnit>(entity.Unit, "请选择单位");
            ViewBag.Unit = BaseHelper.GetMeasureNameList(entity.UnitNum);
            return(View());
        }
Example #3
0
        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;
            }
            return(View());
        }
Example #4
0
 public ActionResult List()
 {
     ViewBag.StorageNumList = LocalHelper.GetStorageNumList(string.Empty);
     ViewBag.LocalTypeList  = EnumHelper.GetOptions <ELocalType>(string.Empty);
     return(View());
 }