private void btnCrearCliente_Click(object sender, EventArgs e) { FormAgregarCliente fm = new FormAgregarCliente(user, "agregar", -1); DialogResult DialogForm = fm.ShowDialog(); if (fm.Valor != string.Empty) { cargarTodosLosCliente(); mostrarLabelStatus(fm.Valor, true); } }
private void btnEditarCliente_Click(object sender, EventArgs e) { if (filaSeleccionada >= 0) { FormAgregarCliente fm = new FormAgregarCliente(user, "editar", int.Parse(dgvClientes["idcliente", filaSeleccionada].Value.ToString())); DialogResult DialogForm = fm.ShowDialog(); if (fm.Valor != string.Empty) { cargarTodosLosCliente(); mostrarLabelStatus(fm.Valor, true); } } }