private string AddProductApi(ProductModel model) { StringBuilder sbUrl = new StringBuilder("http://shop.api.myqwe.com/api/Product/AddCloudProduct?"); sbUrl.Append("ProName=" + model.ProName); sbUrl.Append("&ShortTitle=" + model.ShortTitle); sbUrl.Append("&LongTitle=" + model.LongTitle); sbUrl.Append("&ProPic=" + model.ProPic); sbUrl.Append("&ProDetails=" + model.ProDetails); sbUrl.Append("&BrandId=" + model.BrandId); sbUrl.Append("&ProStore="+model.ProStore); sbUrl.Append("&ProCategoryId=" + model.ProCategoryId); sbUrl.Append("&MarketPrice=" + model.MarketPrice); sbUrl.Append("&SalePrice=" + model.SalePrice); sbUrl.Append("&AgentPrice=" + model.AgentPrice); sbUrl.Append("&BusinessId=" + model.BusinessId); sbUrl.Append("&IsFlatPrice=" + model.IsFlatPrice); sbUrl.Append("&ImgUrls=" + model.ImgUrls); sbUrl.Append("&PropertyName=" + model.PropertyName); sbUrl.Append("&PropertyValue=" + model.PropertyValue); sbUrl.Append("&NewStore=" + model.NewStore); sbUrl.Append("&PropertyValues=" + model.PropertyValues); sbUrl.Append("&NewSalePrice=" + model.NewSalePrice); return sbUrl.ToString(); }
public ActionResult AddProduct(ProductModel model) { string url = AddProductApi(model); return View(); }