Beispiel #1
0
        public AutoCompleteStringCollection MtdCargarClientes()
        {
            ClsNcliente N = new ClsNcliente();
            AutoCompleteStringCollection datoauto = new AutoCompleteStringCollection();

            foreach (ClsEcliente item in N.listarClientes())
            {
                datoauto.Add(item.Nombres + " " + item.Apellidos);
                datoauto.Add(item.DniCliente);
            }
            return(datoauto);
        }
Beispiel #2
0
        public bool existeCliente(ErrorProvider err, TextBox txt, string mensaje)
        {
            bool        existe = false;
            ClsNcliente N      = new ClsNcliente();

            foreach (ClsEcliente item in N.listarClientes())
            {
                if (txt.Text == item.Nombres + " " + item.Apellidos || txt.Text == item.DniCliente)
                {
                    existe = true;
                    break;
                }
            }
            if (existe)
            {
                err.SetError(txt, "");
            }
            else
            {
                err.SetError(txt, mensaje);
            }
            return(existe);
        }