logueo form with composite control

0

I have this logueo form created with composite control but it throws an input string error, what would that error be?

        private void btnIniciarSesion_Click(object sender, EventArgs e)
        {

            try
            {
                int cedula=0;
                string contraseña="";
                try
                {
                    cedula = Convert.ToInt32(_Logueo.Usuario);
                }
                catch
                {
                    lblerror.Text = "Cedula Incorrecta";
                }
                contraseña = _Logueo.Contraseña;
                ILogicaEmpleado LEmpleado = FabricaLogica.getLogicaEmpleado();
                Empleado _unEmpleado = LEmpleado.BuscarEmpleadoLogueo(cedula, contraseña);

                if (_unEmpleado == null)
                {
                    lblerror.Text = "No existe el Empleado";

                }
                else
                {
                    this.Hide();
                    //pasarcedula(_Login.Usuario);
                    FrmDefault _unfrm = new FrmDefault();
                    _unfrm.Show();
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                lblerror.Text = ex.Message;
            }
        }
    
asked by Francop 27.10.2018 в 19:38
source

0 answers