/// <summary> /// 诊所信息 /// </summary> /// <param name="ids">经营类目ID集</param> /// <returns></returns> public ActionResult Step5(string ids) { Cache.Remove(CacheKeyCollection.CACHE_SHOP(CurrentSellerManager.ShopId, true)); Cache.Remove(CacheKeyCollection.CACHE_SHOPDTO(CurrentSellerManager.ShopId, true)); var shop = ShopApplication.GetShop(CurrentSellerManager.ShopId, true); if (shop.Stage == ShopInfo.ShopStage.CompanyInfo) { return(RedirectToAction("step3")); } if (shop.Stage == ShopInfo.ShopStage.FinancialInfo) { return(RedirectToAction("step4")); } var step3 = new ShopProfileStep3(); step3.ShopName = shop.ShopName; step3.ShopGrade = shop.GradeId; var gradeInfo = ShopApplication.GetShopGrade(shop.GradeId); ViewBag.GradeName = gradeInfo != null ? gradeInfo.Name : "未选择";//获取等级名称 ViewBag.ShopBusinessCategory = "未选择"; ViewBag.BusinessCategoryIds = string.Empty; if (!string.IsNullOrWhiteSpace(ids)) { var idArr = ids.Split(','); if (idArr.Length > 0) { List <long> idList = idArr.Select(p => long.Parse(p)).ToList(); var categoriesList = _iCategoryService.GetCategories().Where(p => idList.Contains(p.Id)); if (categoriesList.Count() == idArr.Length) { string businessCategory = string.Join("、", categoriesList.Select(x => x.Name).ToArray()); ViewBag.ShopBusinessCategory = businessCategory.Length > 0 ? businessCategory : "未选择"; ViewBag.BusinessCategoryIds = ids; } } } else { var businessCategoryInfo = ShopApplication.GetBusinessCategory(CurrentSellerManager.ShopId); if (businessCategoryInfo != null && businessCategoryInfo.Count > 0) { List <long> categoryIds = businessCategoryInfo.Select(p => p.CategoryId).ToList(); ViewBag.BusinessCategoryIds = string.Join(",", categoryIds.ToArray()); string businessCategory = string.Join("、", _iCategoryService.GetCategories().Where(p => categoryIds.Contains(p.Id)).Select(x => x.Name).ToArray()); ViewBag.ShopBusinessCategory = businessCategory.Length > 0 ? businessCategory : "未选择"; } } return(View(step3)); }
public ActionResult Renew() { //店铺当前信息 ShopRenewModel model = new ShopRenewModel(); model.ShopId = CurrentSellerManager.ShopId; var shop = _iShopService.GetShop(CurrentSellerManager.ShopId); model.ShopName = shop.ShopName; model.ShopCreateTime = shop.CreateDate.ToString("yyyy/MM/dd"); model.ShopEndTime = shop.EndDate.ToString("yyyy/MM/dd"); var grade = ShopApplication.GetShopGrade(shop.GradeId); model.GradeName = grade.Name; model.ImageLimit = grade.ImageLimit; model.ProductLimit = grade.ProductLimit; //续费时间 List <SelectListItem> yearList = new List <SelectListItem> { }; yearList.Add(new SelectListItem() { Selected = true, Text = "一年", Value = "1" }); yearList.Add(new SelectListItem() { Selected = false, Text = "两年", Value = "2" }); yearList.Add(new SelectListItem() { Selected = false, Text = "三年", Value = "3" }); yearList.Add(new SelectListItem() { Selected = false, Text = "四年", Value = "4" }); yearList.Add(new SelectListItem() { Selected = false, Text = "五年", Value = "5" }); ViewBag.YearList = yearList; //可升级套餐 List <SelectListItem> gradeList = new List <SelectListItem>() { new SelectListItem() { Selected = true, Text = "请选择升级套餐", Value = "0" } }; var enableGrade = _iShopService.GetShopGrades().Where(c => c.ChargeStandard >= grade.ChargeStandard && c.Id != shop.GradeId);//要排除自己 foreach (var item in enableGrade) { gradeList.Add(new SelectListItem() { Selected = false, Text = item.Name, Value = item.Id.ToString() }); } ViewBag.GradeList = gradeList; ViewBag.HasOver = shop.EndDate <= DateTime.Now; var shopAccount = ShopApplication.GetShopAccount(CurrentSellerManager.ShopId); ViewBag.ShopAccountAmount = shopAccount.Balance.ToString("F2"); return(View(model)); }