Пример #1
0
        public List <ETerceros> getTipo(string tipo)
        {
            if (string.IsNullOrEmpty(tipo))
            {
                return(null);
            }
            TerceroDAO tDao = new TerceroDAO();

            return(tDao.getPorTipo(tipo));
        }
Пример #2
0
        public ETerceros buscarTercero(string codigo)
        {
            if (string.IsNullOrWhiteSpace(codigo))
            {
                return(null);
            }
            TerceroDAO tdao = new TerceroDAO();

            return(tdao.buscarTercero(codigo));
        }
Пример #3
0
        public List <ETerceros> buscar(string campo, string dato)
        {
            if (campo == "Nombre")
            {
                campo = "nombre";
            }
            else
            {
                campo = "nit";
            }
            TerceroDAO tDao = new TerceroDAO();

            return(tDao.getPorFiltro(campo, dato));
        }
Пример #4
0
        public string insert(ETerceros obj)
        {
            TerceroDAO tDao = new TerceroDAO();

            if (string.IsNullOrWhiteSpace(obj.nit))
            {
                return("Nit o Cedula Esta  Vacia");
            }

            if (string.IsNullOrWhiteSpace(obj.nit))
            {
                return("Falta el Nombre ");
            }

            if (tDao.insertar(obj) > 0)
            {
                return("Exito"); // Datos Guardados
            }
            else
            {
                return("Error al Guardar los Datos");
            }
        }
Пример #5
0
        public DataTable getTodos()
        {
            TerceroDAO tDao = new TerceroDAO();

            return(tDao.getTodos());
        }
Пример #6
0
        public List <ETerceros> getAll()
        {
            TerceroDAO tdao = new TerceroDAO();

            return(tdao.getAll());
        }