Stud MGMT System
Stud MGMT System
TRIGGER
SQL> create or replace trigger stud_trig
2 before insert on student
3 for each row
4 declare
5 k varchar2(6);
6 begin
7 select lpad(to_char(stud_seq.nextval),6,'0')
8 into k from dual;
9 :new.rollno := 'S'||k;
10 end;
SQL> /
Trigger created.
CONNECTIVITY.VB
Imports System.Data.OracleClient
MAIN FORM.VB
Imports System.Windows.Forms
INSERT.VB
Imports System.Data.OracleClient
tfname.Text = ""
tmname.Text = ""
tlname.Text = ""
tadd.Text = ""
tcity.Text = ""
tcategory.Text = ""
tpland.Text = ""
tpmobile.Text = ""
temail.Text = ""
tdob.Text = ""
tgraduation.Text = ""
tgrad_year.Text = ""
tgrad_uni.Text = ""
tgrad_per.Text = ""
trank_combine.Text = ""
trank_category.Text = ""
End Sub
mycon.add(query)
End Sub
End Class
UPDATE.VB
Imports System.Data.OracleClient
tgraduation.Enabled = False
tgrad_year.Enabled = False
tgrad_uni.Enabled = False
tgrad_per.Enabled = False
trank_combine.Enabled = False
trank_category.Enabled = False
End Sub
Private Sub Update_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
mycon.cmdrefresh()
For Each mycon.dr In mycon.dt.Rows
ComboBox1.Items.Add(mycon.dr.Item("rollno"))
Next
setenable()
End Sub
tgraduation.Text = ""
tgrad_year.Text = ""
tgrad_uni.Text = ""
tgrad_per.Text = ""
trank_combine.Text = ""
trank_category.Text = ""
End Sub
If str.Equals(mycon.dr.Item("rollno")) Then
tfname.Text = mycon.dr.Item("fname")
tmname.Text = mycon.dr.Item("mname")
tlname.Text = mycon.dr.Item("lname")
tadd.Text = mycon.dr.Item("address")
tcity.Text = mycon.dr.Item("city")
tcategory.Text = mycon.dr.Item("category")
tpland.Text = mycon.dr.Item("phone_land")
tpmobile.Text = mycon.dr.Item("phone_mobile")
temail.Text = mycon.dr.Item("email")
tdob.Text = mycon.dr.Item("to_char(dob)")
tgraduation.Text = mycon.dr.Item("graduation")
tgrad_year.Text = mycon.dr.Item("grad_year")
tgrad_uni.Text = mycon.dr.Item("grad_uni")
tgrad_per.Text = mycon.dr.Item("grad_per")
trank_combine.Text = mycon.dr.Item("gcet_rank_combine")
trank_category.Text = mycon.dr.Item("gcet_rank_category")
Exit For
End If
Next
End Sub
Public Sub setenable2()
' tfname.Enabled = True
'tmname.Enabled = True
'tlname.Enabled = True
tadd.Enabled = True
tcity.Enabled = True
' tcategory.Enabled = True
tpland.Enabled = True
tpmobile.Enabled = True
temail.Enabled = True
' tdob.Enabled = True
'tgraduation.Enabled = True
'tgrad_year.Enabled = True
'tgrad_uni.Enabled = True
'tgrad_per.Enabled = True
'trank_combine.Enabled = True
'trank_category.Enabled = True
End Sub
mycon.cmdrefresh()
End Sub
End Class
SEARCH.VB
Imports System.Data.OracleClient
DELETE.VB
Imports System.Data.OracleClient
If str.Equals(mycon.dr.Item("rollno")) Then
tfname.Text = mycon.dr.Item("fname")
tmname.Text = mycon.dr.Item("mname")
tlname.Text = mycon.dr.Item("lname")
tadd.Text = mycon.dr.Item("address")
tcity.Text = mycon.dr.Item("city")
tcategory.Text = mycon.dr.Item("category")
tpland.Text = mycon.dr.Item("phone_land")
tpmobile.Text = mycon.dr.Item("phone_mobile")
temail.Text = mycon.dr.Item("email")
tdob.Text = mycon.dr.Item("to_char(dob)")
tgraduation.Text = mycon.dr.Item("graduation")
tgrad_year.Text = mycon.dr.Item("grad_year")
tgrad_uni.Text = mycon.dr.Item("grad_uni")
tgrad_per.Text = mycon.dr.Item("grad_per")
trank_combine.Text = mycon.dr.Item("gcet_rank_combine")
trank_category.Text = mycon.dr.Item("gcet_rank_category")
Exit For
End If
Next
End Sub
tgraduation.Text = ""
tgrad_year.Text = ""
tgrad_uni.Text = ""
tgrad_per.Text = ""
trank_combine.Text = ""
trank_category.Text = ""
End Sub
Private Sub delete1_Load(ByVal sender As System.Object,_
ByVal e As System.EventArgs) Handles MyBase.Load
setenable()
mycon.cmdrefresh()
For Each mycon.dr In mycon.dt.Rows
ComboBox1.Items.Add(mycon.dr.Item("rollno"))
Next
End Sub
tgraduation.Enabled = False
tgrad_year.Enabled = False
tgrad_uni.Enabled = False
tgrad_per.Enabled = False
trank_combine.Enabled = False
trank_category.Enabled = False
End Sub
End Class
VIEW.VB
Imports System.Data.OracleClient
mycon.cmdrefresh()
DataGridView1.DataSource = mycon.dt
DataGridView1.AllowUserToAddRows = False
DataGridView1.AllowUserToDeleteRows = False
DataGridView1.AllowUserToOrderColumns = False
DataGridView1.AllowUserToResizeColumns = False
DataGridView1.AllowUserToResizeRows = False
DataGridView1.ReadOnly = True
End Sub
Me.Close()
End Sub
End Class
RES_INSERT
Imports System.Data.OracleClient
tm1.Text = ""
tm2.Text = ""
tpass.Text = ""
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
RES_UPDATE
Imports System.Data.OracleClient
ComboBox3.Items.Clear()
For i = 1 To 6
ComboBox3.Items.Add((str + i.ToString))
Next
ComboBox3.Enabled = True
End Sub
End Sub
Private Sub Button3_Click(ByVal sender As System.Object,_
ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
End Sub
If str.Equals(mycon.dr.Item("rollno")) Then
tm1.Text = mycon.dr.Item("marks_int")
tm2.Text = mycon.dr.Item("marks_ext")
tpass.Text = mycon.dr.Item("pass_year")
Exit For
End If
Next
End Sub
Private Sub tpass_TextChanged(ByVal sender As System.Object,_
ByVal e As System.EventArgs) Handles tpass.TextChanged
If tpass.Text = "" Then
Button1.Enabled = False
Else
Button1.Enabled = True
End If
End Sub
End Class
RES_VIEW
Imports System.Data.OracleClient
Public Class res_view
Dim mycon As New Connectivity
Private Sub view1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
mycon.cmdrefresh1()
DataGridView1.DataSource = mycon.dt
DataGridView1.AllowUserToAddRows = False
DataGridView1.AllowUserToDeleteRows = False
DataGridView1.AllowUserToOrderColumns = False
DataGridView1.AllowUserToResizeColumns = False
DataGridView1.AllowUserToResizeRows = False
DataGridView1.ReadOnly = True
End Sub