Project Report ON "Industrial Man Power Resources Organizer"
Project Report ON "Industrial Man Power Resources Organizer"
Submitted in partial fulfillment of the requirement for the degree of Bachelor of Computer Application From
CERTIFICATE
This is to certify that MANOJ MONDAL student of Rungta College, Kohka has successfully completed his academic project work titled Industrial Man Power Resource Organization. He has done this project using VB.Net during the period from May 2013 to June 2013. He has completed his project well with the time frame. He is sincere hardworking and conduct his project is commendable.
Place Bhilai
Authorized Signature
SELF CERTIFICATE
This is to certify that the project report entitled INDUSTRIAL MAN POWER RESOURCE ORGANIZERdone by me is an authentic work carried out for the partial fulfillment of the requirement for the award of the degree Bachelor of Computer Application under guidance of Ms. VARSHA YADAV
CERTIFICATE OF EVALUATION
This is to certify that the project work entitled INDUSTRIAL MAN POWER RESOURCE ORGANIZER is carried out by Manoj Kumar Mondal student of BCA-VI Semester at rungta College of Information & Technology,Bhilai,after proper evaluation and examination is hereby approved as a credible work in the discipline of Computer Science and done in a satisfactory manner for its acceptance as a requisite for the award of degree of Bachelor of Computer Application during the year 2013 form Sikkim Manipal University.
Internal Examiner
External Examiner
Acknowledgment
I am very thankful to all those who had helped me in successful completion of my project work which is mandatory requirement for the award of degree. First of all I express my sincere thanks to our Centre Head DR.KANAK SINHA for his effort and timely advice as well as active interest in my project. His direction, supervision and constructive criticism were indeed a source of inspiration to me. Finally I want to express a deep sense of gratitude to my project guide Ms.VARSHA YADAV under whose guidance I had completed my project.
1. Candidate Roll No. 2. Project Title 3. Front End/ Back End 4. Course 5. Year 6. Centre Code 7. Name & Address
: : : : : : :
521032353 Industrial man power resources organizer Vb.Net / Sql-Server Bachelor of Computer Application 2013 03009 Rungta College of Information Technology, Kohka-Kurud Road, Bhilai (C.G)
Project Code Total Marks Scored External Name External Signature BC0060
TABLE OF CONTENTS
Chapter
1 2 3 4
Title
Abstract Objective of Project Problem Statement Technology Used
4.1. NET Framework 4.2. Other Technologies Used
5 6 7
8 9
10
System analysis
10.1. Interface Design
11 12 13 14
ATTENDANCE FORM
Public Class ATTENDENCE Sub TXTCLEAR() TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() TextBox4.Clear() ComboBox1.Text = "" TextBox5.Clear()
End Sub Sub LISTFILL() ListBox1.Items.Clear() SQL = "SELECT * FROM ATTENDENCE" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader While (DR.Read) ListBox1.Items.Add(DR(0)) End While CON.Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click I = 0 SQL = "SELECT * FROM ATTENDENCE" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader While (DR.Read) I = I + 1 End While DR.Close() CON.Close() TextBox1.Text = I + 1 End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click SQL = "INSERT INTO ATTENDENCE VALUES(" & TextBox1.Text & ",'" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & ComboBox1.Text & "','" & TextBox5.Text & "')" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() CMD.ExecuteNonQuery() CON.Close() MsgBox("RECORD INSERT") Call TXTCLEAR() Call LISTFILL() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click SQL = "UPDATE ATTENDENCE SET EMP_NAME='" & TextBox2.Text & "',ATT_NAME='" & TextBox3.Text & "',ATTENDENCE_PER_ABC_LEAVE='" & TextBox4.Text & "',LEAVE_TYPE='" & ComboBox1.Text & "',REMARK='" & TextBox5.Text & "' WHERE EMP_ID=" & TextBox1.Text & "" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() CMD.ExecuteNonQuery() CON.Close() MsgBox("RECORD UPDATE") Call TXTCLEAR() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click SQL = "SELECT * FROM ATTENDENCE WHERE EMP_ID=" & ListBox1.Text & "" CMD = New SqlClient.SqlCommand(SQL, CON)
CON.Open() DR = CMD.ExecuteReader While (DR.Read) TextBox1.Text = DR(0) TextBox2.Text = DR(1) TextBox3.Text = DR(2) TextBox4.Text = DR(3) ComboBox1.Text = DR(4) TextBox5.Text = DR(5) End While CON.Close() End Sub Private Sub ATTENDENCE_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call LISTFILL() End Sub Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress ONLYNUMBER(sender, e) End Sub Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox4_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox4.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox5_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox5.KeyPress ONLYCHAR(sender, e) End Sub End Class
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click DS_ATTENDENCE1.Clear() SqlDataAdapter1.Fill(DS_ATTENDENCE1, "ATTENDENCE") CR.SetDataSource(DS_ATTENDENCE1) CrystalReportViewer1.ReportSource = CR End Sub Private Sub ATTENDENCE_INFO_REPORT_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load SqlConnection1.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=" & Application.StartupPath & "\Industrial_man_pow_res_org.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" SqlConnection2.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=" & Application.StartupPath & "\Industrial_man_pow_res_org.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" ComboBox1.Items.Clear() SQL = "SELECT EMP_ID FROM ATTENDENCE" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader While (DR.Read) ComboBox1.Items.Add(DR(0)) End While CON.Close() End Sub Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click End Sub End Class
EMPLOYEE FORM
Public Class EMP_INFO Sub TXTCLEAR() TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() TextBox4.Clear() TextBox5.Clear() TextBox6.Clear() TextBox7.Clear() TextBox8.Clear() TextBox9.Clear() TextBox10.Clear() End Sub Sub LISTFILL() ListBox1.Items.Clear() SQL = "SELECT EMP_ID FROM EMP_INFO" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader
While (DR.Read) ListBox1.Items.Add(DR(0)) End While CON.Close() End Sub Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call TXTCLEAR() Call LISTFILL() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Call TXTCLEAR() I = 0 SQL = "SELECT EMP_ID FROM EMP_INFO" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader While (DR.Read) I = I + 1 End While DR.Close() CON.Close() TextBox1.Text = I + 1 End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click SQL = "INSERT INTO EMP_INFO VALUES(" & TextBox1.Text & ",'" & TextBox2.Text & "','" & TextBox3.Text & "'," & TextBox4.Text & ",'" & TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text & "','" & TextBox8.Text & "'," & TextBox9.Text & ",'" & TextBox10.Text & "')" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() CMD.ExecuteNonQuery() CON.Close() MsgBox("RECORD INSERT") Call TXTCLEAR() Call LISTFILL() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click SQL = "UPDATE EMP_INFO SET EMP_NAME='" & TextBox2.Text & "',ADDRESS='" & TextBox3.Text & "',PHONE_NO=" & TextBox4.Text & ",DOB='" & TextBox5.Text & "',DOJ='" & TextBox6.Text & "',DEPART='" & TextBox7.Text & "',DESIGNATION='" & TextBox8.Text & "',SALARY=" & TextBox9.Text & ",WORKING_AREA='" & TextBox10.Text & "' WHERE EMP_ID=" & TextBox1.Text & "" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() CMD.ExecuteNonQuery() CON.Close() MsgBox("RECORD UPDATE") Call TXTCLEAR() End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click SQL = "SELECT * FROM EMP_INFO WHERE EMP_ID=" & ListBox1.Text & "" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader While (DR.Read) TextBox1.Text = DR(0) TextBox2.Text = DR(1) TextBox3.Text = DR(2) TextBox4.Text = DR(3) TextBox5.Text = DR(4) TextBox6.Text = DR(5) TextBox7.Text = DR(6) TextBox8.Text = DR(7) TextBox9.Text = DR(8) TextBox10.Text = DR(9) End While CON.Close() End Sub Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox4_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox4.KeyPress ONLYNUMBER(sender, e) End Sub Private Sub TextBox7_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox7.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox8_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox8.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox9_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox9.KeyPress ONLYNUMBER(sender, e) End Sub Private Sub TextBox10_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox10.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
End Class
ORGANITZATION FORM
Public Class ORGNIZATION_INFO Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click SQL = "SELECT * FROM ORGNIZATION_INFO" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader While (DR.Read) TextBox1.Text = DR(0) TextBox2.Text = DR(1) TextBox3.Text = DR(2) TextBox4.Text = DR(3) TextBox5.Text = DR(4) TextBox6.Text = DR(5) TextBox7.Text = DR(6) TextBox8.Text = DR(7) TextBox9.Text = DR(8) End While CON.Close() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click SQL = "UPDATE ORGNIZATION_INFO SET OFFICIAL_ADDRESS='" & TextBox2.Text & "',CONTACT_NO='" & TextBox3.Text & "',EMAIL='" & TextBox4.Text & "',HEAD_INCHARGE='" & TextBox5.Text & "',PHONE_NO='" & TextBox6.Text & "',NO_OF_BRANCH='" & TextBox7.Text & "',NO_OF_EMP='" & TextBox8.Text & "',EST_DATE='" & TextBox9.Text & "' WHERE ORG_NAME='" & TextBox1.Text & "'" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() CMD.ExecuteNonQuery() CON.Close() MsgBox("RECORD UPDATE") TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() TextBox4.Clear() TextBox5.Clear() TextBox6.Clear() TextBox7.Clear() TextBox8.Clear() TextBox9.Clear() End Sub Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress ONLYCHAR(sender, e) End Sub
Private Sub TextBox3_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox3.KeyPress ONLYNUMBER(sender, e) End Sub Private Sub TextBox5_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox5.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox6_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox6.KeyPress ONLYNUMBER(sender, e) End Sub Private Sub TextBox7_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox7.KeyPress ONLYNUMBER(sender, e) End Sub Private Sub TextBox8_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox8.KeyPress ONLYNUMBER(sender, e) End Sub End Class
PERFORMANCE FORM
Public Class PERFORMANCE_INFO Sub TXTCLEAR() TextBox1.Clear() TextBox2.Clear()
TextBox3.Clear() TextBox4.Clear() TextBox5.Clear() TextBox6.Clear() TextBox7.Clear() TextBox8.Clear() TextBox9.Clear() TextBox10.Clear() End Sub Sub LISTFILL() ListBox1.Items.Clear() SQL = "SELECT * FROM PERFORMANCE_INFO" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader While (DR.Read) ListBox1.Items.Add(DR(0)) End While CON.Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Call TXTCLEAR() I = 0 SQL = "SELECT * FROM PERFORMANCE_INFO" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader While (DR.Read) I = I + 1 End While DR.Close() CON.Close() TextBox1.Text = I + 1 End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click SQL = "INSERT INTO PERFORMANCE_INFO VALUES(" & TextBox1.Text & ",'" & TextBox2.Text & "','" & TextBox3.Text & "'," & TextBox4.Text & ",'" & TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text & "','" & TextBox8.Text & "'," & TextBox9.Text & ",'" & TextBox10.Text & "')" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() CMD.ExecuteNonQuery() CON.Close() MsgBox("RECORD INSERT") Call TXTCLEAR() Call LISTFILL() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click SQL = "UPDATE PERFORMANCE_INFO SET EMP_NAME='" & TextBox2.Text & "',WORKING_AREA='" & TextBox3.Text & "',EXPERIANCE_YEAR=" & TextBox4.Text & ",FIELD_PERFORMANCE='" & TextBox5.Text & "',ACTIVITY='" & TextBox6.Text &
"',COMMUNICATION='" & TextBox7.Text & "',LEADERSHIP='" & TextBox8.Text & "',ATTENDENCE_PERCENT=" & TextBox9.Text & ",OVER_ALL_PERFORMANCE='" & TextBox10.Text & "' WHERE EMP_ID=" & TextBox1.Text & "" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() CMD.ExecuteNonQuery() CON.Close() MsgBox("RECORD UPDATE") Call TXTCLEAR() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click SQL = "SELECT * FROM PERFORMANCE_INFO WHERE EMP_ID=" & ListBox1.Text & "" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader While (DR.Read) TextBox1.Text = DR(0) TextBox2.Text = DR(1) TextBox3.Text = DR(2) TextBox4.Text = DR(3) TextBox5.Text = DR(4) TextBox6.Text = DR(5) TextBox7.Text = DR(6) TextBox8.Text = DR(7) TextBox9.Text = DR(8) TextBox10.Text = DR(9) End While CON.Close() End Sub Private Sub PERFORMANCE_INFO_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call TXTCLEAR() Call LISTFILL() End Sub Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress ONLYNUMBER(sender, e) End Sub Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox3_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox3.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox4_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox4.KeyPress ONLYNUMBER(sender, e) End Sub
Private Sub TextBox5_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox5.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox6_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox6.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox7_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox7.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox8_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox8.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox9_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox9.KeyPress ONLYNUMBER(sender, e) End Sub Private Sub TextBox10_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox10.KeyPress ONLYCHAR(sender, e) End Sub End Class
SqlConnection2.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=" & Application.StartupPath & "\Industrial_man_pow_res_org.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" ComboBox1.Items.Clear() SQL = "SELECT EMP_ID FROM PERFORMANCE_INFO" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader While (DR.Read) ComboBox1.Items.Add(DR(0)) End While CON.Close() End Sub Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load End Sub End Class
PROMOTION FORM
Public Class PRAMOTION_INFO Sub TXTCLEAR() ComboBox1.Text = " " TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() TextBox4.Clear() TextBox5.Clear() TextBox6.Clear() End Sub Sub LISTFILL() ListBox1.Items.Clear() SQL = "SELECT EMP_ID FROM PRAMOTION_INFO" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader While (DR.Read) ListBox1.Items.Add(DR(0)) End While CON.Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Call TXTCLEAR() I = 0 SQL = "SELECT EMP_ID FROM PRAMOTION_INFO" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader
While (DR.Read) I = I + 1 End While DR.Close() CON.Close() TextBox1.Text = I + 1 End Sub Private Sub PRAMOTION_INFO1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call TXTCLEAR() Call LISTFILL() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click SQL = "INSERT INTO PRAMOTION_INFO VALUES(" & ComboBox1.Text & ",'" & TextBox1.Text & "','" & TextBox2.Text & "'," & TextBox3.Text & "," & TextBox4.Text & "," & TextBox5.Text & ",'" & TextBox6.Text & "')" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() CMD.ExecuteNonQuery() CON.Close() MsgBox("RECORD INSERT") Call TXTCLEAR() Call LISTFILL() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click SQL = "UPDATE PRAMOTION_INFO SET EMP_NAME='" & TextBox1.Text & "',DEPART='" & TextBox2.Text & "',SALARY=" & TextBox3.Text & ",INCREMENT=" & TextBox4.Text & ",CURRENT_SALARY=" & TextBox5.Text & ",POST='" & TextBox6.Text & "' WHERE EMP_ID='" & ListBox1.Text & "'" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() CMD.ExecuteNonQuery() CON.Close() MsgBox("RECORD UPDATE") Call TXTCLEAR() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click SQL = "SELECT * FROM PRAMOTION_INFO WHERE EMP_ID=" & ListBox1.Text & "" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader While (DR.Read) ComboBox1.Text = DR(0) TextBox1.Text = DR(1) TextBox2.Text = DR(2) TextBox3.Text = DR(3) TextBox4.Text = DR(4) TextBox5.Text = DR(5) TextBox6.Text = DR(6) End While DR.Close()
CON.Close() End Sub Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress ONLYCHAR(sender, e) End Sub Private Sub TextBox3_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox3.KeyPress ONLYNUMBER(sender, e) End Sub Private Sub TextBox4_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox4.KeyPress ONLYNUMBER(sender, e) End Sub Private Sub TextBox5_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox5.KeyPress ONLYNUMBER(sender, e) End Sub Private Sub TextBox6_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox6.KeyPress ONLYCHAR(sender, e) End Sub
End Class
CR.SetDataSource(DS_PRAMOTION1) CrystalReportViewer1.ReportSource = CR End Sub Private Sub PRAMOTION_INFO_REPORT_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load SqlConnection1.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=" & Application.StartupPath & "\Industrial_man_pow_res_org.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" SqlConnection2.ConnectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=" & Application.StartupPath & "\Industrial_man_pow_res_org.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" ComboBox1.Items.Clear() SQL = "SELECT EMP_ID FROM PRAMOTION_INFO" CMD = New SqlClient.SqlCommand(SQL, CON) CON.Open() DR = CMD.ExecuteReader While (DR.Read) ComboBox1.Items.Add(DR(0)) End While CON.Close() End Sub End Class