Пример #1
0
 private void bBuscar_Click(object sender, EventArgs e)
 {
     FormListadoEmpleados form = new FormListadoEmpleados();
     form.MessageFromParent = null;
     form.ShowDialog(this);
     if (form.MessageFromParent != null) {
         this.cargarEmpleado((Empleado)form.MessageFromParent);
         bCrearOtro.Hide();
         bCrear.Hide();
         if (form.empleadosActivos) {
             bModificar.Show();
             bBorrar.Show();
         } else {
             bBorrar.Show();
             bBorrar.Text = "Habilitar";
             txtApellido.Enabled = false;
             txtNombre.Enabled = false;
             txtMail.Enabled = false;
             txtTelefono.Enabled = false;
             txtDireccion.Enabled = false;
             cmbProvincia.Enabled = false;
             cmbSucursal.Enabled = false;
             cmbTipoEmpleado.Enabled = false;
         }
         txtDni.Enabled = false;
     }
 }
Пример #2
0
        private void bBuscar_Click(object sender, EventArgs e)
        {
            FormListadoEmpleados form = new FormListadoEmpleados();

            form.MessageFromParent = null;
            form.ShowDialog(this);
            if (form.MessageFromParent != null)
            {
                this.cargarEmpleado((Empleado)form.MessageFromParent);
                bCrearOtro.Hide();
                bCrear.Hide();
                if (form.empleadosActivos)
                {
                    bModificar.Show();
                    bBorrar.Show();
                }
                else
                {
                    bBorrar.Show();
                    bBorrar.Text            = "Habilitar";
                    txtApellido.Enabled     = false;
                    txtNombre.Enabled       = false;
                    txtMail.Enabled         = false;
                    txtTelefono.Enabled     = false;
                    txtDireccion.Enabled    = false;
                    cmbProvincia.Enabled    = false;
                    cmbSucursal.Enabled     = false;
                    cmbTipoEmpleado.Enabled = false;
                }
                txtDni.Enabled = false;
            }
        }
Пример #3
0
 private void bBuscarEmpleado_Click(object sender, EventArgs e)
 {
     FormListadoEmpleados form = new FormListadoEmpleados("ConUsuario");
     form.MessageFromParent = null;
     form.ShowDialog(this);
     if (form.MessageFromParent != null) {
         this.cargarEmpleado((Empleado)form.MessageFromParent);
     }
 }