public string GetTuhuProductName(string tuhuProductId) { string result = string.Empty; if (!string.IsNullOrEmpty(tuhuProductId)) { using (var client = new ShopClient()) { var serviceResult = client.GetBeautyProductDetailByPid(tuhuProductId); if (serviceResult.Success && serviceResult.Result != null && !string.IsNullOrEmpty(serviceResult.Result.ProductName)) { result = serviceResult.Result.ProductName; } } } return(result); }
public ActionResult GetAllVipService() { var allVipService = new Dictionary <string, string>(); using (var client = new ShopClient()) { var vipServiceIds = (client.GetBeautyProductIdsByCategoryId(67)).Result; if (vipServiceIds != null) { foreach (var item in vipServiceIds) { var product = (client.GetBeautyProductDetailByPid(item)).Result; allVipService[item] = product.ProductName; } } } return(Json(allVipService, JsonRequestBehavior.AllowGet)); }