public ActionResult Check(int Id) { var dto = new PartnerManageCheck() { PartnerManageId = Id }; var mod = _PartnerManageCheckContract.Entities.FirstOrDefault(a => a.PartnerManageId == Id); if (mod.IsNotNull()) { dto = mod; } ViewBag.StoreTypes = CacheAccess.GetStoreType(_StoreTypeContract, false); Dictionary <int, string> dic = new Dictionary <int, string>(); var rols = CacheAccess.GetRoles(_roleContract).Where(c => c.IsDeleted == false && c.IsEnabled == true); foreach (var item in rols) { dic.Add(item.Id, item.RoleName); } ViewBag.roles = dic; return(PartialView(dto)); }
public ActionResult Payment(string PurchaseNumber, int Id) { ViewBag.PurchaseNumber = PurchaseNumber; ViewBag.PurchaserId = Id; var mod = _purchaseContract.Purchases.Where(c => c.PurchaseNumber == PurchaseNumber && c.IsDeleted == false && c.IsEnabled == true && c.PurchaseStatus == (int)PurchaseStatusFlag.待付款).FirstOrDefault(); if (mod.IsNotNull()) { ViewBag.ReceiptStoreId = mod.ReceiverId; ViewBag.ReceiptStorageId = mod.ReceiverStorageId; #region 计算价格 var listprices = mod.PurchaseItems.Where(w => w.PurchaseItemProducts.Any()).Select(s => new { TagPrices = s.Product.ProductOriginNumber.TagPrice * s.PurchaseItemProducts.Count, PurchasePrices = s.Product.ProductOriginNumber.PurchasePrice * s.PurchaseItemProducts.Count, WholesalePrices = s.Product.ProductOriginNumber.WholesalePrice * s.PurchaseItemProducts.Count, }).ToList(); ViewBag.TagPrices = listprices.Sum(s => s.TagPrices); ViewBag.PurchasePrices = listprices.Sum(s => s.PurchasePrices); ViewBag.WholesalePrices = listprices.Sum(s => s.WholesalePrices); #endregion } ViewBag.StoreTypes = CacheAccess.GetStoreType(_storeTypeContract, true); return(PartialView()); }
/// <summary> /// 载入修改数据 /// </summary> /// <param name="Id"></param> /// <returns></returns> public ActionResult Update(int Id) { var result = _storeContract.Edit(Id); ViewBag.StoreTypes = CacheAccess.GetStoreType(_storeTypeContract, false); return(PartialView(result)); }
/// <summary> /// 载入创建数据 /// </summary> /// <returns></returns> public ActionResult Create() { ViewBag.StoreTypes = CacheAccess.GetStoreType(_storeTypeContract, false); return(PartialView(new StoreDto() { StoreCredit = 100, Balance = 0 })); }
/// <summary> /// 初始化一键下单界面 /// </summary> /// <returns></returns> public ActionResult AddPurchase() { StoreCart storeCart = _storeCartContract.StoreCarts.Where(x => x.IsDeleted == false && x.IsEnabled == true && x.IsOrder == false) .FirstOrDefault(x => x.PurchaserId == AuthorityHelper.OperatorId); var allPrice = storeCart?.StoreCartItems.Where(w => w.IsEnabled && !w.IsDeleted)?.Sum(s => s.Quantity * s.Product?.ProductOriginNumber?.PurchasePrice ?? 0) ?? 0; ViewBag.AllPrice = allPrice; ViewBag.StoreTypes = CacheAccess.GetStoreType(_storeTypeContract, true); return(PartialView()); }
public ActionResult Index() { ViewBag.StoreTypes = CacheAccess.GetStoreType(_storeTypeContract, true); return(View()); }