コード例 #1
0
        private bool validar()
        {
            UtilidadesInt ut = new UtilidadesInt();



            if (string.IsNullOrEmpty(FiltrotextBox.Text))
            {
                BuscarerrorProvider.SetError(FiltrotextBox, "Ingresar el campo que desea filtar");
                return(false);
            }

            if (FiltrarcomboBox.SelectedIndex == 0 && UsuariosBLL.GetLista(ut.StringInt(FiltrotextBox.Text)).Count == 0)
            {
                MessageBox.Show("No hay registros que coincidan con este campo de filtro..." + "\n" + "\n" + "Intente con otro campo");
                return(false);
            }

            if (FiltrarcomboBox.SelectedIndex == 1 && UsuariosBLL.GetListaNombreUsuario(FiltrotextBox.Text).Count == 0)
            {
                MessageBox.Show("No hay registros que coincidan con este campo de filtro..." + "\n" + "\n" + "Intente con otro campo");
                return(false);
            }



            BuscarerrorProvider.Clear();


            return(true);
        }
コード例 #2
0
        private bool validar()
        {
            if (string.IsNullOrEmpty(FiltrotextBox.Text))
            {
                BuscarerrorProvider.SetError(FiltrotextBox, "Ingresar el campo que desea filtar");
                return(false);
            }
            if (FiltrocomboBox.SelectedIndex == 0 && UsuariosBLL.GetListaId(StringToInt(FiltrotextBox.Text)).Count == 0)
            {
                MessageBox.Show("No hay registros que coincidan con este campo de filtro..." + "\n" + "\n" + "Intente con otro campo");
                return(false);
            }
            if (FiltrocomboBox.SelectedIndex == 1 && UsuariosBLL.GetApellido(FiltrotextBox.Text).Count == 0)
            {
                MessageBox.Show("No hay registros que coincidan con este campo de filtro..." + "\n" + "\n" + "Intente con otro campo");
                return(false);
            }
            if (FiltrocomboBox.SelectedIndex == 2 && UsuariosBLL.GetListaIdPermiso(StringToInt(FiltrotextBox.Text)).Count == 0)
            {
                MessageBox.Show("No hay registros que coincidan con este campo de filtro..." + "\n" + "\n" + "Intente con otro campo");
                return(false);
            }


            return(true);
        }
コード例 #3
0
        private bool validar()
        {
            if (FiltrocomboBox.SelectedIndex == 3)
            {
                if (DesdeDateTimePicke.Value == HastadateTimePicker.Value)
                {
                    MessageBox.Show("Favor colocar un intervalo entre las dos fechas");
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
            if (string.IsNullOrEmpty(FiltrotextBox.Text))
            {
                BuscarerrorProvider.SetError(FiltrotextBox, "Ingresar el campo que desea filtar");
                return(false);
            }

            if (FiltrocomboBox.SelectedIndex == 1 && FacturasBLL.GetListClienteId(StringToInt(FiltrotextBox.Text)).Count == 0)
            {
                MessageBox.Show("No hay registros que coincidan con este campo de filtro" + "\n" + "\n" + "Intente con otro campo");
                return(false);
            }
            if (FiltrocomboBox.SelectedIndex == 0 && FacturasBLL.GetListId(StringToInt(FiltrotextBox.Text)).Count == 0)
            {
                MessageBox.Show("No hay registros que coincidan con este campo de filtro" + "\n" + "\n" + "Intente con otro campo");
                return(false);
            }
            BuscarerrorProvider.Clear();
            return(true);
        }
コード例 #4
0
 private void Buscarbutton_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(bancaIdTextBox.Text))
     {
         BuscarerrorProvider.SetError(bancaIdTextBox, "Favor digitar el ID de la banca que desea buscar");
     }
     else
     {
         LLenar(BancasBLL.Buscar(Convert.ToInt32(bancaIdTextBox.Text)));
     }
 }
コード例 #5
0
 private bool validarId(string message)
 {
     if (string.IsNullOrEmpty(equipoIdTextBox.Text))
     {
         BuscarerrorProvider.SetError(equipoIdTextBox, "Ingresar el ID");
         MessageBox.Show(message);
         return(false);
     }
     else
     {
         return(true);
     }
 }
コード例 #6
0
 private bool IdValidado(string mensaje)
 {
     if (string.IsNullOrEmpty(IdUsuariotextBox.Text))
     {
         BuscarerrorProvider.SetError(IdUsuariotextBox, "Ingrese Id");
         MessageBox.Show(mensaje);
         return(false);
     }
     else
     {
         return(true);
     }
 }
コード例 #7
0
        private bool validar()
        {
            UtilidadesInt ut = new UtilidadesInt();

            if (FiltrarcomboBox.SelectedIndex == 0 && ArticuloBLL.GetLista(ut.StringInt(FiltrotextBox.Text)).Count == 0)
            {
                MessageBox.Show("No hay registros que coincidan con este campo de filtro..." + "\n" + "\n" + "Intente con otro campo");
                return(false);
            }



            if (string.IsNullOrEmpty(FiltrotextBox.Text))
            {
                BuscarerrorProvider.SetError(FiltrotextBox, "Ingresar el campo que desea filtar");
                return(false);
            }


            if (FiltrarcomboBox.SelectedIndex == 1 && ArticuloBLL.GetListaNombreArticulo(FiltrotextBox.Text).Count == 0)
            {
                MessageBox.Show("No hay registros que coincidan con este campo de filtro..." + "\n" + "\n" + "Intente con otro campo");
                return(false);
            }
            if (FiltrarcomboBox.SelectedIndex == 2 && ArticuloBLL.GetListaMarcaArticulo(FiltrotextBox.Text).Count == 0)
            {
                MessageBox.Show("No hay registros que coincidan con este campo de filtro..." + "\n" + "\n" + "Intente con otro campo");
                return(false);
            }

            if (FiltrarcomboBox.SelectedIndex == 4)
            {
                if (DesdeDateTimePicke.Value == HastadateTimePicker.Value)
                {
                    MessageBox.Show("Favor definir un intervalo diferente entre las dos fechas");
                    return(false);
                }
                else
                {
                    return(true);
                }
            }


            BuscarerrorProvider.Clear();


            return(true);
        }
コード例 #8
0
        private bool validar()
        {
            if (string.IsNullOrEmpty(FiltrotextBox.Text))
            {
                BuscarerrorProvider.SetError(FiltrotextBox, "Ingresar el campo que desea filtar");
                return(false);
            }

            if (FiltrocomboBox.SelectedIndex == 1 && ClientesBLL.GetListNombres(FiltrotextBox.Text).Count == 0)
            {
                MessageBox.Show("No hay registros que coincidan con este campo de filtro" + "\n" + "\n" + "Intente con otro campo");
                return(false);
            }
            if (FiltrocomboBox.SelectedIndex == 0 && ClientesBLL.GetListClienteId(Utilidades.ToInt(FiltrotextBox.Text)).Count == 0)
            {
                MessageBox.Show("No hay registros que coincidan con este campo de filtro" + "\n" + "\n" + "Intente con otro campo");
                return(false);
            }
            BuscarerrorProvider.Clear();
            return(true);
        }