Exemplo n.º 1
0
        private void init(CliFor cliFor, DateTime dt1, DateTime dt2, IQueryable <Venda> iqueryable)
        {
            //Task 6 - inclusão do nome do dia da semana e do mes
            //System.Globalization.DateTimeFormatInfo.CurrentInfo.GetDayName(DateTime.Now.DayOfWeek) <- pega dia da semana
            InitializeComponent();

            indexarDadosMatriz();

            xrDtInicio.Text = DataUtil.ToDate(dt1);
            xrDtFinal.Text  = DataUtil.ToDate(dt2);
            //passa as vendas pro cliente
            cliFor.Vendas = iqueryable != null?iqueryable.ToList() : null;

            List <CliFor> lst = new List <CliFor>();

            lst.Add(cliFor);

            //Define o datasource atraves da proposta
            this.DataSource = lst;

            //cria o documento em background
            this.CreateDocument(true);

            this._xFrmReportView = new XFrmReportView(this);
        }
Exemplo n.º 2
0
 private void setReport(IQueryable <Venda> iqueryable)
 {
     //Define o datasource atraves da proposta
     this.DataSource = iqueryable;
     //cria o documento em background
     this.CreateDocument(true);
     //form para visualizar o relatório
     this._xFrmReportView = new XFrmReportView(this);
 }
Exemplo n.º 3
0
        public RptListagemLiqFolha(CompetenciaFolha competencia)
        {
            InitializeComponent();
            this.DataSource = new FolhaDaoManager().GetDataSource(competencia.IdCompetencia);

            //cria o documento em background
            this.CreateDocument(true);

            this._xFrmReportView = new XFrmReportView(this);
        }
Exemplo n.º 4
0
        public RptPackageInfo(Package pacote)
        {
            InitializeComponent();
            List <Package> pacotes = new List <Package>();

            pacotes.Add(pacote);
            this.DataSource = pacotes;

            //cria o documento em background
            this.CreateDocument(true);
            this.xrLabelAnexosCount.Text = "Anexos: " + pacote.CountPackages;
            this.xFrmReportView          = new XFrmReportView(this);
        }
Exemplo n.º 5
0
        public RptHolerite(CompetenciaFolha competencia)
        {
            InitializeComponent();
            //this.lbDia.Text = DateTime.Now.Day.ToString();
            //this.lbMes.Text = DateTimeFormatInfo.CurrentInfo.GetMonthName(DateTime.Now.Month);
            //this.lbAno.Text = DateTime.Now.Year.ToString();
            // this.DataSource = null;
            this.DataSource = new FolhaDaoManager().GetDataSource(competencia.IdCompetencia);

            //cria o documento em background
            this.CreateDocument(true);

            this._xFrmReportView = new XFrmReportView(this);
        }
Exemplo n.º 6
0
        private void init(IQueryable <Venda> iq, DateTime dt1, DateTime dt2)
        {
            InitializeComponent();
            indexarDadosMatriz();
            xrDtInicio.Text = dt1.ToShortDateString();
            xrDtFinal.Text  = dt2.ToShortDateString();

            //Define o datasource atraves da proposta
            this.DataSource = iq;

            //cria o documento em background
            this.CreateDocument(true);

            this._xFrmReportView = new XFrmReportView(this);
        }
Exemplo n.º 7
0
        public RptNotaVendaBobina(Venda venda)
        {
            InitializeComponent();
            this.lbDia.Text = DateTime.Now.Day.ToString();
            this.lbMes.Text = DateTimeFormatInfo.CurrentInfo.GetMonthName(DateTime.Now.Month);
            this.lbAno.Text = DateTime.Now.Year.ToString();
            IndexarDadosMatriz();

            //this.DataSource = null;
            this.DataSource = new VendaDaoManager().GetDataSource(venda);

            //cria o documento em background
            this.CreateDocument(true);

            this._xFrmReportView = new XFrmReportView(this);
        }
Exemplo n.º 8
0
        public RptNotaVenda(Venda venda)
        {
            InitializeComponent();
            this.lbDia.Text = DateTime.Now.Day.ToString();
            this.lbMes.Text = DateTimeFormatInfo.CurrentInfo.GetMonthName(DateTime.Now.Month);
            this.lbAno.Text = DateTime.Now.Year.ToString();
            if (string.IsNullOrEmpty(venda.Observacao))
            {
                xrLabelObs.SizeF   = new System.Drawing.SizeF(0, 0);
                xrLabelObs.Visible = false;
            }

            indexarDados(venda);

            //cria o documento em background
            this.CreateDocument(true);

            this._xFrmReportView = new XFrmReportView(this);
        }
Exemplo n.º 9
0
        public RptNotaManutencao(Venda venda)
        {
            InitializeComponent();
            this.lbDia.Text = DateTime.Now.Day.ToString();
            this.lbMes.Text = DateTimeFormatInfo.CurrentInfo.GetMonthName(DateTime.Now.Month);
            this.lbAno.Text = DateTime.Now.Year.ToString();

            if (string.IsNullOrEmpty(venda.Observacao))
            {
                xrLabelObs.SizeF   = new System.Drawing.SizeF(0, 0);
                xrLabelObs.Visible = false;
            }


            IndexarDados(venda);

            // this.DataSource = null;
            this.DataSource = new VendaDaoManager().GetDataSource(venda);

            var lanctos = new BalcaoContext().LancamentoFinanceiroDao
                          .Where(l => l.IdVenda != null && l.IdVenda == venda.IdVenda).ToList();

            var sb1 = new StringBuilder("| ");
            var sb2 = new StringBuilder("| ");

            int metade = (lanctos.Count / 2);

            //cabe tudo na mesma linha
            if ((metade * 2) <= 6)
            {
                metade = lanctos.Count;
            }

            for (int i = 0; i < lanctos.Count; i++)
            {
                var l    = lanctos[i];
                var data = l.DataVencimento.ToShortDateString();

                if (i < metade)
                {
                    //maximo metade na mesma linha
                    sb1.Append(data).Append(" | ");
                }
                else
                {
                    sb2.Append(data).Append(" | ");
                }
            }
            this.xrlDataVencimentos1.Text = sb1.ToString();

            //tem metade
            if (metade != lanctos.Count)
            {
                this.xrlDataVencimentos2.Text = sb2.ToString();
            }

            //cria o documento em background
            this.CreateDocument(true);

            this._xFrmReportView = new XFrmReportView(this);
        }