Пример #1
0
        private bool ValidateData()
        {
            if (String.IsNullOrWhiteSpace(TxNombre.Text))
            {
                MessageBox.Show("Debe ingresar el nombre del empleado.");
                TxNombre.Focus();
                return(false);
            }

            if (String.IsNullOrWhiteSpace(TxApellido.Text))
            {
                MessageBox.Show("Debe ingresar el apellido del empleado.");
                TxApellido.Focus();
                return(false);
            }

            if (String.IsNullOrWhiteSpace(TxEmail.Text))
            {
                MessageBox.Show("Debe ingresar el email del empleado.");
                TxEmail.Focus();
                return(false);
            }

            if (String.IsNullOrWhiteSpace(TxClave.Text))
            {
                MessageBox.Show("Debe ingresar la clave del empleado.");
                TxClave.Focus();
                return(false);
            }

            if (comboTanda.SelectedIndex == -1)
            {
                MessageBox.Show("Debe seleccionar la tanda del empleado.");
                comboTanda.Focus();
                return(false);
            }

            if (String.IsNullOrWhiteSpace(TxPorcientoComision.Text))
            {
                MessageBox.Show("Debe ingresar el porciento de comision del empleado.");
                TxPorcientoComision.Focus();
                return(false);
            }

            if (String.IsNullOrWhiteSpace(DPFechaIngreso.Text))
            {
                MessageBox.Show("Debe ingresar la fecha de ingreso del empleado.");
                DPFechaIngreso.Focus();
                return(false);
            }

            if (comboTipoEmpleado.SelectedIndex == -1)
            {
                MessageBox.Show("Debe seleccionar el tipo de empleado.");
                comboTipoEmpleado.Focus();
                return(false);
            }

            return(true);
        }
Пример #2
0
        private bool ValidateData()
        {
            if (String.IsNullOrWhiteSpace(TxNombres.Text))
            {
                MessageBox.Show("Debe ingresar el nombre del cliente.");
                TxNombres.Focus();
                return(false);
            }

            if (String.IsNullOrWhiteSpace(TxApellidos.Text))
            {
                MessageBox.Show("Debe ingresar el apellidos del cliente.");
                TxApellidos.Focus();
                return(false);
            }

            if (String.IsNullOrWhiteSpace(TxCedula.Text))
            {
                MessageBox.Show("Debe ingresar la cedula del cliente.");
                TxCedula.Focus();
                return(false);
            }

            if (String.IsNullOrWhiteSpace(TxEmail.Text))
            {
                MessageBox.Show("Debe ingresar la correo del cliente.");
                TxEmail.Focus();
                return(false);
            }

            if (String.IsNullOrWhiteSpace(TxTarjetaCredito.Text))
            {
                MessageBox.Show("Debe ingresar la tarjeta de credito del cliente.");
                TxTarjetaCredito.Focus();
                return(false);
            }

            if (String.IsNullOrWhiteSpace(TxLimiteCredito.Text))
            {
                MessageBox.Show("Debe ingresar el limite de credito del cliente.");
                TxLimiteCredito.Focus();
                return(false);
            }

            if (comboTipoPersona.SelectedIndex == -1)
            {
                MessageBox.Show("Debe seleccionar el tipo de cliente.");
                comboTipoPersona.Focus();
                return(false);
            }

            return(true);
        }
Пример #3
0
        private bool ValidateData()
        {
            if (string.IsNullOrWhiteSpace(TxEmail.Text))
            {
                MessageBox.Show("Debe ingresar el email");
                TxEmail.Focus();
                return false;
            }

            if (string.IsNullOrWhiteSpace(TxClave.Text))
            {
                MessageBox.Show("Debe ingresar la clave");
                TxClave.Focus();
                return false;
            }

            return true;
        }
Пример #4
0
        public Usuario Decrypt(CoeusProjectContext Context = null)
        {
            if (this.Salt == null)
            {
                if (Context == null)
                {
                    Context = new CoeusProjectContext();
                }

                this.Salt = Context.Salt.Where(s => s.IdSalt == this.IdSalt).FirstOrDefault();
            }

            this.TxEmail  = SecurityFacade.Decrypt(TxEmail.Replace("*****@*****.**", ""), this.Salt.BtSalt);
            this.NmPessoa = SecurityFacade.Decrypt(NmPessoa, this.Salt.BtSalt);
            this.SnPessoa = SecurityFacade.Decrypt(SnPessoa, this.Salt.BtSalt);

            return(this);
        }