投稿総数:
3953
カルマ:
35272
参加:
2010/02/08
ロケーション:
Australia
When you look at the database the FigRef field - is it defined as an Integer or String ? Seems to be a mismatch in the definition i.e. Website is defined as Int and maybe the Database is a string ? Or maybe the field in the database is null so it cannot be converted to int - check the value in the field
投稿総数:
287
カルマ:
1491
参加:
2010/04/03
ロケーション:
Canada
Hello and thanks for the reply. I fixed that definition problem and have gotten this far (but have errors when I try to display the FigRef). Domain Controller RelatedProduct.cs /// <DAVE> /// Gets or sets the display order /// </summary> public string FigRef { get; set; } /// <DAVE> /// Gets or sets the display order /// </summary> public int Qty { get; set; } Admin Controller ProductController.ca var relatedProducts = _productService.GetRelatedProductsByProductId1(productId, true); var relatedProductsModel = relatedProducts .Select(x => new ProductModel.RelatedProductModel { Id = x.Id, //ProductId1 = x.ProductId1, ProductId2 = x.ProductId2, Product2Name = _productService.GetProductById(x.ProductId2).Name, DisplayOrder = x.DisplayOrder, FigRef = x.FigRef, Qty = x.Qty }) .ToList(); View _SimpleProductBox.cshtml <div class="item-details details"> <h5 class="product-title"> <a href=" ("Product", new { SeName = Model.SeName })">@Model.Name</a> ********* Show FigRef and Qty here ********** </h5> </div>