GPCustomization

Rating: No reviews yet
Downloads: 9
Released: Sep 22, 2008
Updated: Sep 22, 2008 by mkkaleem
Dev status: -not yet defined by owner-

Recommended Download

Example GPCust
example, 15K, uploaded Sep 22, 2008 - 9 downloads

Release Notes

Public Class clsAccountSaveBalance

Private clsStoreProcedure As New clsCallSP
Private _clsDB As New clsDB
Dim DTBDB21, DTTmp, DT_ASB As DataTable
Dim style, style1 As New DataGridViewCellStyle

Public Function AccountSaveBalance(ByVal reportName As String, ByVal userID As String, ByVal tmpDGV As DataGridView) As DataGridView
curDS = New curDataSetGP10
Try
clsStoreProcedure.callSPSGPU00001(reportName, _userID)

strSQL = "SELECT DISTINCT ACCATNUM FROM BDB00021 WHERE REPNAME='" & reportName & "' AND USERID='" & userID & "'"
ObjSQLCon = _clsDB.getConnectionObject()
ObjSQLCon.Open()
ObjDA = _clsDB.getAdapter(ObjSQLCon, strSQL)
ObjDA.Fill(curDS, "TMP_ACCTNUM")

DTBDB21 = curDS.Tables("TMPACCTNUM")

For Each row As DataRow In DT_BDB21.Rows
strSQL = "SELECT ACTINDX FROM BDB00021 WHERE REPNAME='" & reportName & "' AND USERID='" & userID & "' AND ACCATNUM ='" & row(0) & "'"
ObjDA = _clsDB.getAdapter(ObjSQLCon, strSQL)
ObjDA.Fill(curDS, "TMP")
DT_Tmp = curDS.Tables("TMP")
For Each rowTmp As DataRow In DT_Tmp.Rows
LedgerDetails(reportName, userID, rowTmp(0), row(0))
Next
LedgerSum(reportName, userID, row(0))
Next
LedgerGroupSum(reportName, userID)


With tmpDGV
.AutoGenerateColumns = False
.DataSource = curDS.Tables("Record")

For i As Integer = 0 To .RowCount - 1
If tmpDGV(3, i).Value = 2 Then
style1.Font = New Font(tmpDGV.Font, FontStyle.Bold)
.Rows(i).DefaultCellStyle = style1
.Rows(i).DefaultCellStyle.BackColor = Color.AliceBlue
ElseIf tmpDGV(3, i).Value = 3 Then
style.Font = New Font(tmpDGV.Font, FontStyle.Bold)
.Rows(i).DefaultCellStyle = style
.Rows(i).DefaultCellStyle.ForeColor = Color.Blue
.Rows(i).DefaultCellStyle.BackColor = Color.GhostWhite
Else
.Rows(i).DefaultCellStyle.BackColor = Color.White
End If

Next
.Columns(3).Visible = False
.Columns(4).Visible = False
.Columns(5).Visible = False
.Columns(6).Visible = False




End With
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
Return tmpDGV
End Function

Private Sub LedgerDetails(ByVal REPNAME As String, ByVal USERID As String, ByVal ACTINDX As String, ByVal ACCATNUM As Integer)
Try
ObjSQLCon = _clsDB.getConnectionObject()
ObjSQLCon.Open()
strSQL = "Select RTRIM(GL.ACTNUMBR1)'-'RTRIM(GL.ACTNUMBR2)'-'RTRIM(GL.ACTNUMBR3) AS C1,RTRIM(GL.ACTDESCR) AS C2 ,'GENERAL LEDGER' AS C3,1 AS C4,GM.TRXTYPE AS C5,GM.ACTINDX AS C6,GM.ACCATNUM AS C7, POSTBLNC AS C8, BATCHRECV AS C9, JOURNAL AS C10, CHECKBOOK AS C11,ASSET AS C12, PAYROLL AS C13, INVENTORY AS C14, PURCHASE AS C15, SALES AS C16,SAVEBLNC AS C17 From GMainView AS GM INNER JOIN GL00100 AS GL ON GM.ACTINDX = GL.ACTINDX WHERE GM.REPNAME='" & REPNAME & "' AND GM.USERID='" & USERID & "' AND GM.ACTINDX='" & ACTINDX & "' AND GM.ACCATNUM=" & _ACCATNUM & ""
ObjDA = _clsDB.getAdapter(ObjSQLCon, strSQL)
ObjDA.Fill(curDS, "Record")
DT_ASB = curDS.Tables("Record")

strSQL = "Select '' AS C1,'' AS C2,'SUB LEDGER' AS C3,1 AS C4,'S' AS C5,ACTINDX AS C6,ACCATNUM AS C7,POSTBLNC AS C8, BATCHRECV AS C9, JOURNAL AS C10, CHECKBOOK AS C11, ASSET AS C12, PAYROLL AS C13, INVENTORY AS C14, PURCHASE AS C15, SALES AS C16,SAVEBLNC AS C17 From SSUBView WHERE REPNAME='" & _REPNA

Reviews for this release

No reviews yet for this release.