Exemplo n.º 1
0
        public List <BalcaoVendasGridViewModel> GetAllGridViewModelDay(Guid idOrg, string Date)
        {
            List <BalcaoVendas> itens = new List <BalcaoVendas>();

            itens = (from bl in db.BalcaoVendas where bl.idOrganizacao.Equals(idOrg) select bl).ToList();

            return(HelperAssociate.ConvertToGridBalcaoVendas(itens));
        }
Exemplo n.º 2
0
        public List <BalcaoVendasGridViewModel> GetAll(Guid idOrg, int view, DateTime inicio, DateTime fim)
        {
            List <BalcaoVendas> itens = new List <BalcaoVendas>();


            //Contas do dia
            if (view == 0)
            {
                itens = (from bl in db.BalcaoVendas where (bl.criadoEm.Date == DateTime.Now.Date) & (bl.idOrganizacao.Equals(idOrg)) select bl).ToList();
            }

            //Contas do ultimos 7
            if (view == 1)
            {
                itens = (from bl in db.BalcaoVendas where (bl.criadoEm.Date >= DateTime.Now.Date.AddDays(-3)) & (bl.idOrganizacao.Equals(idOrg)) select bl).ToList();
            }

            //Todos Contas do Mes
            if (view == 2)
            {
                itens = (from bl in db.BalcaoVendas where (bl.criadoEm.Date.Month == DateTime.Now.Date.Month) & (bl.idOrganizacao.Equals(idOrg)) select bl).ToList();
            }

            //Todos Contas do Periodo
            if (view == 3)
            {
                itens = (from bl in db.BalcaoVendas where  (bl.idOrganizacao.Equals(idOrg)) & ((bl.criadoEm.Date >= inicio.Date & bl.criadoEm.Date <= fim.Date)) select bl).ToList();
            }

            //Todos Contas da Base
            if (view == 4)
            {
                itens = (from bl in db.BalcaoVendas where (bl.idOrganizacao.Equals(idOrg))  select bl).ToList();
            }

            return(HelperAssociate.ConvertToGridBalcaoVendas(itens));
        }
Exemplo n.º 3
0
        public List <BalcaoVendasGridViewModel> GetByCodigo(Guid idOrg, string codigo)
        {
            List <BalcaoVendas> itens = (from bl in db.BalcaoVendas where (bl.codigo == codigo) & (bl.idOrganizacao.Equals(idOrg))  select bl).ToList();

            return(HelperAssociate.ConvertToGridBalcaoVendas(itens));
        }