private void Venta(object sender, DataGridViewCellMouseEventArgs e) { try { Restaurant.AgregarVenta(int.Parse(DgProductos.Rows[e.RowIndex].Cells["Codigo"].FormattedValue.ToString()), DgProductos.Rows[e.RowIndex].Cells["Descripcion"].FormattedValue.ToString(), float.Parse(DgProductos.Rows[e.RowIndex].Cells["Precio"].FormattedValue.ToString())); DgVenta.RowHeadersVisible = false; DgVenta.DataSource = null; DgVenta.DataSource = Restaurant.viewVentas(); Calculo(); } catch (Exception) { } }