How could i convert this code vb in vb.net?

Dim Report As CRAXDRT.Report
Dim ReportSub As CRAXDRT.Report
Dim ReportSub1 As CRAXDRT.Report

Dim m_crwDatabase As CRAXDRT.Database

Dim MaxDetail As Integer
Dim MaxMain As Integer

Dim PageCountMax As Integer

Private Sub Command1_Click()

  
  PayableVoucher "应付款挂帐单", "应付组"
   
   
End Sub

Private Sub Command2_Click()

    Command1.Visible = True
    CRViewer1.Visible = False
    Command2.Visible = False
    Command3.Visible = True
    Me.WindowState = 0
 
   
End Sub

Private Sub Command3_Click()
    Unload Me
End Sub

Private Sub Form_Activate()
On Error Resume Next

    txticu.SetFocus
   
End Sub


Private Sub Form_Load()
On Error GoTo ERR1:

   
    txticu.Text = ""
    txtdoco.Text = ""
    txticut.Text = ""
   
    MaxDetail = GetSetting("PayForApprint", "Print", "MaxDetail", 9)
    MaxMain = GetSetting("PayForApprint", "Print", "MaxMain", 5)
    PageCountMax = GetSetting("PayForApprint", "Print", "PageCountMax", 10)
   
    Exit Sub
ERR1:


End Sub

Private Sub Form_Resize()

On Local Error Resume Next
    CRViewer1.Top = 0
    CRViewer1.Left = 0
    CRViewer1.Height = ScaleHeight - CRViewer1.Top
    CRViewer1.Width = ScaleWidth
    Command2.Left = ScaleWidth - 1000
   
End Sub

 

Private Sub menusetup_Click()
   
    frmPageSetup.Show vbModal, Me
   
    MaxDetail = GetSetting("PayForApprint", "Print", "MaxDetail", 9)
    MaxMain = GetSetting("PayForApprint", "Print", "MaxMain", 5)
    PageCountMax = GetSetting("PayForApprint", "Print", "PageCountMax", 10)
   
End Sub

Private Sub Option2_Click(Index As Integer)

    If Option2(0).Value = True Then
        txticu.Enabled = True
        txtdoco.Enabled = False
        txticu.SetFocus
       
       
    Else
        txticu.Enabled = False
        txtdoco.Enabled = True
        txtdoco.SetFocus
    End If
   
End Sub

Private Sub txtdoco_Change()

  If Not (KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = 8) Then
       KeyAscii = 0
    End If
   
    Option2(1).Value = True
   
End Sub

Private Sub TxtICU_Change()

 

    Dim RS As New Recordset
   
    If Trim(txticu.Text) = "" Then Exit Sub
    RS.Open "SELECT ICICUT FROM F0011 WHERE ICICU=" & Me.txticu, ConnectStr, adOpenStatic, adLockReadOnly
    If Not (RS.EOF And RS.BOF) Then
       Me.txticut.Text = RS!ICICUT & ""
    Else
       Me.txticut.Text = ""
    End If
   
    RS.Close
   
    Option2(0).Value = True
   
End Sub

Private Sub TxtICU_KeyPress(KeyAscii As Integer)

    If Not (KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = 8) Then
       KeyAscii = 0
    End If

End Sub

 

Private Sub PayableVoucher(ByVal ChnTitle As String, ByVal EngTitle As String)
       
Dim AdoConnection As ADODB.Connection
Dim RS As Recordset
Dim Rs1 As ADODB.Recordset
Dim Rs_Detail As ADODB.Recordset
Dim Rs_DetailPpv As ADODB.Recordset

Dim Rs_temp As ADODB.Recordset
Dim MaxId As String
Dim NN As Integer
Dim CC As Integer
Dim Rpdoc As Variant
Dim RpDcto As String

Dim mType As String


Dim ConnectStrm As String


Const PageCountmin = 10

 Dim SQLSTR As String
 
 
        Set RS = New Recordset
      
        Set Rs1 = New ADODB.Recordset
       
        RS.CursorType = adOpenStatic
       
        RS.CursorLocation = adUseClient
       
       
        Rs1.CursorType = adOpenStatic
       
        Rs1.CursorLocation = adUseClient
            
         Set Rs_temp = New ADODB.Recordset
         Rs_temp.CursorType = adOpenStatic
         Rs_temp.CursorLocation = adUseClient
    
         Set Rs_Detail = New ADODB.Recordset
        
         Set Rs_DetailPpv = New ADODB.Recordset
       
        Set AdoConnection = New ADODB.Connection
       
      
        Screen.MousePointer = vbHourglass
       
        ShowStaticMessageDialog "正在检索数据, 请稍等......"
       
       
        ConnectStrm = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=crystal;password=crystal;Initial Catalog=" & DatabaseNameM & ";Data Source=" & ServerNameM
       
        AdoConnection.ConnectionString = ConnectStr
        AdoConnection.CommandTimeout = 100
        AdoConnection.Open

On Error Resume Next

        AdoConnection.Execute "DROP TABLE #TEMP1", , adExecuteNoRecords
        AdoConnection.Execute "DROP TABLE #temp2", , adExecuteNoRecords
        AdoConnection.Execute "DROP TABLE #TEMP3", , adExecuteNoRecords

On Error GoTo ERR1:

      
        
                                  SQLSTR = "    SELECT GLAN8,ABALPH ,  GLVINV,GLPO AS GLPO,GLPDCT AS GLDCTO,PNPTD,GLCRCD,AYCBNK, AYDL01, GMR021 AS Account_Local," & _
                                    "    rtrim(GLOBJ)+'.'+rtrim(GLSUB) Account_SCOA,GLSBL,GMDL01,GLCRR, GLAA/100 AS GLAA,GLEXR,GLICU,GLPN,GLDOC,GLCTRY,GLFY,0 AS RPDIVJ,0 AS RPDDJ,left(gmr005,3)+ltrim(GLMCU) AS GLMCU,0 AS RPDGJ,SPACE(50) AS RPRMK " & _
                                    "    INTO #TEMP1 From F0911 " & _
                                    "    INNER JOIN F0901 ON GMAID=GLAID " & _
                                    "    INNER JOIN F0101 ON GLAN8=ABAN8" & _
                                    "    LEFT OUTER  JOIN F0030 ON GLAN8=AYAN8" & _
                                    "    INNER JOIN F0401 ON F0911.GLAN8=F0401.A6AN8" & _
                                    "    INNER JOIN F0014 ON F0401.A6TRAP=F0014.PNPTC" & _
                                    "    WHERE  F0911.GLLT='AA' AND GLDCT<>'AE' AND GLICUT='V'  "
                     
                                                If Option2(0).Value = True Then
                                
                                                          
                                SQLSTR = SQLSTR & " AND F0911.GLKCO='" & mCompanyID & "'and F0911.GLICU=" & txticu.Text & " AND F0911.GLICUT='" & txticut.Text & "'"
                           
                       
                            ElseIf Option2(1).Value = True Then
                            
                                                                SQLSTR = SQLSTR & " AND F0911.GLKCO='" & mCompanyID & "'and F0911.GLDOC='" & txtdoco.Text & "' "
                            
                            End If
                            
                                                     
                             AdoConnection.Execute SQLSTR, NN, adExecuteNoRecords
                              
                            If NN = 0 Then
                                
                                                               
                                                SQLSTR = " INSERT INTO #TEMP1   SELECT GLAN8,ABALPH ,  GLVINV,GLPO AS GLPO,GLPDCT AS GLDCTO,PNPTD,GLCRCD,AYCBNK, AYDL01, GMR021 AS Account_Local," & _
                                                "    rtrim(GLOBJ)+'.'+rtrim(GLSUB) Account_SCOA,GLSBL,GMDL01,GLCRR, GLAA/100 AS GLAA,GLEXR,GLICU,GLPN,GLDOC,GLCTRY,GLFY,RPDIVJ,RPDDJ,left(gmr005,3)+ltrim(GLMCU) AS GLMCU,RPDGJ,RPRMK+ SPACE(50) AS RPRMK  From F0911 " & _
                                                "    INNER JOIN F0901 ON GMAID=GLAID " & _
                                                "    INNER JOIN F0101 ON GLAN8=ABAN8" & _
                                                "    LEFT OUTER  JOIN F0030 ON GLAN8=AYAN8" & _
                                                "    INNER JOIN F0411 ON GLDCT=RPDCT AND GLDOC=RPDOC AND GLKCO=RPKCO AND GLAN8=RPAN8 AND GLLNID=RPLNID " & _
                                                "    INNER JOIN F0401 ON F0411.RPAN8=F0401.A6AN8" & _
                                                "    INNER JOIN F0014 ON F0401.A6TRAP=F0014.PNPTC" & _
                                                "    WHERE F0411.RPDCT IN ('PV','PD') AND F0911.GLLT='AA' AND GLDCT<>'AE' AND GLICUT='V'  "
  
                                        If Option2(0).Value = True Then
                                            
                                                                                 
                                            SQLSTR = SQLSTR & " AND F0911.GLKCO='" & mCompanyID & "'and F0911.GLICU=" & txticu.Text & " AND F0911.GLICUT='" & txticut.Text & "'"
                                       
                                   
                                        ElseIf Option2(1).Value = True Then
                                        
                                                                                      
                                              SQLSTR = SQLSTR & " AND F0411.RPKCO='" & mCompanyID & "'and F0411.RPDOC='" & txtdoco.Text & "' "
                                        
                                        End If

                            
                                     AdoConnection.Execute SQLSTR, NN, adExecuteNoRecords
                               
                                    If NN = 0 Then
                                   
                                        Unload frmMessage
                                        Screen.MousePointer = vbDefault
                                        MsgBox "无付款信息,处理退出", vbInformation, "系统提示"
                                        Exit Sub
                                   
                                    End If
                                   
                               
                            End If
                            
                            
                            
                                                       
                                                                
                                     SQLSTR = " INSERT INTO #TEMP1   SELECT MAX(RPAN8) AS GLAN8,MAX(ABALPH) AS ABALPH ,MAX(RPVINV) AS " & _
                                             "  GLVINV,MAX(RPPO) AS GLPO,MAX(RPPDCT) AS GLDCTO ,MAX(PNPTD)  AS PNPTD,RPCRCD , " & _
                                             " MAX('') AS AYCBNK,MAX('') AS AYDL01,GMR021 AS KGSUB,RTRIM(KGOBJ) + '.' + RTRIM(KGSUB) AS KGOBJ, " & _
                                             " RPSBL,GMDL01,RPCRR,-SUM(RPAG)/100 AS RPAG,'' AS GLEXR,MAX(RPICU) AS GLICU, " & _
                                             " MAX(RPPN) AS GLPN,RPDOC,MAX(RPCTRY) AS GLCTRY,  MAX(RPFY) AS RPFY,MAX(RPDIVJ) " & _
                                             " AS RPDIVJ,MAX(RPDDJ) AS RPDDJ,left(gmr005,3)+ltrim(GmMCU) AS GLMCU,MAX(RPDGJ), " & _
                                             " MAX(RPRMK)  FROM F0411,F0901,F0012,F0101,F0014,F0401 WHERE 'PC'+LTRIM(RPGLC)=KGITEM AND GMMCU=KGMCU AND GMOBJ=KGOBJ AND " & _
                                             " GMSUB=KGSUB AND KGCO=RPCO AND GMCO=RPCO AND ABAN8=RPAN8 AND RPAN8=A6AN8 AND A6TRAP=F0014.PNPTC "
                                    
                                     If Option2(0).Value = True Then
                                    
                                            SQLSTR = SQLSTR & " AND RPCO='" & mCompanyID & "' and RPICU='" & txticu.Text & "' and RPICUT='" & txticut.Text & "'" & _
                                                    " GROUP BY RPDOC,RPCRCD,RPCRR,RPSBL,GMDL01,KGOBJ,KGSUB,left(gmr005,3)+ltrim(GmMCU),GMR021 having SUM(RPAG)<>0"
                                                 
                                     ElseIf Option2(1).Value = True Then
                                     
                                            SQLSTR = SQLSTR & " AND RPCO='" & mCompanyID & "' and RPDOC='" & txtdoco.Text & _
                                                      "' GROUP BY RPDOC,RPCRCD,RPCRR,RPSBL,GMDL01,KGOBJ,KGSUB,left(gmr005,3)+ltrim(GmMCU),GMR021 having SUM(RPAG)<>0"
                                                                              
                                     End If
                                     
     
                                     AdoConnection.Execute SQLSTR, NN, adExecuteNoRecords
                                    
                                        If Option2(0).Value = True Then
                                           
                                            SQLSTR = "SELECT DISTINCT RPEXR1 FROM F0411 WHERE RPICU='" & txticu.Text & "' and RPKCO='" & mCompanyID & "'  and RPICUT='" & txticut.Text & "'  order by rpexr1 desc"
                                       
                                        ElseIf Option2(1).Value = True Then
                                       
                                            SQLSTR = "SELECT DISTINCT RPEXR1 FROM F0411 WHERE RPDOC='" & txtdoco.Text & "' and RPKCO='" & mCompanyID & "' order by rpexr1 desc"
                                       
                                       End If
                                    
                                     If RS.State = adStateOpen Then RS.Close
                                    
                                     RS.Open SQLSTR, AdoConnection, adOpenStatic, adLockReadOnly
                                    
                                     If Not RS.EOF Or Not RS.BOF Then
                                     
                                     
                                                                              If Trim(RS!RPEXR1) = "V" Then
                                                SQLSTR = "  INSERT INTO #TEMP1 SELECT MAX(RPAN8) AS GLAN8,MAX(ABALPH) AS ABALPH ,MAX(RPVINV) AS GLVINV,MAX(RPPO) AS GLPO,MAX(RPPDCT) AS GLDCTO,MAX(PNPTD) AS PNPTD,RPCRCD ," & _
                                                         "  MAX('') AS AYCBNK,MAX('') AS AYDL01,GMR021 AS KGSUB,RTRIM(KGOBJ) + '.' + RTRIM(KGSUB) AS KGOBJ,RPSBL,GMDL01,RPCRR,SUM(RPSTAM)/100 AS RPAG, " & _
                                                         "  '' AS GLEXR,MAX(RPICU) AS GLICU, MAX(RPPN) AS GLPN,RPDOC,MAX(RPCTRY) AS GLCTRY," & _
                                                         "   MAX(RPFY) AS RPFY,MAX(RPDIVJ) AS RPDIVJ,MAX(RPDDJ) AS RPDDJ,left(gmr005,3)+ltrim(GmMCU) AS GLMCU,MAX(RPDGJ),MAX(RPRMK) " & _
                                                         "  From F0411, F0901, F0012, F0101,F0014,F0401 " & _
                                                         "  Where 'PTTXTX'=KGITEM AND GMMCU=KGMCU AND GMOBJ=KGOBJ AND GMSUB=KGSUB AND KGCO=RPCO AND GMCO=RPCO " & _
                                                         "  AND ABAN8=RPAN8 AND RPAN8=A6AN8  AND A6TRAP=F0014.PNPTC "
                                                
                                                        If Option2(0).Value = True Then
                                                       
                                                            SQLSTR = SQLSTR & " AND RPCO='" & mCompanyID & "' and RPICU='" & txticu.Text & "' " & _
                                                                    " GROUP BY RPDOC,RPCRCD,RPCRR,RPSBL,GMDL01,KGOBJ,KGSUB,left(gmr005,3)+ltrim(GmMCU),GMR021 having SUM(RPSTAM)<>0"
                                                       
                                                        ElseIf Option2(1).Value = True Then
                                                       
                                                       
                                                            SQLSTR = SQLSTR & " AND RPCO='" & mCompanyID & "' and RPDOC='" & txtdoco.Text & _
                                                                    "' GROUP BY RPDOC,RPCRCD,RPCRR,RPSBL,GMDL01,KGOBJ,KGSUB,left(gmr005,3)+ltrim(GmMCU),GMR021 having SUM(RPSTAM)<>0"
                                                        End If
                                               
                                                AdoConnection.Execute SQLSTR, NN, adExecuteNoRecords
                                       
                                            End If
                                     End If
                           
                            
                                SQLSTR = "select GLMCU,GLSBL,GLDOC,GLICU,GLICUT,RTRIM(LTRIM(GLANI)) AS GLANI,GLAA,GLEXA,GMDL01 INTO #temp3  from f0911 " & _
                                         "  INNER JOIN F0901 ON GLAID=GMAID AND GLKCO=GMCO " & _
                                         " WHERE F0911.GLANI='' AND gmAID='' "
                                       
                                   
                                AdoConnection.Execute SQLSTR, NN, adExecuteNoRecords
                                
                                                      
                                
                            If Option2(0).Value = True Then
                           
                                    SQLSTR = "SELECT DISTINCT RPAN8,RPPO,RPPDCT,RPPKCO ,RPLNID FROM F0411 WHERE RPICU='" & txticu.Text & "' and RPKCO='" & mCompanyID & "'  and RPICUT='" & txticut.Text & "'  order by RPPO desc"
                           
                            ElseIf Option2(1).Value = True Then
                           
                                    SQLSTR = "SELECT DISTINCT RPAN8,RPPO,RPPDCT,RPPKCO ,RPLNID FROM F0411 WHERE RPDOC='" & txtdoco.Text & "' and RPKCO='" & mCompanyID & "' order by RPPO desc"
                           
                            End If
                           
                            If RS.State = adStateOpen Then RS.Close
                            
                                                    
                            RS.Open SQLSTR, AdoConnection, adOpenStatic, adLockReadOnly
                           
                            Do While Not RS.EOF
                           
                                SQLSTR = "INSERT INTO #TEMP3 select GLMCU,GLSBL,GLDOC,GLICU,GLICUT,RTRIM(LTRIM(GLANI)) AS GLANI,GLAA,GLEXA,GMDL01 from f0911 " & _
                                        "  INNER JOIN F0901 ON GLAID=GMAID AND GLKCO=GMCO " & _
                                        " where glpo='" & RS.Fields("RPPO").Value & "' AND GLDCTO='" & RS.Fields("RPPDCT").Value & "' " & _
                                        " AND GLLNID='" & RS.Fields("RPLNID").Value & " ' AND GLKCO='" & RS.Fields("RPPKCO").Value & "' " & _
                                        " AND   GLAN8='" & RS.Fields("RPAN8").Value & "'   and  gldct='ov' "
                                   
                                AdoConnection.Execute SQLSTR, NN, adExecuteNoRecords
                           
                               RS.MoveNext
                            Loop
                    
                                                       
        
                        SQLSTR = "  SELECT  PRAN8,PRKCOO,PRDOCO,PRDCTO,PRLNID,PRANI, PRDOC,SPACE(50) AS PRLITM,SPACE(50) AS IMDSC1,PRQTYS/100 AS PRUORG,PRUOM " & _
                                 " ,COUNCS/10000 AS COUNCS,PRPRRC/10000 AS PRPRRC,PRAPTD/10000 AS PRAPTD,PRAREC/100 AS PRAREC,0 AS PRAMT,0 AS PRPPV ," & _
                                 "  0 AS SEQ   ,PRCRCD,PREXR1,PRTXA1,SPACE(50) AS PRCNID,PRMCU,PRSFXO,PRNLIN,PRITM ,PRMATC,SPACE(20) AS PRSBL,PRRCDJ,PRTDAY " & _
                                 "  INTO #temp2    From F43121     INNER JOIN F4101 ON PRITM=IMITM " & _
                                 "    INNER JOIN F4105 ON F43121.PRITM=F4105.COITM AND F43121.PRMCU=F4105.COMCU " & _
                                 "  WHERE  PRDOCO='' AND PRMATC=1 AND COCSPO='P' "
                          
                        AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                     
                                              
                        If Option2(0).Value = True Then
                                               
                              SQLSTR = "SELECT DISTINCT RPDOC,RPPO,RPPDCT,RPMCU FROM F0411 WHERE RPICU='" & txticu.Text & "' AND RPICUT='" & txticut.Text & "' and RPKCO='" & mCompanyID & "' order by RPPO desc"
                                           
                        ElseIf Option2(1).Value = True Then
                                           
                             SQLSTR = "SELECT DISTINCT RPDOC,RPPO,RPPDCT,RPMCU FROM F0411 WHERE RPDOC='" & txtdoco.Text & "' and RPKCO='" & mCompanyID & "' order by RPPO desc"
                                           
                        End If
                                        
                    
                     
                       If RS.State = adStateOpen Then RS.Close
                       
                       RS.Open SQLSTR, AdoConnection, adOpenStatic, adLockReadOnly
                       
                                             
                       Rpdoc = RS.Fields("RPDOC").Value
                       RpDcto = RS.Fields("RPPDCT").Value
                                           
                        SQLSTR = "SELECT DISTINCT MAX(PRDOCO) AS PRDOCO, MAX(PRITM) AS PRITM, MAX(PRLITM) AS PRLITM, MAX(PRAITM) AS PRAITM,MAX(PRDOC) AS PRDOC  FROM F43121  WHERE  ( PRKCO = '" & mCompanyID & "' AND PRDCT = 'PV' AND PRDOC =" & Rpdoc & " AND PRMATC = '2' )  "
                       
                        If RS.State = adStateOpen Then RS.Close
                       
                        RS.Open SQLSTR, AdoConnection, adOpenStatic, adLockReadOnly
                       
                        
         
                                              
                        NN = 0
                        CC = 0
                       
                       
                        If RS.RecordCount > 0 And Not IsNull(RS.Fields("PRDOCO").Value) Then
                        'Do While Not RS.EOF
                            
                               
                                                 
                               If Len(Trim(RS.Fields("PRDOCO").Value)) <> 0 And RS.Fields("PRITM").Value > 0 Then
                               

                                               
'                                                SQLSTR = " INSERT INTO #temp2  SELECT  PRAN8,PRKCOO,PRDOCO,PRDCTO,PRLNID,PRANI, PRDOC,PRLITM,IMDSC1,PRUPTD/100 AS PRUORG," & _
'                                                         " PRUOM ,0 AS COUNCS,PRPRRC/10000,PRAPTD/100 AS PRAPTD,PRAREC/100 AS PRAREC,'0' AS PRAMT,  0 AS SEQ   ,PRCRCD, " & _
'                                                         " PREXR1,PRTXA1,PRCNID,PRMCU,PRSFXO,PRNLIN,PRITM,PRMATC,PRSBL,PRRCDJ,PRTDAY FROM F43121  INNER JOIN F4101 ON PRITM=IMITM  " & _
'                                                         " WHERE  ( PRKCO = '" & mCompanyID & "' AND PRDCT = 'PV' AND PRDOC = " & RS.Fields("PRDOC").Value & " AND PRMATC = '2')"
'                                                 AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
'                                                 NN = NN + CC
'// AREC

                                                SQLSTR = " INSERT INTO #temp2  SELECT  PRAN8,PRKCOO,PRDOCO,PRDCTO,PRLNID,PRANI, PRDOC,PRLITM,IMDSC1,PRUREC/100 AS PRUORG," & _
                                                         " PRUOM ,0 AS COUNCS,PRPRRC/10000,PRAREC/100 AS PRAPTD,PRAREC/100 AS PRAREC,'0' AS PRAMT,0 AS PRPPV,  0 AS SEQ   ,PRCRCD, " & _
                                                         " PREXR1,PRTXA1,PRCNID,PRMCU,PRSFXO,PRNLIN,PRITM,PRMATC,PRSBL,PRRCDJ,PRTDAY FROM F43121  INNER JOIN F4101 ON PRITM=IMITM  " & _
                                                         " WHERE  ( PRKCO = '" & mCompanyID & "' AND PRDCT IN ('PV','OV') AND PRDOCO = " & RS.Fields("PRDOCO").Value & " AND PRMATC IN('1', '2')) "
                                                 AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                                                 NN = NN + CC
                                                 
                                                 
                                        
                           
                               
                                                SQLSTR = "UPDATE #TEMP2 SET #TEMP2.PRRCDJ=F43121.PRRCDJ,#TEMP2.PRTDAY=F43121.PRTDAY FROM #TEMP2 INNER JOIN F43121 ON #TEMP2.PRAN8=F43121.PRAN8 AND #TEMP2.PRKCOO=F43121.PRKCOO " & _
                                                       " AND #TEMP2.PRDOCO=F43121.PRDOCO AND #TEMP2.PRDCTO=F43121.PRDCTO AND #TEMP2.PRLNID=F43121.PRLNID " & _
                                                       " AND #TEMP2.PRAN8=F43121.PRAN8 AND #TEMP2.PRNLIN=F43121.PRNLIN " & _
                                                       " WHERE F43121.PRDCT='OV' "
                                                      
                                                 AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                                                 
                                                   
                                                                 SQLSTR = "UPDATE #TEMP1 SET  RPRMK='PO Date From:' +CAST((SELECT MIN(DBO.JTOD(PDDRQJ)) FROM F4311 INNER JOIN #TEMP2 ON  PDDOCO=PRDOCO AND PDKCOO=PRKCOO   " & _
                                            "  AND PDDCTO=PRDCTO AND PDAN8=PRAN8 ) AS NVARCHAR(11)) + ' To:'+CAST((SELECT Max(DBO.JTOD(PDTRDJ)) FROM F4311 INNER JOIN #TEMP2 ON  PDDOCO=PRDOCO AND PDKCOO=PRKCOO   " & _
                                            "  AND PDDCTO=PRDCTO AND PDAN8=PRAN8 ) AS NVARCHAR(11))  WHERE GLAN8='202860'  "
                                   
                                   
                                    SQLSTR = "UPDATE #TEMP1 SET  RPRMK='PO Date From:' +CONVERT(VARCHAR(12),(SELECT MIN(DBO.JTOD(PDDRQJ)) FROM F4311 INNER JOIN #TEMP2 ON  PDDOCO=PRDOCO AND PDKCOO=PRKCOO   " & _
                                            "  AND PDDCTO=PRDCTO AND PDAN8=PRAN8 ),101) + ' To:'+CONVERT(VARCHAR(12),(SELECT Max(DBO.JTOD(PDADDJ)) FROM F4311 INNER JOIN #TEMP2 ON  PDDOCO=PRDOCO AND PDKCOO=PRKCOO   " & _
                                            "  AND PDDCTO=PRDCTO AND PDAN8=PRAN8 ),101)  WHERE GLAN8='202860'  "
                                   
                                    AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                
                                                 
                                                 
                                                 
                                                                       SQLSTR = "    UPDATE #TEMP2 SET PRPPV=A.GLAA FROM #TEMP2 " & _
                                                  "  INNER JOIN F0911 A   ON #TEMP2.PRDOCO=A.GLPO AND #TEMP2.PRDCTO=A.GLDCTO AND #TEMP2.PRLNID=A.GLLNID " & _
                                                  " AND #TEMP2.PRKCOO=A.GLKCO AND #TEMP2.PRAN8=A.GLAN8 AND A.GLDOC=PRDOC" & _
                                                  " INNER JOIN F4111 ON A.GLKCO=ILKCO AND A.GLPO=ILDOCO AND A.GLDOC=ILDOC AND GLDCT=ILDCT AND GLICU=ILICU" & _
                                                 " INNER JOIN F4095 ON   A.GLKCO = MLCO And A.GLGLC = MLGLPT And A.GLPDCT = MLDCT And A.GLMCU = MLMCU " & _
                                                  " And A.GLOBJ = MLOBJ And A.GLSUB = MLSUB   WHERE  A.GLPO=" & RS.Fields("PRDOCO").Value & " and A.gldct='OV' " & _
                                                 "  AND MLANUM=4335 AND A.GLDCT='OV'"
               
                                               AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                                               
                         
                                              
                                            SQLSTR = "  UPDATE #TEMP2 SET PRPPV=A.PRPPV   FROM #TEMP2 " & _
                                                   "  Inner Join   (SELECT * FROM #TEMP2 WHERE PRMATC='1') AS  A " & _
                                                   "  ON  #TEMP2.PRDOCO=A.PRDOCO AND #TEMP2.PRLNID=A.PRLNID AND #TEMP2.PRLITM=A.PRLITM " & _
                                                   "  AND #TEMP2.PRNLIN=A.PRNLIN " & _
                                                   "  WHERE #TEMP2.PRMATC='2' "
                                             
                                             AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                                             
                                             
                                             SQLSTR = "DELETE #TEMP2 WHERE PRDOC<>'" & RS.Fields("PRDOC").Value & "' "
                                            
                                             AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                                              
                                              
            
                                  
                                 ElseIf Len(Trim(RS.Fields("PRDOCO").Value)) <> 0 And RS.Fields("PRITM").Value = 0 And Len(Trim(RS.Fields("PRAITM").Value)) > 0 Then
                                               
                                                        SQLSTR = " INSERT INTO #temp2  SELECT  PRAN8,PRKCOO,PRDOCO,PRDCTO,PRLNID,PRANI, PRDOC,LTRIM(PRAITM),'',PRUPTD/100 AS PRUORG," & _
                                                                    " PRUOM ,0 AS COUNCS,PRPRRC/10000,PRAREC/100 AS PRPRRC,PRAREC/100 AS PRAREC,'0' AS PRAMT,0 AS PRPPV,  0 AS SEQ   ,PRCRCD, " & _
                                                                    " PREXR1,PRTXA1,PRCNID,PRMCU,PRSFXO,PRNLIN,PRITM,PRMATC,PRSBL,PRRCDJ,PRTDAY FROM F43121  " & _
                                                                    " WHERE  ( PRKCO = '" & mCompanyID & "' AND PRDCT = 'PV' AND PRDOC = " & RS.Fields("PRDOC").Value & " AND PRMATC = '2')"
                                                            AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                                                            NN = NN + CC
                                                                                                            
                                                          SQLSTR = " select left(phdesc,(case when charindex('/',phdesc)<1 then 0 else charindex('/',phdesc)-1 end) )  from SMBCSVR09.JDE_PRODUCTION.PRODDTA.f4301 where   phdoco=" & RS.Fields("PRDOCO").Value
                                                       
                                                            If Rs_temp.State = adStateOpen Then Rs_temp.Close
                                                       
                                                            Rs_temp.Open SQLSTR, AdoConnectionM, adOpenStatic, adLockReadOnly
                                                            
                                                                                                                          If Rs_temp.RecordCount > 0 And Len(Rs_temp.Fields(0).Value) > 1 Then
                                                                       
                                                                                                                                                MaxId = Rs_temp.Fields(0).Value
                                                                         
                                                                                                                                                  If Len(MaxId) > 1 Then
                                                                        
                                                                                   If Rs_temp.State = adStateOpen Then Rs_temp.Close
                                                                            
                                                                                       SQLSTR = " SELECT  matrectrans.* FROM matrectrans INNER JOIN poline " & _
                                                                                               "  ON  poline.ponum=matrectrans.ponum and poline.polinenum=matrectrans.polinenum " & _
                                                                                               "  WHERE poline.PONUM='" & MaxId & "'"
                                                                                       Rs_temp.Open SQLSTR, AdoConnectionM, adOpenStatic, adLockReadOnly
                                                                                                                                                                            
                                                                                           Do While Not Rs_temp.EOF
                                                                                          
                                                                                             
                                                                                               SQLSTR = "  UPDATE #TEMP2 SET PRRCDJ=DBO.DTOJ('" & Format(Rs_temp.Fields("TRANSDATE").Value, "YYYY/MM/DD") & "'),PRTDAY= CAST(DATEPART(HH,'" & Rs_temp.Fields("TRANSDATE").Value & "') AS NVARCHAR(2))+" & _
                                                                                                         " CAST(DATEPART(MI,'" & Rs_temp.Fields("TRANSDATE").Value & "') AS NVARCHAR(2))+ CAST(DATEPART(SS,'" & Rs_temp.Fields("TRANSDATE").Value & "') AS NVARCHAR(2))+'.0' , PRDOC='" & MaxId & "', " & _
                                                                                                         " PRCNID='" & IIf(IsNull(Rs_temp.Fields("packingslipnum").Value), "", Mid(Rs_temp.Fields("packingslipnum").Value, 1, 25)) & "',IMDSC1='" & Mid(Rs_temp.Fields("description").Value, 1, 25) & "' " & _
                                                                                                         " WHERE PRLITM='" & Rs_temp.Fields("itemnum").Value & "' AND PRLNID/1000='" & Rs_temp.Fields("polinenum").Value & "'"
                                                                                               AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                                                                                              
                                                                                            
                                                                                               Rs_temp.MoveNext
                                                                                           Loop
                                                                                            
                                                                                                                                                                               
                                                                                        SQLSTR = "UPDATE #TEMP2 SET  IMDSC1=PDDSC1,PRANI=LTRIM(F4311.PDANI),PRDOC='" & MaxId & "' FROM #TEMP2 INNER JOIN F4311 ON PRKCOO=PDKCOO AND PRDOCO=PDDOCO AND PRDCTO=PDDCTO AND PRLNID=PDLNID " & _
                                                                                                 " WHERE LEN(RTRIM(LTRIM(#TEMP2.IMDSC1)))=0 "
                                                                                              
                                                                                        AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                                                                                          
                                                                                   
                                                                                          
                                                                                          
                                                                                          
                                                                        End If
                                                               
                                                                End If
                                     
   
                                     ElseIf Len(Trim(RS.Fields("PRDOCO").Value)) <> 0 And RS.Fields("PRITM").Value = 0 And Len(Trim(RS.Fields("PRAITM").Value)) = 0 Then
                                        
                           
                                                               SQLSTR = " INSERT INTO #temp2  SELECT  PRAN8,PRKCOO,PRDOCO,PRDCTO,PRLNID,PRANI, PRDOC,PRAITM,'',PRUPTD/100 AS PRUORG," & _
                                                                                           " PRUOM ,0 AS COUNCS,PRPRRC/10000,PRAREC/100 AS PRPRRC,PRAREC/100 AS PRAREC,'0' AS PRAMT, 0 AS PRPPV, 0 AS SEQ   ,PRCRCD, " & _
                                                                                           " PREXR1,PRTXA1,PRCNID,PRMCU,PRSFXO,PRNLIN,PRITM,PRMATC,PRSBL,PRRCDJ,PRTDAY FROM F43121  " & _
                                                                                           " WHERE  ( PRKCO = '" & mCompanyID & "' AND PRDCT = 'PV' AND PRDOC = " & RS.Fields("PRDOC").Value & " AND PRMATC = '2')"
                                                               AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                                                               NN = NN + CC
                                                                                                   
                                                               SQLSTR = " UPDATE #TEMP2 SET #TEMP2.PRAMT=F43121.PRAPTD FROM #TEMP2 INNER JOIN F43121  ON #TEMP2.PRDOCO=F43121.PRDOCO AND #TEMP2.PRLNID=" & _
                                                                                       "F43121.PRLNID AND #TEMP2.PRKCOO=F43121.PRKCOO AND #TEMP2.PRDOC=F43121.PRDOC AND #TEMP2.PRAN8=F43121.PRAN8  " & _
                                                                                       " WHERE #TEMP2.PRPRRC=0 "
                                                                                      
                                                                AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                                                                                                                               
                                                                  SQLSTR = " SELECT  PRAN8,PRKCOO,PRDOCO,PRDCTO,PRLNID,PRVANI, PRDOC,PRAITM,'',PRUPTD/100 AS PRUORG, PRUOM ,0 AS COUNCS,PRPRRC/10000 AS PRPRRC,PRAREC/100 AS PRAREC, " & _
                                                                           " '0' AS PRAMT,  0 AS SEQ   ,PRCRCD,  PREXR1,PRTXA1,PRCNID,PRMCU,PRSFXO,PRNLIN,PRITM,PRMATC FROM F43121   WHERE  ( PRKCO = '" & mCompanyID & "' AND PRDCT = 'PV' AND PRDOC = " & Int(RS.Fields("PRDOC").Value) & " AND PRMATC = '2') "
                                                                  
                                                                   If Rs1.State = adStateOpen Then Rs1.Close
                                                              
                                                                   Rs1.Open SQLSTR, AdoConnection, adOpenStatic, adLockReadOnly
                                                                   
                                                                                                                                   If Rs1.RecordCount > 0 Then
                                                                   
                                                                                                                                                           SQLSTR = "UPDATE #TEMP2 SET IMDSC1=LEFT(F4311.PDDSC1,30) ,PRANI=LTRIM(F4311.PDANI) FROM #TEMP2 INNER JOIN F4311 ON #TEMP2.PRDOCO=F4311.PDDOCO AND #TEMP2.PRLNID=" & _
                                                                                       "F4311.PDLNID AND #TEMP2.PRKCOO=F4311.PDKCOO WHERE PRKCOO = '" & mCompanyID & "' AND PDDCTO = '" & RpDcto & "' AND PDDOCO = " & RS.Fields("PRDOCO").Value
                                                                                  AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                                                                  
                                                                   End If
                                                  
                                       
                                    End If
                                   
                                   
                                  '  RS.MoveNext
                               
                       Else
                     
                                         
                       
                               SQLSTR = "INSERT INTO #TEMP2  SELECT  GLAN8,GLKCO,GLDOC,GLDCT,GLLNID,RTRIM(LTRIM(GLANI)) AS GLANI, GLDOC,'' AS GLAITM," & _
                                        "  GLEXR AS IMDSC1,0 AS GLUORG, '' AS GLUOM ,0 AS COUNCS,0 AS GLGLRC,0 AS GLGLRC, " & _
                                        "  0 AS GLAREC,GLAA AS GLAMT, 0 AS GLPPV, 0 AS SEQ   ,GLCRCD,'' AS GLEXR,'' AS GLTXA,GLVINV, " & _
                                        "  GLMCU,0 AS GLSFXO,0 AS GLNLIN,'' AS GLITM,'1' AS GLMATC,GLSBL,GLDGJ,GLUPMT FROM F0911 "

                                    If Option2(0).Value = True Then

                                                                              SQLSTR = SQLSTR & " WHERE GLKCO='" & mCompanyID & "'and GLICU=" & txticu.Text & " AND GLICUT='" & txticut.Text & "' AND GLLT='AA'"


                                    ElseIf Option2(1).Value = True Then

                                                                          SQLSTR = SQLSTR & " WHERE GLKCO='" & mCompanyID & "'and GLDOC='" & txtdoco.Text & "' AND GLLT='AA'"

                                    End If

                                    AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                    
                    
                       End If
                      
'
                     
                 
                   
                     SQLSTR = " UPDATE #TEMP2 SET PRDOC=A.PRDOC FROM #TEMP2 INNER JOIN F43121 A" & _
                             "  ON #TEMP2.PRAN8=A.PRAN8 AND #TEMP2.PRKCOO=A.PRKCOO  AND #TEMP2.PRDOCO=A.PRDOCO AND #TEMP2.PRSFXO=A.PRSFXO AND #TEMP2.PRNLIN=A.PRNLIN " & _
                             " AND #TEMP2.PRMCU=A.PRMCU AND #TEMP2.PRITM=A.PRITM WHERE A.PRMATC='1' "
                    
                     AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                     
                                     
                     SQLSTR = "UPDATE #TEMP1 SET #TEMP1.RPDDJ=F0411.RPDDJ,#TEMP1.RPDGJ=F0411.RPDGJ,#TEMP1.RPDIVJ=F0411.RPDIVJ FROM #TEMP1 " & _
                              " INNER JOIN F0411  ON GLICU=F0411.RPICU AND GLDOC=F0411.RPDOC AND GLAN8=F0411.RPAN8 " & _
                              "  AND GLPO=F0411.RPPO "

                      AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                      
                                   
                   
                   
                      
                                       If RS.State = adStateOpen Then RS.Close
                         SQLSTR = "SELECT * FROM #TEMP2"
                         RS.Open SQLSTR, AdoConnection, adOpenStatic, adLockReadOnly
                        
                      If RS.RecordCount > 0 Then
                     
                           If Trim(RS.Fields("PRMCU").Value) = "311" Or Trim(RS.Fields("PRMCU").Value) = "315" Then
                            
                                                              SQLSTR = "UPDATE #TEMP2 SET COUNCS=(A.COUNCS/10000) FROM #TEMP2 INNER JOIN F4105 A ON COLITM=#TEMP2.PRLITM  AND LTRIM(COMCU)='311'" & _
                                         " INNER JOIN F4102 B ON PRITM=IBITM  AND PRMCU=IBMCU " & _
                                         " WHERE   COLEDG='07' AND IBGLPT NOT IN ('IN40','IN47','IN50') "
                                                                        '--IN40 粮食 in47 广告品 in50 宣传品
                                                                       
                           Else
                          
                          
                                SQLSTR = "UPDATE #TEMP2 SET COUNCS=(A.COUNCS/10000) FROM #TEMP2 INNER JOIN F4105 A ON COLITM=#TEMP2.PRLITM  AND COMCU=#TEMP2.PRMCU WHERE   COLEDG='07'"
                          
                           End If
                         
                          AdoConnection.Execute SQLSTR, CC, adExecuteNoRecords
                    
                       End If
            
          
            
            
                                
                If Optxz(1).Value = True Then
                         
                        SQLSTR = "SELECT * FROM #TEMP1  ORDER BY GLDOC,GLAA DESC"
                Else
                                
                     
                       SQLSTR = "select GLAN8,ABALPH,MAX(GLVINV) AS GLVINV,MAX(GLPO) AS GLPO,MAX(GLDCTO) AS GLDCTO,MAX(PNPTD) AS PNPTD,MAX(GLCRCD) AS GLCRCD, " & _
                                " MAX(AYCBNK) AS AYCBNK ,MAX(AYDL01) AS AYDL01,ACCOUNT_LOCAL,ACCOUNT_SCOA,MAX(GLSBL) GLSBL,MAX(GMDL01) AS GMDL01,MAX(GLCRR) AS  " & _
                                " GLCRR,   SUM(GLAA) AS GLAA,MAX(GLEXR) AS GLEXR,GLICU,MAX(GLPN) AS GLPN,MAX(GLDOC) AS GLDOC,MAX(GLCTRY) AS GLCTRY,MAX(GLFY) AS " & _
                                " GLFY,MAX(RPDIVJ) AS RPDIVJ,   MAX(RPDDJ) AS RPDDJ ,GLMCU AS GLMCU,MAX(RPDGJ) AS RPDGJ ,MAX(RPRMK) AS RPRMK from  #TEMP1  " & _
                                " GROUP BY GLMCU,ACCOUNT_LOCAL,ACCOUNT_SCOA,GLICU,GLAN8,ABALPH"

                End If
               
               
                Set RS = New ADODB.Recordset
                   
                If RS.State = adStateOpen Then RS.Close
                
                               
                RS.Open SQLSTR, AdoConnection, adOpenStatic, adLockReadOnly
                
                              
                Set Rs_Detail = New ADODB.Recordset
                   Rs_Detail.Open "select *,left(right('00'+ltrim(str(prtday)),6),2)+':'+substring(right('00'+ltrim(str(prtday)),6),3,2) as PRDAY1 from #temp2 ", AdoConnection, adOpenStatic, adLockBatchOptimistic
              
                              
                Set Rs_DetailPpv = New ADODB.Recordset
                   
                  Rs_DetailPpv.Open "SELECT *  from #temp3  ", AdoConnection, adOpenStatic, adLockBatchOptimistic
                 
                 

                
                               
                  If Not Rs_Detail.EOF Then Rs_Detail.MoveFirst
                  NN = 0
                  Do While Not Rs_Detail.EOF
                    NN = NN + 1
                    Rs_Detail.MoveNext
                  Loop
               
               
               
               
                   If NN < MaxDetail And RS.RecordCount < MaxMain Then
                    
                            For i = NN + 1 To MaxDetail
                            
                                Rs_Detail.AddNew
                                    Rs_Detail.Fields("SEQ").Value = i
                                    Rs_Detail.Fields("PRAMT").Value = 0
                                    Rs_Detail.Fields("PRPPV").Value = 0
                                    Rs_Detail.Fields("PRMCU").Value = ""
                                Rs_Detail.UpdateBatch adAffectCurrent
                               
                             Next
                   
                    ElseIf NN < MaxDetail And RS.RecordCount >= MaxMain Then
                   
                             For i = NN + 1 To MaxDetail
                            
                                Rs_Detail.AddNew
                                    Rs_Detail.Fields("SEQ").Value = i
                                    Rs_Detail.Fields("PRAMT").Value = 0
                                    Rs_Detail.Fields("PRPPV").Value = 0
                                    Rs_Detail.Fields("PRMCU").Value = ""
                                Rs_Detail.UpdateBatch adAffectCurrent
                               
                             Next
                    
                   
                    ElseIf NN >= MaxDetail And RS.RecordCount <= MaxMain Then
                   
                             For i = NN + 1 To PageCountMax
                            
                                Rs_Detail.AddNew
                                    Rs_Detail.Fields("SEQ").Value = i
                                    Rs_Detail.Fields("PRAMT").Value = 0
                                    Rs_Detail.Fields("PRPPV").Value = 0
                                    Rs_Detail.Fields("PRMCU").Value = ""
                                Rs_Detail.UpdateBatch adAffectCurrent
                               
                             Next
   
                   
                    ElseIf NN >= MaxDetail And RS.RecordCount >= MaxMain Then
                   
                             For i = NN + 1 To PageCountMax
                            
                                Rs_Detail.AddNew
                                    Rs_Detail.Fields("SEQ").Value = i
                                    Rs_Detail.Fields("PRAMT").Value = 0
                                    Rs_Detail.Fields("PRPPV").Value = 0
                                    Rs_Detail.Fields("PRMCU").Value = ""
                                Rs_Detail.UpdateBatch adAffectCurrent
                               
                             Next
   
                 
               
                    End If
               
               
               
                Set AdoConnection = Nothing
                
                
                
                              
                If Optxz(2).Value = True Then '库存类
                   
                    Set Report = New cryPayMentVoucher
                      Report.DiscardSavedData
                 
                ElseIf Optxz(3).Value = True Then   '//费用类
               
                                   
                    Set Report = New cryPayMentVoucher2
                      Report.DiscardSavedData

               
                End If
                
                
                                          
                If Optxz(2).Value = True Then '库存类
               
                    Set ReportSub = Report.OpenSubreport("Sub1")
                    Set ReportSub1 = Report.OpenSubreport("Sub2")
                       Report.Database.SetDataSource RS, 3, 1
                      
                       ReportSub.Database.SetDataSource Rs_Detail, 3, 1
                       ReportSub1.Database.SetDataSource Rs_DetailPpv, 3, 1
                   
                   
                   
                Else
               
               
                    Set ReportSub = Report.OpenSubreport("Sub1")
                    Report.Database.SetDataSource RS, 3, 1
                    ReportSub.Database.SetDataSource Rs_Detail, 3, 1
                   
                   
                   
                 End If
                
                  
             '/////////////////////////////////////////////////////////////
            
            '////////////////////////////////////////////////////////////////
                         
                         
                        If mCompanyID = "00003" Then
                       
                             
                                Report.TextcoCHN.SetText "上海力波商贸有限公司"
                                Report.TextcoENG.SetText " "
                                ReportSub.Sections(2).ReportObjects("TEXT5").SetText "不含税" & Chr(13) & "标准进价" & Chr(13) & "U/SDC"
       
                               
                                
                        End If
                       
                       
                        CRViewer1.ReportSource = Report
                        CRViewer1.ZOrder
                        Unload frmMessage
                        CRViewer1.ViewReport
                        Command2.ZOrder
                        CRViewer1.Visible = True
                        Me.WindowState = 2
                       ' RS.Close
                        Set AdoRs = Nothing
                       
                     
                        Command1.Visible = False
                        Command2.Visible = True
                        Command3.Visible = False
                        Screen.MousePointer = vbDefault
                       
                       
                        Set RS = Nothing
                        Set Rs1 = Nothing
               
               
                Exit Sub
ERR1:
    MsgBox Err.Description
    Unload frmMessage
    Screen.MousePointer = vbDefault
 End Sub


 

0
swordjustin
9/15/2005 5:31:42 AM
asp.net.migrating-from-asp 901 articles. 0 followers. Follow

0 Replies
1034 Views

Similar Articles

[PageSpeed] 48

Reply:

Similar Artilces:

How to convert C#.Net code to VB.Net code ???...
HI, i was searching something new, then i suddenly find some tips to convert C#.Net code to VB.Net but i did not do well. i am puttint its url here plz tell me how to convert C#.Net code to VB.Net. http://www.dotnetspider.com/code/C-273-Convert-C-VB-NET.aspx Jasim...Please remember to click “Mark as Answer” on the post that helps youJasim AkhtarNew Delhi ( INDIA ) It would be better if you write the problem you having, while converting from C# to VB.NET. You cannot completely rely on online converters. ThanksMark post(s) as "Answer" that helped youElectronic ScrewWebsite||Bl...

convert code from VB to VB.Net
hi, I have both an offline application (done with Visual Basic 6.0 ) and an online application (thru ASP.Net 2.0 and Visual Basic as code behind). Right now, I have a code in Visual Basic for encrypting a file. This is working in my offline application. However, when I used the code in my online application, it got some errors in it. Maybe incompatibility with the language used. Is there any way I can convert my VB code to VB.Net? Thanks a lot. Sheila   Rock on!!! Get the VB6 code advisor from http://msdn2.microsoft.com/en-gb/vbasic/ms789135.aspx and check you existing...

Is there a software to convert VB codes to VB.net codes automatically?
hi there! Do anyone of you know if there is any software to convert VB codes to VB.net codes? Or must i maunally convert them? Visual Studio.NET 2000 and 2003 versions automatically convert VB 6 code to VB.NET code, for the most part. Refer to Preparing Your Visual Basic 6.0 Applications for the Upgrade to Visual Basic .NET for more information. Hope this helps, AppanASP.NET Team This posting is provided "AS IS" with no warranties, and confers no rights. thanks! =) Is this case same for Visual C codes? Same concept. Refer to Managed Extensions for C++ Migratio...

Problems in migrating code from VB to VB.NET
Hi,  We are trying to upgrade VB code to .NET. In VB these following lines have been used to accomplish a batch replication functionality. ' Opens an HTTP request handle.Public Declare Function HttpOpenRequest Lib "wininet.dll" Alias "HttpOpenRequestA" _(ByVal hHttpSession As Long, ByVal sVerb As String, ByVal sObjectName As String, ByVal sVersion As String, _ByVal sReferer As String, ByVal something As Long, ByVal lFlags As Long, ByVal lContext As Long) As Long We are not able to find the exact equivalent in .NET to implement this. Can you please provide inputs on how to change this i...

Migrate code from vb.net to C#.net
Hello friends, I had created a web site using visual studio 2005. web site was created using the language vb i.e. VB.net. Now as per the clint requirement I have to migrate all the code in C#. So the question is that is there any tool or any inbuild utility in Visual Stuidio so that we can migrate the site from vb.net to C#.net. Or we have to do it mannually i.e. by changing each and every line of code mannually? Kindly suggest me. Thanks & Regards Girish NehteThanks & RegardsGirish NehteIf This post helps you to solve your problem please mark this as an answer. Hi, at the mome...

How to migrate code from vb.net to c#.net?
Hi all,If anybody knows information on migration of VB.Net application to C#.net. i.e Any tools available, best practices, methodology for estimation. etc.   RegardsHelen    Hey, Take a look at this topic http://forums.asp.net/t/1100603.aspxMaybe some of these sites can be of help to you.  Arnold you can do it by page by page just copy and paste ur page in the following link http://labs.developerfusion.co.uk/convert/vb-to-csharp.aspx and convert ur vb.net to c# gotcha!!YasserSpica.www.spica.aewww.bncnetwork.netPlease remember to mark as answers i...

converting vb.net 2003 files to vb.net 2005
Hi, i am beginner..i watch videos about vb.net..they made on vs.net 2003 when i wrote these codes in 2005 ,it gives errors..is there any program which convert the code automatically?   thanks,Thanks,Speranza What videos are you talking about?  There are lots of great, up-to-date ASP.NET Videos on this site for free.Darrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you! i am talking about learnvisualstudio.net videos..Thanks,Speranza Speranza:they made on vs.net 2003 when i wrote these codes in 2005 ,it gives errors..is there a...

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

Converting Web Site from Vb.Net 2003 to Vb.Net 2005
I have a web site in vb.net 2003 that I what to convert to vb.net 2005. I open my web site in the visual studio 2005 by Local IIS option. I follow the steps of the visual studio conversion wizard.In the conversion report I received the following warning 'Referencepath' settings have not been converted.  Can anyone tell what I have to do to make this warning disappear? Best regards,Sérgio 'Referencepath'  is a property you can set with with VS2003 project file, sothat when ever you to do Add reference this path is serached for class libraries.  We do not  have that ...

converting to vb.net from c#.net authorize.net
authorize.net offered me some sample code when I signed up with them the only problem is the sample code is in c#.net but my page that they type all of their credit card into is vb.net <code><%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="C#" runat="server"> void Page_Load(Object Src, EventArgs E) { myPage.Text = readHtmlPage("https://certification.authorize.net/gateway/transact.dll"); } private String readHtmlPage(string url) { ...

Convert VB Macro code to VB.NET or C#
Hello all i want to convert the following Vb macro code to VB.NET ot C# how to do that ? any help ? Set myrange = objword.Selection.Range myrange.Collapse Set myTable = objword.ActiveDocument.Tables.Add(myrange, 2, 5) With myTable With .Borders(wdBorderLeft) .LineStyle = wdLineStyleSingle .LineWidth = wdLineWidth050pt .Color = wdColorAutomatic End With With .Borders(wdBorderRight) .LineStyle...

Convert VB console code into VB.Net Web Application?
Anybody know how to convert this into a project and have a webform work with it instead of the console? http://sourceforge.net/projects/imdbparse/ ' Copyright (c) 2004, Andrew Brereton' All rights reserved.' ' Redistribution and use in source and binary forms, with or without' modification, are permitted provided that the following conditions are met:'  * Redistributions of source code must retain the above copyright notice, this'    list of conditions and the following disclaimer.'  * Redistributions in binary form must reproduce the above copyright notice,' ...

Converting Vb to VB.net
I am converting a VB application to .net. There is a feature in Vb application where you can check the check box on the vb form and that form will be printed directly to the printer. That form can be a fax sheet or any other form. Most of the fields of that forms are coming from the database. This Vb application is using mail merge to do this. What can i use in VB.net or C# to do the same thing. I am using Visual studio 2003 and SQL server 2000. Any suggestions will be appreciated. vinki:I am converting a VB application to .net.It seems that the application you are converting is a deskto...

VB code to VB.Net
I have a contact manager application who has released a SDK that allows outside programs to manipulate its data. The examples are provided for VB and C++ developers. In the VB code examples, there is .bas and .frm files. There are also .vbp and .vbw files. There is also a Global.bas file that looks like it contains the global variables and a public function to handle logins. I have also identified a .scc file that is commented "source code control file". I would like to move this code into the .Net framework if possible, but I would like suggestions on where to start. I'm ge...

Web resources about - How could i convert this code vb in vb.net? - asp.net.migrating-from-asp

File:Convert to SVG and move to Commons.svg - Wikipedia, the free encyclopedia
As a courtesy (but not a requirement), please e-mail me or leave a note on my talk page if you use this image outside of Wikipedia. Thanks! As ...

Facebook Co-Founder Dustin Moskovitz Sells 450K Shares, Converts 7M More
The great Facebook stock sale frenzy continues on with a report that Co-Founder Dustin Moskovitz unloaded 450,000 shares in the social network ...

Facebook Announces “App2User” Liquidity Program for Merchants to Convert Rewards Points into Credits
... for Credits, just announced a new Credits program called “App2User,” designed to enable merchants and loyalty program operators to convert their ...

How to Convert Leads Into Buying Customers - The 9 Step Sales Process EVERYONE Should Use
... School of Business in Toronto on the topics of Sales and Entrepreneurship. I shared with them the sales process that I find How to Convert Leads ...

Bitcoin : Should I convert my savings to Bitcoin?
Answer (1 of 7): You should think of this question as "Should I invest all my savings in Bitcoin?", and not "Should I have my savings denominated ...

Convertizo 2 - Convert Units and Currency in Style on the App Store on iTunes
Get Convertizo 2 - Convert Units and Currency in Style on the App Store. See screenshots and ratings, and read customer reviews.

Catholics should not convert Jews, says Vatican, in push against anti-Semitism
... 50 years since the Vatican's repudiation of the concept of Jewish guilt for Jesus' death.  Vatican City: Catholics should not try to convert ...

Convert your images quickly and easily with PDF Photos
Have you ever wanted an easy way to convert images to a PDF? Maybe you want to include them in a document for work, send them via email at a ...

Ford patents rear wheel that converts into a unicycle
Filed under: Government/Legal , Green , Ford , Green Driving , Motorcycle , Electric Ford is thinking about allowing drivers to remove a rear ...

How to convert your old VHS tapes to DVD with this software
Remember those old VHS tapes you have sitting in the corner? Convert them into DVDs with this affordable software so you can easily watch them ...

Resources last updated: 1/13/2016 10:39:15 PM