I am using .Net MVC application and jquery.I have list of OrderLines returning to the View
Structure of OrderLine will be
public class OrderLine
{
public string OrderNumber { get; set; }
public string PartNumber { get; set; }
public string QuantityOrdered { get; set; }
}
I have to display in the view in a table as order lines. There will be button at the bottom. Onclicking the button, I need to group the order lines by OrderNumber and then submit each order('NOT each order line') as ajax request to the action method at a time.
Can any one tell, what is the best way to do this?
I need to post the data in the following structure
public class Order
{
public string OrderNumber { get; set; }
public List<OrderLine> orderLines { get; set; }
}
Action Method Signature will
Public ActionResult Update(Order order)
Thanks.