Example #1
0
        private void ListaPedido_Otica(StatusPedido StatusDe, StatusPedido StatusAte)
        {
            frmRelListPedido_Otica relatorio = new frmRelListPedido_Otica();

            relatorio.rvRelatorios.LocalReport.ReportEmbeddedResource = "prjbase.relatorios.relListPedido_Otica.rdlc";
            relatorio.statusDe  = (int)StatusDe;
            relatorio.statusAte = (int)StatusAte;
            relatorio.ExibeDialogo(this);
            relatorio.Dispose();
        }
Example #2
0
        protected override void imprimirRegistro(object sender, EventArgs e)
        {
            base.imprimirRegistro(sender, e);

            frmRelListPedido_Otica frm = new frmRelListPedido_Otica();

            if (!string.IsNullOrEmpty(txtCodPedidoDe.Text))
            {
                frm.pedidoDe = Convert.ToInt64(txtIdPedidoDe.Text);
            }

            if (!string.IsNullOrEmpty(txtCodPedidoAte.Text))
            {
                frm.pedidoAte = Convert.ToInt64(txtIdPedidoAte.Text);
            }

            if (!string.IsNullOrEmpty(txtCodClienteDe.Text))
            {
                frm.clienteDe = Convert.ToInt64(txtIdClienteDe.Text);
            }

            if (!string.IsNullOrEmpty(txtCodClienteAte.Text))
            {
                frm.clienteAte = Convert.ToInt64(txtIdClienteAte.Text);
            }
            txtDtEmissaoDe.TextMaskFormat = MaskFormat.IncludePromptAndLiterals;
            if (ValidateUtils.isDate(txtDtEmissaoDe.Text))
            {
                frm.data_emissaoDe = Convert.ToDateTime(txtDtEmissaoDe.Text);
            }
            txtDtEmissaoDe.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals;

            txtDtEmissaoAte.TextMaskFormat = MaskFormat.IncludePromptAndLiterals;
            if (ValidateUtils.isDate(txtDtEmissaoAte.Text))
            {
                frm.data_emissaoAte = Convert.ToDateTime(txtDtEmissaoAte.Text);
            }
            txtDtEmissaoAte.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals;

            if (ValidateUtils.isDate(txtDtFechamentoDe.Text))
            {
                frm.data_fechamentoDe = Convert.ToDateTime(txtDtFechamentoDe.Text);
            }

            if (ValidateUtils.isDate(txtDtFechamentoAte.Text))
            {
                frm.data_fechamentoAte = Convert.ToDateTime(txtDtFechamentoAte.Text);
            }

            if (!string.IsNullOrEmpty(txtIdTransportadoraDe.Text))
            {
                frm.transportadoraDe = Convert.ToInt64(txtIdTransportadoraDe.Text);
            }

            if (!string.IsNullOrEmpty(txtIdTransportadoraAte.Text))
            {
                frm.transportadoraAte = Convert.ToInt64(txtIdTransportadoraAte.Text);
            }

            if (!string.IsNullOrEmpty(txtCodVendedorDe.Text))
            {
                frm.vendedorDe = Convert.ToInt64(txtNomeVendedorDe.Text);
            }

            if (!string.IsNullOrEmpty(txtCodVendedorAte.Text))
            {
                frm.vendedorAte = Convert.ToInt64(txtNomeVendedorAte.Text);
            }

            if (cbCaixaDe.SelectedValue != null)
            {
                frm.caixaDe = (int)cbCaixaDe.SelectedValue;
            }

            if (cbCaixaAte.SelectedValue != null)
            {
                frm.caixaAte = (int)cbCaixaAte.SelectedValue;
            }

            frm.nrpedclienteDe = null;
            if (!string.IsNullOrEmpty(txtNrPedClienteDe.Text))
            {
                frm.nrpedclienteDe = txtNrPedClienteDe.Text;
            }

            frm.nrpedclienteAte = null;
            if (!string.IsNullOrEmpty(txtNrPedClienteAte.Text))
            {
                frm.nrpedclienteAte = txtNrPedClienteAte.Text;
            }

            if (cbStatusDe.SelectedValue != null)
            {
                frm.statusDe = (int)cbStatusDe.SelectedValue;
            }

            if (cbStatusAte.SelectedValue != null)
            {
                frm.statusAte = (int)cbStatusAte.SelectedValue;
            }

            frm.ExibeDialogo();
        }
Example #3
0
        protected override void imprimirRegistro(object sender, EventArgs e)
        {
            base.imprimirRegistro(sender, e);

            frmRelListPedido_Otica frm = new frmRelListPedido_Otica();

            if (!string.IsNullOrEmpty(txtCodPedidoDe.Text))
            {
                frm.pedidoDe = Convert.ToInt64(txtCodPedidoDe.Text);
            }

            if (!string.IsNullOrEmpty(txtCodPedidoAte.Text))
            {
                frm.pedidoAte = Convert.ToInt64(txtCodPedidoAte.Text);
            }

            if (!string.IsNullOrEmpty(txtCodClienteDe.Text))
            {
                frm.clienteDe = Convert.ToInt64(txtIdClienteDe.Text);
            }

            if (!string.IsNullOrEmpty(txtCodClienteAte.Text))
            {
                frm.clienteAte = Convert.ToInt64(txtIdClienteAte.Text);
            }

            if (ValidateUtils.isDate(txtDtEmissaoDe.Text))
            {
                frm.data_emissaoDe = Convert.ToDateTime(txtDtEmissaoDe.Text);
            }

            if (ValidateUtils.isDate(txtDtEmissaoAte.Text))
            {
                frm.data_emissaoAte = Convert.ToDateTime(txtDtEmissaoAte.Text);
            }

            if (ValidateUtils.isDate(txtDtFechamentoDe.Text))
            {
                frm.data_fechamentoDe = Convert.ToDateTime(txtDtFechamentoDe.Text);
            }

            if (ValidateUtils.isDate(txtDtFechamentoAte.Text))
            {
                frm.data_fechamentoAte = Convert.ToDateTime(txtDtFechamentoAte.Text);
            }

            if (!string.IsNullOrEmpty(txtIdTransportadoraDe.Text))
            {
                frm.transportadoraDe = Convert.ToInt64(txtIdTransportadoraDe.Text);
            }

            if (!string.IsNullOrEmpty(txtIdTransportadoraAte.Text))
            {
                frm.transportadoraAte = Convert.ToInt64(txtIdTransportadoraAte.Text);
            }

            if (!string.IsNullOrEmpty(txtCodVendedorDe.Text))
            {
                frm.vendedorDe = Convert.ToInt64(txtNomeVendedorDe.Text);
            }

            if (!string.IsNullOrEmpty(txtCodVendedorAte.Text))
            {
                frm.vendedorAte = Convert.ToInt64(txtNomeVendedorAte.Text);
            }

            if (cbCaixaDe.SelectedValue != null)
            {
                frm.caixaDe = (int)cbCaixaDe.SelectedValue;
            }

            if (cbCaixaAte.SelectedValue != null)
            {
                frm.caixaAte = (int)cbCaixaAte.SelectedValue;
            }

            frm.nrpedclienteDe = null;
            if (!string.IsNullOrEmpty(txtNrPedClienteDe.Text))
            {
                frm.nrpedclienteDe = txtNrPedClienteDe.Text;
            }

            frm.nrpedclienteAte = null;
            if (!string.IsNullOrEmpty(txtNrPedClienteAte.Text))
            {
                frm.nrpedclienteAte = txtNrPedClienteAte.Text;
            }

            if (cbStatusDe.SelectedValue != null)
            {
                frm.statusDe = (int)cbStatusDe.SelectedValue;
            }

            if (cbStatusAte.SelectedValue != null)
            {
                frm.statusAte = (int)cbStatusAte.SelectedValue;
            }

            if (stUsuario.UsuarioLogado.Id_empresa != null)
            {
                frm.empresa = stUsuario.UsuarioLogado.Id_empresa;
            }

            if (stUsuario.UsuarioLogado.Id_filial != null)
            {
                frm.filial = stUsuario.UsuarioLogado.Id_filial;
            }
            else
            {
                if (gbFilial.Visible)
                {
                    if (cbFilial.SelectedValue != null)
                    {
                        frm.filial = Convert.ToInt64(cbFilial.SelectedValue);
                    }
                }
            }

            frm.ExibeDialogo();
        }