Sunteți pe pagina 1din 25

Table of Contents

S. No. 1 2 3 4 5 6

Description Introduction---------------------------------------------------------------------Project Initiation Note----------------------------------------------------------Project Plan----------------------------------------------------------------------Individual Project Schedule---------------------------------------------------Test Plan-------------------------------------------------------------------------Software Project Plan Review Checklist--------------------------------------

Page No.

7
8 9 10 11 12 13 14 15 16 17 18 19 20

Test Plan Review Checklist----------------------------------------------------Naming Conventions-----------------------------------------------------------Database Design----------------------------------------------------------------Forms Design--------------------------------------------------------------------Validations to be Performed---------------------------------------------------Reports Design--------------------------------------------------------------------

Software Design Review Checklist--------------------------------------------Problem Report------------------------------------------------------------------Code Review Checklist----------------------------------------------------------Test Report------------------------------------------------------------------------Test Procedure Review Checklist-----------------------------------------------

Program Listings-----------------------------------------------------------------Suggested Enhancements------------------------------------------------------Conclusion-------------------------------------------------------------------------

Introduction

Library management is aimed at developing a institutional administration system which can help in the streamline functioning of library work in all institutional and any orzanization.it involve s many administrative work and coordination it centralized the book details and student activites information in the library .thus meeting the communication and information needs of the entire library community in real time and it will be utterly simple to use for everyone Goals To be Achieved: (1)The system should store information about the book details and all information of the records maintain in the library database. (2)The system should provide a Windows-based interface for accepting users requirements details, then assigning a feedback to an client from the responsible operational department, accepting investigation details. In addition, it shoud have all the latest technology. (3)The library management should provide a Windows-based interface , provide easy to access all applications displaying the current status . (4) the library management system provide us the best way of running even the large library thats contain thousands of books and student issuing lot of books in a day (5) with this use we dont need to turn out old pages of record book to check out the detail activities in the previous year. (6) it can perform the daily work activities done by library management system. It contain books information details and record It contain number of books have been issued till now Update data of all information regarded to all records It provide security provided by using password so no any stranger would able to access.

Project Initiation Note


Clint :Bhutta college of engineering and technology Project Name : library management system Efforts (person month):: 3 month Quality reviewer : inderdeep singh Team members 1>bipin kumar 2>mohd kamal Initiated by : inderdeep deep date -

Project Plan

a) Title & scope of project Title: library management Scope: Library management is aimed at developing a institutional administration system which can help in the streamline functioning of library work in all institutional and any orzanization. Initial Activity: Project Plan Final activity: Project Walkthrough

b) Outputs or deliverables for the project # Item Requireme Responsib Planned nts ility Date 2 Copies Mohd kamal 12/08/2010 Actual Date 14/08/2010 Statu s Done

1 Software

2 Documents

1 Copy

,bipin kumar bipin

12/08/2010

14/08/2010

Done

a) Resource requirements # Resource Name Why would you need the resource Where would you get the resour ce from BCET How would you get the resource How long would you need the resour ce Throug hout the constru ction phase of the Current status on availabilit y Contingen cy Action

1 H/w

For constructio n of the system

Collect the data from computer lab

Available

Take extra bookings or work at home

# Resource Name

Why would you need the resource

Where would you get the resour ce from

How would you get the resource

How long would you need the resour ce project as well as during the walkthr ough Throug hout the constru ction phase of the project as well as during the walkthr ough Throug h-out the constru c-tion phase of the project

Current status on availabilit y

Contingen cy Action

2 S/W (Visual Studio .NET)

For constructio n

BCET

Request the faculty to ensure that

Available

Inform the faculty and the center head and seek the solution

3 MSDN Help

For further reference and sample codes

BCET

4 Books on , VB.NET, and sql

For additional information

BCET Library

Request the faculty to ensure that MSDN help is installed on the computer Issue the book from the library

Not available

Refer to the coursewar e, issue books from the library for additional information Buy them, borrow them from friends

Throug h-out the constru c-tion phase of the project

Not available

b) Risks identified in the project # Risk 1 Missed deadlines Probability (%) 80 Severity (%) 100 Action plan Make a detailed project schedule and ensure that every team member adheres to the schedule. Regular discussions between the team members to check the status of the project. In case of problems inform the faculty about the problem and request for extra machine room bookings. Take printouts of all work done during extra bookings and type it during the time allocated for projects. Discuss the problems that may be faced during integration with the faculty. Find out information about integrating different modules from books and MSDN help. In order to ensure that database connectivity information does not need to be changed on each and every form, create a single component that contains the connectivity information and use the same component in Windows Forms as well as Web Forms.

2 Defects in the end product due to problems faced during integration

90

100

Defects in the end product due to problems faced during integration

90

100

Discuss the problems that may be faced during integration with the faculty. Find out information about integrating different modules from books and MSDN help. In order to ensure that database connectivity information does not need to be changed on each and every form, create a single component that contains the connectivity information and use the same component in Windows Forms as well as Web Forms. Discuss the naming conventions with the team members even before the first machine room session.

Difference in standards followed, such as naming conventions

80

15

a) Allocation of tasks
# 1. 2. 3. 4. 5. 6. Task Writing the script for creating the database and database objects Creating the necessary reusable components and testing them Creating Windows forms Designing reports Creating Forms Creating Help files Responsibility Mohd kamal Bipin kumar Mohd kamal Bipin kumar Mohd kamal Bipin kumar Mohd kamal Bipin kumar Mohd kamal Bipin kumar Mohd kamal Bipin kumar

Individual Project Schedule

S. No. 1. 2.

Activity Description

Planned Date of Completion Aug12,2010 Aug12,2010

Actual date

Responsibilit y Mohd kamal Bipin kumar Mohd kamal Bipin kumar

Remark

Deciding naming conventions Filling the project documentation formats (Introduction, Initiation, Project Plan, Individual Project Schedule, Software Review Checklist, Naming Conventions) Creating the database and database objects Creating all the necessary reusable

Aug14,2010 Aug14,2010

3. 4.

Aug12,2010 Aug12,2010

Aug14,2010 Aug14,2010

Mohd kamal Bipin kumar Mohd kamal Bipin kumar

S. No.

Activity Description components

Planned Date of Completion

Actual date

Responsibilit y Maohd kamal Bipin kumar Mohd kamal Bipin kumar Mohd kamal Bipin kumar Mohd kamal Bipin kumar Mohd kamal Bipin kumar Mohd kamal Bipin kumar

Remark

5. 8.

Creating the Login form Creating the Assign Feedback form Creating the Assign Feedback form Creating reports Creating the Help files Integrating all program modules

Aug14,2010 Aug14,2010

Aug14,2010 Aug14,2010

8. 10. 11 12.

Aug14,2010 Aug15,2010 Aug16,2010 Aug17,2010

Aug14,2010 Aug15,2010 Aug16,2010 Aug20,2010

Test Plan

Testing phase Unit Testing Components

Functionality to be tested Check whether each method of a component returns the expected values.

Scheduled date

Actual Date

Aug22,2010

Aug24,2010

Windows Forms Logon, Log Feedback, Assign Feedback, Investigation Details, Corrective Action Details Web Forms

Check whether all validations are performed properly and whether appropriate values are added to the database. Check whether data is retrieved from the database properly in case of the Feedback Status Inquiry form. Check whether all validations are performed in the Feedback details form. Check whether all independent modules work properly after integration.

Aug22,2010

Aug22,2010

Aug22,2010

Aug22,2010

Integration Testing Aug 23,2010 Aug23,2010

Software Project Plan Review Checklist

S. No. 1. 2. 3. 4. 5. 6. 7.

Areas of concern Software scope is defined unambiguously. Terminology is clear. Resources are sufficient. Resources are readily available. All the risks involved in the project have been identified. Risk management plan is in place. All tasks have been identified and allocated.

result

Test Plan Review Checklist

S. No. 1. 2. 3.

Areas of concern Test phases have been identified and sequenced properly. Test plan is consistent with the overall project plan. Test schedule has been explicitly defined.

result

Naming Conventions

Item Classes

Naming conventions Class names should clearly indicate the entity that it represents. For example, the name of the class that represents a student should be named student Object names should begin with obj. For example, an instance of the student class should be named objstudent. Integer intVarName Long lVarName Decimal dVarName String strVarName Boolean bVarName

Objects Variables

Controls

Label lblControlName Text box- txtControlName Button cmdControlName List box lstControlName Combo box - cmbControlName Radio button rbControlName Check box cbControlName

Files

File names should clearly indicate the kind of data that they store. For example, the name of the file containing the definition of the student class should be student.vb

Screen Designs

Screen Name Login

Screen Type Windows Form

Description Accepts user name and password for the main menu for the application is displayed. Displays the main menu for the application. Accepts all detail of student information Book name book id number

Table/Query Used User name & password

Main menu form

Windows Form

Student and book detail etc

Student form

Windows Form

Student name ,roll no,branch ,batch. Book name,bookno,book auther. All the required entries

Book detail form

Windows Form

User account form

Windows Form

Allows a new users to enter the details Allows a user to chek the Pending status Allows a Customer to enter a return date book details Allows a user to access this form If user forget password user can again fatch password by used verifying form.

Report

Windows Form

Check the stutus

Return book form

form

Date form,submit form.

Verifiying form

Form

New Services

Form

Displays details about the new update,add,delete,

Services

Validations to be Performed

Form: Login
1. 2. The user name and password should enter in the login form If you forget your password then you will try again

Student deials form


1. 2. 3. Student name Roll no,branch branch

Form: books details


1. 2. 3. 4. 5. name of the book The authers name. The publiaction. The subject of the book Price of the book

Form: verification
1. If you forget password and user names then u can get ur password by answering the security questions

Software Design Review Checklist

S. No. 1. 2. 3. 4. 5. 6.

Areas of concern Software requirements are reflected in the software architecture. Effective modularity is achieved. All modules are functionally independent. Data structure is consistent with the information domain. Data structure is consistent with the software requirements. Maintainability of software has been considered during the design phase.

result

Test Report

# Form: Login 1.

Path

Input

Output

Actual Result

If a wrong user name and password is entered, an error message should be displayed. If in all 3 attempts a wrong user name and password is specified, an error should be displayed and the application should be terminated.

Any invalid user name and password Any invalid user name and password, then click the Login button three times

An error message

An error message

An error message in first two attempts. Third time, a message Unauthorized access. Aborting

An error message in first two attempts. Third time, a message Unauthorized access. Aborting

3.

If a valid user name and password is provided, it should display the main menu.

User Name: E005 Password: pass

Main Menu form

Main Menu form

Form: Log Customer Feedback 1. Log Customer Feedback Form: The valid values for the feedback source are Verbal, written, and Media. Student details Form: Enter Official in the Feedback Source field and click the Save button Enter any other value or try to leave the field blank and click the save button Enters the book name Enter user names and password Error- Invalid Feedback Source. Please Re-enter Error- Invalid Feedback Source. Please Reenter

2.

Error Invalid Feedback Type. Please Re-enter

Error Invalid Feedback Type. Please Re-enter

3.

Book form

add

Error Invalid Feedback Category. Please Re-enter Error Please Enter the correct user name

4.

Verification forms

Error Please Enter Feedback Details

Test Procedure Review Checklist

S. No. 1. 2. 3.

Areas of concern Test cases have been identified and listed with their expected results. Acceptable criteria from expected results have been specified. Error handling has been tested.

result

Program Listings
The Database Script for login form
Imports System.Data.SqlClient Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click End Sub Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim con As New SqlConnection("server=VINEETPC\sqlexpress;database=library;trusted_connection=true") Dim str As String str = "select * from useraccount where UserName=@un and password=@pwd" Dim cmd As New SqlCommand(str, con) cmd.Parameters.AddWithValue("@un", TextBox1.Text) cmd.Parameters.AddWithValue("@pwd", TextBox2.Text) con.Open() Dim dr As SqlDataReader dr = cmd.ExecuteReader() If dr.HasRows = True Then mainform.Show() Else MsgBox("please inter correct userid and Password") End If con.Close()

End Sub Private Sub Label3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub

Private Sub Label3_Click_2(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click forgetpwd.show() End Sub Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged End Sub Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click End Sub End Class

Main form coding


Public Class mainform Private Sub BookDetailsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BookDetailsToolStripMenuItem.Click End Sub Private Sub AddToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddToolStripMenuItem.Click Addform.Show() End Sub Private Sub EditToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EditToolStripMenuItem.Click Editform.Show() End Sub Private Sub AddToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddToolStripMenuItem1.Click AddStudentrecord.Show() End Sub

Private Sub EditToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EditToolStripMenuItem1.Click steditform.Show() End Sub Private Sub IssueToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles IssueToolStripMenuItem.Click issueform.Show() End Sub Private Sub CreateNewUserAccountToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CreateNewUserAccountToolStripMenuItem.Click Useraccount.Show() End Sub Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click Me.Dispose() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.Dispose() End Sub Private Sub AllBookToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AllBookToolStripMenuItem.Click Form2.Show()

End Sub Private Sub AllStudentToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AllStudentToolStripMenuItem.Click allstudent.Show() End Sub Private Sub mainform_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Form1.Hide()

End Sub Private Sub BookReportToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub

Private Sub ReportToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReportToolStripMenuItem.Click End Sub Private Sub BookreportToolStripMenuItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BookreportToolStripMenuItem.Click breport.Show() End Sub Private Sub StudentreportToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentreportToolStripMenuItem.Click studentform.Show() End Sub Private Sub ReturnBookToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ReturnBookToolStripMenuItem.Click Return_Form.Show() End Sub Private Sub StudentDetailsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentDetailsToolStripMenuItem.Click End Sub End Class

Return form
Imports System.Data.SqlClient Public Class Return_Form Dim con As New SqlConnection("server=vineetPC\SQLEXPRESS;database=library;trusted_connection=true") Dim d As String Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If ComboBox1.Text = "" Or ComboBox2.Text = "" Then MsgBox("fill all the box") Else Dim str As String str = "select datediff(dd,date,getdate()) from issuebook where bookno=@bn and rollno=@rno"

Dim cmd As New SqlCommand(str, con) cmd.Parameters.AddWithValue("@bn", ComboBox1.Text) cmd.Parameters.AddWithValue("@rno", ComboBox2.Text) con.Open() Dim dr As SqlDataReader dr = cmd.ExecuteReader() If dr.HasRows = True Then dr.Read() d = dr(0) End If Dim a As String a = d - 15 If a <= 0 Then Label4.Visible = True Label4.Text = (0) Else Label4.Visible = True Label4.Text = (a * 2) End If con.close() End If

End Sub Private Sub Return_Form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'LibraryDataSet3.issuebook' table. You can move, or remove it, as needed. Me.IssuebookTableAdapter1.Fill(Me.LibraryDataSet3.issuebook) 'TODO: This line of code loads data into the 'LibraryDataSet2.issuebook' table. You can move, or remove it, as needed. Me.IssuebookTableAdapter.Fill(Me.LibraryDataSet2.issuebook) End Sub End Class

User account form


Imports System.Data.SqlClient Public Class Useraccount Private Sub Label6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label6.Click End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Dispose() End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or ComboBox1.Text = "" Or TextBox4.Text = "" Then MsgBox("fill all the box") Else Dim con1 As New SqlConnection("server=vineetPC\SQLEXPRESS;database=library;trusted_connection=true") Dim st As String st = "select * from useraccount where username=@un" Dim cm As New SqlCommand(st, con1) cm.Parameters.AddWithValue("un", TextBox1.Text) con1.Open() Dim dr As SqlDataReader dr = cm.ExecuteReader() If dr.HasRows = True Then dr.Read() TextBox2.Text = dr(1) TextBox4.Text = dr(2) TextBox3.Text = dr(3) MsgBox("same user name cannt be duplicated") con1.Close() Else Dim con As New SqlConnection("server=vineetPC\SQLEXPRESS;database=library;trusted_connection=true") Dim str As String str = "insert into useraccount values(@un,@pwd,@cpwd,@sq,@a)" Dim cmd As New SqlCommand(str, con) cmd.Parameters.AddWithValue("@un", TextBox1.Text) cmd.Parameters.AddWithValue("@pwd", TextBox2.Text) cmd.Parameters.AddWithValue("@cpwd", TextBox3.Text) cmd.Parameters.AddWithValue("@sq", ComboBox1.Text) cmd.Parameters.AddWithValue("@a", TextBox4.Text) con.Open() Dim i As String i = cmd.ExecuteNonQuery() If i > 0 Then MsgBox("User Added") Else MsgBox("ur registration is not completed") End If con.Close() End If mainform.Hide() End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim con As New SqlConnection("server=vineetPC\SQLEXPRESS;database=library;trusted_connection=true") Dim str As String str = "select * from useraccount where username=@un" Dim cmd As New SqlCommand(str, con) cmd.Parameters.AddWithValue("un", TextBox1.Text) con.Open()

Dim dr As SqlDataReader dr = cmd.ExecuteReader() If dr.HasRows = True Then dr.Read() TextBox1.Text = dr(0) MsgBox("already exit") Else MsgBox("avilable") End If con.Close() End Sub End Class

Varification forms
Imports System.Data.sqlclient Public Class forgetpwd Dim con As New SqlConnection("server=VINEETPC\SQLEXPRESS;database=library;trusted_connection=true") Dim ans As String Dim pwd As String Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.Dispose() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Dim con As New SqlConnection("server=vineetPC\SQLEXPRESS;database=library;trusted_connection=true") Dim ui As String Dim str As String str = "select username,password,securityquestion,answer from useraccount where username=@ui" Dim cmd As New SqlCommand(str, con) cmd.Parameters.AddWithValue("@ui", TextBox1.Text) cmd.Parameters.AddWithValue("@ans", TextBox3.Text) con.Open() Dim dr As SqlDataReader dr = cmd.ExecuteReader() If dr.HasRows Then Panel1.Visible = True dr.Read() ui = dr(0) ans = dr(3) pwd = dr(1) Else MsgBox("please inter correct userid") End If con.Close()

End Sub Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If ans = TextBox3.Text Then Label5.Visible = True Label5.Text = "ur password is :" + pwd Else MsgBox("wrong answer") End If End Sub End Class

Issues forms codes:


Public Class Form2 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click SqlDataAdapter1.Fill(Me.DataSet11.book) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click SqlDataAdapter1.Update(Me.DataSet11.book) MsgBox("updated") End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.Dispose() End Sub Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'LibraryDataSet1.book' table. You can move, or remove it, as needed. Me.BookTableAdapter.Fill(Me.LibraryDataSet1.book) End Sub Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick

End Sub End Class

Book report forms codes:


Public Class book Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim cr As New bookreport CrystalReportViewer1.ReportSource = cr End Sub Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load End Sub End Class

Student record forms:


Imports System.Data.SqlClient Public Class AddStudentrecord Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = "" Or TextBox5.Text = "" Then MsgBox("fill all the box") Else Dim con1 As New SqlConnection("server=vineetPC\SQLEXPRESS;database=library;trusted_connection=true") Dim st As String st = "select * from student where rollno=@rno" Dim cm As New SqlCommand(st, con1) cm.Parameters.AddWithValue("rno", TextBox2.Text) con1.Open() Dim dr As SqlDataReader dr = cm.ExecuteReader() If dr.HasRows = True Then dr.Read() TextBox2.Text = dr(1)

TextBox4.Text = dr(2) TextBox3.Text = dr(3) MsgBox("same roll no student already exit") con1.Close() Else Dim con2 As New SqlConnection("server=vineetPC\SQLEXPRESS;database=library;trusted_connection=true") Dim str As String str = "insert into student values(@sn,@srn,@sb,@ss,@sx)" Dim cmd As New SqlCommand(str, con2) cmd.Parameters.AddWithValue("@sn", TextBox1.Text) cmd.Parameters.AddWithValue("@srn", TextBox2.Text) cmd.Parameters.AddWithValue("@sb", TextBox3.Text) cmd.Parameters.AddWithValue("@ss", TextBox4.Text) cmd.Parameters.AddWithValue("@sx", TextBox5.Text) con2.Open() Dim i As Integer i = cmd.ExecuteNonQuery() If i > 0 Then MsgBox("student added") Else MsgBox("student not added") End If con2.Close() End If mainform.Hide() End If End Sub Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Me.Dispose() End Sub Private Sub AddStudentrecord_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub End Class

Edit book details forms codes:


Imports System.Data.SqlClient Public Class Editform

Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim con As New SqlConnection("server=vineetPC\SQLEXPRESS;database=library;trusted_connection=true") Dim str As String str = "update book set bookno=@bno,price=@p,auname=@Au,bookname=@bname where bookno=@bno" Dim cmd As New SqlCommand(str, con) cmd.Parameters.AddWithValue("@bno", TextBox1.Text) cmd.Parameters.AddWithValue("@bname", TextBox2.Text) cmd.Parameters.AddWithValue("@p", TextBox3.Text) cmd.Parameters.AddWithValue("Au", TextBox4.Text) con.Open() Dim i As Integer i = cmd.ExecuteNonQuery() If i > 0 Then MsgBox("book record updated") End If con.Close() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Me.Dispose() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim con As New SqlConnection("server=HEMANTPC\SQLEXPRESS;database=library;trusted_connection=true") Dim str As String str = "delete from book where bookno=@bno" Dim cmd As New SqlCommand(str, con) cmd.Parameters.AddWithValue("bno", TextBox1.Text) con.Open() Dim i As Integer i = cmd.ExecuteNonQuery() If i > 0 Then MsgBox("book deleted") End If con.Close() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim con As New SqlConnection("server=HEMANTPC\SQLEXPRESS;database=library;trusted_connection=true") Dim str As String str = "select * from book where bookno=@bno" Dim cmd As New SqlCommand(str, con) cmd.Parameters.AddWithValue("bno", TextBox1.Text) con.Open()

Dim dr As SqlDataReader dr = cmd.ExecuteReader() If dr.HasRows = True Then dr.Read() TextBox2.Text = dr(1) TextBox4.Text = dr(2) TextBox3.Text = dr(3) Else MsgBox("book record not found") End If con.Close() End Sub End Class