private void btnAgregar_Click(object sender, EventArgs e) { ClienteTiendaRegistro clienteTiendaRegistro = new ClienteTiendaRegistro(); clienteTiendaRegistro.ShowDialog(); actualizarTabla(); }
/// <summary> /// Acción de editar al presionar doble clic sobre un cliente /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void paginacionTabla_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex != -1) { DataGridViewRow renglon = paginacionTabla.Rows[e.RowIndex]; string sql_where = " where idcliente=@id"; List <string> parametros = new List <string>(); List <object> valores = new List <object>(); parametros.Add("@id"); valores.Add(renglon.Cells["ID"].Value); Cliente cliente = clienteDAO.ConsultaGeneral(sql_where, parametros, valores)[0]; ClienteTiendaRegistro clienteTiendaRegistro = new ClienteTiendaRegistro(cliente); clienteTiendaRegistro.ShowDialog(); actualizarTabla(); } else { Mensajes.Error("Selecciona un registro"); } }