Denis Alex

Denis Alex

  • NA
  • 63
  • 2.4k

Update value from a model with one from another model

Apr 28 2021 3:13 PM
Hello, I have a project for school to make an auction website.
 
I managed to make the controller to Add Bids for Auction, but now I don't know how to update the "Start Price" from Auction with value from bidders:
 
 
 
 
I don't know exactly but it can be done in the view only? 
 I tried to do that, but without success.
 
  1. <dd>  
  2.           @Html.DisplayFor(model => model.DataIncheiere)  
  3.       </dd>  
  4.   
  5.       <dt>  
  6.           @Html.DisplayNameFor(model => model.PretInitial)  
  7.       </dt>  
  8.   
  9.       <dd>  
  10.           @Html.DisplayFor(model => model.PretInitial== model.PretInitial + model.Oferte.LastOrDefault(b =>(b.ValoareBid).ToString()))  
  11.       </dd>  
  12.   
  13.       <dt>  
  14.           @Html.DisplayNameFor(model => model.Produse.NumeProdus)  
  15.       </dt>  
 
 

Answers (5)