Example #1
0
        public string DeletarReport(TRegistro_Cad_Report val)
        {
            Hashtable hs = new Hashtable(1);

            hs.Add("@P_ID_REPORT", val.ID_Report);
            return(this.executarProc("EXCLUI_CON_REPORT", hs));
        }
Example #2
0
        public string GravarReport(TRegistro_Cad_Report val)
        {
            Hashtable hs = new Hashtable(8);

            hs.Add("@P_ID_REPORT", val.ID_Report);
            hs.Add("@P_DS_REPORT", val.DS_Report);
            if (val.ID_RDC != "")
            {
                hs.Add("@P_ID_RDC", new Guid(val.ID_RDC));
            }
            hs.Add("@P_VERSAO", val.Versao);
            hs.Add("@P_CODE_REPORT", val.Code_Report);
            hs.Add("@P_CODE_DATACUBE", val.Code_DataCube);
            hs.Add("@P_CODE_CHART", val.Code_Chart);
            hs.Add("@P_MODULO", val.Modulo);
            hs.Add("@P_IDENT", val.Ident);
            hs.Add("@P_NM_CLASSE", val.NM_Classe);
            hs.Add("@P_SISTEMA", val.Sistema);

            return(this.executarProc("IA_CON_REPORT", hs));
        }
Example #3
0
        public TList_Cad_Report Select(TpBusca[] vBusca, Int32 vTop, string vNM_Campo)
        {
            bool             podeFecharBco = false;
            TList_Cad_Report lista         = new TList_Cad_Report();

            if (Banco_Dados == null)
            {
                this.CriarBanco_Dados(false);
                podeFecharBco = true;
            }
            SqlDataReader reader = this.ExecutarBusca(this.SqlCodeBusca(vBusca, vTop, vNM_Campo));

            try
            {
                while (reader.Read())
                {
                    TRegistro_Cad_Report reg = new TRegistro_Cad_Report();

                    if (!(reader.IsDBNull(reader.GetOrdinal("ID_Report"))))
                    {
                        reg.ID_Report = reader.GetDecimal(reader.GetOrdinal("ID_Report"));
                    }
                    if (!(reader.IsDBNull(reader.GetOrdinal("DS_Report"))))
                    {
                        reg.DS_Report = reader.GetString(reader.GetOrdinal("DS_Report"));
                    }
                    if (!(reader.IsDBNull(reader.GetOrdinal("ID_RDC"))))
                    {
                        reg.ID_RDC = reader.GetGuid(reader.GetOrdinal("ID_RDC")).ToString();
                    }
                    if (!(reader.IsDBNull(reader.GetOrdinal("Versao"))))
                    {
                        reg.Versao = reader.GetDecimal(reader.GetOrdinal("Versao"));
                    }
                    if (!(reader.IsDBNull(reader.GetOrdinal("Code_Report"))))
                    {
                        reg.Code_Report = (byte[])reader.GetValue(reader.GetOrdinal("Code_Report"));
                    }
                    if (!(reader.IsDBNull(reader.GetOrdinal("Modulo"))))
                    {
                        reg.Modulo = reader.GetString(reader.GetOrdinal("Modulo"));
                    }
                    if (!(reader.IsDBNull(reader.GetOrdinal("Ident"))))
                    {
                        reg.Ident = reader.GetString(reader.GetOrdinal("Ident"));
                    }
                    if (!(reader.IsDBNull(reader.GetOrdinal("NM_Classe"))))
                    {
                        reg.NM_Classe = reader.GetString(reader.GetOrdinal("NM_Classe"));
                    }

                    lista.Add(reg);
                }
            }
            finally
            {
                reader.Close();
                reader.Dispose();
                if (podeFecharBco)
                {
                    this.deletarBanco_Dados();
                }
            }
            return(lista);
        }