Oracle connection via C# / ASP.Net

Guys,
we have a VB function that provides the results we need but we need to convert it to C# for ASP.Net, can somebody help?

Function dashboard()

        Dim oradb As String = "Data Source=DCTM;User id=VMV_ACBDH_DBO;Password=Password123"
        Dim conn As New OracleConnection(oradb)
        Dim cmd As New OracleCommand

        'QUERY 1
        Dim dr As OracleDataReader
        Dim datos1 As String = ""
        conn.Open()
        cmd.Connection = conn
        Dim Sqlstr As String = "select count (deliverable_doc.code) AS num , LOWER(deliverable_doc.code) AS code from deliverable_doc_sp deliverable_doc group by code"
        cmd.CommandText = Sqlstr
        cmd.CommandType = CommandType.Text
        dr = cmd.ExecuteReader()

        While dr.Read()
            datos1 = datos1 + "['" + ucfirst(dr.Item("cod_eqf_code").ToString) + " (" + dr.Item("num").ToString + ")'," + dr.Item("num").ToString + "], "
        End While

        'QUERY 2
        Dim datos2 As String = ""
        Dim dr2 As OracleDataReader
        Dim Sqlstr2 As String = "select count (deliverable_doc.issue_reason) AS num, deliverable_doc.issue_reason  from deliverable_doc_sp deliverable_doc group by deliverable_doc.issue_reason"
        cmd.CommandText = Sqlstr2
        cmd.CommandType = CommandType.Text
        dr2 = cmd.ExecuteReader()

        While dr2.Read()
            datos2 = datos2 + "['" + ucfirst(dr2.Item("eif_issue_reason").ToString) + " (" + dr2.Item("num").ToString + ")'," + dr2.Item("num").ToString + "], "
        End While

        'QUERY 3
        Dim datos3 As String = ""
        Dim dr3 As OracleDataReader
        Dim Sqlstr3 As String = "select count (deliverable_doc.state) AS num, deliverable_doc.state  from deliverable_doc_sp deliverable_doc group by deliverable_doc.state"
        cmd.CommandText = Sqlstr3
        cmd.CommandType = CommandType.Text
        dr3 = cmd.ExecuteReader()

        While dr3.Read()
            datos3 = datos3 + "['" + dr3.Item("ecs_lc_state").ToString + " (" + dr3.Item("num").ToString + ")'," + dr3.Item("num").ToString + "], "
        End While

        'QUERY 4
        Dim textos4 As String = ""
        Dim number4 As String = ""
        Dim cont As Integer = 1
        Dim dr4 As OracleDataReader
        Dim Sqlstr4 As String = "select count (deliverable_doc.revision) AS num, UPPER(deliverable_doc.revision) AS revision from deliverable_doc_sp deliverable_doc group by UPPER(revision) ORDER BY num DESC "
        cmd.CommandText = Sqlstr4
        cmd.CommandType = CommandType.Text
        dr4 = cmd.ExecuteReader()

        While dr4.Read()

            If cont <= 10 Then
                textos4 = textos4 + "'" + dr4.Item("eif_revision").ToString + "', "
                number4 = number4 + dr4.Item("num").ToString + ", "
                cont = cont + 1
            End If

        End While

        conn.Close()

        'testeo.Text = textos4

        'HIGHCHARTS
        Dim funcion1 As String = "$(function () { $('#container').highcharts({ chart: { type: 'pie', options3d: { enabled: true, alpha: 45} }, title: { text: 'Documentos por Área (WBS)' }, plotOptions: { pie: {innerSize:40, depth: 25} }, series: [{ name: 'Cantidad de Documentos', data: [ " + datos1 + " ] }] }); });"
        Dim funcion2 As String = "$(function () { $('#container2').highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, title: { text: 'Documentos (Emitidos Para)' }, tooltip: { pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, format: '{point.name}', style: { color:'black'} } } }, series: [{ type: 'pie', name: '% de Documentos', data: [" + datos2 + "] }] }); });"
        Dim funcion3 As String = "$(function () { $('#container3').highcharts({ chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false }, title: { text: 'Documentos por Estado' }, tooltip: { pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: { enabled: true, format: '{point.name}', style: { color:'black'} } } }, series: [{ type: 'pie', name: '% de Documentos', data: [" + datos3 + "] }] }); });"

        'GRFICO DE BARRAS
        Dim funcion4 As String = "$(function () { $('#container4').highcharts({ chart: { type: 'column', margin: 75, options3d: { enabled: true, alpha: 10, beta: 25, depth: 70 } }, title: { text: 'Revisiones (Ranking)' }, yAxis: {min: 0,title: {text: 'Cantidad de Documentos'}}, plotOptions: { column: { depth: 25 } }, xAxis: { categories: [" + textos4 + "] }, series: [{ showInLegend: false, name: 'Revisiones', data: [" + number4 + "] }]});});"

        datadash.Text = "<script>" + funcion1 + " " + funcion2 + " " + funcion3 + " " + funcion4 + "</script>"
        Return True
    End Function

Open in new window

LVL 2
José PerezAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.