protected void pizzaCrustGridView_RowUpdating(object sender, GridViewUpdateEventArgs e) { PizzaCrustDTO pizzaCrustDTO = new PizzaCrustDTO(); GridViewRow gvRow = pizzaCrustGridView.Rows[e.RowIndex]; pizzaCrustDTO.PizzaCrustId = (Guid)pizzaCrustGridView.DataKeys[e.RowIndex].Values[0]; pizzaCrustDTO.PizzaCrustType = ((TextBox)(gvRow.Cells[0].Controls[0])).Text; pizzaCrustDTO.PizzaCrustPrice = Convert.ToDecimal(((TextBox)(gvRow.Cells[1].Controls[0])).Text); PriceMaintenanceController.PizzaCrustDTOUpdateARow(pizzaCrustDTO); pizzaCrustGridView.EditIndex = -1; initialisePage(); }
public static void PizzaCrustDTOUpdateARow(PizzaCrustDTO pizzaCrustDTO) { Persistence.Repositories.PizzaCrustRepository.PizzaCrustDTOUpdateARow(pizzaCrustDTO); }