Вы находитесь на странице: 1из 74

Visual Programming Student Accommodation System

INTERNATIONAL COLLEGE OF BUSINESS & TECHNOLOGY LTD

Visual programming... Student Accommodation Service

HND in computing Prepared By -Niranjan.k 1|Page

Visual Programming Student Accommodation System HND C/07/07

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

Visual Programming Student Accommodation System

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

Visual Programming Student Accommodation System

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

Visual Programming Student Accommodation System

Introduction to the Software Tool

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

Visual Programming Student Accommodation System

Introduction to Sql Server

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

Visual Programming Student Accommodation System SCOPE OF THE PROJECT

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

Visual Programming Student Accommodation System Criteria( P15.1.1)

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 Programming Student Accommodation System

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

Label 1 Display Text - Student Registration

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

Buttons 1. 2. 3. 4. 5. 6. 7. New Save Search Edit Clear Delete Exit

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

Visual Programming Student Accommodation System

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

Visual Programming Student Accommodation System Criteria (P 15.1.2)

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

Visual Programming Student Accommodation System

System Menu Form

System menu was design under Menu stripe and Labels, picture box. Buttons, Relevant forms linked to the Menu stripe.

Rules and Regulation Form

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

Visual Programming Student Accommodation System

Accommondation package 1 Form

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

Visual Programming Student Accommodation System Accommondation package 2 Form

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

Here we have some more locations

15 | P a g e

Visual Programming Student Accommodation System Accommodation Registration form

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

Student Registrtion form

In this form Students can Enter They information before the Accommodation Registration

16 | P a g e

Visual Programming Student Accommodation System Accommodation payment form

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

Visual Programming Student Accommodation System Employee info form

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

Visual Programming Student Accommodation System Land Lord Infromations

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

Visual Programming Student Accommodation System Criteria (P 15.1.2)

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

Visual Programming Student Accommodation System

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

Visual Programming Student Accommodation System

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.

Give value and fix the size for the frame.

It will show as a Frame Name, when we run the program. (Login)

22 | P a g e

Visual Programming Student Accommodation System Criteria (P15.21.1) and criteria (P15.2.2)

Employ the different modeling techniques.

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

Visual Programming Student Accommodation System

UML Diagram Types


Each UML diagram is designed to let developers and customers view a software system from a different perspective and in varying degrees of abstraction. UML diagrams commonly created in visual modeling tools include

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

Visual Programming Student Accommodation System

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

Visual Programming Student Accommodation System

Overall System Design Structure

Login

Login

Student Registratio n

Accommodation Registration

Employee info

Land Lord

Reports

User Case Diagram


Student Info Employee Info

Land Lord info

Sql DATABASE

Packages

Reports

26 | P a g e

Visual Programming Student Accommodation System

Sequence Diagrams
Login and Finding Accommodation information
User 1. Login 2. Authentication User Student Accommodation System SQL Database

3. Success fully Authentication 4. Success fully Login

5. Searching Accommodation info 6. Finding Infoamtions 7. Available 8. Found Rooms/ Appartment

9. Log Out

10. Logout Success fully

Registering and Requesting for Rooms/ Apartment


Student Accommondaton System Land Lord Information

User

SQL Database

1. Authentication User

3. Success fully Login

4. Registering & Requesting Rooms 7. Success Fully Reserved

5. Check Room/ appartment Status

6. Available of Waiting 8. Log Out

9. Logout Success fully

27 | P a g e

Visual Programming Student Accommodation System Removing Students/Employees


Student accommodation system

Admin

Sql Database

1. Login

2.Authentication User

3. Success fully Login

4.Removing Students

5.Checking Satus

6. Confirm of Waiting 7. successfully Removed

8. Log Out

9. Logout Success fully

Activity Diagrams for Student Accommodation system

Login

Search/ rooms, appartment

Not Found

Available Room detail's Information

Log Out

28 | P a g e

Visual Programming Student Accommodation System Login and System Menu

Login

Login Id

password

Both Not filed Information Filled

Prompt Error message

Incorrect information

Correct Details

Prompt Error message

Clear Fields

Display User Interface 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

Visual Programming Student Accommodation System

Class Diagram

30 | P a g e

Visual Programming Student Accommodation System Criteria( P15.2.2)

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

Visual Programming Student Accommodation System

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

Visual Programming Student Accommodation System


Private Sub Location2ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Location2ToolStripMenuItem.Click _53_Alexandra_Terrace.Show() End Sub Private Sub Location3ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Location3ToolStripMenuItem.Click _30_St_Faiths_St.Show() End Sub Private Sub Location4ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Location4ToolStripMenuItem.Click _45_Nelthorpe_St.Show() End Sub Private Sub ToolStripMenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem4.Click End Sub Private Sub AccommondationRegistrationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AccommondationRegistrationToolStripMenuItem.Click Accommondation_Registration.Show() End Sub Private Sub StudentRegistrationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentRegistrationToolStripMenuItem.Click Student_Registration.Show() End Sub Private Sub PaymentToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PaymentToolStripMenuItem.Click Student_Payment.Show() End Sub Private Sub ComplainsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComplainsToolStripMenuItem.Click Student_Complains.Show() End Sub Private Sub EmployeeInfoToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EmployeeInfoToolStripMenuItem.Click Employee_Info.Show() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Close() End Sub End Class

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

Visual Programming Student Accommodation System


' 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() Else btnsave.Enabled = True Try 'this part to call data from database con.Open() Dim cmdSave As New SqlCommand("Insert into Student_Registration values(@id,@name,@address,@city,@state,@zip,@email,@contact)") 'will insert the unique record of uid cmdSave.Parameters.Add(New cmdSave.Parameters.Add(New cmdSave.Parameters.Add(New txtaddress.Text)) cmdSave.Parameters.Add(New cmdSave.Parameters.Add(New cmdSave.Parameters.Add(New cmdSave.Parameters.Add(New cmdSave.Parameters.Add(New txtcontact.Text)) cmdSave.Connection = con cmdSave.ExecuteNonQuery() MsgBox("Your data was inserted successfully") 'clear() con.Close() Catch ex As Exception MsgBox("Invalid Data" & " " & ex.Message) SqlParameter("@id", txtid.Text)) SqlParameter("@name", txtname.Text)) SqlParameter("@address", SqlParameter("@city", txtcity.Text)) SqlParameter("@state", txtstate.Text)) SqlParameter("@zip", txtzip.Text)) SqlParameter("@email", txtemail.Text)) SqlParameter("@contact",

35 | P a g e

Visual Programming Student Accommodation System


con.Close() 'Close the connection End Try End If End Sub Private Sub btnsearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsearch.Click '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

36 | P a g e

Visual Programming Student Accommodation System

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

Visual Programming Student Accommodation System


txtcity.Clear() txtstate.Clear() txtzip.Clear() txtemail.Clear() txtcontact.Clear() End Sub Private Sub btndelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndelete.Click Try 'Open the connection con.Open() 'Search the unique record by the Student ID Dim cmdDelete As New SqlCommand("Delete from Student_Registration where Studentid=@id") cmdDelete.Parameters.Add(New SqlParameter("@id", txtid.Text)) cmdDelete.Connection = con cmdDelete.ExecuteNonQuery() '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 End Sub 'Creating Command for Close Button Private Sub btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexit.Click Me.Close() End Sub End Class

38 | P a g e

Visual Programming Student Accommodation System Criteria (P 15.2.2)

Put the Comments for all tasks


Comments for Coding
Login

Student Registration

39 | P a g e

Visual Programming Student Accommodation System

40 | P a g e

Visual Programming Student Accommodation System

41 | P a g e

Visual Programming Student Accommodation System

42 | P a g e

Visual Programming Student Accommodation System

43 | P a g e

Visual Programming Student Accommodation System Criteria (P 15.3.1)

Generate and reports according to the envisioned system given

Reports with Crystal Report


The reports always give details about our requirements. In this program I generated around 5 reports. Such as, 1. 2. 3. 4. 5. Student details Employee details Accommodation info Payment info Complains report

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

Visual Programming Student Accommodation System 1st Report

45 | P a g e

Visual Programming Student Accommodation System

2nd report

46 | P a g e

Visual Programming Student Accommodation System 3d report

47 | P a g e

Visual Programming Student Accommodation System

4th Report

48 | P a g e

Visual Programming Student Accommodation System 5th report

49 | P a g e

Visual Programming Student Accommodation System Criteria (p 15.3.2)

Validation checks in your system


Validations

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

Visual Programming Student Accommodation System

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

Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsave.Click

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

Visual Programming Student Accommodation System

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

Visual Programming Student Accommodation System Criteria (p15.3.2)

Validation the form controls against the users input


Login form

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

Visual Programming Student Accommodation System

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

Visual Programming Student Accommodation System

Then the Name Field is Required..

Continuing the Address Field is Required

57 | P a g e

Visual Programming Student Accommodation System

To complete the Registration form State is Required

Zip Code is Required

58 | P a g e

Visual Programming Student Accommodation System

Now The Validation Part is for the Search Button

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

Visual Programming Student Accommodation System

To proceed the System Payment we have to Enter the Reference No

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

Visual Programming Student Accommodation System

Button Search

Button Delete

Button Edit

61 | P a g e

Visual Programming Student Accommodation System

Your Data Was Inserted Successfully!!

Here im going to Edit my Niranjan Kanagaratnam // Success Fully Updated

62 | P a g e

Visual Programming Student Accommodation System

Delection also done Sucessfully

63 | P a g e

Visual Programming Student Accommodation System Criteria (P15.3.2)

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.

Button Click Event for Clear the Data


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() txtcity.Clear() txtstate.Clear() txtzip.Clear() txtemail.Clear() txtcontact.Clear() End Sub

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

Private Sub btnsearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsearch.Click

'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

Visual Programming Student Accommodation System

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

The following Entries have been update to the Database fields

66 | P a g e

Visual Programming Student Accommodation System

Also payment datas updated to the Database Fields

67 | P a g e

Visual Programming Student Accommodation System

Student Complain Datas also updated to the Database Fields

68 | P a g e

Visual Programming Student Accommodation System

Employee Details also updated to the Database Fields

69 | P a g e

Visual Programming Student Accommodation System

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

Visual Programming Student Accommodation System

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

Visual Programming Student Accommodation System Conclusion

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

Visual Programming Student Accommodation System Gantt chart

73 | P a g e

Visual Programming Student Accommodation System

Reference

Visual objects in VB, 2010 Microsoft Corporation, http://msdn.microsoft.com/enus viewed on 6/12/11

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

Training & Reference Murachs Visual Basic 2008

74 | P a g e

Вам также может понравиться