Public con As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim adm As New ADODB.Recordset
Dim cus As New ADODB.Recordset
Dim edet As String
Dim dbid As String
Dim cn As String
Public Function Make_Connection()
cn = "Provider=MSDAORA.1;User ID=bank/SABank;Data Source=localhost;Persist Security Info=False"
End Function
Private Sub CNpass_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
RPass_Click
End If
End Sub
Private Sub Command1_Click()
dbid = UCase(Id.Text)
Make_Connection
If Combo1.Text = "" Then
MsgBox "Choose User type", vbExclamation
Combo1.SetFocus
Else
If Id.Text = "" And Password.Text = "" Then
MsgBox "Enter Username and Password", vbExclamation
Id.SetFocus
Else
If Combo1.Text = "Admin" Then
con.Open cn
adm.Open " select password from admin_login where id = '" & dbid & "'", cn, adOpenDynamic, adLockOptimistic
If adm.EOF Then
MsgBox "No user found", vbExclamation
Id.Text = ""
Password.Text = ""
adm.Close
Id.SetFocus
Else
If adm!Password = Password.Text Then
Admin_Home.Show
adm.Close
Unload Me
Else
MsgBox "Wrong Password", vbExclamation
adm.Close
Password.Text = ""
Password.SetFocus
End If
End If
con.Close
Else
If Combo1.Text = "Customer" Then
con.Open cn
cus.Open " select password from customer_data where id = '" & dbid & "'", cn, adOpenDynamic, adLockOptimistic
If cus.EOF Then
MsgBox "No User Found", vbExclamation
cus.Close
Id.Text = ""
Password.Text = ""
Id.SetFocus
Else
If cus!Password = Password.Text Then
Customer_Home.Show
cus.Close
Unload Me
Else
MsgBox "Wrong Password", vbExclamation
cus.Close
Password.Text = ""
Password.SetFocus
End If
End If
con.Close
End If
End If
End If
End If
End Sub
Private Sub ErrIco_Click()
MsgBox "Database Error: ,'" & edet & "'", vbCritical
End Sub
Private Sub Exit_app_Click()
Unload Me
End
End Sub
Private Sub fb_Click()
Shell ("explorer https://www.facebook.com/sabankproject")
End Sub
Private Sub FBack_Click()
Label1.Visible = False
Frame4.Visible = False
Frame5.Visible = False
NPass.Visible = False
CNpass.Visible = False
RPass.Visible = False
Frame1.Visible = True
Frame2.Visible = True
Frame3.Visible = True
Fid.Visible = True
Fmail.Visible = True
FPhone.Visible = True
FNext.Visible = True
Combo2.Visible = True
End Sub
Private Sub FClose_Click()
FPassw.Visible = False
Combo1.Visible = True
Command1.Visible = True
Id.Visible = True
Password.Visible = True
FPass.Visible = True
FClose.Visible = False
fb.Visible = True
twitter.Visible = True
Insta.Visible = True
Linkedin.Visible = True
Mail.Visible = True
Site.Visible = True
Frame1.Visible = False
Frame2.Visible = False
Frame3.Visible = False
Fid.Visible = False
Fmail.Visible = False
FPhone.Visible = False
FNext.Visible = False
Label1.Visible = False
Frame4.Visible = False
Frame5.Visible = False
NPass.Visible = False
CNpass.Visible = False
FBack.Visible = False
RPass.Visible = False
Combo2.Visible = False
Fid.Text = ""
Fmail.Text = ""
FPhone.Text = ""
NPass.Text = ""
CNpass.Text = ""
End Sub
Private Sub FNext_Click()
Dim Fdata As New ADODB.Recordset
Dim Fcdata As New ADODB.Recordset
Dim fdid As String
Dim fdmail As String
Dim fdphone As String
fdid = UCase(Trim(Fid.Text))
If Combo2.Text = "" Then
MsgBox "Choose User type", vbExclamation
Combo2.SetFocus
Else
If Fid.Text = "" And Fmail.Text = "" And FPhone.Text = "" Then
MsgBox "Enter ID, Email, and Phone Number", vbExclamation
Fid.SetFocus
Else
If Combo2.Text = "Admin" Then
Make_Connection
con.Open cn
Fdata.Open " select * from admin_login where id = '" & fdid & "'", cn, adOpenDynamic, adLockOptimistic
If Fdata.EOF Then
MsgBox "No User Found", vbExclamation
Fid.SetFocus
Else
fdmail = UCase(Trim(Fdata!Email))
fdphone = UCase(Trim(Fdata!phone))
If UCase(Trim(Fmail.Text)) <> fdmail Then
MsgBox "Wrong E-mail ID", vbExclamation
Fmail.SetFocus
Else
If UCase(Trim(FPhone.Text)) <> fdphone Then
MsgBox "Wrong Phone Number", vbExclamation
FPhone.SetFocus
Else
Label1.Visible = True
Frame4.Visible = True
Frame5.Visible = True
NPass.Visible = True
CNpass.Visible = True
FBack.Visible = True
Frame1.Visible = False
Frame2.Visible = False
Frame3.Visible = False
Fid.Visible = False
Fmail.Visible = False
FPhone.Visible = False
FNext.Visible = False
Combo2.Visible = False
RPass.Visible = True
End If
End If
End If
con.Close
End If
If Combo2.Text = "Customer" Then
Make_Connection
con.Open cn
Fcdata.Open " select * from customer_data where id = '" & fdid & "'", cn, adOpenDynamic, adLockOptimistic
If Fcdata.EOF Then
MsgBox "No User Found", vbExclamation
Fid.SetFocus
Else
If UCase(Trim(Fmail.Text)) <> UCase(Trim(Fcdata!Email)) Then
MsgBox "Wrong E-mail ID", vbExclamation
Fmail.SetFocus
Else
If UCase(Trim(FPhone.Text)) <> UCase(Trim(Fcdata!Mobile)) Then
MsgBox "Wrong Phone Number", vbExclamation
FPhone.SetFocus
Else
Label1.Visible = True
Frame4.Visible = True
Frame5.Visible = True
NPass.Visible = True
CNpass.Visible = True
FBack.Visible = True
Frame1.Visible = False
Frame2.Visible = False
Frame3.Visible = False
Fid.Visible = False
Fmail.Visible = False
FPhone.Visible = False
FNext.Visible = False
Combo2.Visible = False
RPass.Visible = True
End If
End If
End If
con.Close
End If
End If
End If
End Sub
Dim con As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim rs As New ADODB.Recordset
Dim zo As New ADODB.Recordset
Dim banbal As New ADODB.Recordset
Dim bbala As String
Private Declare Function sndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Dim cn As String
Public Function Make_Connection()
cn = "Provider=MSDAORA.1;User ID=bank/SABank;Data Source=localhost;Persist Security Info=False"
End Function
Public Sub PlaySound(strFileName As String)
sndPlaySound strFileName, 1
End Sub
Private Sub SortListView(ByRef List As ListView, ColHeadIndex As Integer)
Dim lcv As Long 'Loop Control Variable
With List
' Make sure the Sorted property is set to true
.Sorted = True
' Sort according to the colum that was clicked (off by one)
.SortKey = ColHeadIndex - 1
' Does the column already have an icon?
If .ColumnHeaders(ColHeadIndex).Icon = 0 Then
'No, So we will assume this column is not sorted
' Set to Ascending order
.SortOrder = lvwAscending
' Set the ColumnHeader to be the Up Arrow
.ColumnHeaders(ColHeadIndex).Icon = "UpArrow"
' Does the column have an UpArrow icon?
ElseIf .ColumnHeaders(ColHeadIndex).Icon = "UpArrow" Then
' Yes, So the column is in Ascending order, switch to descending
' Set the Column Icon to the Down Arrow
.ColumnHeaders(ColHeadIndex).Icon = "DownArrow"
' Set the sort order to descending
.SortOrder = lvwDescending
Else
' Otherwise sort into ascending order
' Set to Ascending order
.SortOrder = lvwAscending
' Set the ColumnHeader to be the Up Arrow
.ColumnHeaders(ColHeadIndex).Icon = "UpArrow"
End If
' Remove any icon (presumably an arrow icon) from all other columns
' For every Column in the ListView Control...
For lcv = 1 To List.ColumnHeaders.Count
' Is the current column the clicked column?
If Not (lcv = ColHeadIndex) Then
' No, remove any icon it may have
.ColumnHeaders(lcv).Icon = 0
End If
Next lcv
' Refresh the display of the ListView Control
.Refresh
End With
End Sub
Private Sub ACancel_Click()
PLogout.Visible = False
HomeCover.Visible = True
Hifsc.Visible = True
BCode.Visible = True
Hmbl.Visible = True
Hmail.Visible = True
Haddress.Visible = True
Twitter.Visible = True
Linkedin.Visible = True
facebook.Visible = True
Instagram.Visible = True
Website.Visible = True
Download1.Visible = True
Download2.Visible = True
FDPer.Visible = False
Profile.Visible = False
Cross.Visible = False
LName.Visible = False
Pid.Visible = False
Pdoj.Visible = False
Pphone.Visible = False
Pmail.Visible = False
Paddress.Visible = False
PImg.Visible = False
SCustom.Visible = False
Bal.Visible = False
wamt.Visible = False
Wbtn.Visible = False
Saving.Visible = False
Current.Visible = False
FD.Visible = False
CId.Visible = False
OBal.Visible = False
OName.Visible = False
FName.Visible = False
MName.Visible = False
DOB.Visible = False
DTPicker1.Visible = False
Gender.Visible = False
Male.Visible = False
Female.Visible = False
Transgender.Visible = False
Mobile.Visible = False
Email.Visible = False
Address.Visible = False
PLogout.Visible = False
LogYes.Visible = False
LogNo.Visible = False
APImg.Visible = False
UploadPImg.Visible = False
ASignImg.Visible = False
ASignUpload.Visible = False
APimgtext.Visible = False
ASignText.Visible = False
Enm.Visible = False
Enm1.Visible = False
Enm2.Visible = False
Enm3.Visible = False
Enm4.Visible = False
Enm5.Visible = False
Enm6.Visible = False
Enm7.Visible = False
TBD.Visible = False
TBD1.Visible = False
TBD2.Visible = False
TBD3.Visible = False
SEmpBtn.Visible = False
EmpNm.Visible = False
EmpPosition.Visible = False
EmpDOJ.Visible = False
EmpEID.Visible = False
EmpPhone.Visible = False
EmpMail.Visible = False
EmpSal.Visible = False
EmpAdd.Visible = False
acno.Text = ""
CId.Text = ""
OBal.Text = ""
OName.Text = ""
FName.Text = ""
MName.Text = ""
DOB.Text = ""
Mobile.Text = ""
Email.Text = ""
Address.Text = ""
APimgtext.Text = ""
ASignText.Text = ""
APImg.Picture = Nothing
ASignImg.Picture = Nothing
Set Me.Picture = Me.HomeImg
End Sub
Private Sub ASignUpload_Click()
CD2.Filter = "JPG File | *.jpg|GIF File|*.gif|All files|*.*"
CD2.ShowOpen
If CD2.FileName <> "" Then
ASignImg.Picture = LoadPicture(CD2.FileName)
ASignText.Text = CD2.FileName
End If
End Sub
Private Sub Caadedit_Click()
Caadh.Enabled = True
cname.Enabled = False
CFName.Enabled = False
CMName.Enabled = False
CDOB.Enabled = False
CGender.Enabled = False
CMobile.Enabled = False
CMail.Enabled = False
CLocation.Enabled = False
End Sub
Private Sub CDedit_Click()
CDOB.Enabled = False
cname.Enabled = False
CFName.Enabled = False
CMName.Enabled = False
CGender.Enabled = False
CMobile.Enabled = False
CMail.Enabled = False
CLocation.Enabled = False
Caadh.Enabled = False
End Sub
Private Sub CDel_Click()
Dim cdids As String
cdids = ccid.Text
If ccid.Text = "" Then
MsgBox ("Search Customer First")
Else
answer = MsgBox("Are you sure you want to close account of " & vbCrLf & "'" & cname.Text & "'", vbCritical + vbYesNo, "Warning")
If answer = vbYes Then
SCustom_Click
wamt.Text = Bal.Caption
WithdrawBTN_Click
Make_Connection
con.Open cn
con.Execute ("delete from customer_data where id='" & cdids & "' ")
con.Execute ("delete from customer_statement where id='" & cdids & "' ")
con.Execute ("commit")
MsgBox ("A/C No. " + cac.Text + " closed Successfully")
ccid.Text = ""
ctype.Text = ""
cifsc.Text = ""
cac.Text = ""
cname.Text = ""
CFName.Text = ""
CMName.Text = ""
CDOB.Text = ""
CGender.Text = ""
CMobile.Text = ""
CMail.Text = ""
CLocation.Text = ""
Caadh.Text = ""
CPic.Picture = Nothing
CSign.Picture = Nothing
con.Close
End If
End If
End Sub
Private Sub CFedit_Click()
CFName.Enabled = True
cname.Enabled = False
CMName.Enabled = False
CDOB.Enabled = False
CGender.Enabled = False
CMobile.Enabled = False
CMail.Enabled = False
CLocation.Enabled = False
Caadh.Enabled = False
End Sub
Private Sub CGedit_Click()
CGender.Enabled = True
cname.Enabled = False
CFName.Enabled = False
CMName.Enabled = False
CDOB.Enabled = False
CMobile.Enabled = False
CMail.Enabled = False
CLocation.Enabled = False
Caadh.Enabled = False
End Sub
Private Sub CLoedit_Click()
CLocation.Enabled = True
cname.Enabled = False
CFName.Enabled = False
CMName.Enabled = False
CDOB.Enabled = False
CGender.Enabled = False
CMobile.Enabled = False
CMail.Enabled = False
Caadh.Enabled = False
End Sub
Private Sub CMaedit_Click()
CMail.Enabled = True
cname.Enabled = False
CFName.Enabled = False
CMName.Enabled = False
CDOB.Enabled = False
CGender.Enabled = False
CMobile.Enabled = False
CLocation.Enabled = False
Caadh.Enabled = False
End Sub
Private Sub CMedit_Click()
CMName.Enabled = True
cname.Enabled = False
CFName.Enabled = False
CDOB.Enabled = False
CGender.Enabled = False
CMobile.Enabled = False
CMail.Enabled = False
CLocation.Enabled = False
Caadh.Enabled = False
End Sub
Private Sub CMobile_KeyPress(KeyAscii As Integer)
If KeyAscii <> 48 And KeyAscii <> 49 And KeyAscii <> 50 And KeyAscii <> 51 And KeyAscii <> 52 And KeyAscii <> 53 And KeyAscii <> 54 And KeyAscii <> 55 And KeyAscii <> 56 And KeyAscii <> 57 And KeyAscii <> 8 And KeyAscii <> 13 Then
KeyAscii = 0
MsgBox ("Please Enter Numbers Only")
End If
End Sub
Private Sub CMoedit_Click()
CMobile.Enabled = True
cname.Enabled = False
CFName.Enabled = False
CMName.Enabled = False
CDOB.Enabled = False
CGender.Enabled = False
CMail.Enabled = False
CLocation.Enabled = False
Caadh.Enabled = False
End Sub
Private Sub CNedit_Click()
cname.Enabled = True
CFName.Enabled = False
CMName.Enabled = False
CDOB.Enabled = False
CGender.Enabled = False
CMobile.Enabled = False
CMail.Enabled = False
CLocation.Enabled = False
Caadh.Enabled = False
End Sub
Private Sub CNext_Click()
Dim srn As New ADODB.Recordset
Dim snre As String
Dim Snre1 As String
Dim Snre2 As String
cname.Enabled = False
CFName.Enabled = False
CMName.Enabled = False
CDOB.Enabled = False
CGender.Enabled = False
CMobile.Enabled = False
CMail.Enabled = False
CLocation.Enabled = False
Caadh.Enabled = False
rs.Open
Make_Connection
con.Open cn
srn.Open " select * from customer_data order by id", cn, adOpenDynamic, adLockOptimistic
If ccid.Text = "" Then
MsgBox ("Please Search any Record")
Else
snre = Trim(Right(ccid.Text, 11)) + 1
Snre1 = rs!bid + snre
f = 0
Do While srn.EOF <> True
If Snre1 = srn!Id Then
f = 1
ccid.Text = srn!Id
ctype.Text = srn!actype
cifsc.Text = srn!IFSC
cac.Text = srn!acno
cname.Text = srn!Name
CFName.Text = srn!FName
CMName.Text = srn!MName
CDOB.Text = srn!DOB
CGender.Text = srn!Gender
CMobile.Text = srn!Mobile
CMail.Text = srn!Email
CLocation.Text = srn!Address
CPic.Picture = LoadPicture(srn!PImg)
CPictext.Text = srn!PImg
CSign.Picture = LoadPicture(srn!sImg)
CSigntext.Text = srn!sImg
SearchBox.Text = ccid.Text
If IsNull(srn!aadhar) Then
Caadh.Text = ""
MsgBox "KYC Pending, Update Aadhar Data", vbInformation
Caadh.Enabled = True
Caadh.SetFocus
Else
Caadh.Text = srn!aadhar
End If
Exit Do
End If
srn.MoveNext
Loop
If f = 0 Then
Snre1 = (rs!bid & (snre - 1))
If ccid.Text = Snre1 Then
MsgBox "Serially Last Record, Search other by ID", vbInformation
Else
If ccid.Text <> Snre1 Then
MsgBox "You Can't See Next Record of other branch, but you can search individually", vbInformation
End If
End If
End If
End If
con.Close
rs.Close
End Sub
Private Sub CPicedit_Click()
cname.Enabled = False
CFName.Enabled = False
CMName.Enabled = False
CDOB.Enabled = False
CGender.Enabled = False
CMobile.Enabled = False
CMail.Enabled = False
CLocation.Enabled = False
Caadh.Enabled = False
CD3.Filter = "JPG File | *.jpg|GIF File|*.gif"
CD3.ShowOpen
If CD3.FileName <> "" Then
CPic.Picture = LoadPicture(CD3.FileName)
CPictext.Text = CD3.FileName
End If
End Sub
Private Sub CPrev_Click()
Dim srp As New ADODB.Recordset
Dim spre As String
Dim spre1 As String
cname.Enabled = False
CFName.Enabled = False
CMName.Enabled = False
CDOB.Enabled = False
CGender.Enabled = False
CMobile.Enabled = False
CMail.Enabled = False
CLocation.Enabled = False
Caadh.Enabled = False
rs.Open
Make_Connection
con.Open cn
srp.Open " select * from customer_data", cn, adOpenDynamic, adLockOptimistic
If ccid.Text = "" Then
MsgBox ("Please Search any Record")
Else
spre = Trim(Right(ccid.Text, 11)) - 1
spre1 = rs!bid + spre
f = 0
Do While srp.EOF <> True
If spre1 = srp!Id Then
f = 1
ccid.Text = srp!Id
ctype.Text = srp!actype
cifsc.Text = srp!IFSC
cac.Text = srp!acno
cname.Text = srp!Name
CFName.Text = srp!FName
CMName.Text = srp!MName
CDOB.Text = srp!DOB
CGender.Text = srp!Gender
CMobile.Text = srp!Mobile
CMail.Text = srp!Email
CLocation.Text = srp!Address
CPic.Picture = LoadPicture(srp!PImg)
CPictext.Text = srp!PImg
CSign.Picture = LoadPicture(srp!sImg)
CSigntext.Text = srp!sImg
SearchBox.Text = ccid.Text
If IsNull(srp!aadhar) Then
Caadh.Text = ""
MsgBox "KYC Pending, Update Aadhar Data", vbInformation
Caadh.Enabled = True
Caadh.SetFocus
Else
Caadh.Text = srp!aadhar
End If
Exit Do
End If
srp.MoveNext
Loop
If f = 0 Then
Snre1 = (rs!bid & (snre + 1))
If ccid.Text = Snre1 Then
MsgBox "This is First Record", vbInformation
Else
If ccid.Text <> Snre1 Then
MsgBox "You Can't See Record of other branch, but you can search individually", vbInformation
End If
End If
End If
End If
con.Close
rs.Close
End Sub
Private Sub Cross_Click()
Profile.Visible = False
Cross.Visible = False
LName.Visible = False
Pid.Visible = False
Pdoj.Visible = False
Pphone.Visible = False
Pmail.Visible = False
Paddress.Visible = False
PImg.Visible = False
FDPer.Visible = False
End Sub
Private Sub CSignedit_Click()
cname.Enabled = False
CFName.Enabled = False
CMName.Enabled = False
CDOB.Enabled = False
CGender.Enabled = False
CMobile.Enabled = False
CMail.Enabled = False
CLocation.Enabled = False
Caadh.Enabled = False
CD4.Filter = "JPG File | *.jpg|GIF File|*.gif"
CD4.ShowOpen
If CD4.FileName <> "" Then
CPic.Picture = LoadPicture(CD4.FileName)
CSigntext.Text = CD4.FileName
End If
End Sub
Private Sub CUpdate_Click()
Dim cdsearch As String
Dim cdsid As String
Dim cdnm As String
Dim cdfnm As String
Dim cdmnm As String
Dim cddob As String
Dim cdgdr As String
Dim cdmbl As String
Dim cdmail As String
Dim cdadrs As String
Dim cdpimg As String
Dim cdsimg As String
Dim cdaadhr As Integer
cdsearch = UCase(Trim(SearchBox.Text))
cdsid = UCase(Trim(ccid.Text))
cdnm = UCase(Trim(cname.Text))
cdfnm = UCase(Trim(CFName.Text))
cdmnm = UCase(Trim(CMName.Text))
cddob = UCase(Trim(CDOB.Text))
cdgdr = UCase(Trim(CGender.Text))
cdmbl = UCase(Trim(CMobile.Text))
cdmail = UCase(Trim(CMail.Text))
cdadrs = UCase(Trim(CLocation.Text))
cdpimg = Trim(CPictext.Text)
cdsimg = Trim(CSigntext.Text)
caadhr = Trim(Caadh.Text)
If ccid.Text = "" Then
MsgBox ("Search Customer First")
Else
If Len(CMobile.Text) > 10 Or Len(CMobile.Text) < 10 Then
MsgBox "Enter the phone number in 10 digits!", vbExclamation, ""
Cancel = True
CMobile.SetFocus
Else
Make_Connection
con.Open cn
con.Execute ("update customer_data set name='" & cdnm & "',fname='" & cdfnm & "',mname='" & cdmnm & "',gender='" & cdgdr & "',mobile='" & cdmbl & "',email='" & cdmail & "',address='" & cdadrs & "',simg='" & cdsimg & "',pimg='" & cdpimg & "',aadhar='" & caadhr & "' where id='" & cdsid & "' ")
con.Execute ("commit")
MsgBox ("A/C No. " + cac.Text + " Updated Successfully")
ccid.Text = ""
ctype.Text = ""
cifsc.Text = ""
cac.Text = ""
cname.Text = ""
CFName.Text = ""
CMName.Text = ""
CDOB.Text = ""
CGender.Text = ""
CMobile.Text = ""
CMail.Text = ""
CLocation.Text = ""
Caadh.Text = ""
CPic.Picture = Nothing
CSign.Picture = Nothing
cname.Enabled = False
CFName.Enabled = False
CMName.Enabled = False
CDOB.Enabled = False
CGender.Enabled = False
CMobile.Enabled = False
CMail.Enabled = False
CLocation.Enabled = False
Caadh.Enabled = False
con.Close
End If
End If
End Sub
Private Sub Current_Click()
FDPer.Visible = False
End Sub
Private Sub CustomerPage_Click()
SearchBox.ToolTipText = "Enter ID"
ccid.Text = ""
ctype.Text = ""
cifsc.Text = ""
cac.Text = ""
CPic.Picture = LoadPicture()
CSign.Picture = LoadPicture()
cname.Text = ""
CFName.Text = ""
CMName.Text = ""
CDOB.Text = ""
CGender.Text = ""
CMobile.Text = ""
CMail.Text = ""
CLocation.Text = ""
Caadh.Text = ""
Profile.Visible = False
Cross.Visible = False
LName.Visible = False
Pid.Visible = False
Pdoj.Visible = False
Pphone.Visible = False
Pmail.Visible = False
Paddress.Visible = False
PImg.Visible = False
ACancel.Visible = False
LOpen.Visible = False
FDPer.Visible = False
SearchTran.Visible = False
BankBal.Visible = False
Stdep.Visible = False
Stwid.Visible = False
Sttra.Visible = False
Sbrnm.Visible = False
Scod.Visible = False
Sifs.Visible = False
Sintr.Visible = False
Sloc.Visible = False
TransactionList.Visible = False
WithdrawBTN.Visible = False
DepositBTN.Visible = False
SCustom.Visible = False
Bal.Visible = False
wamt.Visible = False
Wbtn.Visible = False
StatementList.Visible = False
Saving.Visible = False
Current.Visible = False
FD.Visible = False
CId.Visible = False
OBal.Visible = False
OName.Visible = False
FName.Visible = False
MName.Visible = False
DOB.Visible = False
DTPicker1.Visible = False
Gender.Visible = False
Male.Visible = False
Female.Visible = False
Transgender.Visible = False
Mobile.Visible = False
Email.Visible = False
Address.Visible = False
PLogout.Visible = False
LogYes.Visible = False
LogNo.Visible = False
Hifsc.Visible = False
HomeCover.Visible = False
BCode.Visible = False
Hmbl.Visible = False
Hmail.Visible = False
Haddress.Visible = False
Twitter.Visible = False
Linkedin.Visible = False
facebook.Visible = False
Instagram.Visible = False
Website.Visible = False
Download1.Visible = False
Download2.Visible = False
APImg.Visible = False
UploadPImg.Visible = False
ASignImg.Visible = False
ASignUpload.Visible = False
APimgtext.Visible = False
ASignText.Visible = False
Enm.Visible = False
Enm1.Visible = False
Enm2.Visible = False
Enm3.Visible = False
Enm4.Visible = False
Enm5.Visible = False
Enm6.Visible = False
Enm7.Visible = False
TBD.Visible = False
TBD1.Visible = False
TBD2.Visible = False
TBD3.Visible = False
SEmpBtn.Visible = False
EmpNm.Visible = False
EmpPosition.Visible = False
EmpDOJ.Visible = False
EmpEID.Visible = False
EmpPhone.Visible = False
EmpMail.Visible = False
EmpSal.Visible = False
EmpAdd.Visible = False
SearchS.Visible = False
SObal.Visible = False
STDp.Visible = False
STWd.Visible = False
SCbal.Visible = False
SAcNo.Visible = False
SAtyp.Visible = False
SAIfsc.Visible = False
SIra.Visible = False
SNom.Visible = False
SearchBox.Visible = True
SearchCustomer.Visible = True
CPrev.Visible = True
CNext.Visible = True
CUpdate.Visible = True
CDel.Visible = True
CPic.Visible = True
CSign.Visible = True
CPicedit.Visible = True
CSignedit.Visible = True
ccid.Visible = True
ctype.Visible = True
cifsc.Visible = True
cac.Visible = True
cname.Visible = True
CNedit.Visible = True
CFName.Visible = True
CFedit.Visible = True
CMName.Visible = True
CMedit.Visible = True
CDOB.Visible = True
CDedit.Visible = True
CGender.Visible = True
CGedit.Visible = True
CMobile.Visible = True
CMoedit.Visible = True
CMail.Visible = True
CMaedit.Visible = True
CLocation.Visible = True
CLoedit.Visible = True
Caadh.Visible = True
Caadedit.Visible = True
Set Me.Picture = Me.CustomerImg
End Sub
Private Sub DepositBTN_Click()
Dim sfres As New ADODB.Recordset
Dim wduid As String
Dim dwduid As String
Dim wdifsc As String
Dim wdacno As String
Dim wdid As String
Dim wdname As String
Dim wdmobile As String
Dim wddate As String
Dim wddebit As String
Dim wdcredit As String
Dim wdbalance As String
Dim Vgbk As String
Dim tdep As String
Dim tmode As String
Dim vtdep1 As String
Dim dtypfi As String
dtypfi = "Credit"
Vgbk = ccid.Text
tmode = "Cash"
If ccid.Text = "" Then
MsgBox ("Please Search Customer")
SearchBox.SetFocus
Else
If wamt.Text = "" Then
MsgBox ("Please Enter Amount")
wamt.SetFocus
Else
Make_Connection
con.Open cn
sfres.Open " select * from customer_data where acno='" & Vgbk & "'", cn, adOpenDynamic, adLockOptimistic
banbal.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
wdifsc = sfres!IFSC
wdacno = sfres!acno
wdid = sfres!Id
wdname = sfres!Name
wdmobile = sfres!Mobile
wddate = Now()
wddebit = "0"
wdcredit = wamt.Text
wdbalance = Trim(sfres!Balance + wamt.Text)
If IsNull(banbal!bank_bal) Then
con.Execute ("update admin_login set bank_bal= 0")
con.Execute ("commit")
banbal.Close
banbal.Open " select bank_bal from admin_login", cn, adOpenDynamic, adLockOptimistic
bbala = Trim(banbal!bank_bal + wamt.Text)
Else
bbala = Trim(banbal!bank_bal + wamt.Text)
End If
wdtid = sfres!ltid + 1
tdep = Trim(sfres!tdeposit + wamt.Text)
con.Execute (" ALTER SESSION SET NLS_DATE_FORMAT='dd-mm-yyyy hh:mi:ss AM'")
con.Execute ("insert into customer_statement (ifsc,acno,id,name,mobile,dates,credit,debit,balance,tid,tmode,ttype)values('" & wdifsc & "','" & wdacno & "','" & wdid & "','" & wdname & "','" & wdmobile & "','" & wddate & "','" & wdcredit & "','" & wddebit & "','" & wdbalance & "','" & wdtid & "','" & tmode & "','" & dtypfi & "')")
con.Execute ("insert into Bank_Transaction (dates,tid,ttype,tmode,id,name,amount,acno,ifsc)values('" & wddate & "','" & wdtid & "','" & dtypfi & "','" & tmode & "','" & wdid & "','" & wdname & "','" & wdcredit & "','" & wdacno & "','" & wdifsc & "')")
con.Execute ("commit")
con.Execute ("update admin_login set bank_bal='" & bbala & "'")
con.Execute ("update customer_data set ltid='" & wdtid & "',balance='" & wdbalance & "',tdeposit='" & tdep & "' where id='" & wdid & "' ")
con.Execute ("commit")
vtdep1 = Trim(banbal!tdeposit + wamt.Text)
con.Execute ("update admin_login set tdeposit= '" & vtdep1 & "'")
con.Execute ("commit")
MsgBox ("Deposited Successfully, Your Balance is " + wdbalance)
Bal.Caption = wdbalance
wamt.Text = ""
banbal.Close
con.Close
End If
End If
End Sub
Private Sub DepositPage_Click()
Set Me.Picture = Me.DepositImg
SearchBox.ToolTipText = "Enter ID"
ccid.Text = ""
ctype.Text = ""
cifsc.Text = ""
cac.Text = ""
Bal.Caption = ""
CPic.Picture = LoadPicture()
CSign.Picture = LoadPicture()
Profile.Visible = False
Cross.Visible = False
LName.Visible = False
Pid.Visible = False
Pdoj.Visible = False
Pphone.Visible = False
Pmail.Visible = False
Paddress.Visible = False
PImg.Visible = False
ACancel.Visible = False
LOpen.Visible = False
WithdrawBTN.Visible = False
DepositBTN.Visible = True
SearchTran.Visible = False
BankBal.Visible = False
Stdep.Visible = False
Stwid.Visible = False
Sttra.Visible = False
Sbrnm.Visible = False
Scod.Visible = False
Sifs.Visible = False
Sintr.Visible = False
Sloc.Visible = False
TransactionList.Visible = False
SCustom.Visible = True
Bal.Visible = True
wamt.Visible = True
Wbtn.Visible = False
StatementList.Visible = False
Saving.Visible = False
Current.Visible = False
FD.Visible = False
CId.Visible = False
OBal.Visible = False
OName.Visible = False
FName.Visible = False
MName.Visible = False
DOB.Visible = False
DTPicker1.Visible = False
Gender.Visible = False
Male.Visible = False
Female.Visible = False
Transgender.Visible = False
Mobile.Visible = False
Email.Visible = False
Address.Visible = False
PLogout.Visible = False
LogYes.Visible = False
LogNo.Visible = False
Hifsc.Visible = False
HomeCover.Visible = False
BCode.Visible = False
Hmbl.Visible = False
Hmail.Visible = False
Haddress.Visible = False
Twitter.Visible = False
Linkedin.Visible = False
facebook.Visible = False
Instagram.Visible = False
Website.Visible = False
Download1.Visible = False
Download2.Visible = False
APImg.Visible = False
UploadPImg.Visible = False
ASignImg.Visible = False
ASignUpload.Visible = False
APimgtext.Visible = False
ASignText.Visible = False
FDPer.Visible = False
SearchS.Visible = False
SObal.Visible = False
STDp.Visible = False
STWd.Visible = False
SCbal.Visible = False
SAcNo.Visible = False
SAtyp.Visible = False
SAIfsc.Visible = False
SIra.Visible = False
SNom.Visible = False
SearchBox.Visible = True
SearchCustomer.Visible = False
CPrev.Visible = False
CNext.Visible = False
CUpdate.Visible = False
CDel.Visible = False
CPic.Visible = True
CSign.Visible = True
CPicedit.Visible = False
CSignedit.Visible = False
ccid.Visible = True
ctype.Visible = True
cifsc.Visible = True
cac.Visible = True
cname.Visible = False
CNedit.Visible = False
CFName.Visible = False
CFedit.Visible = False
CMName.Visible = False
CMedit.Visible = False
CDOB.Visible = False
CDedit.Visible = False
CGender.Visible = False
CGedit.Visible = False
CMobile.Visible = False
CMoedit.Visible = False
CMail.Visible = False
CMaedit.Visible = False
CLocation.Visible = False
CLoedit.Visible = False
Caadh.Visible = False
Caadedit.Visible = False
Enm.Visible = False
Enm1.Visible = False
Enm2.Visible = False
Enm3.Visible = False
Enm4.Visible = False
Enm5.Visible = False
Enm6.Visible = False
Enm7.Visible = False
TBD.Visible = False
TBD1.Visible = False
TBD2.Visible = False
TBD3.Visible = False
SEmpBtn.Visible = False
EmpNm.Visible = False
EmpPosition.Visible = False
EmpDOJ.Visible = False
EmpEID.Visible = False
EmpPhone.Visible = False
EmpMail.Visible = False
EmpSal.Visible = False
EmpAdd.Visible = False
End Sub
Private Sub DOB_Click()
DOB.Text = DTPicker1.Value
End Sub
Private Sub DOB_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
DOB_Click
End If
End Sub
Private Sub Download1_Click()
Shell ("explorer https://www.sbi.co.in/documents/16012/1557541/121120-Account+Opening+Form+for+Individuals.pdf")
End Sub
Private Sub Download2_Click()
Shell ("explorer https://www.bbkindia.com/pdf/form60.pdf")
End Sub
Private Sub DTPicker1_Click()
DOB.Text = DTPicker1.Value
End Sub
Private Sub EmpAdd_Change()
If EmpAdd.Locked = False Then
EmpAdd.FontBold = True
End If
End Sub
Private Sub EmpDel_Click()
Dim empids As String
empids = EmpEID.Text
If EmpEID.Text = "" Then
MsgBox ("Search Employee First")
Else
answer = MsgBox("Are you sure you want to close account of " & vbCrLf & "'" & cname.Text & "'", vbCritical + vbYesNo, "Warning")
If answer = vbYes Then
Make_Connection
con.Open cn
con.Execute ("delete from admin_login where id='" & empids & "' ")
con.Execute ("commit")
MsgBox ("Employee ID " + EmpEID.Text + " Shifted to Alumni")
EmpNm.Text = ""
EmpPosition.Text = ""
EmpDOJ.Text = ""
EmpEID.Text = ""
EmpPhone.Text = ""
EmpMail.Text = ""
EmpSal.Text = ""
EmpAdd.Text = ""
SearchBox.SetFocus
EmpNm.Locked = True
EmpPosition.Locked = True
EmpDOJ.Locked = True
EmpEID.Locked = True
EmpPhone.Locked = True
EmpMail.Locked = True
EmpSal.Locked = True
EmpAdd.Locked = True
con.Close
EmployeePage_Click
End If
End If
End Sub
Private Sub EmpEdit_Click()
If EmpEID.Text = "" Then
MsgBox ("Search Employee First")
Else
EmpNm.Locked = False
EmpNm.SetFocus
EmpPosition.Locked = False
EmpPhone.Locked = False
EmpMail.Locked = False
EmpSal.Locked = False
EmpAdd.Locked = False
End If
End Sub
Private Sub EmployeePage_Click()
Set Me.Picture = Me.EmployeeImg
SearchBox.ToolTipText = "Enter Employee ID"
Profile.Visible = False
Cross.Visible = False
LName.Visible = False
Pid.Visible = False
Pdoj.Visible = False
Pphone.Visible = False
Pmail.Visible = False
Paddress.Visible = False
PImg.Visible = False
ACancel.Visible = False
LOpen.Visible = False
FDPer.Visible = False
SearchTran.Visible = False
BankBal.Visible = False
Stdep.Visible = False
Stwid.Visible = False
Sttra.Visible = False
Sbrnm.Visible = False
Scod.Visible = False
Sifs.Visible = False
Sintr.Visible = False
Sloc.Visible = False
TransactionList.Visible = False
WithdrawBTN.Visible = False
DepositBTN.Visible = False
SCustom.Visible = False
Bal.Visible = False
wamt.Visible = False
Wbtn.Visible = False
StatementList.Visible = False
Saving.Visible = False
Current.Visible = False
FD.Visible = False
CId.Visible = False
OBal.Visible = False
OName.Visible = False
FName.Visible = False
MName.Visible = False
DOB.Visible = False
DTPicker1.Visible = False
Gender.Visible = False
Male.Visible = False
Female.Visible = False
Transgender.Visible = False
Mobile.Visible = False
Email.Visible = False
Address.Visible = False
PLogout.Visible = False
LogYes.Visible = False
LogNo.Visible = False
Hifsc.Visible = False
HomeCover.Visible = False
BCode.Visible = False
Hmbl.Visible = False
Hmail.Visible = False
Haddress.Visible = False
Twitter.Visible = False
Linkedin.Visible = False
facebook.Visible = False
Instagram.Visible = False
Website.Visible = False
Download1.Visible = False
Download2.Visible = False
APImg.Visible = False
UploadPImg.Visible = False
ASignImg.Visible = False
ASignUpload.Visible = False
APimgtext.Visible = False
ASignText.Visible = False
SearchBox.Visible = True
SearchCustomer.Visible = False
CPrev.Visible = False
CNext.Visible = False
CUpdate.Visible = False
CDel.Visible = False
CPic.Visible = False
CSign.Visible = False
CPicedit.Visible = False
CSignedit.Visible = False
ccid.Visible = False
ctype.Visible = False
cifsc.Visible = False
cac.Visible = False
cname.Visible = False
CNedit.Visible = False
CFName.Visible = False
CFedit.Visible = False
CMName.Visible = False
CMedit.Visible = False
CDOB.Visible = False
CDedit.Visible = False
CGender.Visible = False
CGedit.Visible = False
CMobile.Visible = False
CMoedit.Visible = False
CMail.Visible = False
CMaedit.Visible = False
CLocation.Visible = False
CLoedit.Visible = False
Caadh.Visible = False
Caadedit.Visible = False
SearchS.Visible = False
SObal.Visible = False
STDp.Visible = False
STWd.Visible = False
SCbal.Visible = False
SAcNo.Visible = False
SAtyp.Visible = False
SAIfsc.Visible = False
SIra.Visible = False
SNom.Visible = False
Enm.Visible = True
Enm1.Visible = True
Enm2.Visible = True
Enm3.Visible = True
Enm4.Visible = True
Enm5.Visible = True
Enm6.Visible = True
Enm7.Visible = True
TBD.Visible = True
TBD1.Visible = True
TBD2.Visible = True
TBD3.Visible = True
SEmpBtn.Visible = True
EmpNm.Visible = True
EmpPosition.Visible = True
EmpDOJ.Visible = True
EmpEID.Visible = True
EmpPhone.Visible = True
EmpMail.Visible = True
EmpSal.Visible = True
EmpAdd.Visible = True
EmpNew.Visible = True
EmpEdit.Visible = True
EmpDel.Visible = True
EmpSave.Visible = True
Dim esrp As New ADODB.Recordset
Dim esrp1 As New ADODB.Recordset
Dim esrp2 As New ADODB.Recordset
Dim esrp3 As New ADODB.Recordset
Dim esrp4 As New ADODB.Recordset
Dim esrp5 As New ADODB.Recordset
Dim esrp6 As New ADODB.Recordset
Dim esrp7 As New ADODB.Recordset
Dim edsrp As New ADODB.Recordset
Dim edsrp1 As New ADODB.Recordset
Dim edsrp2 As New ADODB.Recordset
Dim evi As String
Dim evi1 As String
Dim evi2 As String
Dim evi3 As String
Dim nu As Integer
Dim nu1 As Integer
Dim nu2 As Integer
Dim nu3 As Integer
Dim nu4 As Integer
Dim nu5 As Integer
Dim nu6 As Integer
Dim nu7 As Integer
EmpNm.Text = ""
EmpPosition.Text = ""
EmpDOJ.Text = ""
EmpEID.Text = ""
EmpPhone.Text = ""
EmpMail.Text = ""
EmpSal.Text = ""
EmpAdd.Text = ""
Make_Connection
con.Open cn
Enm.Clear
Enm1.Clear
Enm2.Clear
Enm3.Clear
Enm4.Clear
Enm5.Clear
Enm6.Clear
Enm7.Clear
esrp.CursorLocation = adUseClient
edsrp.CursorLocation = adUseClient
edsrp1.CursorLocation = adUseClient
edsrp2.CursorLocation = adUseClient
esrp.Open "SELECT name From admin_login", cn, adOpenKeyset, adLockOptimistic, adCmdText
esrp1.Open "SELECT post From admin_login", cn, adOpenDynamic, adLockUnspecified
esrp2.Open "SELECT doj From admin_login", cn, adOpenDynamic, adLockUnspecified
esrp3.Open "SELECT id From admin_login", cn, adOpenDynamic, adLockUnspecified
esrp4.Open "SELECT phone From admin_login", cn, adOpenDynamic, adLockUnspecified
esrp5.Open "SELECT email From admin_login", cn, adOpenDynamic, adLockUnspecified
esrp6.Open "SELECT salary From admin_login", cn, adOpenDynamic, adLockUnspecified
esrp7.Open "SELECT address From admin_login", cn, adOpenDynamic, adLockUnspecified
edsrp.Open "SELECT distinct branch_pincode from admin_login", cn, adOpenDynamic, adLockUnspecified
evi1 = edsrp.RecordCount
edsrp1.Open "SELECT id from customer_data", cn, adOpenDynamic, adLockUnspecified
evi2 = edsrp1.RecordCount
edsrp2.Open "SELECT distinct branch_pincode from admin_login", cn, adOpenDynamic, adLockUnspecified
evi3 = edsrp2.RecordCount
evi = esrp.RecordCount
esrp.MoveFirst
esrp1.MoveFirst
esrp2.MoveFirst
esrp3.MoveFirst
esrp4.MoveFirst
esrp5.MoveFirst
esrp6.MoveFirst
esrp7.MoveFirst
TBD.Caption = evi1
TBD1.Caption = evi
TBD2.Caption = evi2
TBD3.Caption = evi3
nu = 1
Do While nu <= evi
Enm.AddItem esrp.GetString(adClipString, 1)
Enm.AddItem vbNewLine
nu = nu + 1
Loop
nu1 = 1
Do While nu1 <= evi
Enm1.AddItem esrp1.GetString(adClipString, 1)
Enm1.AddItem vbNewLine
nu1 = nu1 + 1
Loop
nu2 = 1
Do While nu2 <= evi
Enm2.AddItem esrp2.GetString(adClipString, 1)
Enm2.AddItem vbNewLine
nu2 = nu2 + 1
Loop
nu3 = 1
Do While nu3 <= evi
Enm3.AddItem esrp3.GetString(adClipString, 1)
Enm3.AddItem vbNewLine
nu3 = nu3 + 1
Loop
nu4 = 1
Do While nu4 <= evi
Enm4.AddItem esrp4.GetString(adClipString, 1)
Enm4.AddItem vbNewLine
nu4 = nu4 + 1
Loop
nu5 = 1
Do While nu5 <= evi
Enm5.AddItem esrp5.GetString(adClipString, 1)
Enm5.AddItem vbNewLine
nu5 = nu5 + 1
Loop
nu6 = 1
Do While nu6 <= evi
Enm6.AddItem esrp6.GetString(adClipString, 1)
Enm6.AddItem vbNewLine
nu6 = nu6 + 1
Loop
nu7 = 1
Do While nu7 <= evi
Enm7.AddItem esrp7.GetString(adClipString, 1)
Enm7.AddItem vbNewLine
nu7 = nu7 + 1
Loop
con.Close
End Sub
Private Sub EmpMail_Change()
If EmpMail.Locked = False Then
EmpMail.FontBold = True
End If
End Sub
Private Sub EmpNm_Click()
If EmpNm.Locked = False Then
EmpNm.FontBold = True
End If
End Sub
Private Sub EmpPhone_Change()
If EmpPhone.Locked = False Then
EmpPhone.FontBold = True
End If
End Sub
Private Sub EmpPhone_KeyPress(KeyAscii As Integer)
If KeyAscii <> 48 And KeyAscii <> 49 And KeyAscii <> 50 And KeyAscii <> 51 And KeyAscii <> 52 And KeyAscii <> 53 And KeyAscii <> 54 And KeyAscii <> 55 And KeyAscii <> 56 And KeyAscii <> 57 And KeyAscii <> 8 And KeyAscii <> 13 Then
KeyAscii = 0
MsgBox ("Please Enter Numbers Only")
End If
End Sub
Private Sub EmpSal_Change()
If EmpSal.Locked = False Then
EmpSal.FontBold = True
End If
End Sub
Private Sub EmpSal_KeyPress(KeyAscii As Integer)
If KeyAscii <> 48 And KeyAscii <> 49 And KeyAscii <> 50 And KeyAscii <> 51 And KeyAscii <> 52 And KeyAscii <> 53 And KeyAscii <> 54 And KeyAscii <> 55 And KeyAscii <> 56 And KeyAscii <> 57 And KeyAscii <> 8 And KeyAscii <> 13 And KeyAscii <> 46 Then
KeyAscii = 0
MsgBox ("Please Enter Numbers Only")
End If
End Sub
Private Sub EmpSave_Click()
Dim empsnm As String
Dim empspos As String
Dim empsdoj As String
Dim empseid As String
Dim empsphn As String
Dim empsmail As String
Dim empssal As String
Dim empsadr As String
empsnm = UCase(Trim(EmpNm.Text))
empspos = UCase(Trim(EmpPosition.Text))
empsdoj = UCase(Trim(EmpDOJ.Text))
empseid = UCase(Trim(EmpEID.Text))
empsphn = UCase(Trim(EmpPhone.Text))
empsmail = UCase(Trim(EmpMail.Text))
empssal = UCase(Trim(EmpSal.Text))
empsadr = UCase(Trim(EmpAdd.Text))
If EmpEID.Text = "" Then
MsgBox ("Search Employee First")
Else
Make_Connection
con.Open cn
If Len(EmpPhone.Text) > 10 Or Len(EmpPhone.Text) < 10 Then
MsgBox "Enter the phone number in 10 digits!", vbExclamation, ""
Cancel = True
EmpPhone.SetFocus
Else
con.Execute ("update admin_login set name='" & empsnm & "',post='" & empspos & "',phone='" & empsphn & "',email='" & empsmail & "',salary='" & empssal & "',address='" & empsadr & "' where id='" & empseid & "' ")
con.Execute ("commit")
MsgBox ("Employee Id " + EmpEID.Text + " Updated Successfully")
EmpNm.Text = ""
EmpPosition.Text = ""
EmpDOJ.Text = ""
EmpEID.Text = ""
EmpPhone.Text = ""
EmpMail.Text = ""
EmpSal.Text = ""
EmpAdd.Text = ""
SearchBox.SetFocus
EmpNm.Locked = True
EmpPosition.Locked = True
EmpDOJ.Locked = True
EmpEID.Locked = True
EmpPhone.Locked = True
EmpMail.Locked = True
EmpSal.Locked = True
EmpAdd.Locked = True
End If
con.Close
End If
End Sub
Private Sub Form_Load()
PlaySound App.Path & "\Welcome_To_SA_Bank.wav"
Dim kk As String
Dim st1 As String
HomeCover.Visible = True
Hifsc.Visible = True
BCode.Visible = True
Hmbl.Visible = True
Hmail.Visible = True
Haddress.Visible = True
Twitter.Visible = True
Linkedin.Visible = True
facebook.Visible = True
Instagram.Visible = True
Website.Visible = True
Download1.Visible = True
Download2.Visible = True
Make_Connection
con.Open cn
If Login.Combo1.Text = "Admin" Then
rs.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
kk = LCase(Trim(Login.Id.Text))
rs.MoveFirst
f = 0
Do While rs.EOF <> True
st1 = LCase(Trim(rs!Id))
If kk = st1 Then
f = 1
Label1.Caption = "Welcome " + StrConv(rs!Name, vbProperCase)
LName.Caption = rs!Name
Label5.Caption = rs!Branch_name
Pid.Caption = rs!Id
Pdoj.Caption = rs!doj
Pphone.Caption = rs!phone
Pmail.Caption = rs!Email
Paddress.Caption = rs!Address
Hifsc.Caption = rs!IFSC
BCode.Caption = rs!bid
Hmbl.Caption = rs!phone
Hmail.Caption = rs!Email
Haddress.Caption = rs!Address
Twitter.Caption = rs!Twitter
Linkedin.Caption = rs!Linkedin
facebook.Caption = rs!facebook
Instagram.Caption = rs!Instagram
Website.Caption = rs!Website
Exit Do
End If
rs.MoveNext
Loop
If f = 0 Then
Label1.Caption = "No Record"
End If
rs.Close
Else
If Login.Combo1.Text = "Customer" Then
zo.Open " select * from customer_data", cn, adOpenDynamic, adLockOptimistic
kk = LCase(Trim(Login.Id.Text))
zo.MoveFirst
f = 0
Do While rs.EOF <> True
st1 = LCase(Trim(rs!Id))
If kk = st1 Then
f = 1
Label1.Caption = "Welcome " + zo!Name
LName.Caption = rs!Name
Label5.Caption = zo!Branch_name
Pid.Caption = zo!Id
Pdoj.Caption = zo!doj
Pphone.Caption = zo!phone
Pmail.Caption = zo!Email
Paddress.Caption = zo!Address
Hifsc.Caption = zo!IFSC
Exit Do
End If
zo.MoveNext
Loop
If f = 0 Then
Label1.Caption = "No Record"
End If
rs.Close
End If
End If
con.Close
End Sub
Private Sub Date_Timer()
Date_Time.Caption = Now
End Sub
Private Sub HomePage_Click()
Profile.Visible = False
Cross.Visible = False
LName.Visible = False
Pid.Visible = False
Pdoj.Visible = False
Pphone.Visible = False
Pmail.Visible = False
Paddress.Visible = False
PImg.Visible = False
ACancel.Visible = False
LOpen.Visible = False
FDPer.Visible = False
SCustom.Visible = False
Bal.Visible = False
wamt.Visible = False
Wbtn.Visible = False
Saving.Visible = False
Current.Visible = False
FD.Visible = False
CId.Visible = False
OBal.Visible = False
OName.Visible = False
FName.Visible = False
MName.Visible = False
DOB.Visible = False
DTPicker1.Visible = False
Gender.Visible = False
Male.Visible = False
Female.Visible = False
Transgender.Visible = False
Mobile.Visible = False
Email.Visible = False
Address.Visible = False
PLogout.Visible = False
LogYes.Visible = False
LogNo.Visible = False
APImg.Visible = False
UploadPImg.Visible = False
ASignImg.Visible = False
ASignUpload.Visible = False
APimgtext.Visible = False
ASignText.Visible = False
SearchBox.Visible = False
SearchCustomer.Visible = False
CPrev.Visible = False
CNext.Visible = False
CUpdate.Visible = False
CDel.Visible = False
CPic.Visible = False
CSign.Visible = False
CPicedit.Visible = False
CSignedit.Visible = False
ccid.Visible = False
ctype.Visible = False
cifsc.Visible = False
cac.Visible = False
cname.Visible = False
CNedit.Visible = False
CFName.Visible = False
CFedit.Visible = False
CMName.Visible = False
CMedit.Visible = False
CDOB.Visible = False
CDedit.Visible = False
CGender.Visible = False
CGedit.Visible = False
CMobile.Visible = False
CMoedit.Visible = False
CMail.Visible = False
CMaedit.Visible = False
CLocation.Visible = False
CLoedit.Visible = False
Caadh.Visible = False
Caadedit.Visible = False
WithdrawBTN.Visible = False
DepositBTN.Visible = False
StatementList.Visible = False
SearchTran.Visible = False
BankBal.Visible = False
Stdep.Visible = False
Stwid.Visible = False
Sttra.Visible = False
Sbrnm.Visible = False
Scod.Visible = False
Sifs.Visible = False
Sintr.Visible = False
Sloc.Visible = False
TransactionList.Visible = False
Enm.Visible = False
Enm1.Visible = False
Enm2.Visible = False
Enm3.Visible = False
Enm4.Visible = False
Enm5.Visible = False
Enm6.Visible = False
Enm7.Visible = False
TBD.Visible = False
TBD1.Visible = False
TBD2.Visible = False
TBD3.Visible = False
SEmpBtn.Visible = False
EmpNm.Visible = False
EmpPosition.Visible = False
EmpDOJ.Visible = False
EmpEID.Visible = False
EmpPhone.Visible = False
EmpMail.Visible = False
EmpSal.Visible = False
EmpAdd.Visible = False
SearchS.Visible = False
SObal.Visible = False
STDp.Visible = False
STWd.Visible = False
SCbal.Visible = False
SAcNo.Visible = False
SAtyp.Visible = False
SAIfsc.Visible = False
SIra.Visible = False
SNom.Visible = False
HomeCover.Visible = True
Hifsc.Visible = True
BCode.Visible = True
Hmbl.Visible = True
Hmail.Visible = True
Haddress.Visible = True
Twitter.Visible = True
Linkedin.Visible = True
facebook.Visible = True
Instagram.Visible = True
Website.Visible = True
Download1.Visible = True
Download2.Visible = True
Set Me.Picture = Me.HomeImg
End Sub
Private Sub LogNo_Click()
PLogout.Visible = False
HomeCover.Visible = True
Hifsc.Visible = True
BCode.Visible = True
Hmbl.Visible = True
Hmail.Visible = True
Haddress.Visible = True
Twitter.Visible = True
Linkedin.Visible = True
facebook.Visible = True
Instagram.Visible = True
Website.Visible = True
Download1.Visible = True
Download2.Visible = True
Set Me.Picture = Me.HomeImg
End Sub
Private Sub LogoutPage_Click()
Profile.Visible = False
Cross.Visible = False
LName.Visible = False
Pid.Visible = False
Pdoj.Visible = False
Pphone.Visible = False
Pmail.Visible = False
Paddress.Visible = False
PImg.Visible = False
ACancel.Visible = False
LOpen.Visible = False
FDPer.Visible = False
WithdrawBTN.Visible = False
DepositBTN.Visible = False
StatementList.Visible = False
SearchTran.Visible = False
BankBal.Visible = False
Stdep.Visible = False
Stwid.Visible = False
Sttra.Visible = False
Sbrnm.Visible = False
Scod.Visible = False
Sifs.Visible = False
Sintr.Visible = False
Sloc.Visible = False
TransactionList.Visible = False
SCustom.Visible = False
Bal.Visible = False
wamt.Visible = False
Wbtn.Visible = False
Saving.Visible = False
Current.Visible = False
FD.Visible = False
CId.Visible = False
OBal.Visible = False
OName.Visible = False
FName.Visible = False
MName.Visible = False
DOB.Visible = False
DTPicker1.Visible = False
Gender.Visible = False
Male.Visible = False
Female.Visible = False
Transgender.Visible = False
Mobile.Visible = False
Email.Visible = False
Address.Visible = False
PLogout.Visible = True
LogYes.Visible = True
LogNo.Visible = True
Hifsc.Visible = False
HomeCover.Visible = False
BCode.Visible = False
Hmbl.Visible = False
Hmail.Visible = False
Haddress.Visible = False
Twitter.Visible = False
Linkedin.Visible = False
facebook.Visible = False
Instagram.Visible = False
Website.Visible = False
Download1.Visible = False
Download2.Visible = False
APImg.Visible = False
UploadPImg.Visible = False
ASignImg.Visible = False
ASignUpload.Visible = False
APimgtext.Visible = False
ASignText.Visible = False
SearchBox.Visible = False
SearchCustomer.Visible = False
CPrev.Visible = False
CNext.Visible = False
CUpdate.Visible = False
CDel.Visible = False
CPic.Visible = False
CSign.Visible = False
CPicedit.Visible = False
CSignedit.Visible = False
ccid.Visible = False
ctype.Visible = False
cifsc.Visible = False
cac.Visible = False
cname.Visible = False
CNedit.Visible = False
CFName.Visible = False
CFedit.Visible = False
CMName.Visible = False
CMedit.Visible = False
CDOB.Visible = False
CDedit.Visible = False
CGender.Visible = False
CGedit.Visible = False
CMobile.Visible = False
CMoedit.Visible = False
CMail.Visible = False
CMaedit.Visible = False
CLocation.Visible = False
CLoedit.Visible = False
Caadh.Visible = False
Caadedit.Visible = False
Enm.Visible = False
Enm1.Visible = False
Enm2.Visible = False
Enm3.Visible = False
Enm4.Visible = False
Enm5.Visible = False
Enm6.Visible = False
Enm7.Visible = False
TBD.Visible = False
TBD1.Visible = False
TBD2.Visible = False
TBD3.Visible = False
SEmpBtn.Visible = False
EmpNm.Visible = False
EmpPosition.Visible = False
EmpDOJ.Visible = False
EmpEID.Visible = False
EmpPhone.Visible = False
EmpMail.Visible = False
EmpSal.Visible = False
EmpAdd.Visible = False
SearchS.Visible = False
SObal.Visible = False
STDp.Visible = False
STWd.Visible = False
SCbal.Visible = False
SAcNo.Visible = False
SAtyp.Visible = False
SAIfsc.Visible = False
SIra.Visible = False
SNom.Visible = False
End Sub
Private Sub LogYes_Click()
Unload Me
Login.Show
End Sub
Private Sub LOpen_Click()
Dim dtype As String
Dim did As String
Dim dnm As String
Dim dfnm As String
Dim dmnm As String
Dim ddob As String
Dim dgdr As String
Dim dmbl As String
Dim dmail As String
Dim dadrs As String
Dim dbranch As String
Dim difsc As String
Dim dacn As String
Dim dobal As String
Dim dpimg As String
Dim dsimg As String
Dim dltid As String
Dim aodat As String
Dim adeb As String
Dim intr As String
Dim fdpd As String
Dim nyhc As String
Dim vtdep As String
Dim otypfi As String
otypfi = "Credit"
If Saving.Value = True Then
dtype = Saving.Caption
FDPer.Text = " "
Else
If Current.Value = True Then
dtype = Current.Caption
FDPer.Text = " "
Else
If FD.Value = True Then
dtype = FD.Caption
FDPer.Visible = True
End If
End If
End If
dacn = Trim(acno.Text)
did = UCase(Trim(CId.Text))
dobal = Trim(OBal.Text)
dnm = UCase(Trim(OName.Text))
dfnm = UCase(Trim(FName.Text))
dmnm = UCase(Trim(MName.Text))
ddob = Trim(DOB.Text)
dpimg = Trim(APimgtext.Text)
dsimg = Trim(ASignText.Text)
dltid = Trim(dacn + "1")
adeb = "0"
aodat = Trim(Now())
fdpd = Trim(FDPer.Text)
nyhc = "OBal, Cash"
If Male.Value = True Then
dgdr = Male.Caption
Else
If Female.Value = True Then
dgdr = Female.Caption
Else
If Transgender.Value = True Then
dgdr = Transgender.Caption
End If
End If
End If
If Saving.Value = True Then
intr = "4.00%"
Else
If Current.Value = True Then
intr = "2.50%"
Else
If FD.Value = True Then
intr = "6.00%"
End If
End If
End If
dmbl = (Trim(Mobile.Text))
dmail = UCase(Trim(Email.Text))
dadrs = UCase(Trim(Address.Text))
dbranch = UCase(Trim(Label5.Caption))
difsc = UCase(Trim(Hifsc.Caption))
Make_Connection
con.Open cn
If Saving.Value = False Xor Current.Value = False Xor FD.Value = False Then
MsgBox ("Please Select Account Type")
Else
If dtype = FD.Caption And FDPer.Text = "" Then
MsgBox "Choose FD Period", vbQuestion
FDPer.Visible = True
Else
If dtype = FD.Caption And FDPer.Text = " " Then
MsgBox "Choose FD Period"
Else
If CId.Text = "" Then
MsgBox ("Customer Id Can't be Empty, Please click on Open Account")
Else
If OBal.Text = "" Then
MsgBox ("Please Enter Opening Balance")
OBal.SetFocus
Else
If acno.Text = "" Then
MsgBox ("Please click on Open Account")
Else
If OName.Text = "" Then
MsgBox ("Please Enter Name")
OName.SetFocus
Else
If FName.Text = "" Then
MsgBox ("Please Enter Father's Name")
FName.SetFocus
Else
If MName.Text = "" Then
MsgBox ("Please Enter Mother's Name")
MName.SetFocus
Else
If DOB.Text = "" Then
MsgBox ("Please Enter Date of Birth in DD-MM-YYYY format")
DOB.SetFocus
Else
If Male.Value = False Xor Female.Value = False Xor Transgender.Value = False Then
MsgBox ("Please Select Gender")
Else
If Len(Mobile.Text) > 10 Or Len(Mobile.Text) < 10 Then
MsgBox "Enter Mobile Number in 10 digits!", vbExclamation, ""
Cancel = True
Mobile.SetFocus
Else
If Email.Text = "" Then
MsgBox ("Please Enter Valid E-mail Id")
Email.SetFocus
Else
If Address.Text = "" Then
MsgBox ("Please Enter Address")
Address.SetFocus
Else
If APImg.Picture = Empty Then
MsgBox ("Please Upload Your Photo")
Else
If ASignImg.Picture = Empty Then
MsgBox ("Please Upload Your Signature")
Else
con.Execute ("ALTER SESSION SET nls_date_format='dd-mm-yyyy'")
con.Execute ("insert into customer_data (branch_name,ifsc,acno,actype,id,obalance,name,fname,mname,dob,gender,mobile,email,address,simg,pimg,balance,ltid,tdeposit,twithdrawl,aodate,interestrate,fdperiod)values('" & dbranch & "','" & difsc & "','" & dacn & "','" & dtype & "','" & did & "','" & dobal & "','" & dnm & "','" & dfnm & "','" & dmnm & "','" & ddob & "','" & dgdr & "','" & dmbl & "','" & dmail & "','" & dadrs & "','" & dsimg & "','" & dpimg & "','" & dobal & "','" & dltid & "','" & dobal & "','" & adeb & "','" & aodat & "','" & intr & "','" & fdpd & "')")
con.Execute ("commit")
con.Execute (" ALTER SESSION SET NLS_DATE_FORMAT='dd-mm-yyyy hh:mi:ss AM'")
con.Execute ("insert into customer_statement (ifsc,acno,id,name,mobile,dates,credit,debit,balance,tid,tmode,ttype)values('" & difsc & "','" & dacn & "','" & did & "','" & dnm & "','" & dmbl & "','" & aodat & "','" & dobal & "','" & adeb & "','" & dobal & "','" & dltid & "','" & nyhc & "','" & otypfi & "')")
con.Execute ("insert into Bank_Transaction (dates,tid,ttype,tmode,id,name,amount,acno,ifsc)values('" & aodat & "','" & dltid & "','" & otypfi & "','" & nyhc & "','" & did & "','" & dnm & "','" & dobal & "','" & dacn & "','" & difsc & "')")
con.Execute ("commit")
'Add Total Bank Balance Code Start
banbal.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
If IsNull(banbal!bank_bal) Then
con.Execute ("update admin_login set bank_bal= 0")
con.Execute ("commit")
banbal.Close
banbal.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
bbala = Trim(banbal!bank_bal + OBal.Text)
Else
bbala = Trim(banbal!bank_bal + OBal.Text)
End If
con.Execute ("update admin_login set bank_bal='" & bbala & "'")
con.Execute ("commit")
banbal.Close
banbal.Open
If IsNull(banbal!tdeposit) Then
con.Execute ("update admin_login set tdeposit= 0")
con.Execute ("commit")
banbal.Close
banbal.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
vtdep = Trim(banbal!tdeposit + OBal.Text)
con.Execute ("update admin_login set tdeposit= '" & vtdep & "'")
con.Execute ("commit")
Else
vtdep = Trim(banbal!tdeposit + OBal.Text)
con.Execute ("update admin_login set tdeposit= '" & vtdep & "'")
con.Execute ("commit")
End If
banbal.Close
'Code End
MsgBox ("Account Open Successfully, Your A/c No. is " + acno.Text)
acno.Text = ""
CId.Text = ""
OBal.Text = ""
OName.Text = ""
FName.Text = ""
MName.Text = ""
DOB.Text = ""
Mobile.Text = ""
Email.Text = ""
Address.Text = ""
APImg.Picture = Nothing
ASignImg.Picture = Nothing
OName.SetFocus
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
con.Close
End Sub
Private Sub Mobile_KeyPress(KeyAscii As Integer)
If KeyAscii <> 48 And KeyAscii <> 49 And KeyAscii <> 50 And KeyAscii <> 51 And KeyAscii <> 52 And KeyAscii <> 53 And KeyAscii <> 54 And KeyAscii <> 55 And KeyAscii <> 56 And KeyAscii <> 57 And KeyAscii <> 8 And KeyAscii <> 13 Then
KeyAscii = 0
MsgBox ("Please Enter Numbers Only")
End If
End Sub
Private Sub OBal_Click()
If FD.Value = True Then
FDPer.Visible = True
Else
FDPer.Visible = False
End If
End Sub
Private Sub OBal_KeyPress(KeyAscii As Integer)
If KeyAscii <> 48 And KeyAscii <> 49 And KeyAscii <> 50 And KeyAscii <> 51 And KeyAscii <> 52 And KeyAscii <> 53 And KeyAscii <> 54 And KeyAscii <> 55 And KeyAscii <> 56 And KeyAscii <> 57 And KeyAscii <> 8 And KeyAscii <> 13 And KeyAscii <> 46 Then
KeyAscii = 0
MsgBox ("Please Enter Numbers Only")
End If
End Sub
Private Sub OpenAccountPage_Click()
Set Me.Picture = Me.AccountImg
Dim kt As String
Dim ju As String
Dim acn As String
Dim zc As New ADODB.Recordset
Saving.Value = True
Profile.Visible = False
Cross.Visible = False
LName.Visible = False
Pid.Visible = False
Pdoj.Visible = False
Pphone.Visible = False
Pmail.Visible = False
Paddress.Visible = False
PImg.Visible = False
SearchTran.Visible = False
BankBal.Visible = False
Stdep.Visible = False
Stwid.Visible = False
Sttra.Visible = False
Sbrnm.Visible = False
Scod.Visible = False
Sifs.Visible = False
Sintr.Visible = False
Sloc.Visible = False
TransactionList.Visible = False
SCustom.Visible = False
Bal.Visible = False
wamt.Visible = False
Wbtn.Visible = False
WithdrawBTN.Visible = False
DepositBTN.Visible = False
SearchS.Visible = False
SObal.Visible = False
STDp.Visible = False
STWd.Visible = False
SCbal.Visible = False
SAcNo.Visible = False
SAtyp.Visible = False
SAIfsc.Visible = False
SIra.Visible = False
SNom.Visible = False
Saving.Visible = True
Current.Visible = True
FD.Visible = True
CId.Visible = True
OBal.Visible = True
OName.Visible = True
FName.Visible = True
MName.Visible = True
DOB.Visible = True
DTPicker1.Visible = True
Gender.Visible = True
Male.Visible = True
Female.Visible = True
Transgender.Visible = True
Mobile.Visible = True
Email.Visible = True
Address.Visible = True
APImg.Visible = True
UploadPImg.Visible = True
ASignImg.Visible = True
ASignUpload.Visible = True
APimgtext.Visible = True
ASignText.Visible = True
ACancel.Visible = True
LOpen.Visible = True
PLogout.Visible = False
LogYes.Visible = False
LogNo.Visible = False
Hifsc.Visible = False
HomeCover.Visible = False
BCode.Visible = False
Hmbl.Visible = False
Hmail.Visible = False
Haddress.Visible = False
Twitter.Visible = False
Linkedin.Visible = False
facebook.Visible = False
Instagram.Visible = False
Website.Visible = False
Download1.Visible = False
Download2.Visible = False
SearchBox.Visible = False
SearchCustomer.Visible = False
CPrev.Visible = False
CNext.Visible = False
CUpdate.Visible = False
CDel.Visible = False
CPic.Visible = False
CSign.Visible = False
CPicedit.Visible = False
CSignedit.Visible = False
ccid.Visible = False
ctype.Visible = False
cifsc.Visible = False
cac.Visible = False
cname.Visible = False
CNedit.Visible = False
CFName.Visible = False
CFedit.Visible = False
CMName.Visible = False
CMedit.Visible = False
CDOB.Visible = False
CDedit.Visible = False
CGender.Visible = False
CGedit.Visible = False
CMobile.Visible = False
CMoedit.Visible = False
CMail.Visible = False
CMaedit.Visible = False
CLocation.Visible = False
CLoedit.Visible = False
Caadh.Visible = False
Caadedit.Visible = False
Enm.Visible = False
Enm1.Visible = False
Enm2.Visible = False
Enm3.Visible = False
Enm4.Visible = False
Enm5.Visible = False
Enm6.Visible = False
Enm7.Visible = False
TBD.Visible = False
TBD1.Visible = False
TBD2.Visible = False
TBD3.Visible = False
SEmpBtn.Visible = False
EmpNm.Visible = False
EmpPosition.Visible = False
EmpDOJ.Visible = False
EmpEID.Visible = False
EmpPhone.Visible = False
EmpMail.Visible = False
EmpSal.Visible = False
EmpAdd.Visible = False
StatementList.Visible = False
Make_Connection
con.Open cn
zc.Open " select * from customer_data order by acno", cn, adOpenDynamic, adLockOptimistic
If zc.EOF <> False Then
CId.Text = BCode.Caption + "11000000001"
acno = "10011111111"
Else
zc.MoveLast
kt = zc!Id
ju = Trim(Right(kt, 11)) + 1
CId.Text = BCode.Caption + ju
acn = Trim(zc!acno) + 1
acno.Text = acn
End If
zc.Close
con.Close
End Sub
Private Sub OpenProfile_Click()
Profile.Visible = True
Cross.Visible = True
LName.Visible = True
Pid.Visible = True
Pdoj.Visible = True
Pphone.Visible = True
Pmail.Visible = True
Paddress.Visible = True
PImg.Visible = True
SearchTran.Visible = False
BankBal.Visible = False
Stdep.Visible = False
Stwid.Visible = False
Sttra.Visible = False
Sbrnm.Visible = False
Scod.Visible = False
Sifs.Visible = False
Sintr.Visible = False
Sloc.Visible = False
TransactionList.Visible = False
SCustom.Visible = False
Bal.Visible = False
wamt.Visible = False
Wbtn.Visible = False
StatementList.Visible = False
Saving.Visible = False
Current.Visible = False
FD.Visible = False
CId.Visible = False
OBal.Visible = False
OName.Visible = False
FName.Visible = False
MName.Visible = False
DOB.Visible = False
DTPicker1.Visible = False
Gender.Visible = False
Male.Visible = False
Female.Visible = False
Transgender.Visible = False
Mobile.Visible = False
Email.Visible = False
Address.Visible = False
PLogout.Visible = False
LogYes.Visible = False
LogNo.Visible = False
HomeCover.Visible = False
APImg.Visible = False
UploadPImg.Visible = False
ASignImg.Visible = False
ASignUpload.Visible = False
APimgtext.Visible = False
ASignText.Visible = False
SearchBox.Visible = False
SearchCustomer.Visible = False
CPrev.Visible = False
CNext.Visible = False
CUpdate.Visible = False
CDel.Visible = False
CPic.Visible = False
CSign.Visible = False
CPicedit.Visible = False
CSignedit.Visible = False
ccid.Visible = False
ctype.Visible = False
cifsc.Visible = False
cac.Visible = False
cname.Visible = False
CNedit.Visible = False
CFName.Visible = False
CFedit.Visible = False
CMName.Visible = False
CMedit.Visible = False
CDOB.Visible = False
CDedit.Visible = False
CGender.Visible = False
CGedit.Visible = False
CMobile.Visible = False
CMoedit.Visible = False
CMail.Visible = False
CMaedit.Visible = False
CLocation.Visible = False
CLoedit.Visible = False
Caadh.Visible = False
Caadedit.Visible = False
ACancel.Visible = False
LOpen.Visible = False
FDPer.Visible = False
Enm.Visible = False
Enm1.Visible = False
Enm2.Visible = False
Enm3.Visible = False
Enm4.Visible = False
Enm5.Visible = False
Enm6.Visible = False
Enm7.Visible = False
SEmpBtn.Visible = False
EmpNm.Visible = False
EmpPosition.Visible = False
EmpDOJ.Visible = False
EmpEID.Visible = False
EmpPhone.Visible = False
EmpMail.Visible = False
EmpSal.Visible = False
EmpAdd.Visible = False
SearchS.Visible = False
SObal.Visible = False
STDp.Visible = False
STWd.Visible = False
SCbal.Visible = False
SAcNo.Visible = False
SAtyp.Visible = False
SAIfsc.Visible = False
SIra.Visible = False
SNom.Visible = False
End Sub
Private Sub Saving_Click()
FDPer.Visible = False
End Sub
Private Sub SCustom_Click()
Dim sfren As New ADODB.Recordset
Dim kks As String
Dim sts1 As String
Make_Connection
con.Open cn
sfren.Open " select * from customer_data order by acno", cn, adOpenDynamic, adLockOptimistic
kks = LCase(Trim(SearchBox.Text))
f = 0
Do While sfren.EOF <> True
sts1 = LCase(Trim(sfren!Id))
If kks = sts1 Then
f = 1
ccid.Text = sfren!acno
ctype.Text = sfren!Name
cifsc.Text = sfren!FName
cac.Text = sfren!Mobile
Bal.Caption = sfren!Balance
CPic.Picture = LoadPicture(sfren!PImg)
CSign.Picture = LoadPicture(sfren!sImg)
Exit Do
End If
sfren.MoveNext
Loop
If f = 0 Then
MsgBox "No Record", vbExclamation
End If
con.Close
End Sub
Private Sub SearchCustomer_Click()
Dim sre As New ADODB.Recordset
Dim kks As String
Dim sts1 As String
cname.Enabled = False
CFName.Enabled = False
CMName.Enabled = False
CDOB.Enabled = False
CGender.Enabled = False
CMobile.Enabled = False
CMail.Enabled = False
CLocation.Enabled = False
Caadh.Enabled = False
Make_Connection
con.Open cn
sre.Open " select * from customer_data order by acno", cn, adOpenDynamic, adLockOptimistic
kks = LCase(Trim(SearchBox.Text))
f = 0
Do While sre.EOF <> True
sts1 = LCase(Trim(sre!Id))
If kks = sts1 Then
f = 1
ccid.Text = sre!Id
ctype.Text = sre!actype
cifsc.Text = sre!IFSC
cac.Text = sre!acno
cname.Text = sre!Name
CFName.Text = sre!FName
CMName.Text = sre!MName
CDOB.Text = sre!DOB
CGender.Text = sre!Gender
CMobile.Text = sre!Mobile
CMail.Text = sre!Email
CLocation.Text = sre!Address
CPic.Picture = LoadPicture(sre!PImg)
CPictext.Text = sre!PImg
CSign.Picture = LoadPicture(sre!sImg)
CSigntext.Text = sre!sImg
If IsNull(sre!aadhar) Then
Caadh.Text = ""
MsgBox "KYC Pending, Update Aadhar Data", vbInformation
Caadh.Enabled = True
Caadh.SetFocus
Else
Caadh.Text = sre!aadhar
End If
Exit Do
End If
sre.MoveNext
Loop
If f = 0 Then
MsgBox "No Record", vbExclamation
End If
con.Close
End Sub
Private Sub SearchS_Click()
' Search Customer Statement
Dim stre As New ADODB.Recordset
Dim cstre As New ADODB.Recordset
Dim skks As String
Dim stas1 As String
Dim lista As New ADODB.Recordset
Dim tstat As Integer
Dim stai As Integer
Dim sttype As String
Dim stas2 As String
StatementList.ColumnHeaders.Clear
StatementList.ListItems.Clear
Make_Connection
con.Open cn
stre.Open " select * from customer_data order by acno", cn, adOpenDynamic, adLockOptimistic
skks = LCase(Trim(SearchBox.Text))
f = 0
Do While stre.EOF <> True
stas1 = LCase(Trim(stre!Id))
If skks = stas1 Then
f = 1
SObal.Caption = stre!obalance
STDp.Caption = stre!tdeposit
STWd.Caption = stre!twithdrawl
SCbal.Caption = stre!Balance
SAcNo.Caption = stre!acno
SAtyp.Caption = stre!actype
SAIfsc.Caption = stre!IFSC
SIra.Caption = stre!interestrate
stas2 = Trim(UCase(SearchBox.Text))
lista.CursorLocation = adUseClient
lista.Open " select * from customer_statement where id = '" & stas2 & "' order by tid", cn, adOpenDynamic, adLockOptimistic
tstat = lista.RecordCount
Dim itmx As ListItem ' Create a variable to add ListItem objects.
Dim clmX As ColumnHeader ' Create an object variable for the ColumnHeader object.
' Add ColumnHeaders.
Set clmX = StatementList.ColumnHeaders.Add(, , "Date & Time", StatementList.Width / 4, lvwColumnLeft)
Set clmX = StatementList.ColumnHeaders.Add(, , "Transaction Detail", StatementList.Width / 3.25, lvwColumnCenter)
Set clmX = StatementList.ColumnHeaders.Add(, , "Amount", StatementList.Width / 5, lvwColumnCenter)
Set clmX = StatementList.ColumnHeaders.Add(, , "Available Balance", StatementList.Width / 4, lvwColumnCenter)
StatementList.BorderStyle = ccFixedSingle ' Set BorderStyle property.
StatementList.View = lvwReport ' Set View property to Report.
For stai = 1 To tstat
If lista!debit = "0" Then
sttype = "Deposit"
Else
If lista!credit = "0" Then
sttype = "Withdraw"
End If
End If
' Add a main item
Set itmx = StatementList.ListItems.Add(, , Format(lista!dates, "dd-mm-yyyy HH:MM:SS"))
' Add two subitems for that item
itmx.SubItems(1) = lista!tId & " (" & lista!tmode & " )" & "'" & sttype & "'"
itmx.SubItems(2) = "Rs. " & lista!credit + lista!debit
itmx.SubItems(3) = "Rs. " & lista!Balance
lista.MoveNext
Next stai
Exit Do
End If
stre.MoveNext
Loop
If f = 0 Then
MsgBox "No Record", vbExclamation
End If
con.Close
End Sub
Private Sub SearchTran_Click()
Dim stbt As New ADODB.Recordset
Dim i As Integer
Dim strdo As Integer
Make_Connection
con.Open cn
stbt.CursorLocation = adUseClient
stbt.Open " select tid from bank_transaction", cn, adOpenDynamic, adLockOptimistic
i = stbt.RecordCount
strdo = 1
Do While strdo <= i
If TransactionList.ListItems.Item(strdo).SubItems(1) = SearchBox.Text Then
TransactionList.ListItems.Item(strdo).Selected = True
TransactionList.SetFocus
Else
TransactionList.ListItems.Item(strdo).Selected = False
End If
strdo = strdo + 1
Loop
con.Close
End Sub
Private Sub SEmpBtn_Click()
Dim sempb As New ADODB.Recordset
Dim kemp As String
Dim semp As String
Make_Connection
con.Open cn
sempb.Open " select * from admin_login order by id", cn, adOpenDynamic, adLockOptimistic
kemp = LCase(Trim(SearchBox.Text))
f = 0
Do While sempb.EOF <> True
semp = LCase(Trim(sempb!Id))
If kemp = semp Then
f = 1
EmpNm.Text = sempb!Name
EmpPosition.Text = sempb!post
EmpDOJ.Text = sempb!doj
EmpEID.Text = sempb!Id
EmpPhone.Text = sempb!phone
EmpMail.Text = sempb!Email
EmpSal.Text = sempb!salary
EmpAdd.Text = sempb!Address
Exit Do
End If
sempb.MoveNext
Loop
If f = 0 Then
MsgBox "No Record", vbExclamation
End If
con.Close
EmpNm.Locked = True
EmpPosition.Locked = True
EmpDOJ.Locked = True
EmpPhone.Locked = True
EmpMail.Locked = True
EmpSal.Locked = True
EmpAdd.Locked = True
EmpNm.FontBold = False
EmpPosition.FontBold = False
EmpDOJ.FontBold = False
EmpPhone.FontBold = False
EmpMail.FontBold = False
EmpSal.FontBold = False
EmpAdd.FontBold = False
End Sub
Private Sub StatementList_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
Call SortListView(StatementList, ColumnHeader.Index)
End Sub
Private Sub StatementPage_Click()
Set Me.Picture = Me.StatementImg
SearchBox.ToolTipText = "Enter ID"
SObal.Caption = ""
STDp.Caption = ""
STWd.Caption = ""
SCbal.Caption = ""
SAcNo.Caption = ""
SAtyp.Caption = ""
SAIfsc.Caption = ""
SIra.Caption = ""
SNom.Caption = ""
StatementList.ColumnHeaders.Clear
StatementList.ListItems.Clear
SObal.Visible = True
STDp.Visible = True
STWd.Visible = True
SCbal.Visible = True
SAcNo.Visible = True
SAtyp.Visible = True
SAIfsc.Visible = True
SIra.Visible = True
SNom.Visible = True
StatementList.Visible = True
SearchTran.Visible = False
BankBal.Visible = False
Stdep.Visible = False
Stwid.Visible = False
Sttra.Visible = False
Sbrnm.Visible = False
Scod.Visible = False
Sifs.Visible = False
Sintr.Visible = False
Sloc.Visible = False
TransactionList.Visible = False
Profile.Visible = False
Cross.Visible = False
LName.Visible = False
Pid.Visible = False
Pdoj.Visible = False
Pphone.Visible = False
Pmail.Visible = False
Paddress.Visible = False
PImg.Visible = False
ACancel.Visible = False
LOpen.Visible = False
FDPer.Visible = False
SCustom.Visible = False
Bal.Visible = False
wamt.Visible = False
Wbtn.Visible = False
WithdrawBTN.Visible = False
DepositBTN.Visible = False
Saving.Visible = False
Current.Visible = False
FD.Visible = False
CId.Visible = False
OBal.Visible = False
OName.Visible = False
FName.Visible = False
MName.Visible = False
DOB.Visible = False
DTPicker1.Visible = False
Gender.Visible = False
Male.Visible = False
Female.Visible = False
Transgender.Visible = False
Mobile.Visible = False
Email.Visible = False
Address.Visible = False
PLogout.Visible = False
LogYes.Visible = False
LogNo.Visible = False
Hifsc.Visible = False
HomeCover.Visible = False
BCode.Visible = False
Hmbl.Visible = False
Hmail.Visible = False
Haddress.Visible = False
Twitter.Visible = False
Linkedin.Visible = False
facebook.Visible = False
Instagram.Visible = False
Website.Visible = False
Download1.Visible = False
Download2.Visible = False
APImg.Visible = False
UploadPImg.Visible = False
ASignImg.Visible = False
ASignUpload.Visible = False
APimgtext.Visible = False
ASignText.Visible = False
SearchBox.Visible = True
SearchS.Visible = True
SearchCustomer.Visible = False
CPrev.Visible = False
CNext.Visible = False
CUpdate.Visible = False
CDel.Visible = False
CPic.Visible = False
CSign.Visible = False
CPicedit.Visible = False
CSignedit.Visible = False
ccid.Visible = False
ctype.Visible = False
cifsc.Visible = False
cac.Visible = False
cname.Visible = False
CNedit.Visible = False
CFName.Visible = False
CFedit.Visible = False
CMName.Visible = False
CMedit.Visible = False
CDOB.Visible = False
CDedit.Visible = False
CGender.Visible = False
CGedit.Visible = False
CMobile.Visible = False
CMoedit.Visible = False
CMail.Visible = False
CMaedit.Visible = False
CLocation.Visible = False
CLoedit.Visible = False
Caadh.Visible = False
Caadedit.Visible = False
Enm.Visible = False
Enm1.Visible = False
Enm2.Visible = False
Enm3.Visible = False
Enm4.Visible = False
Enm5.Visible = False
Enm6.Visible = False
Enm7.Visible = False
TBD.Visible = False
TBD1.Visible = False
TBD2.Visible = False
TBD3.Visible = False
SEmpBtn.Visible = False
EmpNm.Visible = False
EmpPosition.Visible = False
EmpDOJ.Visible = False
EmpEID.Visible = False
EmpPhone.Visible = False
EmpMail.Visible = False
EmpSal.Visible = False
EmpAdd.Visible = False
End Sub
Private Sub TransactionList_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
Call SortListView(TransactionList, ColumnHeader.Index)
End Sub
Private Sub TransactionPage_Click()
Set Me.Picture = Me.TransactionImg
SearchBox.ToolTipText = "Enter TID"
Dim todyt As New ADODB.Recordset
Dim libtra As New ADODB.Recordset
Dim ttodyt As Integer
Dim fedat As String
Dim stai1 As Long
Dim tottr As Long
Dim tottr1 As Long
tottr1 = 0
Dim tottr2 As Long
Dim tottr3 As Long
tottr3 = 0
Dim tbtran As Integer
Dim trlai As Long
TransactionList.ColumnHeaders.Clear
TransactionList.ListItems.Clear
SearchTran.Visible = True
BankBal.Visible = True
Stdep.Visible = True
Stwid.Visible = True
Sttra.Visible = True
Sbrnm.Visible = True
Scod.Visible = True
Sifs.Visible = True
Sintr.Visible = True
Sloc.Visible = True
TransactionList.Visible = True
Profile.Visible = False
Cross.Visible = False
LName.Visible = False
Pid.Visible = False
Pdoj.Visible = False
Pphone.Visible = False
Pmail.Visible = False
Paddress.Visible = False
PImg.Visible = False
ACancel.Visible = False
LOpen.Visible = False
FDPer.Visible = False
SCustom.Visible = False
Bal.Visible = False
wamt.Visible = False
Wbtn.Visible = False
StatementList.Visible = False
Saving.Visible = False
Current.Visible = False
FD.Visible = False
CId.Visible = False
OBal.Visible = False
OName.Visible = False
FName.Visible = False
MName.Visible = False
DOB.Visible = False
DTPicker1.Visible = False
Gender.Visible = False
Male.Visible = False
Female.Visible = False
Transgender.Visible = False
Mobile.Visible = False
Email.Visible = False
Address.Visible = False
PLogout.Visible = False
LogYes.Visible = False
LogNo.Visible = False
Hifsc.Visible = False
HomeCover.Visible = False
BCode.Visible = False
Hmbl.Visible = False
Hmail.Visible = False
Haddress.Visible = False
Twitter.Visible = False
Linkedin.Visible = False
facebook.Visible = False
Instagram.Visible = False
Website.Visible = False
Download1.Visible = False
Download2.Visible = False
APImg.Visible = False
UploadPImg.Visible = False
ASignImg.Visible = False
ASignUpload.Visible = False
APimgtext.Visible = False
ASignText.Visible = False
WithdrawBTN.Visible = False
DepositBTN.Visible = False
SearchBox.Visible = True
SearchCustomer.Visible = False
CPrev.Visible = False
CNext.Visible = False
CUpdate.Visible = False
CDel.Visible = False
CPic.Visible = False
CSign.Visible = False
CPicedit.Visible = False
CSignedit.Visible = False
ccid.Visible = False
ctype.Visible = False
cifsc.Visible = False
cac.Visible = False
cname.Visible = False
CNedit.Visible = False
CFName.Visible = False
CFedit.Visible = False
CMName.Visible = False
CMedit.Visible = False
CDOB.Visible = False
CDedit.Visible = False
CGender.Visible = False
CGedit.Visible = False
CMobile.Visible = False
CMoedit.Visible = False
CMail.Visible = False
CMaedit.Visible = False
CLocation.Visible = False
CLoedit.Visible = False
Caadh.Visible = False
Caadedit.Visible = False
Enm.Visible = False
Enm1.Visible = False
Enm2.Visible = False
Enm3.Visible = False
Enm4.Visible = False
Enm5.Visible = False
Enm6.Visible = False
Enm7.Visible = False
TBD.Visible = False
TBD1.Visible = False
TBD2.Visible = False
TBD3.Visible = False
SEmpBtn.Visible = False
EmpNm.Visible = False
EmpPosition.Visible = False
EmpDOJ.Visible = False
EmpEID.Visible = False
EmpPhone.Visible = False
EmpMail.Visible = False
EmpSal.Visible = False
EmpAdd.Visible = False
SearchS.Visible = False
SObal.Visible = False
STDp.Visible = False
STWd.Visible = False
SCbal.Visible = False
SAcNo.Visible = False
SAtyp.Visible = False
SAIfsc.Visible = False
SIra.Visible = False
SNom.Visible = False
con.Open
'Add Total Bank Balance Code Start
banbal.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
If IsNull(banbal!bank_bal) Then
con.Execute ("update admin_login set bank_bal= 0")
con.Execute ("commit")
Else
BankBal.Caption = banbal!bank_bal
End If
banbal.Close
'Total Deposit code
banbal.Open
If IsNull(banbal!tdeposit) Then
con.Execute ("update admin_login set tdeposit= 0")
con.Execute ("commit")
banbal.Close
banbal.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
Stdep.Caption = banbal!tdeposit
Else
Stdep.Caption = banbal!tdeposit
End If
banbal.Close
'Total Withdrawl Code
banbal.Open
If IsNull(banbal!twithdrawl) Then
con.Execute ("update admin_login set twithdrawl= 0")
con.Execute ("commit")
banbal.Close
banbal.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
Stwid.Caption = banbal!twithdrawl
Else
Stwid.Caption = banbal!twithdrawl
End If
banbal.Close
'Code End
'Today Transaction Code Start
fedat = Format(Now, "dd-mmm-yyyy")
todyt.CursorLocation = adUseClient
todyt.Open " select * from customer_statement where trunc(Dates) = '" & fedat & "' order by tid", cn, adOpenDynamic, adLockOptimistic
ttodyt = todyt.RecordCount
For stai1 = 1 To ttodyt
If IsNull(todyt!ttype) Or ttodyt = "0" Then
Sttra.Caption = "No Transaction"
Else
If todyt!ttype = "Credit" Then
tottr = todyt!credit
tottr1 = tottr1 + tottr
Else
If todyt!ttype = "Debit" Then
tottr2 = todyt!debit
tottr3 = tottr3 + tottr2
End If
End If
End If
todyt.MoveNext
Next stai1
Sttra.Caption = "C = " & tottr1 & " | D = " & tottr3
'Code End
Sbrnm.Caption = Label5.Caption
Scod.Caption = BCode.Caption
Sifs.Caption = Hifsc.Caption
Sintr.Caption = "S: 4% | C: 2.5% | FD: 6%"
Sloc.Caption = Paddress.Caption
'Transaction List Code
libtra.CursorLocation = adUseClient
libtra.Open " select * from Bank_Transaction order by tid", cn, adOpenDynamic, adLockOptimistic
tbtran = libtra.RecordCount
Dim itmx As ListItem ' Create a variable to add ListItem objects.
Dim clmX As ColumnHeader ' Create an object variable for the ColumnHeader object.
' Add ColumnHeaders.
Set clmX = TransactionList.ColumnHeaders.Add(, , "Date & Time", TransactionList.Width / 7.5, lvwColumnLeft)
Set clmX = TransactionList.ColumnHeaders.Add(, , "Transaction ID", TransactionList.Width / 6, lvwColumnCenter)
Set clmX = TransactionList.ColumnHeaders.Add(, , "Transaction Type", TransactionList.Width / 4.5, lvwColumnCenter)
Set clmX = TransactionList.ColumnHeaders.Add(, , "ID", TransactionList.Width / 6, lvwColumnCenter)
Set clmX = TransactionList.ColumnHeaders.Add(, , "Name", TransactionList.Width / 6, lvwColumnCenter)
Set clmX = TransactionList.ColumnHeaders.Add(, , "Amount", TransactionList.Width / 7.5, lvwColumnCenter)
Set clmX = TransactionList.ColumnHeaders.Add(, , "A/C No.", TransactionList.Width / 6, lvwColumnCenter)
Set clmX = TransactionList.ColumnHeaders.Add(, , "IFSC", TransactionList.Width / 6, lvwColumnCenter)
TransactionList.BorderStyle = ccFixedSingle ' Set BorderStyle property.
TransactionList.View = lvwReport ' Set View property to Report.
For trlai = 1 To tbtran
' Add a main item
Set itmx = TransactionList.ListItems.Add(, , Format(libtra!dates, "dd-mm-yyyy HH:MM:SS"))
' Add subitems for that item
itmx.SubItems(1) = libtra!tId
itmx.SubItems(2) = libtra!ttype & " | " & libtra!tmode
itmx.SubItems(3) = libtra!Id
itmx.SubItems(4) = libtra!Name
itmx.SubItems(5) = libtra!amount
itmx.SubItems(6) = libtra!acno
itmx.SubItems(7) = libtra!IFSC
libtra.MoveNext
Next trlai
con.Close
End Sub
Private Sub UploadPImg_Click()
CD1.Filter = "JPG File | *.jpg|GIF File|*.gif"
CD1.ShowOpen
If CD1.FileName <> "" Then
APImg.Picture = LoadPicture(CD1.FileName)
APimgtext.Text = CD1.FileName
End If
End Sub
Private Sub wamt_KeyPress(KeyAscii As Integer)
If KeyAscii <> 48 And KeyAscii <> 49 And KeyAscii <> 50 And KeyAscii <> 51 And KeyAscii <> 52 And KeyAscii <> 53 And KeyAscii <> 54 And KeyAscii <> 55 And KeyAscii <> 56 And KeyAscii <> 57 And KeyAscii <> 8 And KeyAscii <> 13 And KeyAscii <> 46 Then
KeyAscii = 0
MsgBox ("Please Enter Numbers Only")
End If
End Sub
Private Sub WithdrawBTN_Click()
Dim sfres As New ADODB.Recordset
Dim wduid As String
Dim dwduid As String
Dim wdifsc As String
Dim wdacno As String
Dim wdid As String
Dim wdname As String
Dim wdmobile As String
Dim wddate As String
Dim wddebit As String
Dim wdcredit As String
Dim wdbalance As String
Dim vgbj As String
Dim twid As String
Dim wtmode As String
Dim vtdep2 As String
Dim wtypfi As String
vgbj = ccid.Text
wtmode = "Cash"
wtypfi = "Debit"
If ccid.Text = "" Then
MsgBox ("Please Search Customer")
SearchBox.SetFocus
Else
If wamt.Text = "" Then
MsgBox ("Please Enter Amount")
wamt.SetFocus
Else
If Bal.Caption = 0 Then
MsgBox ("Low Balance"), vbCritical
Else
Make_Connection
con.Open cn
sfres.Open " select * from customer_data where acno='" & vgbj & "'", cn, adOpenDynamic, adLockOptimistic
wdifsc = sfres!IFSC
wdacno = sfres!acno
wdid = sfres!Id
wdname = sfres!Name
wdmobile = sfres!Mobile
wddate = Now()
wddebit = wamt.Text
wdcredit = "0"
wdbalance = Trim(sfres!Balance - wamt.Text)
wdtid = sfres!ltid + 1
twid = Trim(sfres!twithdrawl + wamt.Text)
con.Execute (" ALTER SESSION SET NLS_DATE_FORMAT='dd-mm-yyyy hh:mi:ss AM'")
con.Execute ("insert into customer_statement (ifsc,acno,id,name,mobile,dates,debit,credit,balance,tid,tmode,ttype)values('" & wdifsc & "','" & wdacno & "','" & wdid & "','" & wdname & "','" & wdmobile & "','" & wddate & "','" & wddebit & "','" & wdcredit & "','" & wdbalance & "','" & wdtid & "','" & wtmode & "','" & wtypfi & "')")
con.Execute ("insert into Bank_Transaction (dates,tid,ttype,tmode,id,name,amount,acno,ifsc)values('" & wddate & "','" & wdtid & "','" & wtypfi & "','" & wtmode & "','" & wdid & "','" & wdname & "','" & wddebit & "','" & wdacno & "','" & wdifsc & "')")
con.Execute ("commit")
con.Execute ("update customer_data set ltid='" & wdtid & "',balance='" & wdbalance & "',twithdrawl='" & twid & "' where id='" & wdid & "' ")
con.Execute ("commit")
'Add Total Bank Balance Code Start
banbal.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
If IsNull(banbal!bank_bal) Then
con.Execute ("update admin_login set bank_bal= 0")
con.Execute ("commit")
banbal.Close
banbal.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
bbala = Trim(banbal!bank_bal - wamt.Text)
Else
bbala = Trim(banbal!bank_bal - wamt.Text)
End If
con.Execute ("update admin_login set bank_bal='" & bbala & "'")
con.Execute ("commit")
banbal.Close
banbal.Open
If IsNull(banbal!twithdrawl) Then
con.Execute ("update admin_login set twithdrawl= 0")
con.Execute ("commit")
banbal.Close
banbal.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
vtdep2 = Trim(banbal!twithdrawl + wamt.Text)
con.Execute ("update admin_login set twithdrawl= '" & vtdep2 & "'")
con.Execute ("commit")
Else
vtdep2 = Trim(banbal!twithdrawl + wamt.Text)
con.Execute ("update admin_login set twithdrawl= '" & vtdep2 & "'")
con.Execute ("commit")
End If
banbal.Close
'Code End
MsgBox ("Withdrawn Successfully, Your Balance is " + wdbalance)
Bal.Caption = wdbalance
wamt.Text = ""
con.Close
End If
End If
End If
End Sub
Private Sub WithdrawPage_Click()
Set Me.Picture = Me.WithdrawImg
SearchBox.ToolTipText = "Enter ID"
SCustom.Visible = True
Bal.Visible = True
wamt.Visible = True
Wbtn.Visible = True
WithdrawBTN.Visible = True
DepositBTN.Visible = False
StatementList.Visible = False
ccid.Text = ""
ctype.Text = ""
cifsc.Text = ""
cac.Text = ""
Bal.Caption = ""
CPic.Picture = LoadPicture()
CSign.Picture = LoadPicture()
Profile.Visible = False
Cross.Visible = False
LName.Visible = False
Pid.Visible = False
Pdoj.Visible = False
Pphone.Visible = False
Pmail.Visible = False
Paddress.Visible = False
PImg.Visible = False
ACancel.Visible = False
LOpen.Visible = False
FDPer.Visible = False
SearchTran.Visible = False
BankBal.Visible = False
Stdep.Visible = False
Stwid.Visible = False
Sttra.Visible = False
Sbrnm.Visible = False
Scod.Visible = False
Sifs.Visible = False
Sintr.Visible = False
Sloc.Visible = False
TransactionList.Visible = False
Saving.Visible = False
Current.Visible = False
FD.Visible = False
CId.Visible = False
OBal.Visible = False
OName.Visible = False
FName.Visible = False
MName.Visible = False
DOB.Visible = False
DTPicker1.Visible = False
Gender.Visible = False
Male.Visible = False
Female.Visible = False
Transgender.Visible = False
Mobile.Visible = False
Email.Visible = False
Address.Visible = False
PLogout.Visible = False
LogYes.Visible = False
LogNo.Visible = False
Hifsc.Visible = False
HomeCover.Visible = False
BCode.Visible = False
Hmbl.Visible = False
Hmail.Visible = False
Haddress.Visible = False
Twitter.Visible = False
Linkedin.Visible = False
facebook.Visible = False
Instagram.Visible = False
Website.Visible = False
Download1.Visible = False
Download2.Visible = False
APImg.Visible = False
UploadPImg.Visible = False
ASignImg.Visible = False
ASignUpload.Visible = False
APimgtext.Visible = False
ASignText.Visible = False
SearchS.Visible = False
SObal.Visible = False
STDp.Visible = False
STWd.Visible = False
SCbal.Visible = False
SAcNo.Visible = False
SAtyp.Visible = False
SAIfsc.Visible = False
SIra.Visible = False
SNom.Visible = False
SearchBox.Visible = True
SearchCustomer.Visible = False
CPrev.Visible = False
CNext.Visible = False
CUpdate.Visible = False
CDel.Visible = False
CPic.Visible = True
CSign.Visible = True
CPicedit.Visible = False
CSignedit.Visible = False
ccid.Visible = True
ctype.Visible = True
cifsc.Visible = True
cac.Visible = True
cname.Visible = False
CNedit.Visible = False
CFName.Visible = False
CFedit.Visible = False
CMName.Visible = False
CMedit.Visible = False
CDOB.Visible = False
CDedit.Visible = False
CGender.Visible = False
CGedit.Visible = False
CMobile.Visible = False
CMoedit.Visible = False
CMail.Visible = False
CMaedit.Visible = False
CLocation.Visible = False
CLoedit.Visible = False
Caadh.Visible = False
Caadedit.Visible = False
Enm.Visible = False
Enm1.Visible = False
Enm2.Visible = False
Enm3.Visible = False
Enm4.Visible = False
Enm5.Visible = False
Enm6.Visible = False
Enm7.Visible = False
TBD.Visible = False
TBD1.Visible = False
TBD2.Visible = False
TBD3.Visible = False
SEmpBtn.Visible = False
EmpNm.Visible = False
EmpPosition.Visible = False
EmpDOJ.Visible = False
EmpEID.Visible = False
EmpPhone.Visible = False
EmpMail.Visible = False
EmpSal.Visible = False
EmpAdd.Visible = False
End Sub
Private Sub SearchBox_KeyPress(KeyAscii As Integer)
If SCustom.Visible = True Then
If KeyAscii = 13 Then
SCustom_Click
End If
Else
If SearchCustomer.Visible = True Then
If KeyAscii = 13 Then
SearchCustomer_Click
End If
Else
If SEmpBtn.Visible = True Then
If KeyAscii = 13 Then
SEmpBtn_Click
End If
Else
If SearchTran.Visible = True Then
If KeyAscii = 13 Then
SearchTran_Click
End If
Else
If SearchS.Visible = True Then
If KeyAscii = 13 Then
SearchS_Click
End If
End If
End If
End If
End If
End If
End Sub
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim banbal As New ADODB.Recordset
Dim st1 As String
Dim st2 As String
Dim tbtran As Integer
Dim sttype As String
Dim libtra As New ADODB.Recordset
Dim cn As String
Public Function Make_Connection()
cn = "Provider=MSDAORA.1;User ID=bank/SABank;Data Source=localhost;Persist Security Info=False"
End Function
Private Sub SortListView(ByRef List As ListView, ColHeadIndex As Integer)
Dim lcv As Long 'Loop Control Variable
With List
' Make sure the Sorted property is set to true
.Sorted = True
' Sort according to the colum that was clicked (off by one)
.SortKey = ColHeadIndex - 1
' Does the column already have an icon?
If .ColumnHeaders(ColHeadIndex).Icon = 0 Then
'No, So we will assume this column is not sorted
' Set to Ascending order
.SortOrder = lvwAscending
' Set the ColumnHeader to be the Up Arrow
.ColumnHeaders(ColHeadIndex).Icon = "UpArrow"
' Does the column have an UpArrow icon?
ElseIf .ColumnHeaders(ColHeadIndex).Icon = "UpArrow" Then
' Yes, So the column is in Ascending order, switch to descending
' Set the Column Icon to the Down Arrow
.ColumnHeaders(ColHeadIndex).Icon = "DownArrow"
' Set the sort order to descending
.SortOrder = lvwDescending
Else
' Otherwise sort into ascending order
' Set to Ascending order
.SortOrder = lvwAscending
' Set the ColumnHeader to be the Up Arrow
.ColumnHeaders(ColHeadIndex).Icon = "UpArrow"
End If
' Remove any icon (presumably an arrow icon) from all other columns
' For every Column in the ListView Control...
For lcv = 1 To List.ColumnHeaders.Count
' Is the current column the clicked column?
If Not (lcv = ColHeadIndex) Then
' No, remove any icon it may have
.ColumnHeaders(lcv).Icon = 0
End If
Next lcv
' Refresh the display of the ListView Control
.Refresh
End With
End Sub
Private Sub Form_Load()
Dim kk As String
Make_Connection
If Login.Combo1.Text = "Customer" Then
rs.Open " select * from customer_data", cn, adOpenDynamic, adLockOptimistic
kk = LCase(Trim(Login.Id.Text))
rs.MoveFirst
f = 0
Do While rs.EOF <> True
st1 = LCase(Trim(rs!Id))
If kk = st1 Then
f = 1
Unm.Caption = "WELCOME " + UCase(rs!Name)
Bal.Caption = rs!Balance
ACTyp.Caption = "SABank " & rs!actype & " Account"
ACNo.Caption = rs!ACNo
CID.Caption = rs!Id
CNM.Caption = rs!Name
Branch.Caption = rs!Branch_name
IFSC.Caption = rs!IFSC
Mobile.Caption = rs!Mobile
Mail.Caption = rs!Email
CPic.Picture = LoadPicture(rs!PImg)
st2 = UCase(st1)
RefreshTran_Click
Exit Do
End If
rs.MoveNext
Loop
If f = 0 Then
Unm.Caption = "No Record"
End If
rs.Close
End If
End Sub
Private Sub Logout_Click()
answer = MsgBox("Are you sure you want Logout ", vbCritical + vbYesNo, "Warning")
If answer = vbYes Then
Unload Me
Login.Show
End If
End Sub
Private Sub RefreshTran_Click()
TransactionList.ListItems.Clear
TransactionList.ColumnHeaders.Clear
'Transaction List Code
libtra.CursorLocation = adUseClient
libtra.Open " select * from customer_statement where id = '" & st2 & "' order by tid", cn, adOpenDynamic, adLockOptimistic
tbtran = libtra.RecordCount
Dim itmx As ListItem ' Create a variable to add ListItem objects.
Dim clmX As ColumnHeader ' Create an object variable for the ColumnHeader object.
' Add ColumnHeaders.
Set clmX = TransactionList.ColumnHeaders.Add(, , "Transaction Detail", TransactionList.Width / 4, lvwColumnLeft)
Set clmX = TransactionList.ColumnHeaders.Add(, , "Date & Time", TransactionList.Width / 3.25, lvwColumnCenter)
Set clmX = TransactionList.ColumnHeaders.Add(, , "Amount", TransactionList.Width / 5, lvwColumnCenter)
Set clmX = TransactionList.ColumnHeaders.Add(, , "Available Balance", TransactionList.Width / 4.8, lvwColumnCenter)
TransactionList.BorderStyle = ccFixedSingle ' Set BorderStyle property.
TransactionList.View = lvwReport ' Set View property to Report.
For trlai = 1 To tbtran
If libtra!debit = "0" Then
sttype = "Deposit"
Else
If libtra!credit = "0" Then
sttype = "Withdraw"
End If
End If
' Add a main item
Set itmx = TransactionList.ListItems.Add(, , libtra!tId & " (" & libtra!tmode & " )" & "'" & sttype & "'")
' Add two subitems for that item
itmx.SubItems(1) = Format(libtra!dates, "dd-mm-yyyy HH:MM:SS")
itmx.SubItems(2) = "Rs. " & libtra!credit + libtra!debit
itmx.SubItems(3) = "Rs. " & libtra!Balance
libtra.MoveNext
Next trlai
libtra.Close
End Sub
Private Sub TAcNo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TSAcn_Click
End If
If KeyAscii <> 48 And KeyAscii <> 49 And KeyAscii <> 50 And KeyAscii <> 51 And KeyAscii <> 52 And KeyAscii <> 53 And KeyAscii <> 54 And KeyAscii <> 55 And KeyAscii <> 56 And KeyAscii <> 57 And KeyAscii <> 8 And KeyAscii <> 13 And KeyAscii <> 46 Then
KeyAscii = 0
MsgBox ("Please Enter Numbers Only")
End If
End Sub
Private Sub TAmt_KeyPress(KeyAscii As Integer)
If KeyAscii <> 48 And KeyAscii <> 49 And KeyAscii <> 50 And KeyAscii <> 51 And KeyAscii <> 52 And KeyAscii <> 53 And KeyAscii <> 54 And KeyAscii <> 55 And KeyAscii <> 56 And KeyAscii <> 57 And KeyAscii <> 8 And KeyAscii <> 13 And KeyAscii <> 46 Then
KeyAscii = 0
MsgBox ("Please Enter Numbers Only")
End If
End Sub
Private Sub TReset_Click()
TSNm.Caption = ""
TAcNo.Text = ""
TIFSC.Text = ""
TIFSC.Enabled = True
TAmt.Text = ""
End Sub
Private Sub TSAcn_Click()
Dim mt1 As String
Dim mt2 As String
Dim mt3 As String
Dim mt4 As String
Dim mrs As New ADODB.Recordset
mrs.Open " select ifsc,acno,name from customer_data", cn, adOpenDynamic, adLockOptimistic
mt1 = Trim(TAcNo.Text)
mt3 = UCase(Trim(TIFSC.Text))
mrs.MoveFirst
f = 0
Do While mrs.EOF <> True
mt2 = Trim(mrs!ACNo)
mt4 = UCase(Trim(mrs!IFSC))
If mt1 = mt2 And mt3 = mt4 Then
f = 1
TSNm.Caption = mrs!Name
TIFSC.Enabled = False
TAmt.SetFocus
Exit Do
End If
mrs.MoveNext
Loop
If f = 0 Then
TSNm.Caption = ""
MsgBox "IFSC & Account No. Not Found", vbInformation
End If
mrs.Close
End Sub
Private Sub TMoney_Click()
Dim sfres As New ADODB.Recordset
Dim chacn As New ADODB.Recordset
Dim wduid As String
Dim dwduid As String
Dim wdifsc As String
Dim wdacno As String
Dim wdid As String
Dim wdname As String
Dim wdmobile As String
Dim wddate As String
Dim wddebit As String
Dim wdcredit As String
Dim wdbalance As String
Dim vgbj As String
Dim smacn As String
Dim twid As String
Dim wtmode As String
Dim vtdep2 As String
Dim wtypfi As String
Dim chname As String
vgbj = ACNo.Caption
smacn = TAcNo.Text
wtmode = "Sent To " & TSNm.Caption & " A/C No. " & TAcNo.Text
wtypfi = "Debit"
If TSNm.Caption = "" Then
MsgBox "Search Customer First", vbCritical
Else
Make_Connection
con.Open cn
chacn.Open " select name from customer_data where acno='" & smacn & "'", cn, adOpenDynamic, adLockOptimistic
If chacn.EOF Then
MsgBox "Invalid Account Number", vbCritical
Else
chname = chacn!Name
End If
chacn.Close
con.Close
If Trim(UCase(chname)) = Trim(UCase(TSNm.Caption)) Then
If TSNm.Caption = "" Then
MsgBox ("Please Search Customer")
TIFSC.SetFocus
Else
If TAmt.Text = "" Then
MsgBox ("Please Enter Amount")
TAmt.SetFocus
Else
If Bal.Caption = 0 Then
MsgBox ("Low Balance"), vbCritical
Else
If Bal.Caption < TAmt.Text Then
MsgBox ("Low Balance"), vbCritical
Else
Make_Connection
con.Open cn
sfres.Open " select * from customer_data where acno='" & vgbj & "'", cn, adOpenDynamic, adLockOptimistic
wdifsc = sfres!IFSC
wdacno = sfres!ACNo
wdid = sfres!Id
wdname = sfres!Name
wdmobile = sfres!Mobile
wddate = Now()
wddebit = TAmt.Text
wdcredit = "0"
wdbalance = Trim(sfres!Balance - TAmt.Text)
wdtid = sfres!ltid + 1
twid = Trim(sfres!twithdrawl + TAmt.Text)
con.Execute (" ALTER SESSION SET NLS_DATE_FORMAT='dd-mm-yyyy hh:mi:ss AM'")
con.Execute ("insert into customer_statement (ifsc,acno,id,name,mobile,dates,debit,credit,balance,tid,tmode,ttype)values('" & wdifsc & "','" & wdacno & "','" & wdid & "','" & wdname & "','" & wdmobile & "','" & wddate & "','" & wddebit & "','" & wdcredit & "','" & wdbalance & "','" & wdtid & "','" & wtmode & "','" & wtypfi & "')")
con.Execute ("insert into Bank_Transaction (dates,tid,ttype,tmode,id,name,amount,acno,ifsc)values('" & wddate & "','" & wdtid & "','" & wtypfi & "','" & wtmode & "','" & wdid & "','" & wdname & "','" & wddebit & "','" & wdacno & "','" & wdifsc & "')")
con.Execute ("commit")
con.Execute ("update customer_data set ltid='" & wdtid & "',balance='" & wdbalance & "',twithdrawl='" & twid & "' where id='" & wdid & "' ")
con.Execute ("commit")
'Add Total Bank Balance Code Start
banbal.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
If IsNull(banbal!bank_bal) Then
con.Execute ("update admin_login set bank_bal= 0")
con.Execute ("commit")
banbal.Close
banbal.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
bbala = Trim(banbal!bank_bal - TAmt.Text)
Else
bbala = Trim(banbal!bank_bal - TAmt.Text)
End If
con.Execute ("update admin_login set bank_bal='" & bbala & "'")
con.Execute ("commit")
banbal.Close
banbal.Open
If IsNull(banbal!twithdrawl) Then
con.Execute ("update admin_login set twithdrawl= 0")
con.Execute ("commit")
banbal.Close
banbal.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
vtdep2 = Trim(banbal!twithdrawl + TAmt.Text)
con.Execute ("update admin_login set twithdrawl= '" & vtdep2 & "'")
con.Execute ("commit")
Else
vtdep2 = Trim(banbal!twithdrawl + TAmt.Text)
con.Execute ("update admin_login set twithdrawl= '" & vtdep2 & "'")
con.Execute ("commit")
End If
banbal.Close
'Code End
MsgBox ("Your Balance is " + wdbalance), vbInformation, "Remaining Balance"
Bal.Caption = wdbalance
con.Close
DepositBTN_Click
End If
End If
End If
End If
Else
MsgBox "Search Customer Again", vbCritical
End If
End If
End Sub
Private Sub DepositBTN_Click()
Dim sfres As New ADODB.Recordset
Dim wduid As String
Dim dwduid As String
Dim wdifsc As String
Dim wdacno As String
Dim wdid As String
Dim wdname As String
Dim wdmobile As String
Dim wddate As String
Dim wddebit As String
Dim wdcredit As String
Dim wdbalance As String
Dim Vgbk As String
Dim tdep As String
Dim tmode As String
Dim vtdep1 As String
Dim dtypfi As String
dtypfi = "Credit"
Vgbk = TAcNo.Text
tmode = "Received from " & CNM.Caption & " A/C No. " & ACNo.Caption
If TSNm.Caption = "" Then
MsgBox ("Please Search Customer")
TAcNo.SetFocus
Else
If TAmt.Text = "" Then
MsgBox ("Please Enter Amount")
TAmt.SetFocus
Else
Make_Connection
con.Open cn
sfres.Open " select * from customer_data where acno='" & Vgbk & "'", cn, adOpenDynamic, adLockOptimistic
banbal.Open " select * from admin_login", cn, adOpenDynamic, adLockOptimistic
wdifsc = sfres!IFSC
wdacno = sfres!ACNo
wdid = sfres!Id
wdname = sfres!Name
wdmobile = sfres!Mobile
wddate = Now()
wddebit = "0"
wdcredit = TAmt.Text
wdbalance = Trim(sfres!Balance + TAmt.Text)
If IsNull(banbal!bank_bal) Then
con.Execute ("update admin_login set bank_bal= 0")
con.Execute ("commit")
banbal.Close
banbal.Open " select bank_bal from admin_login", cn, adOpenDynamic, adLockOptimistic
bbala = Trim(banbal!bank_bal + TAmt.Text)
Else
bbala = Trim(banbal!bank_bal + TAmt.Text)
End If
wdtid = sfres!ltid + 1
tdep = Trim(sfres!tdeposit + TAmt.Text)
con.Execute (" ALTER SESSION SET NLS_DATE_FORMAT='dd-mm-yyyy hh:mi:ss AM'")
con.Execute ("insert into customer_statement (ifsc,acno,id,name,mobile,dates,credit,debit,balance,tid,tmode,ttype)values('" & wdifsc & "','" & wdacno & "','" & wdid & "','" & wdname & "','" & wdmobile & "','" & wddate & "','" & wdcredit & "','" & wddebit & "','" & wdbalance & "','" & wdtid & "','" & tmode & "','" & dtypfi & "')")
con.Execute ("insert into Bank_Transaction (dates,tid,ttype,tmode,id,name,amount,acno,ifsc)values('" & wddate & "','" & wdtid & "','" & dtypfi & "','" & tmode & "','" & wdid & "','" & wdname & "','" & wdcredit & "','" & wdacno & "','" & wdifsc & "')")
con.Execute ("commit")
con.Execute ("update admin_login set bank_bal='" & bbala & "'")
con.Execute ("update customer_data set ltid='" & wdtid & "',balance='" & wdbalance & "',tdeposit='" & tdep & "' where id='" & wdid & "' ")
con.Execute ("commit")
vtdep1 = Trim(banbal!tdeposit + TAmt.Text)
con.Execute ("update admin_login set tdeposit= '" & vtdep1 & "'")
con.Execute ("commit")
MsgBox ("Transferred Successfully, To " + wdname)
TAmt.Text = ""
TSNm.Caption = ""
TIFSC.Text = ""
TAcNo.Text = ""
TIFSC.Enabled = True
banbal.Close
con.Close
RefreshTran_Click
End If
End If
End Sub
Private Sub TransactionList_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
Call SortListView(TransactionList, ColumnHeader.Index)
End Sub
Code by SA
Disclaimer: Only For Education Purpose
© 2020 Satyam Aaditya