public ViewResult Copy(int id) { SE_GiftManageConfigModel model = new SE_GiftManageConfigModel(); var U_ChannelPayList = SE_GiftManageConfigBLL.GetU_ChannelPayList(); if (id > 0) { model = SE_GiftManageConfigBLL.GetEntity(id); if (!string.IsNullOrWhiteSpace(model.Channel)) { U_ChannelPayList?.ToList().ForEach(_ => { var channels = model.Channel.Split(','); foreach (var item in channels) { if (_.ChannelKey.Contains(item)) { _.IsChecked = true; } } }); } _CreateLogs = model; } ViewBag.U_ChannelPayList = U_ChannelPayList; ViewBag.B_Categorys = SE_MDBeautyPartConfigController.InteriorCategorysTreeJson(model.B_Categorys); return(View(model)); }
public ActionResult BrandsListControl(string B_Categorys = "1", string B_Brands = "", int type = 0) { IEnumerable <FilterConditionModel> CP_BrandList = ProductLibraryConfigController.QueryProducts(new SeachProducts() { Category = B_Categorys })?.CP_BrandList ?? new List <FilterConditionModel>(); if (CP_BrandList != null && CP_BrandList.Any() && !string.IsNullOrWhiteSpace(B_Brands)) { CP_BrandList?.ToList().ForEach(a => { var brands = B_Brands.Split(','); foreach (var item in brands) { if (a.Name.Contains(item)) { a.Name = a.Name + ":True"; } } }); } var B_CategorysId = (B_Categorys ?? "").Contains(".") ? B_Categorys.Substring(B_Categorys.LastIndexOf(".") + 1) : B_Categorys; ViewBag.BrandsListControlCategorys = SE_MDBeautyPartConfigController.InteriorCategorysTreeJson(B_CategorysId); ViewBag.CP_BrandList = CP_BrandList; ViewBag.Type = type; return(View()); }