private void btnAlta_Click(object sender, EventArgs e) { FrbaHotel.ABM_de_Cliente.AltaCliente levantarAlta = new AltaCliente(coneccion); this.Hide(); levantarAlta.ShowDialog(); //this.Show(); }
private void btnAlta_Click(object sender, EventArgs e) { FrbaHotel.ABM_de_Cliente.AltaCliente levantarAlta = new AltaCliente(coneccion); this.Hide(); levantarAlta.ShowDialog(); this.Show(); }
private void AgregarCliente_Click(object sender, EventArgs e) { DialogResult exito = new AltaCliente().ShowDialog(); if (exito == DialogResult.OK) { BD db = new BD(); SqlDataReader dr = db.lee("SELECT TOP 1 * FROM FUGAZZETA.Clientes ORDER BY Id_Cliente DESC"); string id = ""; string apellidonombre = ""; while (dr.Read()) { id = dr[0].ToString(); apellidonombre = dr[2].ToString() + ", " + dr[1].ToString(); } dr.Close(); dondeVuelve.agregar(id, apellidonombre); this.DialogResult = DialogResult.OK; this.Close(); } }
private void Seleccionar_Click(object sender, EventArgs e) { string id = celdaElegida(GridClientes, 0); if (esDuplicado(id)) MessageBox.Show("Este cliente posee datos inconsistentes/duplicados. Por favor, actualice sus datos correctamente o comuníquese con un administrador.","FRBA HOTELES",MessageBoxButtons.OK,MessageBoxIcon.Warning); switch (fx) { case 'M': DialogResult modif = new AltaCliente(fx, id).ShowDialog(); if (modif == DialogResult.OK) this.Close(); break; case 'S': dondeVuelve.agregar(celdaElegida(GridClientes, 0), celdaElegida(GridClientes, 1)); this.Close(); break; } }