Академический Документы
Профессиональный Документы
Культура Документы
Acknowledgement
I would like to thank all the lecturers and especially our Lecturer, Mr. Vijay ICBT Visual Programming module Lecture for his support and guidance. He was helped and cleared all my problems regarding this Project. Also I would like to take this opportunity to thank all those who lent a helping hand to me The project was all about Computerizing a Student Accommodation System for University Students, to find the Accommodating information easily and quickly. Finally, I must thank full to ICBT CITY CAMPUS for Providing Good lectures and a quality of learning with most updated study materials
Thank you.
ABSTRACT Student Accommodation system by manual way is tedious process, since it involves work load and time consumption. In this system, we can easily manage the Accommodation information. Landlord Details, room details, student records, easy way of room allocation and hostel Rules and Regulations. The main feature of this project is easy to allocate for the student and also easy to access the Accommodation information and the Registrations. This project is carried out using Visual Basic as front end and SQL as back end.
2|Page
Table of Contents Acknowledgement ---------------------------------------------------------------------------------------------------------------------------- 2 Introduction ------------------------------------------------------------------------------------------------------------------------------------ 4 SCOPE OF THE PROJECT --------------------------------------------------------------------------------------------------------------------- 7 Criteria( P15.1.1) ------------------------------------------------------------------------------------------------------------------------------ 8 Visual objects ------------------------------------------------------------------------------------------------------------------------------- 8 Criteria (P 15.1.2) --------------------------------------------------------------------------------------------------------------------------- 12 Forms --------------------------------------------------------------------------------------------------------------------------------------- 12 Criteria (P 15.1.2) --------------------------------------------------------------------------------------------------------------------------- 20 Forms and Properties ------------------------------------------------------------------------------------------------------------------- 20 Criteria (P15.21.1) and criteria (P15.2.2) ---------------------------------------------------------------------------------------------- 23 Employ the different modeling techniques.--------------------------------------------------------------------------------------- 23 What is UML?----------------------------------------------------------------------------------------------------------------------------- 23 UML Diagram Types --------------------------------------------------------------------------------------------------------------------- 24 User Case Diagram ---------------------------------------------------------------------------------------------------------------------- 26 Criteria( P15.2.2) ---------------------------------------------------------------------------------------------------------------------------- 31 Coding segment -------------------------------------------------------------------------------------------------------------------------- 31 Criteria (P 15.2.2) --------------------------------------------------------------------------------------------------------------------------- 39 Comments for Coding ------------------------------------------------------------------------------------------------------------------ 39 Criteria (P 15.3.1) --------------------------------------------------------------------------------------------------------------------------- 44 Reports with Crystal Report ----------------------------------------------------------------------------------------------------------- 44 Criteria (p 15.3.2) --------------------------------------------------------------------------------------------------------------------------- 50 Validations --------------------------------------------------------------------------------------------------------------------------------- 50 Criteria (p15.3.2) ---------------------------------------------------------------------------------------------------------------------------- 55 Validation the form controls against the users input --------------------------------------------------------------------------- 55 Criteria (P15.3.2) ---------------------------------------------------------------------------------------------------------------------------- 64 Event Handling --------------------------------------------------------------------------------------------------------------------------- 64 SystemTesting---------------------------------------------------------------------------------------------------------------------------------- 70 Gantt chart------------------------------------------------------------------------------------------------------------------------------------ 73 Reference ------------------------------------------------------------------------------------------------------------------------------------- 74
3|Page
Introduction
As the name specifies Student Accommodation system is software developed for managing various activities in the University. And the Student accommodation system helps the students to find properties to rent in the city which they are studying.
For the past few years the number of university are increasing rapidly. Thereby the number of hostels is also increasing for the accommodations of the students studying in the University. And hence there is a lot of strain on the person who are running the Accommodation center and softwares are not usually used in this context. This particular project deals with the problems on managing a Accommodation system and avoids the problem which occur when carried manually. Identification of the drawbacks of the existing system leads to the designing of computerized system that will be compatible to the existing system with the system which is more users friendly and more GUI oriented. We can improve the efficiency of the system, thus overcome the drawbacks of the existing system.
1. 2. 3. 4. 5. 6.
Data redundancy can be avoided to some extent Data consistency Easy to handle Easy data updating Easy record keeping Backup data can be easily generated
Finally I made a project on the Student accommodation System, which is an attempt to automate the existing Hostel. This project gives us the complete information about the Accommodation Land Lord information, Rent Details, Important telephone #,, and the accommodation rules .. Also the developed system is the best way to decrease the work load and saves time required in creation, updating, removal or view within records.
4|Page
The visual part refers to the method used to create the graphical user interface (GUI). Rather than writing numerous lines of code to describe the appearance and location of interface elements, you simply drag and drop pre-built objects into place on screen. If youve ever used a drawing program such as paint, you already have most of the skills necessary to create an effective user interface. It revolves around ready-made objects and it is event-driven that is all the activities in a program are triggered by one event or another. Each object has its own properties, determining its position, size, color, appearance and nature of its text and much more. Each object also has its own event-handling procedures. Visual basic knows what a button is and how it works? It also works how to handle images, menus, dialog boxes, drive and directory list and much else. The programmer does not have to write code to trap these events the system does that automatically because the program code runs in response to events. The flow of execution is not as fixed in a traditional program. Operations do not have to follow a set of sequence and can be easily interrupted, suspended or abandoned. The process of program design reflects the nature of the system. You begin by the screen layout events and then any necessary code to co-ordinate the whole program.
5|Page
Server-side data access is critical to all real-world applications. This section introduces you to the SQL server data access through Web Forms. Microsoft SQL Server is a Relational Database Management System (RDBMS) that issued to store and organize related data the collection of related data is called a database. Microsoft SQL Server is based on the client/server architecture, in which data is stored on a centralized computer called a server. Other computers, called clients, can access the data stored on the server through a network. The client/server architecture prevents data in consistency. You can access data stored on a SQL server through Web Forms. To do so, you can create Web applications that have data access controls. These data access Web controls present the data in a consistent manner irrespective of the actual source, such as Microsoft SQL Server. Therefore, while creating a Web application, you do not need to worry about the format of the data. However, before you can access or manipulate data from a SQL server, you need to perform the following steps in the specified sequence:
1. Establish a connection with the SQL Server. 2. Write the actual command to access or manipulate data. 3. Create a result set of the data from the data source with which the application can work. This result set is called the data set and is disconnected from the actual source. The application accesses and updates data in the data set, which is later reconciled with the actual data source.
6|Page
EXISTING SYSTEM
The existing system is a manually maintained system. All the Hostel Student details are entered into records manually. Separate records are to be maintained for the details of each student, Fee details, Room Allocation, Attendance etc. All these details are entered and retrieved manually. In such a system, if a particular students is to be known, first track the identification number, then look in for the Room number he is stay in and based on that check for the Attendance and Refund record or related record. Limitations of existing system: As described earlier the existing manually maintained system is subject to many errors and disadvantages. The main disadvantages are as follows:
1. Time Consuming: Retrieval of required data takes much time as the data is put at several places and one has to browse through many files to get even a small piece of data. Also the updating process, preparations of reports manually is all very time consuming. 2. Inaccuracy: Maintenance of vast data manually has many chances of inaccuracy of data.
PROPOSED SYSTEM The Proposed system is the computerized version of the existing system. It rectifies most of the pitfalls of the existing system and maintains databases of all the entities participating in the system.
Computerization provides easy and quick access over the data. Authorization schemes like giving passwords, encoding data can be used to maintain data security. Also data cannot be lost due to natural disasters. Visual Basic has been chosen for this project because Visual Studio Application are portable across a wide range of platforms and operating systems. Visual Studio IDE controls provide tools to develop the package to be efficiently used by the end users.
7|Page
Identify Various Visual Objects You Have Use for the Application
Visual objects
In Visual Studio there are lots of Visual objects we can use, whatever we need for our program. Those visual objects we can easily identify and we can handle those objects very easily, not like other programming languages. Just we can drag and drop to the frame. So when we consider about its benefits, it gave lots of facilities to users or programmers.
Student Accommodation System also there is lots of objects I have implemented, such as
1. 2. 3. 4. 5. 6. 7. 8. Textbox, Labels, Frame, Buttons, List box Picture Box Menu Stripe Progress Bar
Those objects I used according to my needs. Each and every objects are doing specified such works, so according to users purpose we can choose those objects.
8|Page
Visual Objects Description with the Screenshots Label This is the Student Registration Form; Here I have use Several Labels to Display to Figure out the Correct Textbox to Enter the Data
Using these labels we can show what ever written formatted phrases. The labels can come in all widths, sizes and colors. In VB program there different situation we can use this labels according to the users need. Such a situation we can use this labels as text area, but only we can read only Text Box
9|Page
Visual Programming Student Accommodation System The text area as we know, writing area of a program, but through this textbox we can full fill several purpose, such as in this program we writing in side this textbox, and I am pressing button I can retrieve records from database and again I can edit my records Menu Stripe 1. 2. 3. 4. 5. 6. 7. Login Rules and Regulations Registration Employee \details Accommodation Accommodation Locations Reports
Menu stripe is the very important in this student accommodation system. Because user doesnt want go and click each and every form.. Simple can used the menu form and can press whatever they needed accordingly likewise student registration, landlord info, accommodation reg... All were properly linked to the forms and database so menu strip Is having a very important place in this
The buttons are very important in a program, because using this buttons only we Can do some short of action events, in this program I had several situation to use this buttons, such as Save, Clear, Check Seat Availability, Update, Delete and etc So those buttons are I added in my program.
10 | P a g e
Picture Box
Picture box is very good tool in vb.net. I have used Picture box for several forms in this student accommodation system, simply drag and choose a picture from the local disk and according to our requirement we can make the picture size easily by using this picture box tool
11 | P a g e
Develop the system using simple forms for the give scenario using interacting objects
Visual Basic forms are windows. It's an important piece of data because it ties the concept of a form in with everything we already know about Windows applications. Here's a simple Visual Basic form. It looks just like any other form that we use in Windows applications. The header area has a caption, the control menu, and the minimize/maximize/close buttons. The large area of the form is called the client area.
In Visual Basic, the basic building block of an application is a form, which is simply a window. The VB IDE can insert forms into your project, and then you can resize the forms as well as change other properties of the form. So after creating these forms we can add objects which we have in VB on top of that. Such as Textbox, Labels, Combo boxes and etc In this program me I have used more than 10 windows forms to develop the student accommodation system
Forms
From 1
Form 1 this name Login form.. in the student accommodation system. After entering the user id and Password the user will able to logon to the system, by Entering the Wrong use rid and password the user will get and Error Notification within the message Box
12 | P a g e
System menu was design under Menu stripe and Labels, picture box. Buttons, Relevant forms linked to the Menu stripe.
This is simple form was design by using a label and picture box . The main reason is designed the form is to give some important information about the accommodation system, to the Students and Visitors
13 | P a g e
This is the form is have a main task in the accommondation system where the Land lord information and contact numbers and Student accommondation package information , the Facilitis various type of usages ,, all the informtion were included in this form, after accesing thse system the student were able to acces this page by pressing accommondation pagkage menu.. also studets can slect a package and they can proced the Accommondation Registation , make sue they need to Enter the package Number
14 | P a g e
This is the form is have a main task in the accommondation system where the Land lord information and contact numbers and Student accommondation package information , the Facilitis various type of usages ,, all the informtion were included in this form, after accesing thse system the student were able to acces this page by pressing accommondation pagkage menu.. also studets can slect a package and they can proced the Accommondation Registation , make sue they need to Enter the package Number
15 | P a g e
After selecting the package student can enter the package details and service no and the Given student id Name, email contact number and if they want any Additional services they have a separate field and they can request additional services and deletion modification also can be done in this form
In this form Students can Enter They information before the Accommodation Registration
16 | P a g e
This is accommodation payment form, the main reason I have designed to the accommodation system student can provide the payment information also we need some proof and backups. So that I have design the payment forms. Where we can enter the Given Student Id and the Date of Payment and Reference No... This we need to provide to the student ID for each and every payment Transaction Function we can delete the payment wrong payment we can edit, search also ca be done
This is Student Complain form., the usage of this form in when student having any kind of complains about the accommondation servicies , suggestion so they enter all the information with the student Id Name , and they have to privide valid information to procedue the Inuries
17 | P a g e
This is used to enter the Employee information who are working on the Accommodation Department Function we can edit employee information, delete and Search Employees.
5 Allison place This is provided by the land lord. Form the accommodating package,, Student can have a look on to the form by clicking more information link Here we have all the information. rent details room , facilities, payment so student easily can select a package
18 | P a g e
No 53 Alexander Terre West End This provided by the land lord the 2nd package 30 St Faiths West End 45 Nelthorpe St off high St
19 | P a g e
Briefly of the properties of the each and every control used on the forms
Forms and Properties
We can change Object Name, which help to make the coding easier and easy to identify System Menu I have used
We can change the objects background colors. White smoke color for the form backgrounds
Making the False this option, we can make the text area as only readable area We can format the Fonts which we used in Labels or Text box or any other font text area. Used format Microsoft Sans Serif ,bold ,size 11
We can change the icon according to our requirement Using this Form Border Style we can change the Border Styles according to our Requirements Locate our objects, such as we can make our frame to locate any place
20 | P a g e
We can change Object Name, which help to make the coding easier and easy to identify Employee info I have used
We can change the objects background colors. White smoke color for the form backgrounds
Making the False this option, we can make the text area as only readable area We can format the Fonts which we used in Labels or Text box or any other font text area. Used format Microsoft Sans Serif ,bold ,size 11[ It will change the back color of text area, such as Labels, Text box, button back colors. Using this Form Border Style we can change the Border Styles according to our Requirements
21 | P a g e
Locate our objects, such as we can make our frame to locate any place Locked our frame or any of object according our requirements, then we cannot move it.
Operate the Maximization button through making as True. Operate the Minimizing button through making as True.
22 | P a g e
Visual Programming Student Accommodation System Criteria (P15.21.1) and criteria (P15.2.2)
What is UML?
The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems, as well as for business modeling and other non-software systems. The UML represents a collection of best engineering practices that have proven successful in the modeling of large and complex systems.1 The UML is a very important part of developing object oriented software and the software development process. The UML uses mostly graphical notations to express the design of software projects. Using the UML helps project teams communicate, explore potential designs, and validate the architectural design of the software.
Goals of UML The primary goals in the design of the UML were: Provide users with a ready-to-use, expressive visual modeling language so they can develop and exchange meaningful models. Provide extensibility and specialization mechanisms to extend the core concepts. Be independent of particular programming languages and development processes. Provide a formal basis for understanding the modeling language. Encourage the growth of the OO tools market. Support higher-level development concepts such as collaborations, frameworks, patterns and Components
23 | P a g e
Use Case Diagram displays the relationship among actors and use cases. 1. A set of use cases and actors and their relationships. 2. Important for organizing and modeling system behaviors. 3. Crucial for requirements management and communication with end users using their own domain terminology. 4. Uses very few symbols, all software independent
Class Diagram models class structure and contents using design elements such as classes, packages and objects. It also displays relationships such as containment, inheritance, associations and others. 1. A set of classes, interfaces, collaborations, and relationships 2. Reflects the static design of a system. 3. Can be confusing if used to explain system dynamics; use less abstract Object Diagrams instead.
Interaction Diagrams Sequence Diagram displays the time sequence of the objects participating in the interaction. This consists of the vertical dimension (time) and horizontal dimension (different objects) Collaboration Diagram displays an interaction organized around the objects and their links to one another. Numbers are used to show the sequence of messages. Composed of objects and messages dispatched between them. 1. 2. 3. 4. Shows a dynamic view of the system. Sequence Diagram exposes time ordering of messages. Collaboration Diagram exposes structural organization of messages. In some tools (i.e. Rational Rose), these diagrams can be interchanged from the same underlying information.
24 | P a g e
State Diagram displays the sequences of states that an object of an interaction goes through during its life in response to received stimuli, together with its responses and actions. 1. 2. 3. 4. Represents a state machine, composed of states and transitions. Addresses the dynamic view of the system. Useful for reactive behaviors. Important for modeling interfaces, classes, or collaborations.
Activity Diagram displays a special state diagram where most of the states are action states and most of the transitions are triggered by completion of the actions in the source states. This diagram focuses on flows driven by internal processing Addresses a dynamic view of the system. 2. Important for modeling system functions. 3. Emphasizes the flow of objects and synchronization of the flow in support of parallel processing. 4. An extension of the old "flow chart" diagram combined with Petri nets.
1.
Physical Diagrams Component Diagram displays the high level packaged structure of the code itself. Dependencies among components are shown, including source code components, binary code components, and executable components. Some components exist at compile time, at link time, at run times well as at more than one time. 1 Shows organization and dependencies among a set of components. 2. Components are composed of one or more classes or interfaces. 3. A static view of the system implementation.
1. 4.
Deployment Diagram displays the configuration of run-time processing elements and the software components, processes, and objects that live on them. Software component instances represent run-time manifestations of code units Shows the configuration of run-time processing nodes in the system. 2. Nodes contain one or more components. 3. Address a static deployment view of the system.
1.
25 | P a g e
Login
Login
Student Registratio n
Accommodation Registration
Employee info
Land Lord
Reports
Sql DATABASE
Packages
Reports
26 | P a g e
Sequence Diagrams
Login and Finding Accommodation information
User 1. Login 2. Authentication User Student Accommodation System SQL Database
9. Log Out
User
SQL Database
1. Authentication User
27 | P a g e
Admin
Sql Database
1. Login
2.Authentication User
4.Removing Students
5.Checking Satus
8. Log Out
Login
Not Found
Log Out
28 | P a g e
Login
Login Id
password
Incorrect information
Correct Details
Clear Fields
Search Datas
User Type
Student/ Admin
Search Type
By ID
Catagory
Search Data
Incorrect Data Correct Data Prompt Error message Not Avalable Available View Results Prompt Error message
29 | P a g e
Class Diagram
30 | P a g e
Write appropriate programming codes to implement the system (Based on Envisioned System.)
Coding segment
Public Class Login Private Sub btnsubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsubmit.Click 'If Statement Starting Here 'It States that if the username is = to text box and password is = password text box, then it should login, 'else display error message! If txtusername.Text = "" Or txtpassword.Text = "" Then MsgBox("Please Enter the User Name and Password") Exit Sub End If If txtusername.Text = "niranjan" And txtpassword.Text = "1234" Then Me.Hide() System_menu.Show() 'A Message box that displays you have entered the wrong username and password Else MsgBox("UserName or Password Entered Wrong.. Please Enter the correct info") End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click clear() End Sub Sub clear() txtusername.Clear() txtpassword.Clear() End Sub Private Sub btncancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncancel.Click Me.Close() End Sub Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click End Sub End Class
31 | P a g e
The VB.NET Windows Menu Strip control provides an application menu system. The menu strip works with both Single document interfaces SDI and Multiple document interfaces MDI. With MDI applications the Menu Strip can be configured to merge with the main form for better navigation.
Public Class System_menu Private Sub LoginHereToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoginHereToolStripMenuItem.Click Login.Show() End Sub Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click Me.Close() End Sub Private Sub AccommondationRulesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AccommondationRulesToolStripMenuItem.Click Rules_and_Regulations.Show() End Sub Private Sub Package1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Package1ToolStripMenuItem.Click Accommondation_Package_1.Show() End Sub Private Sub Package2ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Package2ToolStripMenuItem.Click Accommondation_Package_2.Show() End Sub Private Sub Location1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Location1ToolStripMenuItem.Click _5_Allison_Place.Show() End Sub
32 | P a g e
33 | P a g e
Visual Programming Student Accommodation System Coding for Student Registration form
'this Following code shows how to Save, Edit, Delete, Search Data using VB.Net and SQL Server 2005 as database. 'this code needed some control : 'a database with 8 column (Student Id[primary key],Name, Address, City, States,Zipcode Email,Contact no) '7 button (btnSave,btndit,btnDelete, etc,.) '8 text box (txtid,txtname,txtaddress,txtcity,txtstate,txtzip,txtemail,txtcontact) ' This Proceduere to refresh form and refresh data in datagrid (always show the newest data) Imports System.Data Imports System.Data.SqlClient 'add the namespace Public Class Student_Registration 'Inside the event give the Connection 'String, Database Location 'for connection Dim con As New SqlConnection("Data Source=HOME;Initial Catalog=tempdb;Integrated Security=True") 'connect to database Private Sub btnnew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnnew.Click clear() End Sub Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsave.Click 'Try Catch Method 'clear all textbox If txtid.Text = "" Then
34 | P a g e
35 | P a g e
36 | P a g e
End Sub Private Sub btnedit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnedit.Click Try 'this part to call data from database con.Open() 'Update a value indicating whether the primary key column(s)
'will insert the unique record of Lable Id Dim cmdEdit As New SqlCommand("Update Student_Registration set Studentid=@id,name=@name,address=@address,city=@city,states=@state,zipcode=@zip,emai l=@email,contactno=@contact where Studentid=@id") cmdEdit.Parameters.Add(New SqlParameter("@id", txtid.Text)) cmdEdit.Parameters.Add(New SqlParameter("@name", txtname.Text)) cmdEdit.Parameters.Add(New SqlParameter("@address", txtaddress.Text)) cmdEdit.Parameters.Add(New SqlParameter("@city", txtcity.Text)) cmdEdit.Parameters.Add(New SqlParameter("@state", txtstate.Text)) cmdEdit.Parameters.Add(New SqlParameter("@zip", txtzip.Text)) cmdEdit.Parameters.Add(New SqlParameter("@email", txtemail.Text)) cmdEdit.Parameters.Add(New SqlParameter("@contact", txtcontact.Text)) 'Connect to Database and create Controls cmdEdit.Connection = con cmdEdit.ExecuteNonQuery() MsgBox("Your data was updated successfully") con.Close() Catch ex As Exception MsgBox("Invalid Data" & " " & ex.Message) con.Close() 'Close the connection End Try End Sub
Private Sub btnclear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclear.Click 'Creating sub class for Clear Button clear() End Sub Sub clear() ' will clear the Datas form the given lable ids txtid.Clear() txtname.Clear() txtaddress.Clear()
37 | P a g e
38 | P a g e
Student Registration
39 | P a g e
40 | P a g e
41 | P a g e
42 | P a g e
43 | P a g e
This the Report viewing form,, here we have overall 5 button to view 5 type of Reports and report s can be visible in the Crystal Report Viewer
44 | P a g e
45 | P a g e
2nd report
46 | P a g e
47 | P a g e
4th Report
48 | P a g e
49 | P a g e
Private Sub btnsubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsubmit.Click If txtusername.Text = "" Or txtpassword.Text = "" Then MsgBox("Please Enter the User Name and Password") Exit Sub End If If txtusername.Text = "niranjan" And txtpassword.Text = "1234" Then Me.Hide() System_menu.Show() Else MsgBox("UserName or Password Entered Wrong.. Please Enter the correct info") End If End Sub
50 | P a g e
Visual Programming Student Accommodation System I have made some validation for the Below given Text Fields these will enable to the SAVE Button
Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsave.Click 'Try Catch Method 'clear all textbox If txtid.Text = "" Then ' creating Validation Message Box MsgBox("Studentid is required") txtname.Focus() ElseIf txtname.Text = "" Then MsgBox("Student Name is required") txtname.Focus() ElseIf txtaddress.Text = "" Then MsgBox("Address is required") txtaddress.Focus() ElseIf txtcity.Text = "" Then MsgBox("City is required") txtcity.Focus() ElseIf txtstate.Text = "" Then MsgBox("State is required") txtstate.Focus() ElseIf txtzip.Text = "" Then MsgBox("Zip code required") txtzip.Focus() ElseIf txtemail.Text = "" Then MsgBox("Email is required") txtemail.Focus() ElseIf txtcontact.Text = "" Then MsgBox("Contact Number is required") txtcontact.Focus()
51 | P a g e
Catch ex As Exception MsgBox("You have Entered the Wrong Studentid" & ex.Message) con.Close() End Try
'Connect to Database and create Controls cmdEdit.Connection = con cmdEdit.ExecuteNonQuery() MsgBox("Your data was updated successfully") con.Close() Catch ex As Exception MsgBox("Invalid Data" & " " & ex.Message) con.Close() 'Close the connection End Try
'will delete the Record MsgBox("Your data was deleted successfully") con.Close() Catch ex As Exception MsgBox("No Data" & ex.Message) con.Close() 'Close the connection End Try
52 | P a g e
Visual Programming Student Accommodation System Validation made for Accommondation payment
If txtrefno.Text = "" Then MsgBox("Enter the Referance No") txtrefno.Focus() ElseIf txtstid.Text = "" Then MsgBox("Student ID is Required ") txtstid.Focus() ElseIf txtamount.Text = "" Then MsgBox("Enter the Amount $ ") txtamount.Focus() ElseIf txtmode.Text = "" Then MsgBox("CASH / CHEQUE / CARD") txtmode.Focus() ElseIf txtpaydate.Text = "" Then MsgBox("Date of Payment") txtpaydate.Focus()
MsgBox("Your data was inserted successfully") 'clear() con.Close() Catch ex As Exception MsgBox("Invalid Data" & " " & ex.Message) con.Close()
53 | P a g e
Catch ex As Exception MsgBox("You have entered wrong Ref ID Please Check it." & ex.Message) con.Close() End Try
MsgBox("Your data was updated successfully") con.Close() Catch ex As Exception MsgBox(ex.Message) con.Close() End Try
MsgBox("Your data was deleted successfully") con.Close() Catch ex As Exception MsgBox("No Data" & ex.Message) con.Close() End Try
54 | P a g e
When the user Tried to access the system Without the user Name and the password , its Giving the Error
When the user tried to access the system with incorrect Username and Password Its giving the Warning Message.
55 | P a g e
When the user Tried to save something without Entering the Information to the System then the user will getting a warning message .. Student id Is Required.. after pressing ok.. the mouse curser will automatically moving to the Student id Textbox Field
56 | P a g e
57 | P a g e
58 | P a g e
When the user Tried to Search something in the Registration without Entering the student then the user will getting a Messages box saying Enter the Student id/ invalid Student id
59 | P a g e
This is just for the Mode. Here we have 3 options Cash / cheque/ card.. User can enter 1 of this item
60 | P a g e
Button Search
Button Delete
Button Edit
61 | P a g e
62 | P a g e
63 | P a g e
Use appropriate event handling for the Forms (EG: Database Connectivity)
Event Handling
To create an event handler in Visual Basic
1. 2. 3. 4.
Right-click the form and choose View Code. From the Class Name drop-down box, select the control that you want to add a specific event handler to. From the Method Name drop-down box, select the event for which you want to add a specific handler. The Code Editor inserts the appropriate event handler and positions the insertion point within the method. In the example below, it is the Click event for the Button control. 5. ' Visual Basic 6. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Add event handler code here. End Sub 7. Add the appropriate code to the event handler.
As you can see, there are basically two new things added: 1. The event subroutine arguments sender and e 2. The Handles clause 3. The Handles clause allows the same subroutine to be used for all kinds of event calls. Suppose, for example, that you wanted a click in a Textbox and a Button to be processed by exactly the same code. No problem ...
64 | P a g e
Visual Programming Student Accommodation System Button Search Event to Get the Data using Student id form the Database
'Search the Customer ID 'Using the Try catch method eand if condition 'the(values) Try 'this part to call data from database con.Open() Dim cmd As New SqlCommand("Select * from Student_Registration where Studentid=@id") cmd.Parameters.Add(New SqlParameter("@id", txtid.Text)) cmd.Connection = con cmd.CommandType = CommandType.Text Dim da As New SqlDataAdapter(cmd) Dim ds As New DataSet 'Gets a value indicating whether the primary key column(s) 'of any row in the collection contains the specified value. 'Find the Rows da.Fill(ds) txtid.Text = ds.Tables(0).Rows(0).Item(0) txtname.Text = ds.Tables(0).Rows(0).Item(1) txtaddress.Text = ds.Tables(0).Rows(0).Item(2) txtcity.Text = ds.Tables(0).Rows(0).Item(3) txtstate.Text = ds.Tables(0).Rows(0).Item(4) txtzip.Text = ds.Tables(0).Rows(0).Item(5) txtemail.Text = ds.Tables(0).Rows(0).Item(6) txtcontact.Text = ds.Tables(0).Rows(0).Item(7) 'Close the connection con.Close() Catch ex As Exception MsgBox("You have Entered the Wrong Studentid" & ex.Message) con.Close() End Try
65 | P a g e
This is my Database for the system. And I have created the following tables to the connectivity.. 1. 2. 3. 4. 5. Accommodation Registration Employee info Student Complains Student payment Student _Registration
66 | P a g e
67 | P a g e
68 | P a g e
69 | P a g e
SystemTesting
System testing is the stage of implementation, which is aimed at ensuring that the system works accurately and efficiently before live operation commences. Testing is the process of executing the program with the intent of finding errors and missing operations and also a complete verification to determine whether the objectives are met and the user requirements are satisfied. The ultimate aim is quality assurance. Tests are carried out and the results are compared with the expected document. In the case of erroneous results, debugging is done. Using detailed testing strategies a test plan is carried out on each module. Unit Testing The software units in a system are modules and routines that are assembled and integrated to perform a specific function. Unit testing focuses first on modules, independently of one another, to locate errors. This enables, to detect errors in coding and logic that are contained within each module. This testing includes entering data and ascertaining if the value matches to the type and size supported by java. The various controls are tested to ensure that each performs its action as required.
Integration Testing Data can be lost across any interface, one module can have an adverse effect on another, sub functions when combined, may not produce the desired major functions. Integration testing is a systematic testing to discover errors associated within the interface. The objective is to take unit tested modules and build a program structure. All the modules are combined and tested as a whole. Here the Server module and Client module options are integrated and tested. This testing provides the assurance that the application is well integrated functional unit with smooth transition of data.
User Acceptance Testing User acceptance of a system is the key factor for the success of any system. The system under consideration is tested for user acceptance by constantly keeping in touch with the system users at time of developing and making changes whenever required.
70 | P a g e
Future enhancement
1. inbuilt Backup and Recovery system 2. Access in online network 3. Email Facility for the Students to Notify the Information to Admin through the Accommodation system 4. 24/7 Live support should be enabled. 5. This project does not create monthly, yearly Reports. 6. After removing these and other minor limitations I hope this project will very efficient and effective.
71 | P a g e
The project titled as "Student Accommodation System been designed with much care, with the intention easier and the more complexity involved is presented in a simple and lucid style. The project developed using VS and inbuilt SQL is based on the requirement specification of the user and the analysis of the existing system, with flexibility for future enhancement.
The expanded functionality of todays software requires an appropriate approach towards software development. This Student accommodation system is designed for people who are seeking Accommodation in studying citys.
The product has enormous repetition value as user will be in need of saving time for efficient management of his computer resources. The volume of data and storage capacity is increasing exponentially.
The program is not only useful for educational institutions University Students , organizations Identification of the drawbacks of the existing system leads to the designing of computerized system that will be compatible to the existing system with the system which is more users friendly and more GUI oriented.
The System works in a similar fashion as that of an accommodation system, the various Department student information is to be stored and retrieve any time when required.
72 | P a g e
73 | P a g e
Reference
Event Handling Techniques in VB, 2010 Microsoft Corporation, http://msdn.microsoft.com/en-us/library/2z7x8ys3%28VS.80%29.aspx, viewed on 7/16/11 UML basics: The class diagram, Updated on 15 Sep 2004, IBM, http://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell viewed on 6/21/11 Crystal Report tutorial http://vb.net-informations.com/crystal-report/vb.net_crystal_report_step_by_step.htm 7/17/11
74 | P a g e