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()); }
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()); }