private void dataGridView_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0) //modificar rol { DataGridViewRow filaSeleccionada = dataGridView.Rows[dataGridView.SelectedCells[0].RowIndex]; String nombre = filaSeleccionada.Cells[2].FormattedValue.ToString(); FormAltaRol far = new FormAltaRol(); far.setPadre(this); far.setNombreRol(nombre); far.Show(); } else if (e.ColumnIndex == 1) //habilitar/deshabilitar rol { DataGridViewRow filaSeleccionada = dataGridView.Rows[dataGridView.SelectedCells[0].RowIndex]; String nombre = filaSeleccionada.Cells[2].FormattedValue.ToString(); Dictionary<String, gdDataBase.ValorTipo> camposValores = new Dictionary<string, gdDataBase.ValorTipo>(); camposValores.Add("nombre", new gdDataBase.ValorTipo(nombre, SqlDbType.VarChar)); var dt = new gdDataBase().GetDataWithParameters("ÑUFLO.Inhabilitar_Habilitar", camposValores); dt = new gdDataBase().GetDataWithParameters("ÑUFLO.RolDadoNombre", null); cargarDatosEnTabla(dt); } }
private void btnConfirmarLlegada_Click(object sender, EventArgs e) { if (ValidateChildren()) { var camposValores = gdDataBase.newParameters(); camposValores.Add("matricula", new gdDataBase.ValorTipo(textBoxMatricula.Text, SqlDbType.NVarChar)); camposValores.Add("origen", new gdDataBase.ValorTipo(comboBoxOrigen.SelectedValue, SqlDbType.NVarChar)); camposValores.Add("destino", new gdDataBase.ValorTipo(comboBoxDestino.SelectedValue, SqlDbType.NVarChar)); camposValores.Add("fecha_llegada", new gdDataBase.ValorTipo(fechaCoso.Value, SqlDbType.DateTime)); var resultadoEjecucion = new gdDataBase().Exec("ÑUFLO.RegistrarLlegada", camposValores, null); if (!resultadoEjecucion.huboError() || resultadoEjecucion.codError() == 60021){ FormInformeYValidacion informeYValidacion = new FormInformeYValidacion(); informeYValidacion.setAeronave(textBoxMatricula.Text); informeYValidacion.setFecha(fechaCoso.Value); informeYValidacion.setOrigen(comboBoxOrigen.SelectedValue.ToString()); informeYValidacion.setDestino(comboBoxDestino.SelectedValue.ToString()); Dictionary<int,String> errorMessage = new Dictionary<int,String>(); errorMessage.Add(60021, "[Error atrapado]La Aeronave no arribo al destino esperado"); new gdDataBase().Exec("ÑUFLO.ValidarDestinoLlegada", camposValores, errorMessage); informeYValidacion.Show(); } } }
private void FormSeleccionRol_Load(object sender, EventArgs e) { Dictionary<String, gdDataBase.ValorTipo> camposValores = new Dictionary<string, gdDataBase.ValorTipo>(); camposValores.Add("nombre", new gdDataBase.ValorTipo(textBoxNombre.Text, SqlDbType.VarChar)); var dt = new gdDataBase().GetDataWithParameters("ÑUFLO.RolDadoNombre", null); cargarDatosEnTabla(dt); }
public void setAeronave(String matricula) { var camposValores = gdDataBase.newParameters(); camposValores.Add("matricula",new gdDataBase.ValorTipo(matricula,SqlDbType.NVarChar)); DataRow aeronave = new gdDataBase().ExecAndGetData("ÑUFLO.AeronavePorMatricula",camposValores, null).Rows[0]; lblModelo.Text = aeronave["Modelo"].ToString(); lblMatricula.Text = aeronave["Matricula"].ToString(); lblFabricante.Text = aeronave["Fabricante"].ToString(); lblTipoServicio.Text = aeronave["Tipo de servicio"].ToString(); lblCantButacas.Text = aeronave["Butacas totales"].ToString(); lblCapacEncomiendas.Text = aeronave["Capacidad peso encomiendas"].ToString(); }
public FormRegistrarLlegadas() { InitializeComponent(); var ds = new gdDataBase().ExecAndGetDataSet("ÑUFLO.CiudadTipoServicio").Tables[0]; origenBindingSource.DataSource = ds; destinoBindingSource.DataSource = ds; comboBoxOrigen.DisplayMember = "Nombre"; comboBoxDestino.DisplayMember = "Nombre"; comboBoxOrigen.ValueMember = "Nombre";//cambiar a id ciudad despues comboBoxDestino.ValueMember = "Nombre"; fechaCoso.Format = DateTimePickerFormat.Custom; fechaCoso.CustomFormat = "dd/MM/yyyy HH:mm:ss"; }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { var senderGrid = (DataGridView)sender; var index = e.ColumnIndex; if (senderGrid.Columns[index] is DataGridViewButtonColumn && e.RowIndex >= 0) { if (index == senderGrid.Columns["Eliminar"].Index) { var camposValores = gdDataBase.newParameters(); Dictionary<int, String> errorMensaje = new Dictionary<int, string>(); camposValores.Add("id_ruta",new gdDataBase.ValorTipo(senderGrid.CurrentRow.Cells["id ruta"].Value,SqlDbType.Int)); camposValores.Add("hoy", new gdDataBase.ValorTipo(Config.fecha.ToString(), SqlDbType.DateTime)); errorMensaje.Add(0, "Ignorar errores"); var resultadoEjecucion = new gdDataBase().Exec("ÑUFLO.DeleteRutaAerea",camposValores,errorMensaje,"El registro ha sido eliminado correctamente"); if (resultadoEjecucion.huboError()) { if (resultadoEjecucion.codError() == 60035) MessageBox.Show("Algunos vuelos de la Ruta ya fueron realizados, dichos vuelos no seran cancelados", "Cuidado", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); else resultadoEjecucion.mostrarErrorSqlProducido(); } consultarConFiltro(); } else if (index == senderGrid.Columns["Modificar"].Index) { var formAltaRuta = new FormAltaRuta(); formAltaRuta.setId((int)senderGrid.CurrentRow.Cells["id ruta"].Value); formAltaRuta.setCodRuta(senderGrid.CurrentRow.Cells["Codigo de ruta"].Value.ToString()); formAltaRuta.setOrigen((int)senderGrid.CurrentRow.Cells["id origen"].Value - 1); formAltaRuta.setDestino((int)senderGrid.CurrentRow.Cells["id destino"].Value - 1); formAltaRuta.setServicio((int)senderGrid.CurrentRow.Cells["id servicio"].Value - 1); formAltaRuta.setPrecioBasePeso(Double.Parse(senderGrid.CurrentRow.Cells["Precio base por peso"].Value.ToString())); formAltaRuta.setPrecioBasePasaje(Double.Parse(senderGrid.CurrentRow.Cells["Precio base por pasaje"].Value.ToString())); formAltaRuta.actualizarLabels(); formAltaRuta.esModificacion(); formAltaRuta.setPadre(this); formAltaRuta.Show(); //((DataRowView)rutaAereaBindingSource.Current) } else ; } }
private void btnBuscar_Click(object sender, EventArgs e) { Dictionary<String, gdDataBase.ValorTipo> camposValores = new Dictionary<string, gdDataBase.ValorTipo>(); agregarValorCBADiccionario(comboBoxOrigen, camposValores, "id_ciudad_origen", SqlDbType.Int); agregarValorCBADiccionario(comboBoxDestino, camposValores, "id_ciudad_destino", SqlDbType.Int); agregarValorCBADiccionario(comboBoxTipoServicio, camposValores, "id_tipo_servicio", SqlDbType.Int); var ds = new gdDataBase().GetDataWithParameters("ÑUFLO.FiltrosModificacionRutaAerea", camposValores); dataGridView1.DataSource = ds; }
public FormSeleccionAeronave() { InitializeComponent(); DataRow filaExtraServicio; var dtTipoServicio = new gdDataBase().GetDataWithParameters("ÑUFLO.TiposDeServicio", null); filaExtraServicio = dtTipoServicio.NewRow(); filaExtraServicio["Tipo Servicio"] = "Cualquiera"; dtTipoServicio.Rows.InsertAt(filaExtraServicio, 0); comboBoxTipoServicio.DataSource = dtTipoServicio; comboBoxTipoServicio.DisplayMember = dtTipoServicio.Columns[0].ColumnName; }
private void habilitarFunciones() { var camposValores = gdDataBase.newParameters(); camposValores.Add("nombre_usuario", new gdDataBase.ValorTipo(textBoxUsername.Text, SqlDbType.NVarChar)); var funciones = new gdDataBase().ExecAndGetData("ÑUFLO.FuncionalidadesPorUsuario", camposValores, new Dictionary<int, String>()).Rows; padre.resetearFuncionalidades(); foreach (DataRow funcion in funciones) { padre.activarFuncionalidad(idFuncion(funcion)); } padre.habilitarFormulario(); }
public void consultarConFiltro() { Dictionary<String, gdDataBase.ValorTipo> camposValores = new Dictionary<string, gdDataBase.ValorTipo>(); agregarValorCBADiccionario(comboBoxOrigen, camposValores, "id_ciudad_origen", SqlDbType.Int); agregarValorCBADiccionario(comboBoxDestino, camposValores, "id_ciudad_destino", SqlDbType.Int); agregarValorCBADiccionario(comboBoxTipoServicio, camposValores, "id_tipo_servicio", SqlDbType.Int); var ds = new gdDataBase().GetDataWithParameters("ÑUFLO.FiltrosModificacionRutaAerea", camposValores); rutaAereaBindingSource.DataSource = ds; dataGridView1.DataSource = rutaAereaBindingSource; }
public FormAltaRuta() { InitializeComponent(); var ds = new gdDataBase().GetDataSP("ÑUFLO.CiudadTipoServicio"); origenBinding.DataSource = ds.Tables[0]; destinoBinding.DataSource = ds.Tables[0]; tipoServicioBinding.DataSource = ds.Tables[1]; comboBoxOrigen.DisplayMember = "Nombre"; comboBoxOrigen.ValueMember = "Id ciudad"; comboBoxDestino.DisplayMember = "Nombre"; comboBoxDestino.ValueMember = "Id ciudad"; comboBoxTipoServicio.DisplayMember = "Tipo Servicio"; comboBoxTipoServicio.ValueMember = "Id Tipo Servicio"; }
public void setNombreRol(String nombreRol) { this.Text = "Modificación de Rol"; modificacion = true; nombreViejo = nombreRol; textBoxNombre.Text = nombreViejo; Dictionary<String, gdDataBase.ValorTipo> camposValores = new Dictionary<string, gdDataBase.ValorTipo>(); camposValores.Add("nombre_rol", new gdDataBase.ValorTipo(textBoxNombre.Text, SqlDbType.VarChar)); var dt = new gdDataBase().GetDataWithParameters("ÑUFLO.FuncionalidadesDe", camposValores); for(int i=0;i< dt.Rows.Count;i++) { listBoxFuncionalidades.Items.Add(dt.Rows[i].ItemArray[0]); } }
private void btnSeleccionar_Click(object sender, EventArgs e) { Dictionary<String, gdDataBase.ValorTipo> camposValores = new Dictionary<string, gdDataBase.ValorTipo>(); if (textBoxMatricula.Text.Trim() != "") camposValores.Add("matricula", new gdDataBase.ValorTipo(textBoxMatricula.Text, SqlDbType.VarChar)); if (textBoxModelo.Text.Trim() != "") camposValores.Add("modelo", new gdDataBase.ValorTipo(textBoxModelo.Text, SqlDbType.VarChar)); if (textBoxFabricante.Text.Trim() != "") camposValores.Add("fabricante", new gdDataBase.ValorTipo(textBoxFabricante.Text, SqlDbType.VarChar)); if (comboBoxTipoServicio.Text != "Cualquiera") camposValores.Add("tipo_servicio", new gdDataBase.ValorTipo(comboBoxTipoServicio.SelectedIndex.ToString(), SqlDbType.Int)); if (textBoxCapacidadEncomiendas.Text.Trim() != "") camposValores.Add("capacidad_encomiendas", new gdDataBase.ValorTipo(textBoxCapacidadEncomiendas.Text, SqlDbType.Decimal)); if (textBoxCantidadButacas.Text.Trim() != "") camposValores.Add("cantidad_butacas", new gdDataBase.ValorTipo(textBoxCantidadButacas.Text, SqlDbType.Int)); camposValores.Add("hoy", new gdDataBase.ValorTipo(Config.fecha.ToString(), SqlDbType.DateTime)); var ds = new gdDataBase().GetDataWithParameters("ÑUFLO.FiltroAeronaveSinBajas", camposValores); bindingAeronaves.DataSource = ds; dataGridViewAeronave.DataSource = bindingAeronaves; }
public void consultarConFiltro() { Boolean bajaVidaUtil = false, bajaFueraServicio = false; Dictionary<String, gdDataBase.ValorTipo> camposValores = new Dictionary<string, gdDataBase.ValorTipo>(); if (checkBoxPorVidaUtil.Checked) bajaVidaUtil = true; if (checkBoxBajaPorServicio.Checked) bajaFueraServicio = true; if (textBoxMatricula.Text.Trim() != "") camposValores.Add("matricula", new gdDataBase.ValorTipo(textBoxMatricula.Text, SqlDbType.VarChar)); if (textBoxModelo.Text.Trim() != "") camposValores.Add("modelo", new gdDataBase.ValorTipo(textBoxModelo.Text, SqlDbType.VarChar)); if (textBoxFabricante.Text.Trim() != "") camposValores.Add("fabricante", new gdDataBase.ValorTipo(textBoxFabricante.Text, SqlDbType.VarChar)); if (comboBoxTipoServicio.Text.Trim() != "Cualquiera") camposValores.Add("tipo_servicio", new gdDataBase.ValorTipo((comboBoxTipoServicio.SelectedIndex).ToString(), SqlDbType.Int)); if (textBoxCapacidadEncomiendas.Text.Trim() != "") camposValores.Add("capacidad_encomiendas", new gdDataBase.ValorTipo(textBoxCapacidadEncomiendas.Text, SqlDbType.Decimal)); if (bajaFueraServicio) camposValores.Add("baja_fuera_servicio", new gdDataBase.ValorTipo(Convert.ToString(bajaFueraServicio), SqlDbType.Bit)); if (bajaVidaUtil) camposValores.Add("baja_vida_util", new gdDataBase.ValorTipo(Convert.ToString(bajaVidaUtil), SqlDbType.Bit)); if (textBoxCantidadButacas.Text.Trim() != "") camposValores.Add("cantidad_butacas", new gdDataBase.ValorTipo(textBoxCantidadButacas.Text, SqlDbType.Int)); camposValores.Add("hoy", new gdDataBase.ValorTipo(Config.fecha.ToString(), SqlDbType.DateTime)); var ds = new gdDataBase().GetDataWithParameters("ÑUFLO.FiltroAeronave", camposValores); //dataGridViewAeronave.DataSource = ds; bindingAeronaves.DataSource = ds; dataGridViewAeronave.DataSource = bindingAeronaves; deshabilitarModifBaja(); }
private void FormSeleccionarRutaAerea_Load(object sender, EventArgs e) { var ds = new gdDataBase().ExecAndGetDataSet("ÑUFLO.CiudadTipoServicio"); DataTable ciudades = ds.Tables[0]; var filaExtraCiudad = ciudades.NewRow(); filaExtraCiudad["Nombre"] = " Cualquiera"; ciudades.Rows.InsertAt(filaExtraCiudad, 0); DataTable servicios = ds.Tables[1]; var filaExtraServicios = servicios.NewRow(); filaExtraServicios["Tipo Servicio"] = "Cualquiera"; servicios.Rows.InsertAt(filaExtraServicios, 0); origenBindingSource.DataSource = ciudades; destinoBindingSource.DataSource = ciudades; tipoServicioBinding.DataSource = servicios; comboBoxOrigen.DisplayMember = "Nombre"; comboBoxDestino.DisplayMember = "Nombre"; comboBoxOrigen.ValueMember = "Id ciudad"; comboBoxDestino.ValueMember = "Id ciudad"; comboBoxTipoServicio.DisplayMember = "Tipo Servicio"; comboBoxTipoServicio.ValueMember = "Id Tipo Servicio"; dataGridView1.AutoGenerateColumns = true; rutaAereaBindingSource.DataSource = new gdDataBase().ExecAndGetDataSet("ÑUFLO.FiltrosModificacionRutaAerea").Tables[0]; dataGridView1.AutoGenerateColumns = false; dataGridView1.Columns["id ruta"].Visible = false; dataGridView1.Columns["id destino"].Visible = false; dataGridView1.Columns["id origen"].Visible = false; dataGridView1.Columns["id servicio"].Visible = false; btnAceptar.Enabled = false; dataGridView1.CurrentCell = dataGridView1.Rows[0].Cells["Ciudad origen"]; }
private void FormModificacionRuta_Load(object sender, EventArgs e) { var ds = new gdDataBase().ExecAndGetDataSet("ÑUFLO.CiudadTipoServicio"); DataTable ciudades = ds.Tables[0]; var filaExtraCiudad = ciudades.NewRow(); filaExtraCiudad["Nombre"] = " Cualquiera"; ciudades.Rows.InsertAt(filaExtraCiudad,0); DataTable servicios = ds.Tables[1]; var filaExtraServicios = servicios.NewRow(); filaExtraServicios["Tipo Servicio"] = "Cualquiera"; servicios.Rows.InsertAt(filaExtraServicios, 0); origenBindingSource.DataSource = ciudades; destinoBindingSource.DataSource = ciudades; tipoServicioBinding.DataSource = servicios; comboBoxOrigen.DisplayMember = "Nombre"; comboBoxDestino.DisplayMember = "Nombre"; comboBoxOrigen.ValueMember = "Id ciudad"; comboBoxDestino.ValueMember = "Id ciudad"; comboBoxTipoServicio.DisplayMember = "Tipo Servicio"; comboBoxTipoServicio.ValueMember = "Id Tipo Servicio"; dataGridView1.AutoGenerateColumns = true; rutaAereaBindingSource.DataSource = new gdDataBase().ExecAndGetDataSet("ÑUFLO.FiltrosModificacionRutaAerea").Tables[0]; dataGridView1.AutoGenerateColumns = false; dataGridView1.Columns["id ruta"].Visible = false; dataGridView1.Columns["id destino"].Visible = false; dataGridView1.Columns["id origen"].Visible = false; dataGridView1.Columns["id servicio"].Visible = false; new List<String> { "Eliminar", "Modificar" }.ForEach(column => { dataGridView1.Columns[column].DisplayIndex = dataGridView1.Columns.Count - 1; dataGridView1.Columns[column].Frozen = true; }); }
private void FormSeleccionViaje_Load(object sender, EventArgs e) { var dtOrigenDestino = new gdDataBase().GetDataWithParameters("ÑUFLO.TodasLasCiudades", null); origenBindingSource.DataSource = dtOrigenDestino; destinoBindingSource.DataSource = dtOrigenDestino; comboBoxOrigen.DataSource = origenBindingSource; comboBoxOrigen.DisplayMember = dtOrigenDestino.Columns[0].ColumnName; comboBoxDestino.DataSource = destinoBindingSource; comboBoxDestino.DisplayMember = dtOrigenDestino.Columns[0].ColumnName; }
private void btnVerDisponibles_Click(object sender, EventArgs e) { Dictionary<String, gdDataBase.ValorTipo> camposValores = new Dictionary<string, gdDataBase.ValorTipo>(); camposValores.Add("ciudad_origen", new gdDataBase.ValorTipo(comboBoxOrigen.Text, SqlDbType.VarChar)); camposValores.Add("ciudad_destino", new gdDataBase.ValorTipo(comboBoxDestino.Text, SqlDbType.VarChar)); camposValores.Add("fecha", new gdDataBase.ValorTipo(dateTimePicker1.Value.ToString("yyyy-MM-dd HH:mm:ss.000"), SqlDbType.DateTime)); var ds = new gdDataBase().GetDataWithParameters("ÑUFLO.ViajesDisponiblesPara", camposValores); dataGridView1.DataSource = ds; groupBoxPasajesEncomiendas.Enabled = false; }
private void FormDatosPasajeroEncomienda_Load(object sender, EventArgs e) { Dictionary<String, gdDataBase.ValorTipo> camposValores = new Dictionary<string, gdDataBase.ValorTipo>(); camposValores.Add("id_viaje", new gdDataBase.ValorTipo(idViaje.ToString(), SqlDbType.Decimal)); var dt = new gdDataBase().GetDataWithParameters("ÑUFLO.ButacasDisponibles", camposValores); for (int i = 0; i < dt.Rows.Count; i++) { object[] fila = dt.Rows[i].ItemArray; if (fila.GetValue(1).ToString() == "Pasillo") listBoxEleccionButacaPasillo.Items.Add(fila.GetValue(0).ToString()); else listBoxEleccionButacaVentanilla.Items.Add(fila.GetValue(0).ToString()); } eliminarEnCompra(listBoxEleccionButacaPasillo); eliminarEnCompra(listBoxEleccionButacaVentanilla); }
private void FormAltaRol_Load(object sender, EventArgs e) { var dt = new gdDataBase().GetDataWithParameters("ÑUFLO.TodasLasFuncionalidades", null); comboBoxFuncionalidades.DataSource = dt; comboBoxFuncionalidades.DisplayMember = dt.Columns[0].ColumnName; textBoxNombre.Enabled = !modificacion; checkBox1.Visible = modificacion; }
private void btnModificarAeronave_Click(object sender, EventArgs e) { int cantidadVentanilla, cantidadPasillo; DataGridViewRow filaSeleccionada = getFilaSeleccionada(); Dictionary<String, gdDataBase.ValorTipo> camposValores = new Dictionary<string, gdDataBase.ValorTipo>(); Dictionary<int, String> errorMensaje = new Dictionary<int, string>(); errorMensaje.Add(60017, "No se puede modificar una aeronave con viajes pendientes"); camposValores.Clear(); camposValores.Add("id_aeronave", new gdDataBase.ValorTipo(filaSeleccionada.Cells[0].FormattedValue.ToString(), SqlDbType.Int)); var ejecucion = new gdDataBase().Exec("ÑUFLO.ValidarAeronavesSinViajes", camposValores, errorMensaje, null); if (!ejecucion.huboError()) { FormAltaAeronave faa = new FormAltaAeronave(); faa.setPadre(this); faa.setFilaDeAeronaveSeleccionada(filaSeleccionada); var ds = new gdDataBase().ExecAndGetDataSet("ÑUFLO.CantidadButacasVentanillaPasillo", camposValores, null); cantidadVentanilla = Convert.ToInt32(ds.Tables[0].Rows[0].ItemArray[0].ToString()); cantidadPasillo = Convert.ToInt32(ds.Tables[1].Rows[0].ItemArray[0].ToString()); faa.setButacasVentanilla(cantidadVentanilla); faa.setButacasPasillo(cantidadPasillo); faa.Show(); } }
private void FormSeleccionarAeronave_Load(object sender, EventArgs e) { var ds = new gdDataBase().ExecAndGetDataSet("ÑUFLO.CiudadTipoServicio"); DataTable servicios = ds.Tables[1]; var filaExtraServicios = servicios.NewRow(); filaExtraServicios["Tipo Servicio"] = "Cualquiera"; servicios.Rows.InsertAt(filaExtraServicios, 0); tipoServicioBinding.DataSource = servicios; comboBoxTipoServicio.DisplayMember = "Tipo Servicio"; comboBoxTipoServicio.ValueMember = "Id Tipo Servicio"; }
public void actualizate() { var dt = new gdDataBase().GetDataWithParameters("ÑUFLO.RolDadoNombre", null); cargarDatosEnTabla(dt); }
private void textBoxDNI_TextChanged(object sender, EventArgs e) { //este texto sólo debe permitir ingreso de números if (textBoxDNI.Text.Length >= 7) { Dictionary<String, gdDataBase.ValorTipo> camposValores = new Dictionary<string, gdDataBase.ValorTipo>(); camposValores.Add("dni", new gdDataBase.ValorTipo(textBoxDNI.Text, SqlDbType.Decimal)); var dt = new gdDataBase().GetDataWithParameters("ÑUFLO.ConsultaCliente", camposValores); if (dt.Rows.Count == 1) { object[] fila = dt.Rows[0].ItemArray; textBoxNombre.Text = fila.GetValue(0).ToString(); textBoxApellido.Text = fila.GetValue(1).ToString(); textBoxDireccion.Text = fila.GetValue(2).ToString(); textBoxTelefono.Text = fila.GetValue(3).ToString(); textBoxMail.Text = fila.GetValue(4).ToString(); dateTimeFechaNacimiento.Text = fila.GetValue(5).ToString(); btnAceptar.Text = "Actualizar"; checkBoxModificarDatos.Visible = true; habilitacionDatosCliente(false); } else { limpiarDatosCliente(); checkBoxModificarDatos.Visible = false; btnAceptar.Text = "Guardar"; habilitacionDatosCliente(true); } } }