Exemplo n.º 1
0
        public Tuple <EstruturaErro, DataTable> ListarCompraPorUsuario(int referencial, string nome)
        {
            //Compra compra = new Compra();

            DataTable dt = null;


            if (referencial == 0 || nome == "" || nome == null)
            {
                EstruturaErro estruturaErro = new EstruturaErro();

                estruturaErro.CodigoMensagem    = "";
                estruturaErro.DescricaoMensagem = "DADOS OBRIGATORIO NÃO INFORMADO";
                estruturaErro.indicadorErro     = 1;

                return(new Tuple <EstruturaErro, DataTable>(estruturaErro, dt));
            }
            else
            {
                var retorno = servicoSCT.ListarCompraPorUsuario(referencial, nome);

                return(new Tuple <EstruturaErro, DataTable>(retorno.Item2, retorno.Item1));
            }
        }