protected void pizzaSizeGridView_RowUpdating(object sender, GridViewUpdateEventArgs e) { PizzaSizeDTO pizzaSizeDTO = new PizzaSizeDTO(); GridViewRow gvRow = pizzaSizeGridView.Rows[e.RowIndex]; pizzaSizeDTO.PizzaSizeId = (Guid)pizzaSizeGridView.DataKeys[e.RowIndex].Values[0]; pizzaSizeDTO.PizzaSizeName = ((TextBox)(gvRow.Cells[0].Controls[0])).Text; pizzaSizeDTO.PizzaSizeDesc = ((TextBox)(gvRow.Cells[1].Controls[0])).Text; pizzaSizeDTO.PizzaSizePrice = Convert.ToDecimal(((TextBox)(gvRow.Cells[2].Controls[0])).Text); PriceMaintenanceController.PizzaSizeDTOUpdateARow(pizzaSizeDTO); pizzaSizeGridView.EditIndex = -1; initialisePage(); }
public static void PizzaSizeDTOUpdateARow(PizzaSizeDTO pizzaSizeDTO) { Persistence.Repositories.PizzaSizeRepository.PizzaSizeDTOUpdateARow(pizzaSizeDTO); }