VERSION 5.00
Object = "{0C8DE9F2-EAFC-44DF-A13F-B5A9B36ED780}#2.0#0"; "lvButton.ocx"
Begin VB.Form CashDeposit 
   BackColor       =   &H80000009&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "State Bank Of India - Cash Deposit"
   ClientHeight    =   4170
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   8925
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4170
   ScaleWidth      =   8925
   StartUpPosition =   2  'CenterScreen
   Begin VB.TextBox txtRs 
      Alignment       =   1  'Right Justify
      Appearance      =   0  'Flat
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   5640
      MaxLength       =   4
      MultiLine       =   -1  'True
      TabIndex        =   1
      Top             =   2400
      Width           =   3015
   End
   Begin lvButton.lvButtons_H cmdDone 
      Height          =   495
      Left            =   3840
      TabIndex        =   6
      Top             =   3480
      Width           =   2295
      _ExtentX        =   4048
      _ExtentY        =   873
      Caption         =   "&Done"
      CapAlign        =   2
      BackStyle       =   2
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Palatino Linotype"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      cGradient       =   0
      Mode            =   0
      Value           =   0   'False
      ImgAlign        =   3
      Image           =   "CashDeposit.frx":0000
      ImgSize         =   24
      Enabled         =   0   'False
      cBack           =   -2147483633
   End
   Begin lvButton.lvButtons_H cmdCancel 
      Height          =   495
      Left            =   6360
      TabIndex        =   7
      Top             =   3480
      Width           =   2295
      _ExtentX        =   4048
      _ExtentY        =   873
      Caption         =   "&Cancel"
      CapAlign        =   2
      BackStyle       =   2
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Palatino Linotype"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      cGradient       =   0
      Mode            =   0
      Value           =   0   'False
      ImgAlign        =   3
      Image           =   "CashDeposit.frx":067F
      ImgSize         =   24
      cBack           =   -2147483633
   End
   Begin VB.Label Label3 
      BackColor       =   &H000080FF&
      Height          =   1335
      Left            =   600
      TabIndex        =   8
      Top             =   0
      Width           =   1095
   End
   Begin VB.Image Image1 
      Height          =   960
      Left            =   7680
      Picture         =   "CashDeposit.frx":3AC5
      Stretch         =   -1  'True
      Top             =   120
      Width           =   1095
   End
   Begin VB.Line Line2 
      BorderWidth     =   2
      X1              =   0
      X2              =   9240
      Y1              =   3240
      Y2              =   3240
   End
   Begin VB.Line Line1 
      BorderWidth     =   2
      X1              =   0
      X2              =   9240
      Y1              =   2040
      Y2              =   2040
   End
   Begin VB.Label lblCurrentRs 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Rs."
      BeginProperty Font 
         Name            =   "Palatino Linotype"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   390
      Left            =   3840
      TabIndex        =   5
      Top             =   1560
      Width           =   390
   End
   Begin VB.Label lblBalance 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "Palatino Linotype"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   390
      Left            =   3960
      TabIndex        =   4
      Top             =   1560
      Width           =   195
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Your Current Balance is Rs."
      BeginProperty Font 
         Name            =   "Palatino Linotype"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   390
      Left            =   360
      TabIndex        =   3
      Top             =   1560
      Width           =   3420
   End
   Begin VB.Label lblRs 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Now I am Depositing Rs."
      BeginProperty Font 
         Name            =   "Palatino Linotype"
         Size            =   14.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   390
      Left            =   2280
      TabIndex        =   2
      Top             =   2400
      Width           =   3150
   End
   Begin VB.Image SBI_Logo 
      Height          =   990
      Left            =   2880
      Picture         =   "CashDeposit.frx":67BA
      Top             =   0
      Width           =   3540
   End
   Begin VB.Label Label11 
      BackColor       =   &H000080FF&
      Height          =   255
      Left            =   0
      TabIndex        =   0
      Top             =   1080
      Width           =   9855
   End
End
Attribute VB_Name = "CashDeposit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim FieldError As Boolean

Private Sub cmdCancel_Click()
Unload Me
ATM.Menu.Visible = True
ATM.txtPassword.Visible = False
ATM.lblWelcome = "Welocme To State Bank Of India ATM Service"
ATM.lblDetail = "SBI ATM Services"
ATM.lblWelcome.Visible = True
ATM.lblDetail.Visible = True
End Sub

Private Sub cmdDone_Click()
Dim Total As Double, Result As VbMsgBoxResult
CheckField
If FieldError = True Then
    Exit Sub
Else
    If rsAccount.Fields("Cash") > 100000 Then
        MsgBox "Your Account Contain 10 Lacs So You Cannot Exceed Deposit Limit!", vbInformation, "SBI CashDeposit Msg"
        Exit Sub
    Else
        Total = Val(rsAccount.Fields("Cash"))
        Total = Total + Val(txtRs.Text)
        rsAccount.Fields("Cash") = Total
        rsAccount.Update
        Unload Me
        Result = MsgBox("Your Amount is successfully Deposited.", vbInformation, "State Bank Of India - Money Deposit")
        If Result = vbOK Then
            ATM.lblDetail.Visible = True
            ATM.lblDetail.Caption = "Thanx For Banking With Us!"
            ATM.LogOut.Visible = True
        End If
    End If
End If
End Sub

Private Sub cmdDone_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
    cmdDone_Click
End If
End Sub

Private Sub Form_Load()
lblCurrentRs.Caption = rsAccount.Fields("Cash")
End Sub

Private Sub txtRs_Change()
cmdDone.Enabled = True
End Sub

Private Sub CheckField()
If Trim(Val(txtRs.Text)) = "" Then
    FieldError = True
    MsgBox "Please Enter Rupees To Deposit in Your Account.", vbInformation, "SBI ATM Msg"
    Exit Sub
Else
    FieldError = False
End If
End Sub

