You are on page 1of 39


Sri Ramakrishna Engineering College was established in the year 1994 by SNR Son’s charitable trust. It had grown into an eminent institution in TamilNadu. The institution is accredited by national board of accreditation [NBA]. The college has been awarded autonomous status for all UG and PG programmes by UGC and the sprawling 42.24 acres has an admirable infrastructure with all facilities and well equipped laboratories with latest technology. The Objective of the management of the Sri Ramakrishna Engineering College is that a student passing out of the college should be well trained and equipped to meet the challenges and requirements of the present as well as the future. Therefore industrial training is given to all students as part of the education scheme in well-established industries. Engineers from industries are invited to deliver lecturers on the practices adopted in their establishments. The college has signed MOU with South Dakota School of Mines and Technology, Rapid City USA and Rutgers, The college has also signed MOU with Infosys, Wipro and CODISSIA to enrich the students with exposure on industry scenario.


The Mini Project will help us to manage the leave details. This Mini Project maintains a centralized database through which the leave details are being maintained. The Leave details of each and every person are also is updated in to the database. Authenticated person can able to view the report of individual scheme in detail concurrently. The Authenticated person will provide with both on overall and stage wise details report from all the users. The entire Authenticated person under college will be provided with separate logins to avoid stolen of data from unauthorized users. The Authorized person can only update the details. This system provides all the facilities to maintain correct and confident data of the Mini Project in time to time. The each individual in the institution also can view their leave details using their register number. This package provides efficient and low maintenance effort to have total control over Mini Project. This Mini Project contains the following modules: 1. Department Details, 2. Leave Details, 3. Login Details, 4. Staff Details, 5. Student Details.


The existing system for Online Leave Management system is a manual process. With respect to the existing system, the incharge has to maintain the manual records and it is complicated to identify the particular record at a time and it is not easy to maintain the manual records and manual errors are committed. All this requires more time and labor work. Moreover, the data collected may be inconsistent, redundant, and servicing a remote person will become impossible.

• • • • • • • • • •

Data entry is time consuming and tedious through paper works. No provision for data validation in the manual system. Accessing the records for information takes long time. The process of updating is more time consuming. Consume more time. Expensive. Gives redundant and inconsistent data. Inefficient communication process. Not flexible. Data updating is tedious


ADVANTAGES OF THE PROPOSED SYSTEM • • • • • • • • Managing multiple events efficiently. redundancy can be avoided. As the proposed system is centralized one.2. Erroneous data can be avoided. moreover the coordination of different departments becomes much easier. Redundancy can be reduced. 4 . All the system provides high security for all this data. In the proposed system the user can view their details. Latest technological implementation. Online updating is possible for the authenticated person in the proposed system. Easy to get the vehicle details in case of hacking the data. Accessing of data and report generation becomes easier and faster.2 PROPOSED SYSTEM The proposed system is a fully Leave Management System to maintaining the leave details The system automates all the details of the faculty and student leave details. Leave details status can be checked anytime. This GUI system will make the user flexible to maintain the Leave details.

2 HARDWARE REQUIREMENTS Processor RAM Capacity Hard disk drive Mouse : Intel Pentium Dual CPU T2370 @1.73GHz : 1014MB : 260MB : Optical mouse 3.3 SOFTWARE REQUIREMENTS Operating System Language Front End Tool Back End Tool : Windows 7 : Visual Studio. The manual system will result in some kinds of human mistakes and error which will alter the correct working conditions of the project. So in order to avoid those mistakes and errors we found an alternative way of generating automatically. 3.NET with C# : SQL Server 2005 5 . where it is a difficult process to implement with it.CHAPTER III SYSTEM SPECIFICATION Providing Online Leave Management System the project is faculties and the students leave details. 3. My project has been developed in order to replace the manual system.NET 2008 : ASP.1 SCOPE Create different users and maintain the details and manage all the details related to student and the faculty’s leave details. If there may be a small mistake it will collapse all the factors of the projects.

it actually a new language.NET Framework.NET extensively make use of the .NET and VC++. ASP.NET Framework.NET languages refer to objects and data sources. called managed code.NET. such as VC#.NET framework.NET. Visual Studio IDE is a special development tool that provides an environment to create and test out windows-based and web based programs. ASP. Like C#.NET: Introduction: Visual Basic has become the most popular programming language mainly due to its simplicity and powerful pack of features. 6 . It has managed to emerge as such a powerful and popular language that C# programmers are always in demand in the job market. The MSIL code.1 FRONT END: ASP.Frame Work : Visual Studio.NET languages to interact with each other and standardize how the. The . The rich features in this framework ensure easier development of Windows-based applications. It is fully object-oriented and it is compatible with all the other languages using the . the latest version of c#.NET Frame Work CHAPTER IV SOFTWARE DESCRIPTION 4.NET.NET. The source code written in all the . is executed by the Common Language Runtime (CLR) which is part of the .NET.NET Framework: The programming language ASP. VJ#. and VC+ +. called Microsoft’s Intermediate Language (MSIL).NET allows programmers to easily develop Windows-based applications.NET. It enables the programmers to develop applications that run in a web browser without the complexity generally associated with web-programming.NET languages are all initially compiled to an common intermediate language. allow components from different . VJ#. VASP.

a database that stores information about related objects. forms and reports that are used to implement function effectively. IT includes a Common Type System (CTS) that defines data types that are common go all . It collectively stores all the other related objects such as queries. The CLR effectively functions as a middle layer between a . and ask questions of your data. The CLR can host a variety of languages .NET framework-the engine that drives the key functionality .NET programming the Operating System.NET language inheritance possible among the . Microsoft has made C#. It supports GUI features and an entire programming language. C++ languages for the CLR.NET languages.IT provides memory management features such as garbage collection and data type checking. SQL is a relational database. The compiler also creates the necessary metadata and compiles it into the component. 7 . which means that these three languages fully supported the CLR. the first being that SQL is a feature rich program that can handle any database related task you have. In MS SQL that database means a collection of tables that hold data. Microsoft Intermediate Language (MSIL) The compilation process translates the code into an language called Microsoft Intermediate Language (MSIL) or just IL.NET framework is the common Runtime(CLR). This IL is CPU independent.and can offer a common set of tools across those languages. You can create places to store your data build tools that make it easy to read and modify your database contents.2 BACK-END: MS-SQL SERVER 2005 MS SQL Server is a powerful database management system and the user can create applications that require little or no programming.The CLR is the heart of the . There are quite a few reasons. Visual Studio Application which can be used to develop richer and more developed application. Language 4. The Common Language Runtime: One of the major components of the .

Queries and dynasts: Queries are request to information.The MS SQL database can act as a back end database for . A dynamic set of data meeting our query criteria. MS SQL however is a relational database. There are even wizards for complex printouts. Relational database. which means that you can define relationships among the data it contains. Or they can be pictures. or let the access auto form feature. or access can assign them automatically. Another good reason to use SQL as backend tool is that it is a component of the overwhelmingly popular Microsoft office software suite. that response constitutes a dynaset. 8 . which should be key fields. When access responds with its list of data. dynasts are updated even after we have made our query. Reports: Reports are paper copies of dynasets. Forms: Forms are on screen arrangement that make it easy to enter and read data. Primary key and other indexed fields: Access use key fields and indexing to help speed many database operations. We can design form our self. if we like. We can also print reports to disk. Because of the way access is designed. are superior to flat file databases because you can store discrete information. They can be things like field labels that we drag around when designing reports.NET as a front end. Controls and objects: Queries are access objects us display. A beginner can create his/her own database very simply by some mouse clicks. or boxes containing the results of calculations. MS SQL supports the user with its powerful database management functions. or titles for reports. Access helps us to create the reports. we can also print the forms if we want to. We can tell access. print and use our data.

4 Staff Details This Staff Details is used to add the details of the student of the particular department.1. and view the entire records. 5.CHAPTER V SYSTEM DESIGN AND DEVELOPMENT 5. 5.1MODULE DESCRIPTION 5.1. The details are stored in the database for the reference and to monitor.1 Department Details This Department details is used to get the department details.2 ENTITY RELATIONSHIP DIAGRAM 9 . approved.5 Student Details This Student Details is used to add the details of the student of the particular department. and rejected leave details. The authorized person only can add. 5. The details are stored in the database for the reference and to monitor.3 Login Details This Login Details is used to navigate to the particular page based on Login ID.1.2 Leave Details This Leave Details is used to get the details of applying. This module gets the complete details which are used to store in the database and also retrieve it for future use.1. 5.1. delete. This module gets the complete details which are used to store in the database and also retrieve it for future use. 5. cancelling.

An entity -relationship(ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database. Diamonds are normally used to represent relationships and ovals are used to represent attributes Entity Relationships diagram are tools are used in analysis to describe the data requirements and assumptions in the system from a top down perspective: There are three basic elements in ER module: • • • Entities are the “things” about which we seek information. ER diagrams often use symbols to represent three different types of information. ENTITY RELATONSHIP DIAGRAM 10 . Relationships provide the structure needed to draw information from multiple entities. boxes are commonly used to represent entities. Attributes are the data we collect about the entities.

11 .

The DFD is designed to show how a system is divided into smaller portions and to highlight the flow of data between those parts.1 LEVEL 0 DFD Student and faculty Student and Faculty Details Leave Manage ment System Report Report 5. data flow. There are different notations to draw data flow diagrams.3 DATA FLOW DAIGRAM A data flow diagram (DFD) is a graphical representation of the “flow” of data through an information system. defining different visual representations for processes. it differs from the system flowchart as it shows the flow of data through processes instead of hardware. data stores.3.3.5. and external entities. This Context-level Data flow diagram is then “exploded” to show more detail of the system being modeled. 5.2 LEVEL 1 DFD 12 .

5.6 TABLE DESIGN 13 . there is a chance for error occurrence. Validity checks used to eradicate confusion. In this Mini Project a variety of windows has been provided to help the user to know the current status of the organization and other frequent transactions such as distributing energy to feeders. 5. They must be detected during input and general term given to the method detecting during input and the general term given to the method detecting errors during input validation. Input design is aimed at reducing errors. 5. and transformers etc. Since the computer works as directed by the user/programmer it does not make any mistakes of its own. The goal of input design is to make the data entry easy and free form errors. However.4 INPUT DESIGN The most common source for data processing errors is erroneous input data.5 OUTPUT DESIGN Computer’s output design is a process that involves designing necessary for presenting the output and which can be shared among various users according to their requirements.

2 LOGIN DETAILS To manipulate and view the login details. Primary Key: LoginId 14 . Database management system allows the data to be protected and organized separately from other sources.The database approach to system design emphasis on the integration and independence of data. Primary Key: DeptId FIELD DEPTID DEPTNAME HOD ACACO TUTOR1 TUTOR2 TUTOR3 Integer Varchar(50) nvarchar(25) nvarchar(50) nvarchar(25) nvarchar(25) nvarchar(25) TYPE DESCRIPTION Unique ID for the department Name of the department Head of the Department Academic Co-ordinator Tutor for students Tutor for students Tutor for students 5.6.6. 5.1 DEPARTMENT DETAILS To manipulate and view the department details.

Primary Key: LeaveId FIELD LEAVEID USERID NAME DATE UPDATEDATE STADATE ENDDATE REASON NOOFDAYS APPROVEDDATE CANCELLEDBY TUTOR ACACO HOD Int nvarchar(15) nvarchar(30) nvarchar(50) nvarchar(50) nvarchar(50) nvarchar(50) nvarchar(50) Int nvarchar(25) nvarchar(50) nvarchar(15) nvarchar(15) nvarchar(15) 15 TYPE DESCRIPTION Autogenerated StudentId for who applying the leave Name of the student Date of applying leave Date of updating leave Starting Date of the leave Ending Date Of the leave Reason for leave Number of days It gives Approved Date It gives the details about who cancelled the leave Concerned tutor Concerned Academic Co-ordinator Particular Department HOD .FIELD LOGINID PASSWORD DESIGNATION LASTLOGIN nvarchar(10) nvarchar(20) nvarchar(20) nvarchar(50) TYPE DESCRIPTION Admin userId Admin Password Admin It displays the date when particular user gets login 5.6.3 LEAVE DETAILS To manipulate and view the leave details.

5.STA STATUS Int narchar(50) 0. Rejectedleave. Applied leave. Primary Key:StaffId FIELD STAFFID STAFFNAME PROFESSION QUALIFICATION DPT PHONENO EMAILID BLOODGROUP GENDER DOB ADDRESS EXPYEAR EXPMON FULLSTAFFID RESPONSIBILITY PASSWORD Int nvarchar(25) nvarchar(25) nvarchar(50) Bigint nvarchar(15) nvarchar(25) nvarchar(6) nvarchar(6) nvarchar(15) nvarchar(50) nvarchar(6) nvarchar(6) nvarchar(9) nvarchar(25) nvarchar(15) 16 TYPE DESCRIPTION Unique Id of the staff Name of the staff Tutor.6.1.2.Academic Co-Ordinator.9 Pending leave.3.HOD.Academic Co-ordinator Password for login .HOD Degree of the staff Belongs to particular department Phone number of the staff Mail id of the staff Staff Blood Group FEMALE/MALE Date Of Birth Address of the staff It displays no of experienced years It displays no of experirnced months Staff Id used for login TUTOR.4 STAFF DETAILS To manipulate and view the staff details.

5 STUDENT DETAILS To manipulate and view the student details. Name of the particular student tutor Name of the particular student Academic Co-ordinator Head Of The Department Year that the student join Id that used for login purpose . 5. Primary Key: StuId FIELD STUID STUNAME FNAME ADDR EMAIL PHONO DOB GENDER BGROUP PARENTOCCUPATION DPT TUTOR ACACO HOD YEAR STUPERID Int nvarchar(50) nvarchar(50) nvarchar(50) Text Bigint nvarchar(50) Text Text Text Int nvarchar(25) nvarchar(25) nvarchar(25) nvarchar(2) nvarchar(50) 17 TYPE DESCRIPTION Autogenerated Name of the student Father name of the student Address of the student Mail id of the student Phone number of the student Date Of Birth MALE/FEMALE Blood Group of the student Parent occupation It displays to which department the student belongs to.LASTLOGIN nvarchar(25) It displays when the particular staff lastly logged in.6.

A good test is one that has a high probability of finding an undiscovered error. However the data are created with the intent of determining whether the system will process them correctly without any errors to produce the required output. A successful test is one that uncovers the undiscovered error. The philosophy behind testing is to find the errors. A test case is a set of data that the system will process as an input. Test cases are devised with this purpose in mind. Types of Testing: • • • • • Unit testing Integration testing Validation testing Output testing Acceptance testing 6.1 Unit Testing 18 . all work should verify that all system element have been properly integrated and performed allocated function.LEAVESAPPLIEDALREADY PASSWORD Int nvarchar(20) It displays the details of how many leaves already taken Password for login CHAPTER VI SYSTEM TESTING Testing is a series of different tests that whose primary purpose is to fully exercise the computer based system. Although each test has a different purpose. Testing is the process of checking whether the developed system works according to the actual requirement and objectives of the system.

Objective is to take unit tested modules and build a program structure that has been dictated by design 6. And for the hardcopy the output comes according to the specifications requested by the user. velocity are generated as required.5 Acceptance Testing Finally the software is assessed against the requirements defined in the system requirement’s document. Here the output format is considered in two ways. 6. and Leave module are tested individually for their functionality. successful acceptance testing is required before submitting to the client for approval. Since the system cannot be useful if it does not produce the required output.4 Output Testing After performing the validation testing the next step is output testing of the proposed system.All modules were tested individually as soon as they were completed and were checked for their correct functionality. 6. Validation succeeds when the software function in a manner that can be reasonably accepted by the customer. Login module.e. Asking the user about the format in which the system is required tests the output displayed or generated by the system under consideration..2 Integration Testing Integrated testing is a systematic technique for constructing tests to uncover errors associated with interface. The output format on the screen is found to be corrected as the format was designed in the system phase according to the user needs.3 Validation Testing Interfacing errors have been uncovered and corrected and a final series of test i. 19 . 6. The Department module. One is on screen and another one is printed format. The project is tested whether the requirements such as burn rate. The client (user) conducts the testing in the production environment.

The most creative and challenging phase of the system life cycle is system design. input data and the master files have to be design to meet the requirements of the proposed output. data flow diagrams. To achieve the objectives and the benefits expected from development system is to achieve the confidence of the people who will work in that system. the system is designed System design goes through two phases of the development and they are logical and physical design. Based on the input values and output requirements. The design focuses on the detailed implementation of the system. The primary objective of Implementation is to write source code and internal documentation so that conformance of the code to its specification can easily be verified. by good coding style. they specify then user needs of detail virtually determines information flow and out of the system required data sources.CHAPTER VII SYSTEM IMPLEMENTATION Implementation is the stage of the project when the theoretical design is turned into a working system. The objectives can be achieved by making source code as clear and straight forward as possible source code clarity is enhanced by structural coding techniques. The objectives of the proposed system are the driving forces behind the design process. Finally at the end of the design phase the system design description will be ready which is used 20 . This is the final and important phases in the system life cycle it is actually the process of conserting the new system into operational one.Secondly. System design is the process of planning a new system. menu and screen formats are given. In system manuals. In user manuals. When analyst prepares logical system design. details about the system which were used to develop the system are specified. First step is design phase is to determine how the output is produced and in what format.

CHAPTER VIII CONCLUSION AND FUTURE ENHANCEMENTS 8. Database design. They are submitting their details and maintenance details manually to their department before we have done this Mini Project. 21 . the base for the coding design.1 CONCLUSION The aim of this Mini Project is to create Online Leave Management System through which Mini Project developed for the individual leave status of our college is monitored. The main intension is to gather the leave information. This Mini Project is used to monitor the leave details in our college used to generate reports for their undergoing processes in online. Thus the future enhancement is going to implement this software to the entire SNR trust colleges. All the persons can view the individual details and the reports for details in online. which are the input that is to be fed into the systems. Each details of the leave is stored and updated by the Authenticated person.2 FUTURE ENHANCEMENTS This project maintains the details about the details of the individuals in the institution and provides reports. are the tables used for the system. It gives a detailed concentration on the technical and the other specifications that will make the new system operational are Input design.

using System.ConnectionString).Web. using System.Linq. SqlDataAdapter da.Web.UI.Web. using System.CHAPTER IX APPENDIX 9. SqlConnection con.Now.UI.greetingMsg = null.Web. } public string greetings() { string currTime = DateTime. string query. using System. SqlCommand cmd.ConnectionStrings["LeaveMgmtSysConStr"]. using System.Generic.Configuration. using System. using System.Data. EventArgs e) { con = new SqlConnection(ConfigurationManager.SqlClient. 22 . using System. protected void Page_Load(object sender.aspx. int time = Convert.WebControls.Data. public partial class Login_Login : System.1 SOURCE CODE Login.cs using System.Collections.UI.Page { DataSet ds.ToInt32(currTime).ToString("HH"). SqlDataReader dr.

Session["UserName"] = greetings() + dr[0]. Session["UserID"] = dr[1].ExecuteReader(). //Executing the Command And Assigning the Values to Data Reader(dr) dr = cmd.Now. ". ". ".HasRows) { if (dr. ".ToString().Read()) { string usrName = dr[0].Responsibility FROM [LeaveManagementSystem]. EventArgs e) { if (txtLogID. dr. con). } protected void btnSignIn_Click(object sender. cmd = new SqlCommand(query. } return greetingMsg.Contains("Sta")) { //Assigning Sql Command in to String Object query = "SELECT [Staffname].if (time >= 0 && time < 12) { greetingMsg = "Good Morning.Text. } else { greetingMsg = "Greetings.[dbo].[LastLogin]. if (dr.Text + "' and Password='" + txtPwd.ToString() + "' where FullStaffID='" + txtLogID. 23 .Close(). } else if (time >= 16 && time <= 22) { greetingMsg = "Good Evening.[tb_StaffDetails] Where FullStaffID ='" + txtLogID.ToString() + " !". con).[FullStaffID]. Session["LastLogin"] = dr[3]. Session["Dept"] = dr[4].Open().[Password].Text + "'". //Openning the Connection con. Session["Designation"] = "Staff". Session["Respon"] = dr[5].dpt.ToString().ToString(). cmd.Text + "'".ToString(). cmd = new SqlCommand(query.ToString(). query = "update tb_StaffDetails set LastLogin ='" + DateTime.ExecuteNonQuery(). Session["UsrName"] = dr[0]. } else if (time >= 12 && time < 16) { greetingMsg = "Good Afternoon.ToString().

query = "update tb_Login set LastLogin ='" + DateTime.ToString(). if (dr.ToString(). con). con). lblstatus. [dbo].Open().[dbo].Text = "Login Id Or Password Is Incorrect".[LastLogin] FROM [LeaveManagementSystem]. Session["LastLogin"] = dr[2].Text + "'". } } else { lblstatus.Text + "'".Close(). } } else { //Assigning Sql Command in to String Object query = "SELECT [StuName].[LastLogin] FROM [LeaveManagementSystem].Visible = true. cmd. lblstatus. //Openning the Connection con. } } else { lblstatus. //Openning the Connection con. cmd = new SqlCommand(query.[stuperid]. cmd = new SqlCommand(query. dr. con). cmd = new SqlCommand(query.userPermission(). userPermission(). //Executing the Command And Assigning the Values to Data Reader(dr) dr = cmd.[tb_StudentDetails] Where StuPerID ='" + txtLogID.Text.Open(). Session["UserID"] = dr[0].Text + "'". 24 .Text + "' and Password='" + txtPwd. } } else if (txtLogID.Contains("Adm")) { //Assigning Sql Command in to String Object query = "SELECT [LoginID].[Designation].Text = "Login Id Or Password Is Incorrect".Text + "' and Password='" + txtPwd.[Designation].Now.Visible = true.ExecuteNonQuery(). Session["Designation"] = dr[1].ExecuteReader().ToString().[tb_Login] Where LoginID ='" + txtLogID.Read()) { Session["UserName"] = greetings() + "Admin" + " !".HasRows) { if (dr.ToString() + "' where LoginID='" + txtLogID.

HasRows) { if (dr. } } else { lblstatus.//Executing the Command And Assigning the Values to Data Reader(dr) dr = cmd.Redirect("./Staff/StaffHome.Visible = true. cmd = new SqlCommand(query.Text = "Login Id Or Password Is Incorrect". 25 .. } } } public void userPermission() { string designation = Session["Designation"]. userPermission().ExecuteNonQuery(). Session["LastLogin"] = dr[3].ToString().ToString(). } else if (designation == "Staff") { lblstatus. } else if (designation == "Student") { Response. lblstatus.Visible = true..ToString(). lblstatus. Session["UserName"] = greetings() + dr[0].Redirect(".Read()) { string usrName = dr[0].ToString() + " !".ToString(). query = "update tb_StudentDetails set LastLogin ='" + DateTime. cmd./StudentDetails/addNewStudentDetails.aspx"). if (designation == "Admin") { Response.. dr.Text = "Staff Logged In". Session["UserID"] = dr[1]. Session["Designation"] = dr[2].Text + "'". con).ToString()./Student/StudentHome.aspx using System.aspx").aspx").Redirect(". Response.ExecuteReader(). } } } LeaveDetails.Close().ToString() + "' where StuPerID='" + txtLogID.Now. if (dr.

} dtst = dtst.. int count = 0.Text = "Last Logged In " + Session["LastLogin"]. protected void txtEndDate_TextChanged(object sender.SqlClient.UI.aspx").Web. using System. SqlDataReader dr. using System.DayOfWeek != DayOfWeek.Web. DateTime dtend) { TimeSpan days = dtend.UI. Convert. if (Session.Subtract(dtst)./login/Login.WebControls.Data.UI.Count > 0) { if (Session["Designation"].Data.using System.Text)).Sunday) { count++.Configuration. using System.aspx"). for (int a = 0. a < days.AddDays(1.Redirect(".Redirect(". } 26 ./login/Login. string query = null.Web. using System. } else { Response. lblLastLogin.Page { SqlConnection con. EventArgs e) { int noOfDays = DaysIgnoreWeekends(Convert.Text).ToDateTime(txtStaDate.Text = noOfDays. } } private int DaysIgnoreWeekends(DateTime dtst.ToString().Web.Generic.0).Equals("Student")) { lblUser. public partial class applyLeave : System..Collections. } return count. using System. SqlCommand cmd.ToString().ToString().Saturday && dtst. lblNoDays.Days + 1.ToDateTime(txtEndDate. } } else { Response.Text = Session["UserName"].DayOfWeek != DayOfWeek. a++) { if (dtst. using System.

ToString(). if (!Page. EventArgs e) { lblUserID.Text = sqlex. lblstatus. cmd = new SqlCommand(query. } } public void loaduserdata() { try { query = "SELECT [StuName]. } } } catch (SqlException sqlex) { lblstatus. //Executing the Command And Assigning the Values to Data Reader(dr) dr = cmd.[acaco].protected void Page_Load(object sender.Visible = true.Message.ToString() + "'". } if (dr != null) { dr. if (dr.ToString().ExecuteReader(). con).[dbo].State == ConnectionState.Text = dr[0].ConnectionString).Close().[hod].ToString().ConnectionStrings["LeaveMgmtSysConStr"].[LeavesAppliedAlready] FROM [LeaveManagementSystem].IsPostBack) { loaduserdata(). } query = null. con = new SqlConnection(ConfigurationManager.Text = dr[1].Open(). lblHOD.Close().HasRows) { if (dr. lbltutor. 27 .Text = dr[2].Text = dr[4].Open) { con. } finally { if (con.Text = Session["UserID"].Text = dr[3].Read()) { lblName. lblLeaAppAl.[tutor].[tb_StudentDetails] where stuperid='" + Session["UserID"].ToString(). lblAcaCo.ToString(). //Openning the Connection con.ToString().

'" + DateTime.ToString() + "'.Text + "'.''. btnSave.Text + ".'" + lbltutor.Text = ex.Text + "'.Enabled = false. } finally { if (con. txtReason.'Pending')".ExecuteNonQuery() > -1) { lblstatus.'" + lblAcaCo.Open) { con.'" + txtEndDate.Open(). txtEndDate. } else { lblstatus.Enabled = false. //Openning the Connection con. Check Your Home Page for further Details.ExecuteNonQuery().Text + "'.Text = "The Leave Request Sent to Tutor.''. cmd.'" + lblName.'" + lblHOD.State == ConnectionState. lblstatus. //Executing the Command And Assigning the Values to Data Reader(dr) if (cmd.Close().[dbo]. disControl(). EventArgs e) { try { //Assigning Sql Command in to String Object query = "INSERT INTO [LeaveManagementSystem]. lblstatus.ToString() + "'".Enabled = false. } } catch (SqlException ex) { lblstatus.ToString().Visible = true. cmd = new SqlCommand(query.Text + "' where StuPerID='" + Session["UserID"].0.Text + "'. 28 . con).Visible = true.Enabled = false.''.''.Text + "'.Text + "'. con). btnSave." + lblNoDays. cmd = new SqlCommand(query. } }} public void disControl() { txtStaDate.Enabled = false.'" + txtReason.ToShortDateString() + "'.[tb_LeaveDetails] VALUES ('" + Session["UserID"]. query = "update tb_StudentDetails set LeavesAppliedAlready ='" + lblLeaAppAl.Today.".} } protected void btnSave_Click(object sender.Text = "The Leave Request Not Submitted".'" + txtStaDate.Text + "'.Visible = true. lblstatus.

ConnectionString).Web. if (s.ToString() + "'".aspx").Collections.Redirect(".Generic.Abandon(). //Openning the Connection con. lblPusrID.WebControls.Text + "' where FullStaffID='" + Session["UserID"].Page { DataSet ds. } } ChangePwd. using System.Data. using System.Text = Session["UserID"]. using System. 29 . protected void Page_Load(object sender.Contains("Sta")) { query = "Update [LeaveManagementSystem].Text = "Last Logged In " + Session["LastLogin"].SqlClient.Web. lblUser.Linq. ImageClickEventArgs e) { Session. using System. } protected void ImgLogOut_Click(object sender. con). SqlDataReader dr. public partial class Login_Login : System. EventArgs e) { try { string s = lblPusrID.ConnectionStrings["LeaveMgmtSysConStr"].[dbo]. using System. Response..ToString(). using System.UI. greetingMsg = null. SqlCommand cmd.Redirect(".Data./Login/Login.} protected void ImgLogOut_Click(object sender. Response. EventArgs e) { con = new SqlConnection(ConfigurationManager. ImageClickEventArgs e) { Session..aspx"). lblLastLogin.UI.Web.cs: using System.Web. string query./Login/Login. using System.Open().aspx.[tb_StaffDetails] Set Password ='" + txtConPWD. SqlConnection con. SqlDataAdapter da.Text.UI.Abandon(). using System.ToString().Configuration.ToString().Text = Session["UserName"]. cmd = new SqlCommand(query. } protected void btnChange_Click(object sender.

Open().It Will update the Records if (cmd. query = "Update [LeaveManagementSystem].Visible = true. //Openning the Connection else { lblstatus.[tb_login] Set Password ='" + txtConPWD. //Openning the Connection con. } } else { string stuid = Session["UserID"].ExecuteNonQuery() > -1) { lblstatus.[tb_StudentDetails] Set Password ='" + txtConPWD.Text = "Password Is Updated". lblstatus.Text = "Password is Not Updated". } } else if (s. //Executing the Command . lblstatus.ExecuteNonQuery() > -1) { lblstatus. query = "Update [LeaveManagementSystem]. } } } catch (SqlException ex) finally 30 .It Will update the Records if (cmd. lblstatus. } else { lblstatus.Text = "Password is Not Updated". cmd = new SqlCommand(query. lblstatus.ToString().Visible = true.Text = "Password Is Updated". } else { lblstatus.Visible = true.Text + "' where loginid='" + stuid + "'". lblstatus.Text + "' where StuPerID='" + stuid + "'".Visible = true. con).Contains("Adm")) { string stuid = Session["UserID"].[dbo].//Executing the Command .[dbo]. cmd = new SqlCommand(query.Visible = true. con).Text = "Password is Not Updated".ToString().

SqlClient.ToString(). using System.Web./login/Login. }} 9. using System. public partial class StaffHome : System.WebControls.aspx").UI. ImageClickEventArgs e) { Session. using System./login/Login.. EventArgs e) { if (Session.Data.Web.Close().State == ConnectionState. using System. lblLastLogin. } if (dr != null) { dr.ToString(). using System.aspx").Configuration. } else { Response.Open) { con.{ if (con.Data.Count > 0) { if (Session["Designation"]. using System.UI.Web.Redirect(". } } } StaffHome.aspx.Generic..Web.Redirect(".cs using System..Close(). } query = null.UI.Text = Session["UserName"]. Response.Text = "Last Logged In " + Session["LastLogin"].Page { protected void Page_Load(object sender.Redirect(". }} else { Response.Equals("Staff")) { lblUser.Collections. using System.2 SCREEN SHOTS 31 .aspx"). } } protected void ImgLogOut_Click(object sender.Abandon()./Login/Login.

32 .

33 .

34 .

35 .

36 .

37 .

38 .

com  www.Roger S. 39 .asptutorial.Awad. 2002.hotscripts.CHAPTER X BIBLIOGRAPHY WEBSITES    www. Second Edition Galgotia Publications(p)Ltd Published by Sunil BOOKS: 1) Software engineering .Pressman Fifth Edition.w3schools.Mc Graw Hill International Edition 2001 2) System Analysis and Design • • • Elais  www.