Example #1
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            try
            {
                if (Application.OpenForms["Formcliente"] != null)
                {
                    Application.OpenForms["Formcliente"].Activate();
                }
                else
                {
                    FormCliente form = new FormCliente();
                    form.ShowDialog();

                    if (form.cCliente != null && form.cCliente.Id_Cliente != 0)
                    {
                        cCliente          = form.cCliente;
                        txtidcliente.Text = cCliente.Id_Cliente.ToString();
                        textcliente.Text  = cCliente.Nombre.ToString() + " " + cCliente.Apellidos.ToString();
                        txtdocumento.Text = cCliente.Documento.ToString();
                        txtdireccion.Text = cCliente.Direccion.ToString();
                        txtcelular.Text   = cCliente.Celular;
                        textcliente.Select();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error del sistema : " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
        private void buttonNuevoHotel_Click(object sender, EventArgs e)
        {
            MessageBox.Show("Se pasa a crear un nuevo cliente", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
            this.Hide();
            FormCliente formHotel = new FormCliente();

            formHotel.ShowDialog();
        }
Example #3
0
 private void buttonEditar_Click(object sender, EventArgs e)
 {
     if (this.dataGridViewClientes.SelectedRows.Count == 1)
     {
         MessageBox.Show("Se pasa a editar al cliente", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
         this.idClienteSeleccionado = Int32.Parse(dataGridViewClientes.SelectedRows[0].Cells[0].Value.ToString());
         this.Hide();
         FormCliente formHotel = new FormCliente(idClienteSeleccionado);
         formHotel.ShowDialog();
     }
     else
     {
         MessageBox.Show("Debe seleccionar un cliente", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #4
0
        private void btnClientes_Click(object sender, EventArgs e)
        {
            FormCliente f = new FormCliente();

            f.ShowDialog();
        }
Example #5
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            FormCliente interligar = new FormCliente();

            interligar.ShowDialog();
        }
Example #6
0
        private void clientesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var formClientes = new FormCliente();

            formClientes.ShowDialog();
        }
Example #7
0
        public void abrirCliente()
        {
            FormCliente menu = new FormCliente();

            menu.ShowDialog();
        }