Example #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     NombretextBox.Clear();
     ApellidotextBox.Clear();
     DirecciontextBox.Clear();
     NomUsuariotextBox.Clear();
     ContraseñatextBox.Clear();
 }
Example #2
0
        private bool Validar()
        {
            bool paso = true;

            MyErrorProvider.Clear();

            if (string.IsNullOrWhiteSpace(MatriculamaskedTextBox.Text.Replace("-", "")))
            {
                MyErrorProvider.SetError(MatriculamaskedTextBox, "El campo matricula no puede estar vacio");
                MatriculamaskedTextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(TelefonomaskedTextBox.Text.Replace("-", "")))
            {
                MyErrorProvider.SetError(TelefonomaskedTextBox, "El campo telefono no puede estar vacio");
                TelefonomaskedTextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(CedulamaskedTextBox.Text.Replace("-", "")))
            {
                MyErrorProvider.SetError(CedulamaskedTextBox, "El campo cedula no puede estar vacio");
                CedulamaskedTextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(CelularmaskedTextBox.Text.Replace("-", "")))
            {
                MyErrorProvider.SetError(CelularmaskedTextBox, "El campo celular no puede estar vacio");
                CelularmaskedTextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(NombretextBox.Text))
            {
                MyErrorProvider.SetError(NombretextBox, "El campo nombre no debe estar vacio");
                NombretextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(ApellidotextBox.Text))
            {
                MyErrorProvider.SetError(ApellidotextBox, "El campo apellido no debe estar vacio");
                ApellidotextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(EmailtextBox.Text))
            {
                MyErrorProvider.SetError(EmailtextBox, "El Campo Email no debe estar Vacio");
                EmailtextBox.Focus();
                paso = false;
            }


            return(paso);
        }
Example #3
0
 private void button2_Click(object sender, EventArgs e)
 {
     NombretextBox.Clear();
     ApellidotextBox.Clear();
     DirecciontextBox.Clear();
     CedulatextBox.Clear();
     SocioIdtextBox.Clear();
     TerrenotextBox.Clear();
 }
Example #4
0
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     CobradorIdtextBox.Clear();
     NombretextBox.Clear();
     ApellidotextBox.Clear();
     DirecciontextBox.Clear();
     TelefonotextBox.Clear();
     CelulartextBox.Clear();
     CedulatextBox.Clear();
 }
Example #5
0
 private void ApellidotextBox_KeyPress(object sender, KeyPressEventArgs e)
 {
     Myerror.Clear();
     if (!(char.IsLetter(e.KeyChar)) && (e.KeyChar == (char)Keys.Back))
     {
         Myerror.SetError(ApellidotextBox, "Solo se permiten letras");
         ApellidotextBox.Focus();
         e.Handled = true;
         return;
     }
 }
Example #6
0
 private void button2_Click(object sender, EventArgs e)
 {
     NombretextBox.Clear();
     ApellidotextBox.Clear();
     DirecciontextBox.Clear();
     CedulatextBox.Clear();
     SocioIdtextBox.Clear();
     TerrenotextBox.Clear();
     FertNoradioButton.Checked = false;
     FertSiradioButton.Checked = false;
 }
Example #7
0
 private void Limpiar()
 {
     IdTextBox.Clear();
     NombretextBox.Clear();
     ApellidotextBox.Clear();
     NombreUsuariotextBox.Clear();
     ContrasenatextBox.Clear();
     TipoUsuariocomboBox.Text = null;
     IdTextBox.Enabled        = false;
     BuscarButton.Enabled     = false;
     GuardarButton.Enabled    = true;
     EliminarButton.Enabled   = false;
 }
 private void Limpiar()
 {
     IdTextBox.Clear();
     NombretextBox.Clear();
     ApellidotextBox.Clear();
     DirecciontextBox.Clear();
     TelefonotextBox.Clear();
     CelulartextBox.Clear();
     CedulatextBox.Clear();
     IdTextBox.Enabled      = false;
     BuscarButton.Enabled   = false;
     GuardarButton.Enabled  = true;
     EliminarButton.Enabled = false;
 }
Example #9
0
 private void Limpiar()
 {
     IdtextBox.Clear();
     NombreUsuariotextBox.Clear();
     NombretextBox.Clear();
     ApellidotextBox.Clear();
     DirecciontextBox.Clear();
     TelefonomaskedTextBox.Clear();
     EmailtextBox.Clear();
     ContrasenatextBox.Clear();
     TipoUsuariocomboBox.SelectedIndex = 0;
     CiudadcomboBox.SelectedIndex      = 0;
     ImagenpictureBox.ImageLocation    = null;
     UsuarioerrorProvider.Clear();
     FechadateTimePicker.ResetText();
 }
Example #10
0
 private void Limpiar()
 {
     IdtextBox.Clear();
     NombretextBox.Clear();
     ApellidotextBox.Clear();
     EdadtextBox.Clear();
     MasculinoradioButton.Checked = false;
     FemeninoradioButton.Checked  = false;
     DirecciontextBox.Clear();
     TelefonomaskedTextBox.Clear();
     VacunacomboBox.ResetText();
     VacunadataGridView.Rows.Clear();
     PacienteerrorProvider.Clear();
     SiradioButton.Checked  = false;
     NoradioButton.Checked  = false;
     Eliminarbutton.Enabled = false;
 }
Example #11
0
        private bool validar()
        {
            bool paso = true;

            if (string.IsNullOrWhiteSpace(NombretextBox.Text))
            {
                SuperErrorProvider.SetError(NombretextBox, "El campo no debe estar vacio");
                NombretextBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(ApellidotextBox.Text))
            {
                SuperErrorProvider.SetError(ApellidotextBox, "El campo no debe estar vacio");
                ApellidotextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(DirecciontextBox.Text))
            {
                SuperErrorProvider.SetError(DirecciontextBox, "El Campo no debe estar vacio");
                DirecciontextBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(NoTelefonoMaskedTextBox.Text))
            {
                SuperErrorProvider.SetError(NoTelefonoMaskedTextBox, "El Campo no debe estar vacio");
                NoTelefonoMaskedTextBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(CedulatextBox.Text))
            {
                SuperErrorProvider.SetError(CedulatextBox, "El Campo no debe estar vacio");
                CedulatextBox.Focus();
                paso = false;
            }
            if (FechadateTimePicker.Value > DateTime.Now)
            {
                SuperErrorProvider.SetError(FechadateTimePicker, "La fecha no es correcta");
                FechadateTimePicker.Focus();
                paso = false;
            }
            return(paso);
        }
 private void Limpiar()
 {
     VendedorIdtextBox.Clear();
     NombreVendedortextBox.Clear();
     ApellidotextBox.Clear();
     MujerradioButton.Checked        = false;
     HombreradioButton.Checked       = false;
     VehiculoPsiradioButton.Checked  = false;
     VehiculoPnoradioButton.Checked  = false;
     VasignadonoradioButton.Checked  = false;
     VasignadoSiradioButton3.Checked = false;
     CedulamaskedTextBox.Clear();
     TelefonoFijomaskedTextBox.Clear();
     TelefonoMovilmaskedTextBox.Clear();
     DirecciontextBox.Clear();
     ZonatextBox.Clear();
     DescripciontextBox.Clear();
     RutaAsignadatextBox.Clear();
     TipoVehiculocomboBox.SelectedValue = 1;
     ErrorVenderrorProvider.Clear();
 }
Example #13
0
        private bool Validar()
        {
            bool paso = true;

            Myerror.Clear();

            if (string.IsNullOrWhiteSpace(NombretextBox.Text))
            {
                Myerror.SetError(NombretextBox, "El campo nombre no debe estar vacio!");
                NombretextBox.Focus();
                paso = false;
            }

            if (ValidarNombre())
            {
                Myerror.SetError(NombretextBox, "Ya existe un cliente con el mismo nombre");
                paso = false;
            }

            if (ValidarCedula())
            {
                Myerror.SetError(CedulamaskedTextBox, "Ya existe un cliente con la misma cedula");
                paso = false;
            }

            if (ValidarTelefono())
            {
                Myerror.SetError(TelefonomaskedTextBox, "Ya existe un cliente con el mismo telefono");
                paso = false;
            }

            if (EmailValido())
            {
                Myerror.SetError(EmailtextBox, "Ya existe un cliente con el mismo email");
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(ApellidotextBox.Text))
            {
                Myerror.SetError(ApellidotextBox, "El campo apellido no debe estar vacio!");
                ApellidotextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(CedulamaskedTextBox.Text.Replace("-", "")) || CedulamaskedTextBox.MaskFull == false)
            {
                Myerror.SetError(CedulamaskedTextBox, "El campo cedula no puede estar vacio!");
                CedulamaskedTextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(TelefonomaskedTextBox.Text.Replace("-", "")) || TelefonomaskedTextBox.MaskFull == false)
            {
                Myerror.SetError(TelefonomaskedTextBox, "El campo teléfono no puede estar vacio!");
                TelefonomaskedTextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(EmailtextBox.Text))
            {
                Myerror.SetError(EmailtextBox, "El campo email no puede estar vacio!");
                EmailtextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(DirecciontextBox.Text))
            {
                Myerror.SetError(DirecciontextBox, "El campo dirección no puede estar vacio!");
                DirecciontextBox.Focus();
                paso = false;
            }

            if (!ValidarEmail(EmailtextBox.Text))
            {
                Myerror.SetError(EmailtextBox, "El formato del correo no es valido");
                EmailtextBox.Focus();
            }

            return(paso);
        }
Example #14
0
        private bool validar()
        {
            bool paso = true;

            if (string.IsNullOrWhiteSpace(IDnumericUpDown.Text))
            {
                MyerrorProvider.SetError(IDnumericUpDown, "El campo no debe estar vacio");
                IDnumericUpDown.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(NombretextBox.Text))
            {
                MyerrorProvider.SetError(NombretextBox, "El campo no debe estar vacio");
                NombretextBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(MatriculatextBox.Text))
            {
                MyerrorProvider.SetError(MatriculatextBox, "El campo no debe estar vacio");
                MatriculatextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(EmailtextBox.Text))
            {
                MyerrorProvider.SetError(EmailtextBox, "El campo no debe estar vacio");
                EmailtextBox.Focus();
                paso = false;
            }
            if (ValidaEmail())
            {
                MyerrorProvider.SetError(EmailtextBox, "Ya existe un estudiante con este Email");
                EmailtextBox.Focus();
                paso = false;
            }
            if (!EmailValido(EmailtextBox.Text))
            {
                MyerrorProvider.SetError(EmailtextBox, "Email no valido");
                EmailtextBox.Focus();
                paso = false;
            }
            if (ValidarMatricula())
            {
                MyerrorProvider.SetError(MatriculatextBox, "Ya existe un estudiante con esta matricula");
                MatriculatextBox.Focus();
                paso = false;
            }
            if (ValidarCelular())
            {
                MyerrorProvider.SetError(CelularMaskedTextBox, "Ya existe un estudiante con este celular");
                CelularMaskedTextBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(ApellidotextBox.Text))
            {
                MyerrorProvider.SetError(ApellidotextBox, "El campo no debe estar vacio");
                ApellidotextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(DirecciontextBox.Text))
            {
                MyerrorProvider.SetError(DirecciontextBox, "El Campo no debe estar vacio");
                DirecciontextBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(CelularMaskedTextBox.Text))
            {
                MyerrorProvider.SetError(CelularMaskedTextBox, "El Campo no debe estar vacio");
                CelularMaskedTextBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(UsuariocomboBox.Text))
            {
                MyerrorProvider.SetError(UsuariocomboBox, "El Campo no debe estar vacio");
                UsuariocomboBox.Focus();
                paso = false;
            }

            if (FechadateTimePicker.Value > DateTime.Now)
            {
                MyerrorProvider.SetError(FechadateTimePicker, "La fecha no es correcta");
                FechadateTimePicker.Focus();
                paso = false;
            }
            return(paso);
        }
        private bool Validar()
        {
            bool paso = true;

            {
                if (String.IsNullOrWhiteSpace(NombretextBox.Text))
                {
                    SuperErrorProvider.SetError(NombretextBox, "Este campo no debe estar vacio");
                    NombretextBox.Focus();
                    paso = false;
                }

                if (String.IsNullOrWhiteSpace(ApellidotextBox.Text))
                {
                    SuperErrorProvider.SetError(ApellidotextBox, "Este campo no debe estar vacio");
                    ApellidotextBox.Focus();
                    paso = false;
                }

                if (String.IsNullOrWhiteSpace(CedulamaskedTextBox.Text))
                {
                    SuperErrorProvider.SetError(CedulamaskedTextBox, "Este campo no debe estar vacio");
                    CedulamaskedTextBox.Focus();
                    paso = false;
                }

                if (String.IsNullOrWhiteSpace(TelefonomaskedTextBox.Text))
                {
                    SuperErrorProvider.SetError(TelefonomaskedTextBox, "Este campo no debe estar vacio");
                    TelefonomaskedTextBox.Focus();
                    paso = false;
                }

                if (String.IsNullOrWhiteSpace(CelularmaskedTextBox.Text))
                {
                    SuperErrorProvider.SetError(CelularmaskedTextBox, "Este campo no debe estar vacio");
                    CelularmaskedTextBox.Focus();
                    paso = false;
                }

                if (String.IsNullOrWhiteSpace(TelefonoDeReferenciamaskedTextBox.Text))
                {
                    SuperErrorProvider.SetError(TelefonoDeReferenciamaskedTextBox, "Este campo no debe estar vacio");
                    TelefonoDeReferenciamaskedTextBox.Focus();
                    paso = false;
                }

                if (String.IsNullOrWhiteSpace(TelefonoDeReferenciamaskedTextBox.Text))
                {
                    SuperErrorProvider.SetError(TelefonoDeReferenciamaskedTextBox, "Este campo no debe estar vacio");
                    TelefonoDeReferenciamaskedTextBox.Focus();
                    paso = false;
                }

                if (String.IsNullOrWhiteSpace(DirecciontextBox.Text))
                {
                    SuperErrorProvider.SetError(DirecciontextBox, "Este campo no debe estar vacio");
                    DirecciontextBox.Focus();
                    paso = false;
                }
            }

            return(paso);
        }
        private bool Confirmar()
        {
            bool retornar = true;

            if (string.IsNullOrEmpty(NombreVendedortextBox.Text))
            {
                string texto;
                texto = "Introduzca nombre...";
                ErrorVenderrorProvider.SetError(NombreVendedortextBox, texto);
                MessageBox.Show(texto);
                NombreVendedortextBox.Focus();
                ApellidotextBox.Focus();
                retornar = false;
            }
            else
            {
                ErrorVenderrorProvider.Clear();
            }


            if (string.IsNullOrEmpty(ApellidotextBox.Text))
            {
                string texto;
                texto = "Introduzca Apellido..";
                ErrorVenderrorProvider.SetError(ApellidotextBox, texto);
                MessageBox.Show(texto);
                ApellidotextBox.Focus();
                retornar = false;
            }
            else
            {
                ErrorVenderrorProvider.Clear();
            }
            //if (!HombreradioButton.Checked == true ||! MujerradioButton.Checked == true)
            //{
            //    MessageBox.Show("Al menos seleccione el sexo....!!!");
            //    retornar = true;
            //}
            //else


            if (!CedulamaskedTextBox.MaskFull)
            {
                string texto;
                texto = "Introduzca Cedula...";
                ErrorVenderrorProvider.SetError(CedulamaskedTextBox, texto);
                MessageBox.Show(texto);
                CedulamaskedTextBox.Focus();
                retornar = false;
            }
            else
            {
                ErrorVenderrorProvider.Clear();
            }

            if (!TelefonoFijomaskedTextBox.MaskFull)
            {
                string texto;
                texto = "Introduzca un Telefono...";
                ErrorVenderrorProvider.SetError(TelefonoFijomaskedTextBox, texto);
                ErrorVenderrorProvider.SetError(TelefonoMovilmaskedTextBox, texto);
                MessageBox.Show(texto);
                TelefonoFijomaskedTextBox.Focus();
                retornar = false;
            }
            else
            {
                ErrorVenderrorProvider.Clear();
            }

            if (string.IsNullOrEmpty(DescripciontextBox.Text))
            {
                string texto;
                texto = "Introduzca Descripcion del Vehiculo..";
                ErrorVenderrorProvider.SetError(DescripciontextBox, texto);
                MessageBox.Show(texto);
                DescripciontextBox.Focus();
                retornar = false;
            }
            else
            {
                ErrorVenderrorProvider.Clear();
            }

            if (string.IsNullOrEmpty(RutaAsignadatextBox.Text))
            {
                string texto;
                texto = "Introduzca la Ruta Asignada..";
                ErrorVenderrorProvider.SetError(RutaAsignadatextBox, texto);
                MessageBox.Show(texto);
                RutaAsignadatextBox.Focus();
                retornar = false;
            }
            else
            {
                ErrorVenderrorProvider.Clear();
            }
            if (string.IsNullOrEmpty(DirecciontextBox.Text))
            {
                string texto;
                texto = "Introduzca una Direccion..";
                ErrorVenderrorProvider.SetError(DirecciontextBox, texto);
                MessageBox.Show(texto);
                DirecciontextBox.Focus();
                retornar = false;
            }
            else
            {
                ErrorVenderrorProvider.Clear();
            }
            if (string.IsNullOrEmpty(ZonatextBox.Text))
            {
                string texto;
                texto = "Introduzca la Ruta Asignada..";
                ErrorVenderrorProvider.SetError(ZonatextBox, texto);
                MessageBox.Show(texto);
                ZonatextBox.Focus();
                retornar = false;
            }
            else
            {
                ErrorVenderrorProvider.Clear();
            }
            return(retornar);
        }