Sara T Report 11
Sara T Report 11
Sara T Report 11
TITLE OF THE PROJECT: Online Training Management System STATEMENT ABOUT THE PROBLEM:
The existing system is the manual or partial computerized system where students are facing a lot of problems. The existing system has various drawbacks such as to get admission in the organization student has to come to the organization and fill up a registration form. The information storage & maintenance is more critical in this system. Here the students waste their valuable time in a large scale. Here student may or may not get admission in his favorite course due to unavailability of seats. Faculty has to ask some question to the student to know his knowledge. It wastes the time of both faculty and student. Clerk has to do all the things like batch setup, material setup etc manually which becomes very difficult for him.
project deals with the real world problem and by the help of this system various problems can
Through the website a user can easily fillup the registration form and get his login id.Using this loginid student can appear online exam on a particular date.Considering the mark of online exam and last semester he can get chance to take admission. this site dealings with several cinemahalls having various information i.e charges,availability of vacancy . This site dealings with several course having various information i.e fees,availability of vacancy. Also user can know about the organization. Each course is associated with price & description. Users can save their valuable time. Time is money .So by saving time users can save money.
Modules
A. The Admin Management System: The Administrator plays vital role in this project. Only one administrator is permitted to open an account. The privilege is given to the administrator to allow the account of Students, Faculty and Employees, So that only authorized person create an account on this website. All the Global set up is done by the Administrator like Course Set up, new Advertisement set up, course fee set up etc. Whenever Administrator wants, he can cancel the account of faculty and employee by giving appropriate cause. B. The Clerk Management System: After getting permission from Administrator, he has the power to do manipulate the entire database. He also manages all the set up done by the administrator. He takes the admission of the selected
2
candidates who are qualified in the online exam by taking the corresponding course fee. He also allotted the Roll no to the student, issues the material. C. The Faculty Management System: Faculty manages all the activities related to the Education. He has taken class and attendance regularly. In Every month he conducts an exam related to the subject to know how much the student gain knowledge from the class. He also checks whether the student get the material or not. D. The Student Management System: Student is the important aspect of an institute, without it all are negligible. First they register and then they appear online exam .After selecting; they take admission in the institute by giving the course fee. Then the course materials are issued to the student. Finally the Certificate is issued to the student who is complete the course the successfully.
Software specification:
Operating System Web Server Website designing tool Language Database : Windows 7 : IIS (Internet information service) : ASP.NET : C# : MS SQLSERVER 2005
Testing is the process to test the entire field and find the errors. The entire software system of the project is to be tested. This is normally performing on realistic data of the client to demonstrate for the software is working satisfactorily. Testing here focus on external behavior of the system.
Providing a web-based application, that gives services to user of an organization. The Training Management system is an internet based application that can be accessed throughout net. Anyone can take admission in the Organization basing on their mark without any problem.
One can be ensured that taking admission ones favorite course at his/her suitable time in the Organization.
The website provides some global links so that user can know about the Organization without any cost.
From every part of the project the user is provided with the links through framing so that he can go from one option of the project to other as per the requirement. This is bound to be simple and very friendly as per the user is concerned. That is, we can say that the project is user friendly which is one of the primary concerns of any good project.
It is a common website for advertisement of different course that are available in the Organization. The project has been carried out with the following objective in mind:
Providing a web-based application, that gives services to user of an organization. The Training Management system is an internet based application that can be accessed throughout net. Anyone can take admission in the Organization basing on their mark without any problem.
We can be ensured that taking admission ones favorite course at his/her suitable time in the Organization
The website provides some global links so that user can know about the Organization without any cost.
Purpose
To overcome various problems regarding manual process this Online Training Management System is introduced.
Future Enhancements
Requirements keep changing with time so the implementation of this project change with time hence implementation is an ongoing process, which may change in future.
Administrator
The Administrator plays vital role in this project. Only one administrator is permitted to open an account. The privilege is given to the administrator to allow the account of Students, Faculty and Employees, So that only authorized person create an account on this website. All the Global set up is done by the Administrator like Course Set up, new Advertisement set up, course fee set up etc. Whenever Administrator wants, he can cancel the account of faculty and employee by giving appropriate cause.
Clerk
After getting permission from Administrator, he has the power to do manipulate the entire database.
5
He also manages all the set up done by the administrator. He takes the admission of the selected candidates who are qualified in the online exam by taking the corresponding course fee. He also allotted the Roll no to the student, issues the material.
Faculty
Faculty manages all the activities related to the Education. He has taken class and attendance regularly. In Every month he conducts an exam related to the subject to know how much the student gain knowledge from the class. He also checks whether the student get the material or not.
Student
Student is the important aspect of an institute, without it all are negligible. First they register and then they appear online exam .After selecting; they take admission in the institute by giving the course fee. Then the course materials are issued to the student. Finally the Certificate is issued to the student who is complete the course the successfully. The proposed system is completely web based. It is an internet based application. User can take admission to the particular course just by a single click .If any information is required then he can directly click on appropriate option mention on the site. The System should be user friendly so that any user can easily access this site from any place at any time.
2. THEORETICAL BACKGROUND
6
The Industrial Development Corporation of Orissa Limited (IDCOL) was incorporated on 29th March, 1962 as a wholly owned Govt. of Orissa. It has its registered office at IDCOL HOUSE, Unit-II, Ashok Nagar, Bhubaneswar-751001, Khurda, Orissa, India (Telephone No.: 06742532848), Website: www.idcorissa.com). The main objectives of the corporation are to establish, promote and execute heavy and medium scale industries within the state of Orissa and to aid, assist and finance industrial undertaking with capital for the execution of its works/business which is likely to promote industrial development and accelerate the pace of industrial growth of the state. IDCOL Software Limited (ISL), a subsidiary of IDCOL and a Govt. of Orissa enterprise is emerging as a complete IT solution company in the state. It has been set up with in the area of information technology for the betterment of the people of the state of Orissa along with a wish of preparing the young generation to meet the future requirement in the IT field. It has been given the status of strategic Microsoft Technology Partner (SMTP) and system integrator of Compaq. In association with IT majors like Microsoft, Compaq, ISL has envisioned to carry out prestigious projects to bring e-governance in the state.
When a student wants to take admission in a course at ISL at that time they come to ISL and fill up the registration form manually. Then after the concerned subject faculty ask some question to the student, to know students knowledge .If he is eligible then he takes admission by giving first installment of the course. Then an appropriate batch is allocated to that student. In every class concerned subject faculty first takes the attendance of the student. In the middle time of course there is also a class exam and finally they are giving a project presentation. Their performance rate is also been maintained in the register.
The existing system is the manual or partial computerized system where students are facing following problems. To get admission in the organization student has to come to the organization and fill up a registration form. Here the students waste their valuable time in a large scale. Here student may or may not get admission in his favorite course due to unavailability of seats. Faculty has to ask some question to the student to know his knowledge. The information storage & maintenance is more critical in this system. It wastes the time of both faculty and student. Clerk has to do all the things like batch setup, material setup etc manually which becomes very difficult for him. In the middle time of course there is also a class exam and finally they are giving a project presentation. Their performance rate is also been maintained in the register. Thus to overcome above mentioned problems regarding manual process Online Training Management System is introduced.
4. SYSTEM ANALYSIS
System analysis is the process of investigating a system, identifying problems, and using the information to recommend improvements to the system. Here admin, clerk and faculty management and admission process has been analyzed by me. The SRS document has prepared keeping the project to be developed in view. The document specifies the general procedure that has been followed by me, while the system was studied and developed. The collected information was organized to form the specification document and then was modeled to suite the standards of the system as intended.
System Planning:
This project says that there is no requirement to a student to come to the organization for the registration enquiry. Over Internet they will submit the form .Then after they will get a registration number. By that registration number on a particular date they will appear an online exam. Those students are selected; they will be allowed to take admission by evaluating the last qualification mark percentage and from its online exam mark. The student attendance will be taken by the faculty and faculty attendance will be taken by the administrator, through this project. So no manual process will be required for it. At any time at any moment that report can also be generated. The class exam, purchase of material details, annual income, annual report to any topic, fees collection, maximum seat set up, course set up, batch set up, certification issue, identity card issue ,course content set up are being controlled in this project.
5. SYSTEM DESIGN
9
Context Diagram:
A context diagram is a top level (also known as Level 0) data flow diagram. It only contains one process node (process 0) that generalizes the function of the entire system in relationship to external entities.
Context Diagram(Level-0):
10
LEVEL-1:
11
LEVEL-2(ADMINS MANAGEMENT):
12
LEVEL-2(FACULTYS MANAGEMENT):
13
LEVEL-2(CLERKS MANAGEMENT):
14
LEVEL-2(STUDENTS MANAGEMENT):
15
U E D O M J P E M A E M P L O _ I D M E D Y R S
E A M P P P R L O O Y V E A
S _
L O
E N
G
R A
P_
A DS I D
M
O
BB A A T T C C H H N N OO
R O L L N O
I N
E S
M T
D F E O L E L S E C T
C F
N I O
O E L E L S
A N
E C
M
T S
D E E E T
E L
A W
S S E E R Q
C S
U T N
S N
T A
U M
D E
R R
I D O L
M
G E R
K
B
S S
E A
T T
U C
P H
L
O
N
D U
O
L E
B S
A T C H E T U P
H
N O . O
N
F
O
Q S T
M Q U
O E
D S
E T
S E
N A
I O Q N S U P E
N E A T N
N A M E
I O Q S U E
N E T S U T P
S P U
T P
I O E R
T
S E
Y
E X T A M
I N L A V O P A G P L
E D I T
I N O
I O
C M
R A A L
E T
A E
T R
E I A
A U T
W R
S E I N I D
T
R S E T E G R I
D A L
I A S LT
U I ND
FE
ON
I N
O V
I E
U U SS C A T I O I N F O Q C U A
EE R R N N A T L
__
II DD A I N M
E E
I F I P O
E
O O T F Q D S T N
16
E S
I D
6. UML DIAGRAMS
17
UML stands for Unified Modeling Language. UML is accepted by the Object Management Group as the standard for modeling object oriented programs.
Class diagrams are the backbone of almost every object oriented method, including UML. They describe the static structure of a system.
Sequence diagrams describe interactions among classes in terms of an exchange of messages over time.
DATABASE DESIGN:
The integrated collection of data is usually referred to as database. The records for different entities are stored in database. The database contains information about particular system/ about the enterprise. The data storage, retrieval and maintenance are carried out by the database management. The details of each table including the structure, data type and different constraints (i.e. Primary key and foreign key) are as follows:
ADMITTEDSTUDENT
ADVERTISEMENT
21
BATCHSETUP
COURSESETUP
DEPARTMENT
22
EMPLOYEE
EXAMINFO
23
FEECOLLECTION
LOGINMASTER
24
MATERIAL
MODULE
ORGANIZATION
25
PURCHASE
QUESTION
SCORE
26
STUDENT
STUDENT_EDU
27
TESTQUESTION
8. SYSTEM PLANNING
28
9. METHODOLOGY ADOPTED
29
.NET:
The Microsoft .NET Framework is a software framework that can be installed on computers running Microsoft Windows operating systems. It includes a large library of coded solutions to common programming problems and a virtual machine that manages the execution of programs written specifically for the framework. The .NET Framework is a Microsoft offering and is intended to be used by most new applications created for the Windows platform. The framework's Base Class Library provides a large range of features including user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, and network communications. The class library is used by programmers, who combine it with their own code to produce applications. Programs written for the .NET Framework execute in a software environment that manages the program's runtime requirements. Also part of the .NET Framework, this runtime environment is known as the Common Language Runtime (CLR). The CLR provides the appearance of an application virtual machine so that programmers need not consider the capabilities of the specific CPU that will execute the program. The CLR also provides other important services such as security, memory management, and exception handling. The class library and the CLR together constitute the .NET Framework.
30
.Net Framework provides an environment to develop, execute and debug applications using different .Net-compliant programming languages, such as Visual Basic, Visual C#, and Visual C++. It also offers many other benefits to application developers. The key benefits provided by .Net Framework are consistent programming model, language interoperability, automatic management of resources, easy of deployment etc.
C#:
C# (pronounced "see sharp") is a multi-paradigm programming language encompassing imperative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines. C# is intended to be a simple, modern, general-purpose, object-oriented programming language. Its development team is led by Anders Hejlsberg. During the development of the .NET Framework, the class libraries were originally written using a managed code compiler system called Simple Managed C (SMC). By design, C# is the programming language that most directly reflects the underlying Common Language Infrastructure (CLI). Most of its intrinsic types correspond to value-types implemented by the CLI framework. However, the language specification does not state the code generation requirements of the compiler: that is, it does not state that a C# compiler must target a Common Language Runtime, or generate Common Intermediate Language (CIL), or generate any other specific format. Theoretically, a C# compiler could generate machine code like traditional compilers of C++ or FORTRAN.
COMMON TYPE SYSTEM (CTS): C# has a unified type system. This unified type system is called Common Type System (CTS).A unified type system implies that all types, including primitives such as integers, are subclasses of the System.Object class. For example,
every type inherits a ToString() method. For performance reasons, primitive types (and value types in general) are internally allocated on the stack.
31
ASP.NET:
ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites, web applications and web services. ASP.NET is a web development model, which is used to develop interactive, data-driven Web applications over the Internet. .NET-compliant languages such as Visual Basic or Visual C# can be used to create web applications. A number of controls are provided to generate UI of the web applications, such as Textbox, Button, and Label. If required, you can also extend the functionalities of those controls in code-behind file of the Web application. Ajax, formerly code-named as atlas, is an extension of ASP.NET for developing and Implementing AJAX functionality. ASP.NET AJAX includes both client-side and server-side components that allow you to create web applications that do not require complete reload of the page while making modifications to the page. It enables you to send only the modified portions of a web page to the web server by making asynchronous calls to the Web server. This decreases the network traffic as well as the processing required on the Web server.
PAGES:
.NET pages, known officially as "web forms", are the main building block for application development. Web forms are contained in files with an ".aspx" extension; these files typically contain static (X)HTML markup, as well as markup defining server-side Web Controls and User Controls where the developers place all the required static and dynamic content for the web page.
CODE-BEHIND MODEL:
32
Microsoft recommends dealing with dynamic program code by using the code-behind model, which places this code in a separate file or in a specially designated script tag. Code-behind files typically have names like MyPage.aspx.cs or MyPage.aspx.vb while the page file is MyPage.aspx (same filename as the page file (ASPX), but with the final extension denoting the page language). This practice is automatic in Microsoft Visual Studio and other IDEs. When using this style of programming, the developer writes code to respond to different events, like the page being loaded, or a control being clicked, rather than a procedural walk through the document. ASP.NET's code-behind model marks a departure from Classic ASP in that it encourages developers to build applications with separation of presentation and content in mind. In theory, this would allow a web designer, for example, to focus on the design markup with less potential for disturbing the programming code that drives it. This is similar to the separation of the controller from the view in model-view-controller frameworks.
ADO.NET:
ADO.NET is a technology that is used for working with data and databases of all types. In the project it provides access to data source Microsoft SQL Server, and the data source exposed through OLE DB and Extensible Markup Language (XML). In the project ADO.NET is used to connect to data source for retrieving, manipulating and updating data. The most important feature of ADO.NET is disconnected data architecture. In this architecture, applications are connected to databases only while data is being retrieved or modified. Databases, which refer to a cached set of database records, follow disconnected data architecture for accessing or modifying data. Therefore, applications do not require connecting to the database for processing each record. In addition, all database operations are performed on the dataset instead of the database.
33
Microsoft SQL Server is a relational model database server produced by Microsoft. Its primary query languages are T-SQL and ANSI SQL. SQL Server 2005 (codenamed Yukon), released in October 2005, is the successor to SQL Server 2000. It included native support for managing XML data, in addition to relational data. For this purpose, it defined an xml data type that could be used either as a data type in database columns or as literals in queries. XML columns can be associated with XSD schemas; XML data being stored is verified against the schema. Specialized indexing methods were made available for XML data. XML data is queried using XQuery; CLR Integration was the main features with this edition where one could write SQL code as Managed Code these are those code which are being executed by CLR(Common Language Runtime). SQL Server 2005 added some extensions to the T-SQL language.SQL Server 2005 also allows a database server to be exposed over web services using TDS packets encapsulated within SOAP (protocol) requests. When the data is accessed over web services, results are returned as XML. For relational data, T-SQL has been augmented with error handling features (try/catch) and support for recursive queries (Common Table Expressions). Partitions on tables and indexes are supported natively, so scaling out a database onto a cluster is easier. SQL CLR was introduced with SQL Server 2005 to let it integrate with the .NET Framework. SQL Server 2005 introduced "MARS" (Multiple Active Results Sets), a method of allowing usage of database connections for multiple purposes.
10. TESTING
34
Testing is one of the most important phases in the software development activity. In software development life cycle (SDLC), the main aim of testing process is the quality; the developed software is tested against attaining the required functionality and performance. cases are analyzed whether the software is working according to the expectations or not. The success of the testing process in determining the errors is mostly depends upon the test case criteria, for testing any software we need to have a description of the expected behavior of the system and method of determining whether the observed behavior confirmed to the expected behavior. During the testing process the software is worked with some particular test cases and the output of the test
The entire software system of the project is tested and it meet its requirements. This is normally performing on realistic data of the client to demonstrate for the software is working satisfactorily. Testing here focus on external behavior of the system.
Testing with dummy data:This test was done with wrong data, validating them and making the system fail forcefully, and the system finally is found bug free.
11. IMPLEMENTATION
11.1 SYSTEM IMPLEMENTATION:35
Implementation is the stage of the project when the theoretical design turned into a working system. At this stage the main workload, the up heal and the major impact on the existing practices shift to user department. If the implementation stage is not carefully planned and controlled, it can cause chaos. Thus it can be considered to be the most crucial stage in achieving a new successful system and in giving the users confidence that the users confidence that the new system will work and be effective. Implementation involves careful planning, investigation of current system and constraints on implementation, design of methods to achieve the changeover, training of staff in the changeover procedures and evaluation of changeover methods. The first task is the implementation planning i.e. deciding the methods and time scale to be adopted. Requirements keep changing with time so the implementation of this project may change with time hence implementation is an ongoing process, which may change in future.
This is the home page or first page. Here there are links for new causes register, login. If anyone wants to register they can do by clicking these links. If you already have registered you can login. Any user can add feedback about the system.
After clicking the registration in home page this page will come where we will enter its data like email address, contact no etc. on clicking the register button the data will be stored in the database table details.
COURSE SETUP
41
EMPLOYEE APPROVAL
BATCH SETUP
42
PURCHASE MATERIAL
PUBLISH ADVERTISEMENT
43
QUESTION SETUP
EXAM SETUP
44
VIEW RESULT
CODE
45
46
DataTable dt = dbutility.redatatable(sqlquery); ddl.DataSource = dt; ddl.DataTextField = dt.Columns[1].ToString(); ddl.DataValueField = dt.Columns[0].ToString(); ddl.DataBind(); } public static void returnddl1(ListBox ddl, string sqlquery) { DataTable dt = dbutility.redatatable(sqlquery); ddl.DataSource = dt; ddl.DataTextField = dt.Columns[1].ToString(); ddl.DataValueField = dt.Columns[0].ToString(); ddl.DataBind(); } public static void alter(string sqlquery) { SqlCommand com = new SqlCommand(sqlquery, dbutility.conn()); com.ExecuteNonQuery(); } public static int alter1(string sqlquery) { DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(sqlquery, dbutility.conn()); da.Fill(dt); return Convert.ToInt32(dt.Rows[0][0]); } }
Employee Registration:
47
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.IO; public partial class Default4 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string str = "select dept_id, dept_name from department"; string str1 = "select hint_question_id, hint_question from question"; dbutility.returnddl(DropDownList1, str); dbutility.returnddl(DropDownList2, str1); DropDownList1.Items.Insert(0, "Select Category"); DropDownList2.Items.Insert(0, "Choose a Question"); } } protected void Button2_Click(object sender, EventArgs e) { string s1 = "select * from employee where dept_name='" + "Adminstrator" + "'"; DataTable dt2 = dbutility.redatatable(s1); int y = dt2.Rows.Count;
48
if (y == 1 && DropDownList1.SelectedItem.ToString() == "Adminstrator") { Response.Write("<script language='javascript' >alert('Adminstrator already exists'); </script>"); } else { if (RadioButton1.Checked == false && RadioButton2.Checked == false)
{ Label2.Text = "Select your Gender"; } else { if (CheckBox1.Checked == false) { Label1.Text = "Please accept the term & condition"; Label2.Text = ""; } else { if (TextBox11.Text.Length < 6) { Label4.Text = "password atlest 6 character"; } else { string empid; string s = "select * from employee where dept_name='" + DropDownList1.SelectedItem.ToString() + "'"; DataTable dt1 = dbutility.redatatable(s); int x = dt1.Rows.Count; x++;
49
empid = "ISL/" + TextBox2.Text + "/" + x; String gender = " "; if (RadioButton1.Checked == true) { gender = RadioButton1.Text; } else if (RadioButton2.Checked == true) { gender = RadioButton2.Text; } string filename = Path.GetFileName(FileUpload1.PostedFile.FileName); FileUpload1.PostedFile.SaveAs(Server.MapPath("phot o/" + filename));
string sql = "insert into employee values('" + TextBox1.Text + "','" + TextBox2.Text + "','" + empid + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + gender + "','" + TextBox7.Text + "',0" + TextBox8.Text + ",'" + TextBox9.Text + "','" + filename + "','" + TextBox3.Text + "')"; dbutility.alter(sql); string sql2 = "insert into loginmaster values('" + TextBox10.Text + "','" + TextBox11.Text + "','" + empid + "','" + DropDownList1.SelectedItem.ToString() + "','" + TextBox3.Text + "','" + DropDownList2.SelectedItem.ToString() + "','" + TextBox13.Text + "')"; dbutility.alter(sql2); } } } } } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) {
TextBox2.Text = DropDownList1.SelectedItem.ToString();
50
if (DropDownList1.SelectedItem.ToString() == "Adminstrator") { string s1 = "select * from employee where dept_name='" + "Adminstrator" + "'"; DataTable dt2 = dbutility.redatatable(s1); int y = dt2.Rows.Count; if (y == 1) { Response.Write("<script language='javascript' >alert('Adminstrator already exists'); </script>"); }
else {
TextBox3.Text = "Pending"; }
51
} protected void CustomValidator2_ServerValidate(object source, ServerValidateEventArgs args) { if (DropDownList1.SelectedIndex == 0) { args.IsValid = false; } else { args.IsValid = true; } } protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args) { if (args.Value.Length < 6) { args.IsValid = false; } else { args.IsValid = true; } }
52
else { args.IsValid = true; } } protected void CustomValidator4_ServerValidate(object source, ServerValidateEventArgs args) { string s1 = "select * from loginmaster where user_id='" + TextBox10.Text + "'"; DataTable dt2 = dbutility.redatatable(s1); int y = dt2.Rows.Count; if (y == 1) { args.IsValid = false; } else { args.IsValid = true; } } protected void Button1_Click1(object sender, EventArgs e) { TextBox1.Text = "";
TextBox2.Text = ""; TextBox3.Text = ""; TextBox5.Text = ""; TextBox6.Text = ""; TextBox7.Text = ""; TextBox8.Text = ""; TextBox9.Text = "";
53
TextBox13.Text = ""; DropDownList1.SelectedIndex = 0; DropDownList2.SelectedIndex = 0; RadioButton1.Checked = false; RadioButton2.Checked = false; CheckBox1.Checked = false; }
Student Registration:
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.IO; public partial class Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string str1 = "select hint_question_id, hint_question from question"; dbutility.returnddl(DropDownList15, str1); DropDownList15.Items.Insert(0, "--Choose a Question--");
DropDownList5.Items.Insert(0, "--year--");
54
DropDownList6.Items.Insert(0, "--year--"); DropDownList7.Items.Insert(0, "--Course type--"); DropDownList8.Items.Insert(0, "--year--"); DropDownList11.Items.Insert(0, "--Course type--"); DropDownList12.Items.Insert(0, "--year--"); fillcgpa(); fillcgpa1(); fillyear(); TextBox15.Visible = false; TextBox17.Visible = false; TextBox17.Text = "0"; TextBox15.Text = "none"; DropDownList9.Visible = false; DropDownList10.Visible = false; DropDownList11.Visible = false; DropDownList12.Visible = false; DropDownList13.Visible = false; DropDownList14.Visible = false; RadioButton5.Visible = false; RadioButton6.Visible = false; DropDownList1.Items.Insert(0, "--Select Course--"); DropDownList1.Items.Insert(1, ".Net"); DropDownList1.Items.Insert(2, "Java"); DropDownList2.Items.Insert(0, "--Select Module--"); DropDownList7.Items.Insert(1, "B.Tech"); DropDownList7.Items.Insert(2, "BSc Comp.Sc."); DropDownList7.Items.Insert(3, "BCA"); DropDownList7.Items.Insert(4, "B.E."); DropDownList11.Items.Insert(1, "MSc Comp.Sc."); DropDownList11.Items.Insert(2, "MCA"); DropDownList11.Items.Insert(3, "M.Tech"); fillstate(); DropDownList4.Items.Insert(0, "--none--"); } } public void fillcgpa()
55
{ for (int x = 1; x <= 9; x++) { DropDownList9.Items.Add(x.ToString()); DropDownList13.Items.Add(x.ToString()); } } public void fillcgpa1() { for (int x = 00; x <= 99; x++) { if (x <= 9) { DropDownList10.Items.Add(".0" + x.ToString()); DropDownList14.Items.Add(".0" + x.ToString()); } else { DropDownList10.Items.Add("." + x.ToString()); DropDownList14.Items.Add("." + x.ToString()); } } } public void fillyear() { for (int x = 1980; x <= DateTime.Now.Year; x++) { DropDownList12.Items.Add(x.ToString()); DropDownList5.Items.Add(x.ToString()); DropDownList6.Items.Add(x.ToString()); DropDownList8.Items.Add(x.ToString()); } } public void fillstate() {
56
DropDownList3.Items.Add("Karnataka"); }
protected void Button2_Click(object sender, EventArgs e) { string gen = ""; if (RadioButton1.Checked == true) { gen = RadioButton1.Text; } else { gen = RadioButton2.Text; } double d = 0; d = Convert.ToDouble(TextBox14.Text); if (DropDownList1.SelectedIndex == 0) { Response.Write("<script Course or Module'); </script>"); } else if (RadioButton1.Checked == false && RadioButton2.Checked == false) { Response.Write("<script language='javascript' >alert('Choose a Gender'); </script>"); } language='javascript' >alert('Choose Valid
57
else if (DropDownList3.SelectedIndex == 0) { Response.Write("<script language='javascript' >alert('Please Choose a Valid State or City'); </script>"); } else if (DropDownList5.SelectedIndex == 0 || DropDownList6.SelectedIndex == 0 || DropDownList8.SelectedIndex == 0) {
language='javascript'
>alert('Choose
Valid
Year
Of
else if (DropDownList15.SelectedIndex == 0) {
Response.Write("<script language='javascript' >alert('Choose Valid Question'); </script>"); } else if (CheckBox1.Checked == false) { Response.Write("<script language='javascript' >alert('Please accept terms and condition'); </script>"); } else if (FileUpload1.FileName == "") { Response.Write("<script language='javascript' >alert('Please give your profile Picture'); </script>"); } else if (CheckBox6.Checked == false) { TextBox17.Text = ""; TextBox15.Text = ""; stringfile = Path.GetFileName(FileUpload1.PostedFile.FileName);
58
FileUpload1.PostedFile.SaveAs(Server.MapPath("photo/" + file)); string query = "insert into student values('" + TextBox18.Text + "','" + TextBox1.Text + "','" + TextBox2.Text + "','" + gen + "','" + TextBox3.Text
"','"
TextBox4.Text
"," + +
+ "'," "','" +
TextBox5.Text + + + + "','" +
+ + + + + +
TextBox19.Text
"','Not
string query1 = "insert into student_edu values('" + TextBox18.Text + "','" + TextBox8.Text + "'," + DropDownList5.SelectedItem + "," + TextBox9.Text + ",'" + TextBox10.Text + "'," + DropDownList6.SelectedItem + "," + TextBox11.Text + ",'" + DropDownList7.SelectedItem.ToString() + "','" + TextBox12.Text + "'," + DropDownList8.SelectedItem + "," + d + ",null,null,null,null )"; dbutility.alter(query1); } else { double d1 = 0; d1 = Convert.ToDouble(TextBox17.Text); string file = Path.GetFileName(FileUpload1.PostedFile.FileName); FileUpload1.PostedFile.SaveAs(Server.MapPath("photo/"+ file)); string query = "insert into student values('" + TextBox18.Text + "','" + TextBox1.Text + "','" + TextBox2.Text + "','" + gen + "','" + TextBox3.Text + "','" + TextBox4.Text + "," + TextBox5.Text + "','" +
59
DropDownList3.SelectedItem.ToString() DropDownList4.SelectedItem.ToString() TextBox7.Text + ",'" + + DropDownList15.SelectedItem.ToString() DropDownList1.SelectedItem.ToString() DropDownList2.SelectedValue.ToString() Assigned','Pending','Pending')"; dbutility.alter(query); + + "'," "','"
+ + + + "','" + TextBox19.Text
+ + + + + "','Not
string query1 = "insert into student_edu values('" + TextBox18.Text + "','" + TextBox8.Text + "'," + DropDownList5.SelectedItem + "," + TextBox9.Text + ",'" + TextBox10.Text + "'," + DropDownList6.SelectedItem + "," + TextBox11.Text + ",'" + DropDownList7.SelectedItem.ToString() + "','" + TextBox12.Text + "'," + DropDownList8.SelectedItem + "," + + "','" + d + ",'" + "'," + + DropDownList11.SelectedItem.ToString() dbutility.alter(query1); } } protected void RadioButton3_CheckedChanged(object sender, EventArgs e) { if (RadioButton3.Checked == true) { TextBox14.Text = ""; DropDownList9.Visible = false; DropDownList10.Visible = false; TextBox14.Enabled = true; TextBox15.Text
60
DropDownList9.Visible = true; DropDownList10.Visible = true; TextBox14.ReadOnly = true; TextBox14.Enabled = false; } } protected void RadioButton5_CheckedChanged(object sender, EventArgs e) { if (RadioButton5.Checked == true) {
DropDownList14.Visible = false; DropDownList13.Visible = false; TextBox17.ReadOnly = false; TextBox17.Text = ""; TextBox17.Enabled = true; } } protected void RadioButton6_CheckedChanged(object sender, EventArgs e) { if (RadioButton6.Checked == true) {
DropDownList13.Visible = true; DropDownList14.Visible = true; TextBox17.Text = DropDownList13.SelectedItem.ToString() + DropDownList14.SelectedItem.ToString(); TextBox17.ReadOnly = true; TextBox17.Enabled = false; } }
61
protected void CheckBox6_CheckedChanged(object sender, EventArgs e) { if (DropDownList7.SelectedIndex != 0) { if (CheckBox6.Checked == true) { TextBox17.Text = ""; RadioButton5.Visible = true; RadioButton6.Visible = true; DropDownList11.Visible = true; DropDownList12.Visible = true; TextBox15.Visible = true; TextBox17.Visible = true; TextBox15.Text = ""; }
else { TextBox17.Text = "0"; TextBox15.Visible = false; DropDownList11.Visible = false; DropDownList12.Visible = false; DropDownList13.Visible = false; DropDownList14.Visible = false; RadioButton5.Visible = false; RadioButton6.Visible = false; TextBox17.Visible = false; TextBox15.Text = "none"; } } else { CheckBox6.Checked = false; Response.Write("<script>alert('Please Fill Graduation Details First');</script>"); } }
62
protected EventArgs e) {
void
DropDownList10_SelectedIndexChanged1(object
sender,
DropDownList9.SelectedItem.ToString()
DropDownList13.SelectedItem.ToString()
protected void DropDownList13_SelectedIndexChanged(object sender, EventArgs e) { TextBox17.Text } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { if (DropDownList1.SelectedIndex != 0) { string s = "select module,module_subject from module where coursename='" + DropDownList1.SelectedItem.ToString() + "'"; dbutility.returnddl(DropDownList2, s); } else { DropDownList2.Items.Clear(); = DropDownList13.SelectedItem.ToString() + DropDownList14.SelectedItem.ToString();
63
DropDownList2.Items.Add("Select Module"); } } protected void DropDownList5_SelectedIndexChanged(object sender, EventArgs e) { int x = DropDownList5.SelectedIndex; } protected void Button3_Click(object sender, EventArgs e) { string TextBox18.Text + "'"; DataTable dt = dbutility.redatatable(s); if (dt.Rows.Count == 1) { Label1.Font.Italic = true; Label1.Text = "userid unavailable"; } s = "select userid from student where userid='" +
else { Label1.Text = "user id is available"; } } protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e) { if (DropDownList3.SelectedIndex == 1) { DropDownList4.Items.Clear(); DropDownList4.Items.Add("Bhubaneswar"); DropDownList4.Items.Add("Cuttack"); DropDownList4.Items.Add("Balasore");
64
DropDownList4.Items.Add("Khurda"); DropDownList4.Items.Add("Puri");
} else if (DropDownList3.SelectedIndex == 2) { DropDownList4.Items.Clear(); DropDownList4.Items.Add("Mumbai"); DropDownList4.Items.Add("Pune"); DropDownList4.Items.Add("New Bombay"); } else if (DropDownList3.SelectedIndex == 3) { DropDownList4.Items.Clear();
DropDownList4.Items.Add("Hyderabad"); DropDownList4.Items.Add("Secunderabad"); DropDownList4.Items.Add("Dont know"); } else if (DropDownList3.SelectedIndex == 4) { DropDownList4.Items.Clear(); DropDownList4.Items.Add("singhbhum"); DropDownList4.Items.Add("Surda"); DropDownList4.Items.Add("Jamshedpur"); } else if (DropDownList3.SelectedIndex == 5) { DropDownList4.Items.Clear(); DropDownList4.Items.Add("Manglore"); DropDownList4.Items.Add("Banglore"); DropDownList4.Items.Add("Goa"); } else {
65
DropDownList4.Items.Clear(); DropDownList4.Items.Add("--none--"); } } }
Employee Login:
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Default4 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { TextBox1.BorderStyle = BorderStyle.None; } protected void Button1_Click(object sender, EventArgs e)
{ string s1 = "select password, emp_id, emp_type from loginmaster where user_id='" + TextBox1.Text + "'"; DataTable dt2 = dbutility.redatatable(s1); if (dt2.Rows.Count == 1) {
66
if (dt2.Rows[0][2].ToString() == "Approved") { if (TextBox2.Text == dt2.Rows[0][0].ToString()) { Session["uid"] = TextBox1.Text; if (dt2.Rows[0][2].ToString()== "Adminstrator") { Response.Redirect("admin.aspx"); } else if (dt2.Rows[0][2].ToString() == "Faculty") { Response.Redirect("welcome_fac.aspx"); } else
{ Response.Redirect("welcome_clerk.aspx"); } } else { Label1.Text = "User ID and Password doesn't match"; } } else { Response.Write("<script language='javascript' >alert('Approval is Pending'); </script>"); } else { Label1.Text = "Invalid User ID"; } }
67
ADMINISTRATOR:
Profile:
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Default3 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {
string s2 = "select * from employee,loginmaster where employee.emp_id = loginmaster.emp_id and employee.emp_id= ( select emp_id from loginmaster where user_id ='" + Session["uid"].ToString() + "')"; DataTable dt = dbutility.redatatable(s2); System.Web.Caching.CacheDependency d1 = new System.Web.Caching.CacheDependency("d:\\t.txt"); Cache.Insert("c1", dt, d1, DateTime.Now.AddMinutes(10), TimeSpan.Zero); Label1.Text = dt.Rows[0][0].ToString(); Label2.Text = dt.Rows[0][0].ToString(); Label3.Text = dt.Rows[0][1].ToString(); Label4.Text = dt.Rows[0][2].ToString(); Label5.Text = dt.Rows[0][3].ToString(); Label6.Text = dt.Rows[0][4].ToString(); Label7.Text = dt.Rows[0][6].ToString();
68
Employee Approval:
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Default6 : System.Web.UI.Page { public void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { upd(); } } public void upd()
69
{ DataTable dt = dbutility.redatatable("select * from employee where dept_name != 'Adminstrator'"); grd1.DataSource = dt; grd1.DataBind();
for (int y = 0; y < grd1.Rows.Count; y++) { CheckBox ch2 = new CheckBox(); ch2 = (CheckBox)grd1.Rows[y].Cells[4].FindControl("chk1"); Label lb = new Label(); lb = (Label)grd1.Rows[y].Cells[3].FindControl("lbl4"); if (lb.Text == "Approved") { ch2.Checked = true; } else { ch2.Checked = false; } } } protected void grd1_SelectedIndexChanged(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { int x; CheckBox ch1 = new CheckBox();
70
if (ch1.Checked == true) { Label lbl = new Label(); lbl = (Label)grd1.Rows[x].Cells[0].FindControl("lbl1"); string s = "update employee set status = 'Approved' where emp_id ='" + lbl.Text + "' "; string s1 = "update loginmaster set work_status = 'Approved' where emp_id ='" + lbl.Text + "' ";
dbutility.alter(s); dbutility.alter(s1); } else { Label lbl = new Label(); lbl = (Label)grd1.Rows[x].Cells[0].FindControl("lbl1"); string s = "update employee set status = 'Pending' where emp_id ='" + lbl.Text + "' " ; string s1 = "update loginmaster set work_status = 'Pending' where emp_id ='" + lbl.Text + "' "; dbutility.alter(s); dbutility.alter(s1); } } upd(); } }
71
using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { upd(); }
} protected void grd1_SelectedIndexChanged(object sender, EventArgs e) { } public void upd() { string str = "select student.userid,student.name, student.dob,student.coursename,student.module,student.status, student_edu.pecentage10th,student_edu.pecentage12th,student_edu.pecentageORcgp a,student_edu.pg_pecentageORcgpa from student, student_edu where student.userid = student_edu.userid "; DataTable dt = dbutility.redatatable(str); grd1.DataSource = dt; grd1.DataBind(); for (int y = 0; y < grd1.Rows.Count; y++) { CheckBox ch2 = new CheckBox();
72
ch2 = (CheckBox)grd1.Rows[y].Cells[10].FindControl("chk1");
Label lb = new Label(); lb = (Label)grd1.Rows[y].Cells[9].FindControl("lbl10"); if (lb.Text != "Pending") { ch2.Checked = true; } else { ch2.Checked = false; } } } protected void Button1_Click(object sender, EventArgs e) { { int x; CheckBox ch1 = new CheckBox(); for (x = 0; x < grd1.Rows.Count; x++) { ch1 = (CheckBox)grd1.Rows[x].Cells[10].FindControl("chk1"); if (ch1.Checked == true) { Label lbl = new Label(); lbl = (Label)grd1.Rows[x].Cells[0].FindControl("lbl1"); string s = "update student set status = 'Approved' where userid ='" + lbl.Text + "' "; } else { Label lbl = new Label();
73
lbl = (Label)grd1.Rows[x].Cells[0].FindControl("lbl1"); string s = "update student set status = 'Pending' where userid ='" + lbl.Text + "' "; } upd();
} } } }
protected void Page_Load(object sender, EventArgs e) { update(); } public void update() { DataTable dt10 = dbutility.redatatable("select course_module,seats from coursesetup"); int a = dbutility.alter1("select count (*) from admittedstudent where module = 'J1'");
74
int b = dbutility.alter1("select count (*) from admittedstudent where module = 'J2'"); int c = dbutility.alter1("select count (*) from admittedstudent where module = 'J3'"); int d = dbutility.alter1("select count (*) from admittedstudent where module = 'N1'"); int f = dbutility.alter1("select count (*) from admittedstudent where module = 'N2'"); int g = dbutility.alter1("select count (*) from admittedstudent where module = 'N3'"); ; Label1.Text = (Convert.ToInt32(dt10.Rows[0][1]) - a).ToString(); Label2.Text = (Convert.ToInt32(dt10.Rows[1][1]) - b).ToString();
Label3.Text = (Convert.ToInt32(dt10.Rows[2][1]) - c).ToString(); Label4.Text = (Convert.ToInt32(dt10.Rows[3][1]) - d).ToString(); Label5.Text = (Convert.ToInt32(dt10.Rows[4][1]) - f).ToString(); Label6.Text = (Convert.ToInt32(dt10.Rows[5][1]) - g).ToString(); string str = "select student.userid,student.name ,student.dob,student.coursename,student.module,student.status,student_edu.p ecentage10th,student_edu.pecentage12th,student_edu.pecentageORcgpa,student_ edu.pg_pecentageORcgpa,score.marksecured from student,student_edu,score where student.userid = student_edu.userid and student.userid = score.userid and student.userid not in (select userid from admittedstudent )"; DataTable dt = dbutility.redatatable(str); grd1.DataSource = dt; grd1.DataBind(); }
protected void grd1_RowEditing(object sender, GridViewEditEventArgs e) { Label lb = new Label(); lb = (Label)grd1.Rows[e.NewEditIndex].FindControl("lbl1"); string s = "select * from student where userid ='" + lb.Text + "' "; DataTable dt = dbutility.redatatable(s);
75
DataTable dt1 = dbutility.redatatable("select * from admittedstudent where coursename ='" + dt.Rows[0][13].ToString() + "' and module = '" + dt.Rows[0][14].ToString() + "'"); int i = dt1.Rows.Count; DataTable dt5 = dbutility.redatatable("select seats from coursesetup where course_module='" + dt.Rows[0][14].ToString() + "'"); if (Convert.ToInt32(dt5.Rows[0][0].ToString()) - i == 0) { Response.Write("<script language='javascript' >alert('No seats Available'); </script>"); } else { string s1 = "insert into admittedstudent values('" + dt.Rows[0] [0].ToString() + "','" + dt.Rows[0][1].ToString() + "','" + dt.Rows[0] [16].ToString() + "','" + dt.Rows[0][2].ToString() + "','" +
dt.Rows[0][3].ToString() + "','" + dt.Rows[0][4].ToString() + "','" + dt.Rows[0][5].ToString() + "','" + dt.Rows[0][6].ToString() + "','" + dt.Rows[0][7].ToString() + "'," + Convert.ToInt64(dt.Rows[0][8].ToString()) + "," + Convert.ToInt64(dt.Rows[0][9].ToString()) + ",'" + dt.Rows[0] [13].ToString() + "','" + dt.Rows[0][14].ToString() + "','"+ dt.Rows[0] [15].ToString() + "','Pending',null,null,'Approved')"; dbutility.alter(s1); update(); } } }
FACULTY:
Set Question
76
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {
if (!IsPostBack) { string s ="select distinct coursename,coursename from module"; dbutility.returnddl(DropDownList1, s); DropDownList1.Items.Insert(0, "--Select a Course--"); DropDownList2.Items.Insert(0, "--Select a Module--"); } }
protected void Button1_Click(object sender, EventArgs e) { RadioButton r = new RadioButton(); if (DropDownList1.SelectedIndex == 0) { Response.Write("<script language='javascript' >alert('Select Valid Course or Module '); </script>"); }
77
else if (RadioButton1.Checked == true || RadioButton2.Checked == true || RadioButton3.Checked == true || RadioButton4.Checked == true) { int x; x = Convert.ToInt32(Label1.Text.Substring(1, 1)); x++; Label1.Text = "Q" + x.ToString() + "."; string s1 = ""; if (RadioButton1.Checked == true) { s1 = TextBox2.Text; } else { if (RadioButton2.Checked == true) { s1 = TextBox3.Text; } else {
78
} string s = "insert into testquestion values('" + DropDownList1.SelectedItem.ToString() + "','" + DropDownList2.SelectedValue.ToString() + "','" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + s1 + "')"; dbutility.alter(s); TextBox1.Text = ""; TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; } else { Response.Write("<script language='javascript'>alert('Please Select Answer'); </script>"); } } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { string s = "select module,module_subject from module where coursename='" + DropDownList1.SelectedItem.ToString() + "'"; dbutility.returnddl(DropDownList2, s); if (DropDownList1.SelectedIndex == 0) { DropDownList2.Items.Clear();
79
DataTable dt = dbutility.redatatable("select * from testquestion where module='" + DropDownList2.SelectedValue.ToString() + "'"); DataTable dt1 = dbutility.redatatable("select noofquestion,noofquestion from exam_info where module='" + DropDownList2.SelectedValue.ToString() + "'"); if (dt.Rows.Count == Convert.ToInt32(dt1.Rows[0][0].ToString())) { Response.Write("<script language='javascript' >alert('Can't add new questions for this module'); </script>"); } else { int x = dt.Rows.Count; x++; Label1.Text = "Q" + x.ToString() + "."; } } } protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e) { DataTable dt = dbutility.redatatable("select * from testquestion where module='" + DropDownList2.SelectedValue.ToString() + "'"); DataTable dt1 = dbutility.redatatable("select noofquestion,noofquestion from exam_info where module='" + DropDownList2.SelectedValue.ToString() + "'"); if (dt.Rows.Count == Convert.ToInt32(dt1.Rows[0][0].ToString())) { Response.Write("<script language='javascript' >alert('Can't add new questions for this module'); </script>"); } else { int x = dt.Rows.Count; x++;
80
View Result:
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class studresult : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string s = "select student.name,score.userid,student.coursename,student.module,score.totalmark ,score.marksecured,score.remark from student,score where student.userid = score.userid"; DataTable dt = dbutility.redatatable(s); gd1.DataSource = dt; gd1.DataBind(); } } protected void gd1_SelectedIndexChanged(object sender, EventArgs e) { } }
81
82
Batch Setup:
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { dbutility.returnddl(DropDownList1, "select advid,advid advertisement"); dbutility.returnddl(DropDownList2, "select distinct coursename,coursename from module"); DropDownList2.Items.Insert(0, "Select a Course"); DropDownList3.Items.Insert(0, "Select a Module"); } } protected void Button1_Click(object sender, EventArgs e) { if (DropDownList2.SelectedIndex != 0 && DropDownList2.SelectedIndex != 0) { dbutility.alter("insert into batchsetup values('" + DropDownList1.SelectedItem.ToString() + "','" + DropDownList2.SelectedItem.ToString() + "','" + DropDownList3.SelectedItem.ToString() + "','" + TextBox1.Text + "','" + TextBox2.Text + "')"); } from
83
else {
Course
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e) { if (DropDownList2.SelectedIndex == 0) { DropDownList3.Items.Clear(); DropDownList3.Items.Insert(0, "Select a Module"); } else { DropDownList3.Items.Insert(0, "Select a Module"); string s = "select moduleid,module from module where coursename = '" + DropDownList2.SelectedItem.ToString() + "'"; dbutility.returnddl(DropDownList3, s); } } }
Payment:
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts;
84
using System.Web.UI.HtmlControls; public partial class Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Label1.Visible = false;
Label2.Visible = false; if (!IsPostBack) { dbutility.returnddl(DropDownList1, "select userid,userid from admittedstudent"); DropDownList1.Items.Insert(0, "Select UserID"); } } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { if (DropDownList1.SelectedIndex == 0) { TextBox1.Text = ""; TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; TextBox6.Text = ""; } else { DataTable dt = dbutility.redatatable("select name,roll,coursename,module,firstinst,secondinst from admittedstudent where userid = '" + DropDownList1.SelectedItem.ToString() + "'"); DataTable dt1 = dbutility.redatatable("select firstinsta,secondinsta from coursesetup where course_module='" + dt.Rows[0] [3].ToString() + "'");
85
TextBox1.Text = dt.Rows[0][0].ToString(); TextBox2.Text = dt.Rows[0][1].ToString(); TextBox3.Text = dt.Rows[0][2].ToString(); TextBox4.Text = dt.Rows[0][3].ToString(); if (dt.Rows[0][4].ToString() == "" && dt.Rows[0][5].ToString() == "") { TextBox5.Text = dt1.Rows[0][0].ToString(); TextBox5.ReadOnly = true; TextBox5.Enabled = false;
TextBox6.Text = ""; } else if (dt.Rows[0][4].ToString() != "" && dt.Rows[0][5].ToString() == "") { TextBox5.Text = dt.Rows[0][4].ToString(); TextBox5.ReadOnly = true; TextBox5.Enabled = false; Label1.Visible = true; Label1.Text = "Paid"; TextBox6.Text = dt1.Rows[0][1].ToString(); TextBox6.ReadOnly = true; TextBox6.Enabled = false; } else {
TextBox5.Text = dt.Rows[0][4].ToString(); TextBox5.ReadOnly = true; TextBox5.Enabled = false; Label1.Visible = true; Label1.Text = "Paid"; TextBox6.Text = dt.Rows[0][5].ToString(); TextBox6.ReadOnly = true; TextBox6.Enabled = false; Label2.Visible = true;
86
Label2.Text = "Paid"; Response.Write("<script language='javascript' >alert('Full Payment Received'); </script>"); } } } protected void Button1_Click(object sender, EventArgs e) { if (DropDownList1.SelectedIndex != 0) {
DataTable dt = dbutility.redatatable("select roll,coursename,module from admittedstudent where userid = '" + DropDownList1.SelectedItem.ToString() + "'"); DataTable dt1 = dbutility.redatatable("select roll,firstinst,secondinst from admittedstudent where userid ='" + DropDownList1.SelectedItem.ToString() + "'"); DataTable dt2 = dbutility.redatatable("select * from admitedstudent where module= '" + dt.Rows[0][2].ToString() + "'"); if (dt.Rows[0][0].ToString() == "Not Assigned") { int i = dt2.Rows.Count; string roll = "ISL/" + dt.Rows[0][1].ToString() + "/" + dt.Rows[0] [2].ToString() + "/" + i; string s = "update admittedstudent set roll = '" + roll + "', paymentstatus = 'Paid', firstinst = " + TextBox5.Text + ", admissionstatus = 'Admitted' where userid = '" + DropDownList1.SelectedItem.ToString() + "'"; dbutility.alter(s); TextBox1.Text = ""; TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = "";
87
TextBox6.Text = ""; DropDownList1.SelectedIndex = 0; } else { if (dt1.Rows[0][2].ToString() != "") { Response.Write("<script language='javascript' >alert('Full Payment Received'); </script>"); } else { dbutility.alter("update admittedstudent set secondinst =" + TextBox6.Text + "where userid ='" + DropDownList1.SelectedItem.ToString() + "'");
TextBox1.Text = ""; TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; TextBox6.Text = ""; DropDownList1.SelectedIndex = 0; } } } else { Response.Write("<script language='javascript' >alert('Please Select an User ID'); </script>"); TextBox1.Text = ""; TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; TextBox6.Text = "";
88
DropDownList1.SelectedIndex = 0; } } }
STUDENT:
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class Test : System.Web.UI.Page { int x, j, i; int y, z; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string s3 = "select name,coursename,module from student where userid='" + Session["uid1"].ToString() + "'"; DataTable dt5 = dbutility.redatatable(s3); Label8.Text = dt5.Rows[0][0].ToString();
89
string s1 = "select * from testquestion where coursename='" + dt5.Rows[0][1].ToString() + "' and module = '" + dt5.Rows[0][2].ToString() + "'"; DataTable dt = dbutility.redatatable(s1); DataTable dt1 = dbutility.redatatable("select duration,duration from exam_info where module='" + dt5.Rows[0][2].ToString() + "'"); Label1.Text = "Q1."; Label2.Text = dt.Rows[0][2].ToString(); Label3.Text = dt.Rows[0][3].ToString(); Label4.Text = dt.Rows[0][4].ToString(); Label5.Text = dt.Rows[0][5].ToString(); Label6.Text = dt.Rows[0][6].ToString(); HiddenField1.Value = new TimeSpan(0, Convert.ToInt32(dt1.Rows[0] [0].ToString()), 0).ToString(); } } protected void Button1_Click(object sender, EventArgs e) { string s10 = "select name,coursename,module from student where userid='" + Session["uid1"].ToString() + "'"; DataTable dt5 = dbutility.redatatable(s10); DataTable dt2 = dbutility.redatatable("select individualmark,noofquestion,negativemark from exam_info where module='" + dt5.Rows[0][2].ToString() + "'"); string s2 = "select * from testquestion where coursename='" + dt5.Rows[0][1].ToString() + "' and module = '" + dt5.Rows[0][2].ToString() + "'"; DataTable dt = dbutility.redatatable(s2); string s3 = "select * from testcount"; DataTable dt1 = dbutility.redatatable(s3); y = Convert.ToInt32(dt1.Rows[0][0]); z = Convert.ToInt32(dt1.Rows[0][1]); i = Convert.ToInt32(Label1.Text.Substring(1, 1)); x = i; j = i; j--;
90
if (RadioButton1.Checked == true || RadioButton2.Checked == true || RadioButton3.Checked == true || RadioButton4.Checked == true) { y++; string s1 = ""; if (RadioButton1.Checked == true) { s1 = Label3.Text; } else { if (RadioButton2.Checked == true) { s1 = Label4.Text; } else { if (RadioButton3.Checked == true) { s1 = Label5.Text; } else { if (RadioButton4.Checked == true) { s1 = Label6.Text; } } } } if (s1 == dt.Rows[j][7].ToString()) { z++; } } string s4 = "update testcount set a=" + y + ", b=" + z;
91
i++; Label1.Text = "Q" + i.ToString() + "."; Label2.Text = dt.Rows[x][2].ToString(); Label3.Text = dt.Rows[x][3].ToString(); Label4.Text = dt.Rows[x][4].ToString(); Label5.Text = dt.Rows[x][5].ToString(); Label6.Text = dt.Rows[x][6].ToString(); RadioButton1.Checked = false; RadioButton2.Checked = false; RadioButton3.Checked = false; RadioButton4.Checked = false; } else { int tm, sm; string status = ""; tm = Convert.ToInt32(dt2.Rows[0][0].ToString()) * x; sm = (Convert.ToInt32(dt2.Rows[0][0].ToString()) * z) - ((y - z) * Convert.ToInt32(dt2.Rows[0][2].ToString())); if (sm < (tm / 3)) { status = "fail"; } else { status = "pass"; } string s1 = "insert into score values('" + Label8.Text + "'," + x + "," + y + "," + z + "," + (y - z) + "," + (x - y) + "," + tm + "," + sm + ",'" + status + "')"; dbutility.alter(s1);
92
View Result:
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class viewresult : System.Web.UI.Page {
93
protected void Page_Load(object sender, EventArgs e) { DataTable dt = dbutility.redatatable("select * from Score where userid = '" + Session["uid1"].ToString() + "'"); Label1.Text = dt.Rows[0][1].ToString(); Label2.Text = dt.Rows[0][2].ToString(); Label3.Text = dt.Rows[0][3].ToString(); Label4.Text = dt.Rows[0][6].ToString(); Label5.Text = dt.Rows[0][7].ToString(); Label6.Text = dt.Rows[0][8].ToString(); Label6.Text = dt.Rows[0][8].ToString();
} }
94
15. CONCLUSION
The project ONLINE TRAINING MANAGEMENT SYSTEM has been developed as per the requirement specification .It has been developed in and the complete system is thoroughly tested with the availability data and throughput reports which are prepared manually. The project is successfully completed and tested for accuracy and quality. The software meets almost all the requirements with a good scope of further enhancement and development. The project is capable of meeting the needs of the organization, though it needs some more modules to be sophisticated which we plan to fulfill in future. The users of the website can use it very efficiently and easily without any others help. During the making of the project the Software Development Lifecycle (SDLC) works and a systematic process for development of good software has been learned by me. By practically working on this project knowledge on different technologies learned. With every new task there are hurdles too. In the way of implementing it a number of difficulties faced by me. To solve this problem our project guide helped us and in addition to that the most efficient resource i.e. the Internet used by me to complete my job. Goals achieved by the project:
Communication medium becomes fast and effective through this site. Saves time and money. Easily accessible through internet. This project is designed with its own framework for easy future enhancement.
95
16. BIBLIOGRAPHY
16.1 REFFERENCES:
BOOKS:
Software Engineering by Rajiv Mall An Introduction to Database System by Bipin Desai
WEBSITES:
96
97