Exemple #1
0
        private void bbEditReport_Click(object sender, EventArgs e)
        {
            Type t = null;

            if (BIntelegence)
            {
                t = Application.OpenForms["TFBInteligence"].GetType();
                t.GetMethod("DefineDadosConexao").Invoke(Application.OpenForms["TFBInteligence"], new object[] { "N" });
            }

            Query_Report relatorio = new Query_Report();

            relatorio.Homologacao = true;
            relatorio.vEditor     = true;
            if (BIntelegence)
            {
                relatorio.vBIntelligence = true;
            }
            relatorio.vURLWebService = URLWebService;
            relatorio.vSistema       = "AL";
            relatorio.MontaFormRelatorio((BS_Relatorio.Current as TRegistro_Cad_Report), null);

            (BS_Relatorio.Current as TRegistro_Cad_Report).Code_Report   = relatorio.Cad_Report.Code_Report;
            (BS_Relatorio.Current as TRegistro_Cad_Report).Code_Chart    = relatorio.Cad_Report.Code_Chart;
            (BS_Relatorio.Current as TRegistro_Cad_Report).Code_DataCube = relatorio.Cad_Report.Code_DataCube;
            BS_Relatorio.ResetBindings(true);
            if (BIntelegence)
            {
                t.GetMethod("DefineDadosConexao").Invoke(Application.OpenForms["TFBInteligence"], new object[] { "C" });
            }
        }
Exemple #2
0
        private void BB_Relatorio_Click(object sender, EventArgs e)
        {
            try
            {
                if (BS_Homologacao.Current != null)
                {
                    CamadaDados.WS_RDC.TRegistro_Cad_RDC lista = ServiceRest.DataService.BuscarDetalhesRDC((BS_Homologacao.Current as CamadaDados.WS_RDC.TRegistro_Cad_RDC).ID_RDC);

                    if (lista != null)
                    {
                        (BS_Homologacao.Current as CamadaDados.WS_RDC.TRegistro_Cad_RDC).Code_Report = lista.Code_Report;
                        BS_Homologacao.ResetCurrentItem();
                        TRegistro_Cad_Report Cad_Report = AtualizarRDC.ConvertRDCparaReport(lista);

                        Query_Report relatorio = new Query_Report();
                        relatorio.Homologacao = true;
                        relatorio.MontaFormRelatorio(Cad_Report, null);
                        if ((BS_Homologacao.Current as CamadaDados.WS_RDC.TRegistro_Cad_RDC).Code_Report != relatorio.Cad_Report.Code_Report)
                        {
                            (BS_Homologacao.Current as CamadaDados.WS_RDC.TRegistro_Cad_RDC).Code_Report = relatorio.Cad_Report.Code_Report;
                            Edit = true;
                        }
                    }
                }
                else
                {
                    MessageBox.Show("Atenção é necessário selecionar um RDC!", "Mensagem");
                }
            }
            catch (Exception erro)
            {
                MessageBox.Show(erro.Message, "Mensagem");
            }
        }
Exemple #3
0
        private void BB_Relatorio_Click(object sender, EventArgs e)
        {
            if (BS_Download.Current != null)
            {
                CamadaDados.WS_RDC.TRegistro_Cad_RDC lista = ServiceRest.DataService.BuscarDetalhesRDC((BS_Download.Current as CamadaDados.WS_RDC.TRegistro_Cad_RDC).ID_RDC);
                if (lista != null)
                {
                    (BS_Download.Current as CamadaDados.WS_RDC.TRegistro_Cad_RDC).Code_Report = lista.Code_Report;
                    BS_Download.ResetCurrentItem();
                    //o rel já esta cadastrado diretamente
                    TRegistro_Cad_Report Cad_Report = FormRelPadrao.AtualizarRDC.ConvertRDCparaReport(lista);

                    Query_Report relatorio = new Query_Report();
                    relatorio.Homologacao = true;
                    relatorio.MontaFormRelatorio(Cad_Report, null);
                }
            }
            else
            {
                MessageBox.Show("Atenção é necessário selecionar um RDC!", "Mensagem");
            }
        }