Sie sind auf Seite 1von 10

Lovely Professional University

TERM-PAPER OF CAP-407
Course Code: CAP407

TOPIC- INCOME TAX COMPUTATION.

DOS:- 10.05.10 Course instructor:-


MR.panakaj sharma
ROLLNO- 12
SECTION- D-3802

STUDENT SIGNATURE:-
ramandeep

ACKNOWLEDGEMENT
I AM VERY THANKFUL TO MY

LECTURER MR.pankaj sharma SIR

WHO SUGGESTED ME A LOT

TO PREPARE THIS TERM-PAPER.I

AM ALSO THANKFUL TO MY

FRIENDS FOR HELP ME TO

COMPLETE THIS TERM-PAPER.

CONTENTS:-
1) INTRODUCTION.
2) LOGIN FORM.
3) INSERT.
4) DELETE.
5) SEARCH.
6) DATAGRID.
7) UPDATE.

INTRODUCTION:-
This computation helps us to calculate the tax liability based on taxable income.

For login form:-


Imports System.Windows.forms
Public Class Form2

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
Dim a As String
Dim b As Integer
a = TextBox1.Text
b = TextBox2.Text
If a = "user" And b = "123" Then
Form1.Visible = True
Else

MessageBox.Show("username and password is incorrect")


MessageBox.Show("form is closed")

Me.Close()
End If
End Sub
End Class
For insert button:-

Imports System.Data.odbc

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
Dim con As New OdbcConnection("dsn=rahul")
con.Open()

Dim qry As String

qry = " insert into


raman(taxno,name,address,state,city,pincode,natureofpayment,bankname)
values (' " + TextBox1.Text + " ',' " + TextBox2.Text + " ',' " + TextBox3.Text + " ',' "
+ TextBox4.Text + " ', ' " + TextBox5.Text + " ',' " + TextBox6.Text + " ',' " +
ComboBox1.Text + " ',' " + ComboBox2.Text + " ')"

Dim com As New OdbcCommand(qry, con)


com.ExecuteNonQuery()
MessageBox.Show("inserted")

con.Close()
End Sub

For delete button:-

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
Dim con As New OdbcConnection("dsn=rahul")
con.Open()
Dim qry As String
Dim a As String
a = TextBox1.Text
qry = "delete from raman where taxno=' " & a & " ' "
Dim com As New OdbcCommand(qry, con)
com.ExecuteNonQuery()
MessageBox.Show("deleted")
con.Close()
End Sub
For search button:-

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
Dim con As New OdbcConnection("dsn=rahul")
Dim dr As OdbcDataReader

con.Open()
Dim Query As String
Dim a As String
a = TextBox1.Text
Query = " Select *from raman where taxno=' " & a & " '"
Dim vcommand As New OdbcCommand(Query, con)
dr = vcommand.ExecuteReader

If dr.HasRows Then
While dr.Read

TextBox4.Text = dr.Item("state")
TextBox5.Text = dr.Item("city")
TextBox6.Text = dr.Item("pincode")
End While
End If
con.Close()
End Sub

For datagrid view:-


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'KingDataSet.raman' table. You
can move, or remove it, as needed.
Me.ramanTableAdapter.Fill(Me.KingDataSet. raman)

End Sub

For update button:-

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button4.Click
Dim con As New OdbcConnection("dsn=rahul")
con.Open()
Dim qry As String
qry = "update raman set name='" + TextBox2.Text + "',state='" +
TextBox4.Text + "' where taxno='" & TextBox1.Text & "'"
Dim com As New OdbcCommand(qry, con)
com.ExecuteNonQuery()
con.Close()
MessageBox.Show("Record Updated!")

End Sub

End Class

Das könnte Ihnen auch gefallen