private bool SetError(int error)
        {
            bool paso = false;

            if (error == 1 && IDcomboBox.Text == string.Empty)
            {
                IDerrorProvider.SetError(IDcomboBox, "Llenar Id");
                paso = true;
            }
            if (error == 2 && NombretextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(NombretextBox, "Llenar Nombre");
                paso = true;
            }
            if (error == 2 && DirecciontextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(DirecciontextBox, "Llenar Direccion");
                paso = true;
            }
            if (error == 2 && CedulamaskedTextBox.MaskFull == false)
            {
                DemaserrorProvider.SetError(CedulamaskedTextBox, "Llenar Cedula");
                paso = true;
            }
            if (error == 2 && TelefonomaskedTextBox.MaskFull == false)
            {
                DemaserrorProvider.SetError(TelefonomaskedTextBox, "Llenar Telefono");
                paso = true;
            }
            return(paso);
        }
Example #2
0
        private bool SetError(int error)
        {
            bool paso = false;

            if (error == 1 && IDcomboBox.Text == string.Empty)
            {
                IDerrorProvider.SetError(IDcomboBox, "Llenar Id");
                paso = true;
            }
            if (error == 2 && CLienteIDcomboBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(CLienteIDcomboBox, "Llenar Cliente Id");
                paso = true;
            }
            if (error == 2 && DescripciponFacturatextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(DescripciponFacturatextBox, "Llenar descripcion");
                paso = true;
            }
            if (error == 2 && DescripciponFacturatextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(DescripciponFacturatextBox, "Llenar descripcion");
                paso = true;
            }
            if (error == 3 && ProductoIdcomboBox.Text == string.Empty)
            {
                ProductoerrorProvider.SetError(ProductoIdcomboBox, " Llenar id producto");
                paso = true;
            }
            if (error == 4 && DetallecomboBox.Text == string.Empty)
            {
                ProductoerrorProvider.SetError(DetallecomboBox, " Llenar id producto");
                paso = true;
            }
            if (error == 5 && Convert.ToDecimal(DevueltatextBox.Text) < 0)
            {
                DemaserrorProvider.SetError(DevueltatextBox, "Arreglar efectivo recibido");
                paso = true;
            }
            if (error == 6 && ProductoIdcomboBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(ProductoIdcomboBox, "Debe de buscar antes de agregar!");
                paso = true;
            }
            if (error == 7 && CantidadnumericUpDown.Value == 0)
            {
                DemaserrorProvider.SetError(CantidadnumericUpDown, "Debe de agregar una cantidad andes de agregar!");
                paso = true;
            }
            return(paso);
        }
Example #3
0
        private bool SetError(int error)
        {
            bool paso = false;

            if (error == 1 && IDcomboBox.Text == string.Empty)
            {
                errorProvider.SetError(IDcomboBox, "Llenar Id");
                paso = true;
            }
            if (error == 2 && NombretextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(NombretextBox, "Llenar Nombre");
                paso = true;
            }
            if (error == 2 && UsuariotextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(UsuariotextBox, "Llenar Direccion");
                paso = true;
            }
            if (error == 2 && ContraseñatextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(ContraseñatextBox, "Llenar Contraseña");
                paso = true;
            }
            if (error == 2 && ConfirmartextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(ConfirmartextBox, "Llenar Confirmacion de contraseña");
                paso = true;
            }
            if (error == 2 && ComentariotextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(ComentariotextBox, "Llenar Confirmacion de contraseña");
                paso = true;
            }
            if (error == 3 && ContraseñatextBox.Text != ConfirmartextBox.Text)
            {
                DemaserrorProvider.SetError(ConfirmartextBox, "Llenar Campo!!");
                DemaserrorProvider.SetError(ContraseñatextBox, "Llenar Campo!!");
                paso = true;
            }

            if (error == 4 && BLL.UsuarioBLL.Getlist("NombreUsuario", UsuariotextBox.Text).Exists(t => t.NombreUsuario == UsuariotextBox.Text) && IDcomboBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(UsuariotextBox, "Debe de crear otro usuario!!");
                paso = true;
            }
            return(paso);
        }
Example #4
0
        private bool SetError(int error)
        {
            bool paso = false;

            if (error == 1 && IDcomboBox.Text == string.Empty)
            {
                IderrorProvider.SetError(IDcomboBox, "Llenar Campo Id");
                paso = true;
            }
            if (error == 2 && NombretextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(NombretextBox, "Llenar Nombre");
                paso = true;
            }

            return(paso);
        }
        private bool SetError(int error)
        {
            bool paso = false;

            if (error == 1 && IDcomboBox.Text == string.Empty)
            {
                errorProvider.SetError(IDcomboBox, "Llenar Id");
                paso = true;
            }
            if (error == 2 && NombretextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(NombretextBox, "Llenar Nombre");
                paso = true;
            }
            if (error == 2 && UsuariotextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(UsuariotextBox, "Llenar Direccion");
                paso = true;
            }
            if (error == 2 && ContraseñatextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(ContraseñatextBox, "Llenar Contraseña");
                paso = true;
            }
            if (error == 2 && ConfirmartextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(ConfirmartextBox, "Llenar Confirmacion de contraseña");
                paso = true;
            }
            if (error == 2 && ComentariotextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(ComentariotextBox, "Llenar Confirmacion de contraseña");
                paso = true;
            }
            return(paso);
        }
Example #6
0
 private void LimpiarProvider()
 {
     IDerrorProvider.Clear();
     DemaserrorProvider.Clear();
     ProductoerrorProvider.Clear();
 }
 private void LimpiarProvider()
 {
     errorProvider.Clear();
     DemaserrorProvider.Clear();
 }
        //listo Eso maneja la validacion
        private bool SetError(int error)
        {
            bool paso = false;

            if (error == 1 && IDcomboBox.Text == string.Empty)
            {
                IDerrorProvider.SetError(IDcomboBox, "Llenar Id");
                paso = true;
            }

            if (error == 2 && CLienteIDcomboBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(CLienteIDcomboBox, "Llenar Cliente Id");
                paso = true;
            }
            if (error == 2 && FormaDePagocomboBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(FormaDePagocomboBox, "Llenar Forma de pago");
                paso = true;
            }
            if (error == 2 && DescripciponFacturatextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(DescripciponFacturatextBox, "Llenar descripcion");
                paso = true;
            }
            if (error == 2 && DescripciponFacturatextBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(DescripciponFacturatextBox, "Llenar descripcion");
                paso = true;
            }
            if (error == 2 && EfectivonumericUpDown.Value == 0 && FormaDePagocomboBox.SelectedIndex != 0 && Convert.ToInt32(DevueltatextBox.Text) < Convert.ToInt32(MontotextBox.Text))
            {
                DemaserrorProvider.SetError(EfectivonumericUpDown, "Llenar Efectivo de caja");
                paso = true;
            }
            if (error == 3 && ProductoIdcomboBox.Text == string.Empty)
            {
                ProductoerrorProvider.SetError(ProductoIdcomboBox, " Llenar id producto");
                paso = true;
            }
            if (error == 4 && DetallecomboBox.Text == string.Empty)
            {
                ProductoerrorProvider.SetError(DetallecomboBox, " Llenar id producto");
                paso = true;
            }
            if (error == 5 && Convert.ToDecimal(DevueltatextBox.Text) < 0)
            {
                DemaserrorProvider.SetError(DevueltatextBox, "Posible perdida, Arreglar efectivo recibido");
                paso = true;
            }
            if (error == 6 && ProductoIdcomboBox.Text == string.Empty)
            {
                DemaserrorProvider.SetError(ProductoIdcomboBox, "Debe de buscar antes de agregar!");
                paso = true;
            }
            if (error == 7 && CantidadnumericUpDown.Value == 0)
            {
                DemaserrorProvider.SetError(CantidadnumericUpDown, "Debe de agregar una cantidad andes de agregar!");
                paso = true;
            }



            return(paso);
        }