90
1 CHAPTER 1 INTRODUCTION TO PROJECT

E-Comura Documentation

Embed Size (px)

Citation preview

Page 1: E-Comura Documentation

1

CHAPTER 1

INTRODUCTION TO PROJECT

Page 2: E-Comura Documentation

2

1.1 Goals And Objectives

E-COMURA promotes anytime, anyplace learning. Functionally, it allows teachers to

post messages, discuss classroom topics, assign and grade class work, share content and

materials, and network and exchange ideas with their peers. Take a peek at some of the

unique ways teachers are using E-COMURA to make their classroom a community. E-

COMURA has simply changed the way teachers teach. Now students get assignments,

ask questions, collaborate and communicate outside the confines of the school and class

room. Students can post questions on the site and teachers respond within minutes. This

has given student‘s confidence in their abilities to work hard knowing they have teachers

and their classmates to assist them. Additionally, students and teachers are connected to

many other teachers, classes and communities through E-COMURA that further assist

and expand education.

METHOD

I. Collection of requirements

II. Forming the database

III. Coding the business logic

IV. Designing of modules

V. Coding of modules

VI. Testing

Page 3: E-Comura Documentation

3

1.2 Overview of Technical Area

Agile software development refers to a group of software development methodologies

based on iterative development, where requirements and solutions evolve through

collaboration between self-organizing cross-functional teams.

Agile methods break tasks into small increments with minimal planning, and do not

directly involve long-term planning. Iterations are short time frames that typically last

from one to four weeks. Each iteration involves a team working through a full software

development cycle including planning, requirements analysis, design, coding, unit

testing, and acceptance testing when a working product is demonstrated to stakeholders.

This helps minimize overall risk, and lets the project adapt to changes quickly.

Stakeholders produce documentation as required. Iteration may not add enough

functionality to warrant a market release, but the goal is to have an available release at

the end of each iteration. Multiple iterations may be required to release a product or new

features. Software Engineering will also be exercised which will help in a resultant

library of components, the benefit of which will be reusability and fast development

Understanding .Net Frame Work

The .Net framework can be defined as a language neutral platform designed to provide a

number of rich and powerful application development tools and technologies. It has an

extensive class library that provides wide-ranging support for data access..Net framework

has an independent code execution and management environment called the Common

Language Runtime (CLR) which ensures that code is safe to run, and provides an abstract

layer on top of the operating system, which allows the elements of the .Net framework to

run on many operating systems and devices.

Microsoft SQL Server™ 2008

Microsoft SQL Server 2008 is a full-featured relational database management system

(RDBMS) that offers a variety of administrative tools to ease the burdens of database

development, maintenance and administration. In this article, we'll cover six of the more

Page 4: E-Comura Documentation

4

frequently used tools: Enterprise Manager, Query Analyzer, SQL Profiler, Service

Manager, Data Transformation Services and Books Online.

1. Language Used

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 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.

Version 3.0 of the .NET Framework is included with Windows Server 2008 and

Windows Vista. Version 3.5 is included with Windows 7, and can also be installed on

Windows XP and the Windows Server 2003 family of operating systems. On April 12,

2010, .NET Framework 4 was released alongside Visual Studio 2010.

Understanding .Net Frame Work

DEFINITION: The .Net framework can be defined as a language neutral platform

designed to provide a number of rich and powerful application development tools and

Page 5: E-Comura Documentation

5

technologies. It has an extensive class library that provides wide-ranging support for data

access.

.Net framework has an independent code execution and management environment called

the Common Language Runtime (CLR) which ensures that code is safe to run, and

provides an abstract layer on top of the operating system, which allows the elements of

the .Net framework to run on many operating systems and devices.

THE .NET VISION:

The .Net framework provides the foundation and the plumbing on which the Microsoft

.Net vision is built. The vision is about having a global network and open standards like

XML to make it easier for parties to exchange data and work together. Now devices will

use common languages like XML over standardized or shared protocols such as HTTP

and these devices will be running a multitude of software on various operating systems.

This is not limited to Microsoft but also to other operating systems such as sun, IBM.

The .Net framework provides the tools and the technologies needed to write applications

that can seamlessly and easily communicate over the Internet using open standards like

XML and SOAP. It also aims at solving the various problems that are faced by

developers while working on applications made using the windows DNA. It provides a

solution to problems such as registering of components and shutting down applications in

order to upgrade them.

BENEFITS OF USING .NET:

The windows platform is inherently complex and may pose several problems for

programmers. However the .Net platform is used as it provides solutions to many such

problems and offers an Internet centric platform.

The following are the benefits of using .Net platform:

1) Multiple platform Support .Net platform has been designed keeping multiple

platform support as a key feature. For version 2.0 this means that the code written

Page 6: E-Comura Documentation

6

using the .Net platform can run on all versions of Windows. i.e. Windows

98,95,NT,2000 and so on. Microsoft has included rich support for all the

platforms. Also this code shall also work on any 64-bit processor that may be

used by Microsoft later. It is also expected that .Net shall run on other platforms

like UNIX also, however it is not for sure that all functionality will be available

for the same.

2) Net as a clean start: On the windows platform, the technologies available often

depend on the programming language that they are written in, so they are very

different. Depending on the chosen programming language, these technologies

can be restrictive. The problem with this approach is that it makes the Windows

platform harder to understand. Using .Net there is just one simple object oriented

way of accessing the functionality of the .Net Framework

Figure 1.1:Functionality Of .Net Framework

. Net Framework

MFC

Windows API

ASP VB FORM

Page 7: E-Comura Documentation

7

1.2 Overview of Report

There are various chapters in the report:

CHAPTER 1:It explains the goals and objectives of the project along with the

technology used.

CHAPTER 2:Gives the literature review,all the research done.Introduction about the

project and the conclusion drawn

CHAPTER 3:Gives the software and hardware requirements for running the software

and how the project is developed

CHAPTER 4:It describes the designing and implementation of modules.their data flow

diagrams,tables and store procedures.

CHAPTER 5:It lists the types of testing required for validation and verification,test case

design and pseudo code

CHAPTER 6:Concludes and lists the future scope of educational applications and web

applications.

Page 8: E-Comura Documentation

8

CHAPTER 2

LITERATURE REVIEW

Page 9: E-Comura Documentation

9

2.1 Introduction

E-COMURA promotes anytime, anyplace learning. Functionally, it allows teachers to

post messages, discuss classroom topics, assign and grade class work, share content and

materials, and network and exchange ideas with their peers. Take a peek at some of the

unique ways teachers are using E-COMURA to make their classroom a community. E-

COMURA has simply changed the way teachers teach. Now students get assignments,

ask questions, collaborate and communicate outside the confines of the school and class

room. Students can post questions on the site and teachers respond within minutes. This

has given student‘s confidence in their abilities to work hard knowing they have teachers

and their classmates to assist them. Additionally, students and teachers are connected to

many other teachers, classes and communities through E-COMURA that further assist

and expand education.

2.2 Survey

We have gone through the following research papers to see the developments in field of

web technology and security used for web applications

PAPER 1

Web Applications -

Spaghetti Code for the 21st Century

Abstract:

The software industry is currently in the middle of a paradigm shift. Applications are

increasingly written for the World Wide Web rather than for any specific type of an

operating system, computer or device. Unfortunately, the technologies used for web

application development today violate well-known software engineering principles.

Furthermore,they have reintroduced problems that had already been eliminated years ago

in the aftermath of the ―spaghetti code wars‖ of the 1970s. In this paper, we investigate

web application development from the viewpoint of established software engineering

principles. We argue that current web technologies are inadequate in supporting many of

these principles. However, we also argue that there is no fundamental reason for web

Page 10: E-Comura Documentation

10

applications to be any worse than conventional applications in any of these areas. Rather,

the current inadequacies are just an accidental consequence of the poor conceptual and

technological foundation of the web development technologies today.

PAPER 2

Role Based Authentication Schemes for Security Automation

Abstract—Academy Automation implies to the various different computing hardware

and software that can be used to digitally create, manipulate, collect, store, and relay

Academy information needed for accomplishing basic Operation like admissions and

registration to finance, student and faculty interaction, online library, medical and

business development. Raw data storage, electronic transfer, and the management of

electronic business information comprise the basic activities of an Academy automation

system. The main aim of this work was to design and implement a Role Based

Authentication (RBA) System wherein each user has certain roles allotted to him/her

which defines the user‘s limits and capabilities of making changes, accessing various

areas of the software and transferring/allotting these roles recursively. Strict security

measures had kept in mind while designing such a system and proper encryption and

decryption techniques are used at both ends to prevent any possibility of any third party

attacks. Further, various new age authentication techniques like OpenID and

WindowsCardSpace are surveyed and discussed to serve as a foundation for future work

in this area.

Page 11: E-Comura Documentation

11

CHAPTER 3

PROBLEM DEFINITION AND

REQUIREMENT ANALYSIS

Page 12: E-Comura Documentation

12

3.1 Problem Definition

This phase describes the problems; and tries to find out the approach to solve the

problem. During problem analysis, one of the first things to do is to formulate the

problem. If you get this wrong (or skip it completely) everything you do afterwards could

be a complete waste of time and money.It's all too easy to solve the wrong problem, or

find that your eventual solution does not solve the problem fully, if at all. It all depends

on how you approach and define the problem. Before you start trying to solve a problem

it's important to study the existing system before embarking on major changes.

Consider the case like a visit to the doctor. You would be pretty worried if you told the

doctor you had a headache and the doctor immediately started merrily injecting you with

various things before even looking at you or asking you any questions. Such behavior is

likely to cause more problems than it solves, so doctors always analyze their patients -

observing, questioning, and testing before beginning any treatment.So also do problem

solvers study the system they intend to change, and the organization it's in, before they

decide what needs to be done? By thoroughly understanding a system, its operation, its

context, its strengths and weaknesses, one can better decide how to start improving it.

Determining whether a problem is worth fixing involves a feasibility study. The aim of

the feasibility study is to understand the problem and to determine whether it is worth

proceeding. You end up with a logical design that describes what the current system does,

and what the new system needs to be able to do, but does not specify how it's done.

Initially I conducted problem analysis, where I thoroughly worked out to carry out a

study for recognizing the needs (the actual problem), understanding the current system

and thereby specifying how my proposed system was better than the existing system. I

just tried to find out what the problem was and not how to handle it!

Page 13: E-Comura Documentation

13

3.2 Requirements

The software requirement specification is produced at the culmination of the analysis

task. The function and performance allocated to software as part of system engineering

are refined by establishing a complete information description, a detailed functional

description, a representation of system behavior, an indication of performance

requirement and design constraints appropriate validation criteria, and other information

pertinent to requirement.

The introduction to software requirements specification states the goals and objectives of

the software, describing it in the context of the computer based system. The Information

Description provides a detailed description of the problem that the software must solve.

Information content, flow and structure are documented.

A description of each function required to solve the problem is presented in the

Functional Description. Validation Criteria is probably the most important and ironically

the most often neglected section of the software requirement specification. Software

requirement specification can be used for different purpose.

A main purpose of the product specification is to define the need of the product‘s

user. Some times, the specification may be a part of a contract sign between the

producer and the user. It could also form part of the user manuals. A user‗s needs

are sometimes not clearly understood by the developer. If this is the case, a careful

analysis – involving much interaction with the user should be devoted to reaching a

clear statement of requirements, in order to avoid possible misunderstandings.

Sometimes, at the beginning of a project, even the user has no clear idea of what

exactly the desired product is. Think for instance of user interface , a user with no

previous experience with computer products may not appreciate the difference

between , say menu driven interaction and a command line interface. Even an exact

formation of system functions and performance may be missing an initial

description produced by an experienced user.

Page 14: E-Comura Documentation

14

1.Scope:

This document shall provide the requirement specification for ―E-Comura‖ as per the

scope defined.

2. Users:

This site can be used by 3 types of users:

ADMIN

STUDENT

TEACHER

Requirements:

Functional Requirements

The portal will ask for the details of the user to be entered, to know the category

user belongs to.

The user will be needed to enter his/her details.

The user can search for the documents and other important information.

The user can upload the files he wants to share.

The user can sell his documents.

The user can make groups of categories.

The concept of Master Pages and Content Pages is used.

Web User Controls are used to enhance Reusability.

Page 15: E-Comura Documentation

15

Non-functional Requirements:

Portability:

The system will be designed to be portable across popular Windows OS.

Extensibility:

The system should be extensible to add different formats of files and users for

more expansion.

Re-Usability:

The system‘s code could be reused to add further new features if need to be added

in future.

Reliability and Availability:

System shall be able to deliver the required in reliable manner.

Software Upgradeability:

System is to be developed in phases, so it shall be easily upgradeable to include

the new items in the database.

User Interface Requirements:

Log in screen:

Every user whether member, admin or any other will have to first log in to the

site.

Home page:

After logging in, the users will be in their respective home pages.

Page 16: E-Comura Documentation

16

Panels:

Website is divided into 3 panels for Home page of different users:

Teacher panel

Admin panel

Student Panel

User panel:

Users can upload documents they want to share with other members. They can

download the documents shared by other users. The users also have the option of

creating groups to share the same document among a set of users. They can sell their

documents if they want to.

Admin panel:

Administrator can update any information such as new features, notices, make any

changes to the format etc.

Password:

If the user forgets password or want to change the password, the login screen will

shift to the required password screen.

Hardware Requirements

The system must have the following:

Hardware Requirements:

Pentium IV Processors

256 MB of RAM

5GB of Hard Disk

Page 17: E-Comura Documentation

17

One SQL based server

Client Machine

One domain name space to implement Web based services.

Software Requirements:

Client OS with .NET framework 2.0

Server OS with .NET framework 2.0

MS SQL DBMS (2000 / 2005)

Page 18: E-Comura Documentation

18

3.3 System Specification

System analysis is the process of studying the business processors and procedures,

generally referred to as business systems, to see how they can operate and whether

improvement is needed. This may involve examining data movement and storage,

machines and technology used in the system, programs that control the machines, people

providing inputs, doing the processing and receiving the outputs.

Investigation Phase

The investigation phase is also known as the fact-finding stage or the analysis of the

current system. This is a detailed study conducted with the purpose of wanting to fully

understand the existing system and to identify the basic information requirements.

Various techniques may be used in fact-finding and all fact obtained must be recorded. A

thorough investigation was done in every effected aspect when determining whether the

proposed system is system is feasible enough to be implemented.

Investigation

As it was essential for us to find out more about the present system, we used the

following methods to gather the information: -

1. Observation: - Necessary to see the way the system works first hand.

2. Document sampling: - These are all the documents that are used in the system. They

are necessary to check all the data that enters and leaves the system.

3. Questionnaires: - These were conducted to get views of the other employees who are

currently employed in the system.

Page 19: E-Comura Documentation

19

Analysis of The Investigation

Strengths of the System

1. No complex equipment: - The equipment that is used is very simple and no

special skills have to be mastered to be able to operate the system. Therefore no

training is required for the employees.

2. Low cost: - There is little money spent in maintaining the present system other

than buying the necessary office equipment and the ledgers.

Constraints and Limitations

The constraints and limitation within a system are the drawbacks that occur during the

implementation of the system. These limitations and constraints can crop up in almost

every system; the most important fact is to find a way to overcome these problems.

Software design is the first of three technical activities – design, code generation, and test

that are required to build and verify the software. Each activity transforms information in

manner that ultimately results in validated computer software.

The design task produces a data design, an architectural design, an interface design and

component design. The design of an information system produces the details that clearly

describe how a system will meet the requirements identified during system analysis. The

system design process is not a step by step adherence of clear procedures and guidelines.

When I started working on system design, I face different types of problems; many of

these are due to constraints imposed by the user or limitations of hardware and software

available. Some times it was quite difficult to enumerate that complexity of the problems

and solutions thereof since the variety of likely problems is so great and no solutions are

exactly similar however the following consideration I kept in mind during design phased.

Page 20: E-Comura Documentation

20

CHAPTER 4

DESIGN AND IMPLEMENTATION

Page 21: E-Comura Documentation

21

4.1 Introduction

System Design is the process of planning a new system to replace existing one. If the

analysis means ‗what‘ the system should do, then design specifies ‗how‘ to accomplish

the objectives. The design of the system uses information gathered as basis and produces

details that state how the system will meet the requirements identified during the analysis

phase. Design is very crucial in the whole development cycle. The logical system of the

product is developed in this phase. Design will serve as a blueprint for a system and helps

detect problems before errors or problems are built into the final system. Professionals

create a system design, but must review their work with the users to ensure the design

meets user‘s needs. The exceptional (or foolish) programmer might begin coding

without a good design. Programmers who do so may find themselves going back to

modify pieces of code they've already written as they move through the project. With a

good design, the likelihood of this happening will be reduced dramatically. The end result

is a program that will behave in the way it was intended, and will generally have with a

shorter overall program development time.

When I decided to start with the designing phase for my project, I had two design phases

that I tempted to follow. They were:

Module Design

Detailed Design

Page 22: E-Comura Documentation

22

4.2 Functional Decompositions

Module Design

This phase involves understanding the modules required for the project. However this

understanding is confined only to get an overview of the system design and then

preparing for the detailed designing for the project. During this sub-phase of system

designing, I tried to create an understanding about how a module would work. For this I

developed few pictorial representations just trying to picture design for the overall

system. It was just limited to creating a blueprint of the entire system design.

Primarily, in this phase I focused on deciding which modules are needed for the system,

the specifications for these modules and how they are related so that after combining

them I could attain the desired results.

MODULES OF THE PROJECT

Registration and login

Student

Teacher

Admin

Each panel has three layers

Page 23: E-Comura Documentation

23

Registration: In this module, we will register different users to have a secure navigation

through documents submitted and shared by users. The registration process is made for

the trusted set of users. This is ensured by assigning every user the unique username and

password to login into the account and maintain their documents, share them and access

from anywhere.

Student:will register and login using id.join a group under a teacher can be part of

multiple groups but through different id

Teacher:register and login.create groups and add students.allot assignments and

quizzes.both teacher and students have online storage space.

Admin:has the control over the site.responsible for adding colleges and countries.

DETAILED DESIGN

The internal logic and working of each module is described in the system design is

decided in this phase. And the module logic is described in high level language. Data

structure and algorithmic design of each and every modulle are also defined in this phase.

These are part of the structured analysis, the set of techniques and graphical tools that

allow the analyst to develop a new kind of system specification that are easily

understandable to the user. It is a way to focus on function rather than physical

implementation. The traditional approach focuses on the cost/benefit analysis, feasibility

analysis, project management, hardware and software section and personal considerations

in contrast. Structured analysis considers new goals and structured tools for analysis.

There are different tools for structured system analysis of which DATA FLOW

DIAGRAMS are very important.

Now we will see algorithmic representations of each module through flowcahrts that

describe information flow in the modules. Then we will try to describe flow of data

Page 24: E-Comura Documentation

24

using the Data Flow Diagrams that completely picture out the data flow through the

client, proxy and the web server.

Using the DFD‘s and Flowcharts the internal logic and working of each module has been

specified. Algorithmic design of each module has been defined in this part of designing.

4.3 Different Design Options

DATA FLOW DIAGRAMS

It is a way of expressing system requirement in a graphical form; this leads to a

modular design. It is also known as bubble chart, has the purpose of clarifying system

requirements and identifying major transformations that will become program in

system design. So it is the starting point of the design phase that functionally

decomposes the requirement specifications down to the lowest level of details. A

DFD consist of a series of bubbles joined by lines. The bubbles represent data

transformation and the lines represent data flows in the system.

DFD SYMBOLS:

= Source or Destination of data

= Data flow

= Process that transform data flow

Page 25: E-Comura Documentation

25

= Store Data

BUSINESS LOGIC LAYER:

This layer consist of DLL (dynamic link library) naming Class Library Class1 having

namespace nsnetdocs and one class naming clscon for connection with sqlserver database

and various interfaces naming int-tablename having property declaration for each field in

the respective table, class naming 18 property class naming cls-tablename-prp which

inherit its respective interface for definition of each property declared in the interface,

class naming 18 methods class naming cls-tablename which inherit class clscon for

definition of methods like : save_rec(), update_rec(), delete_rec(), display_rec(),

find_rec() etc. methods.

Dynamic Link Library:

Compiled class

Reusable Scope

Multiple application

No Graphical user interface

In process component

Self described

It contains following:

1. Interfaces

2. Main Classes

PRESENTATION LAYER:

Page 26: E-Comura Documentation

26

Presentation layer consists of web pages which include:

MASTER PAGES:

1. Master Page is Common Template that can be implemented on more than one Page.

We can make

changes whenever needed.

2. Master page extension is. Master

3. It can never be start up page.

4. We can create properties, methods, classes in master pages.

5. Multiple master pages can be there in single application.

CONTENT PAGES:

1. Content pages are web pages which can be made as startup page.

2. Content page extension is .aspx

3. Multiple content pages can be there in single master page

ENTITY – RELATIONSHIP MODEL:

As a database designer, one should use an Entity Relationship (ER) diagram as a tool

to build the logical database design of a system. An ER diagram represents the

following three elements:

Entities: An entity is an object with a distinct set of properties that is easily

identified.

Attributes: An attribute is a property of an entity that differentiates it from other

entities and provides information about the entity.

Page 27: E-Comura Documentation

27

Relationships: A relationship is a crucial part of the design of database.

Figure 4.1:DFD representing teacher and student panel

Page 28: E-Comura Documentation

28

ENTITIES:

User table:

Groups table:

tbusr

Usrcod(

pk)

usrnam usrpwd

usreml

usrfstn

am

tbgrp Grpcod(p

k)

(

(pk

grpusrcod

grpnam grpmgtrig grpjoncod

grpcrtdat

usrlstna

m

usrtyp

usrgrpcod

grpgrd

grpsub

grpsts

Page 29: E-Comura Documentation

29

Assignment table:

Quiz detail table:

Library table:

tbasg

asgcod(pk) Asgtit

asgdsc

asgfil

tblib

librescod(p

k)

librestyp libresdsc

libresusrcod

tbquzdet

quzdecod(pk)

quzdetquzcod quzqstdsc

quzdetqsttyp quzqstord

quzqstscr

libresshrsts

Page 30: E-Comura Documentation

30

Country table:

Quiz table:

Quiz detail option:

tbcnt

cntcod cntname

tbquz

quzcod(pk)

quztit quzdur

quztotscr

quzcutoffscr

quzusrcod

tbquzdetopt

Quzdetoptcod(p

k)

quzdetquzdet

cod quzdetoptdsc

quzdetoptsts

Page 31: E-Comura Documentation

31

Quiz Assignment table:

Assignment Share table:

Post table:

tbquzasg

quzasgcod

(pk)

quzasgquzcod quzasggrpcod

quzasgdat

tbasgshr

asgshrcod

asgshrtyp asggrpcod

asgshrduedat

asgshrasgcod

tbpst

pstcod

pstusrcod Pstdat pstrep

pstfil

pstdsc

Page 32: E-Comura Documentation

32

Profile table:

College table:

tbprf

prfcod

prfusrcod prfpic

prfcntcod

prftimzon

prfcolcod

tbcol

colcod

colnam colcntcod

colpstcod

Page 33: E-Comura Documentation

33

Database Design :

It includes:

1. Tables

2. Stored Procedures

DATABASE FILES

Sr. No. Table Name Description

1. Tbusr Table for Users

2. Tbasg Table for Assignment

3. Tbasgshr Table for share assignment

4. Tbcnt Table for country names

5. Tbcol Table for college names

6. Tbgrp Table for group names

7. Tblib Table for library

8. Tbprf Table for profile

9. Tbpst Table for posts

10. Tbquz Table for quiz detail

11. Tbquzasg Table for quiz assignment

12. Tbquzdet Table for Quiz detail

13. Tbquzdetopt Table for quiz detail option

Table 4.1:tables in project

Page 34: E-Comura Documentation

34

RELATIONS IN THE DATABASE

The following are the relations we have designed to manage the database. Here we have

followed a convention of having the table names with tb as a prefix, and the remaining

name of the table represent the description of the data inside that table.

Tbasg

Asgcod(PK) Int

Asgtit varchar(100)

asg varchar(500)

Asgfil varchar(50)

Table 4.2:Tbusr table design

Tbasgshr

asgshrcod(PK) Int

Asgshrtyp Char(1)

Asggrpcod Int

Asgshrduedat Datetime

Asgshrasgcod Int

Table 4.3:Tbasgshr design

Page 35: E-Comura Documentation

35

Tbcol

Colcod(PK) Int

Colnam varchar(100)

Colcntcod Int

Colpstcod Varchar(100)

Table 4.4:Tbcol design

Tbgrp

Grpcod(PK) Int

Grpusrcod Int

Grpnam varchar(100)

Grpmgtrig Varchar(100)

Grpgrd Varchar(100)

Grpsub Varchar(100)

Grpjoncod Varchar(50)

Grpsts Char(1)

Grpcrtdat Datetime

Table 4.5:Tbgrp design

Page 36: E-Comura Documentation

36

Tblib

Librescod(PK) Int

Librestyp Char(10)

Libresdsc Varchar(500)

Libresusrcod Int

Libresshrsts Char(1)

Table 4.6Tblib design

Tbprf

Prfcod(PK) Int

Prfusrcod Int

Prfpic Varchar(50)

Prfcntcod Int

Prftimzon Varchar(50)

Prfcolcod Int

Table 4.7:Tbprf design

Stored Procedures

There are five kinds of stored procedures for each table. They are:

Insert, Update , Delete, Find, Display

1. They are Compiled objects

2. Store in database

3. Execute in database

4. High performance

5. Secure

There are five kinds of stored procedures for each table.

Page 37: E-Comura Documentation

37

Naming Convention/Symbols For Store Procedures

Figure 4.2:checkgroup store procedure

INSERT PROCEDURE - ins-tablename (for inserting values in the particular table

Figure 4.3:insert store procedure

Page 38: E-Comura Documentation

38

UPDATE PROCEDURE- upd-table name(for updating data in the tables)

Figure 4.4:update store procedure

DELETE PROCEDURE- del-table name(for deleting data in the tables)

Figure 4.5:delete store procedure

Page 39: E-Comura Documentation

39

FIND PROCEDURE- fnd-table name(for finding particular data in the tables)

Figure 4.6:find store procedure

DISPLAY PROCEDURE- dsp-table name(for displaying tables data onto screen)

Figure 4.7:display store procedure

Page 40: E-Comura Documentation

40

4.4 Proposed Flow Model

Flow Charts Of Modules

REGISTRATION:

Is new User Login StopSignup

Stop

Start

yes no

Figure 4.8:flow chart for login and registration

Page 41: E-Comura Documentation

41

Figure 4.9:Flow diagram for student and teacher module

Page 42: E-Comura Documentation

42

4.5 IMPLEMENTATION

Implementation is the stage in the project where the theoretical design is turned into the

working system and is giving confidence to the new system for the users i.e. will work

efficiently and effectively. It involves careful planning, investigation of the current

system and its constraints on implementation, design of method to achieve the change

over, an evaluation, of change over methods. A part from planning major task of

preparing the implementation is education of users. The more complex system is

implemented, the more involved will be the system analysis and design effort required

just for implementation. An implementation coordinating committee based on policies of

individual organization has been appointed. The implementation process begins with

preparing a plan for the implementation for the system. According to this plan, the

activities are to be carried out, discussions may regarding the equipment has to be

acquired to implement the new system

Page 43: E-Comura Documentation

43

CHAPTER 5

TESTING AND DEPLOYMENT

Page 44: E-Comura Documentation

44

5.1 Verification

The basic goal of the software development process is to produce software that has no

errors or very few errors. In an effort to detect errors soon after they are introduced, each

phase ends with verification activity such as a review. As testing is the last phase before

the final software is delivered, it has the enormous responsibility of detecting any type of

error that may in the software. A software typically undergoes changes even after it has

been delivered. And to validate that a change has not affected some old functionality of

software regression testing is performed

Levels Of Testing:

The basic levels of testing are unit testing, integration testing and system and acceptance

testing. These different levels of testing attempt to detect different types of faults.

Client Needs Acceptance Testing

Requirements System Testing

Design Integration Testing

Code Unit Testing

Table 5.1 levels of testing

Overview of Testing

1. Testing: Testing involves executing the program (or part of it) using sample data and

inferring from the output whether the software performs correctly or not. This can be

done either during module development (unit testing) or when several modules are

combined (system testing).

2. Defect Testing: Defect testing is testing for situation where the program does not meet

its functional specification. Performance testing tests a system's performance or reliability

under realistic loads. This may go some way to ensuring that the program meets its non-

functional requirements.

Page 45: E-Comura Documentation

45

3.Debugging: Debugging is a cycle of detection, location, repair and test. Debugging is a

hypothesis testing process. When a bug is detected, the tester must form a hypothesis

about the cause and location of the bug. Further examination of the execution of the

program (possible including many returns of it) will usually take place to confirm the

hypothesis. If the hypothesis is demonstrated to be incorrect, a new hypothesis must be

formed. Debugging tools that show the state of the program are useful for this, but

inserting print statements is often the only approach. Experienced debuggers use their

knowledge of common and/or obscure bugs to facilitate the hypothesis testing process.

After fixing a bug, the system must be reset to ensure that the fix has worked and that no

other bugs have been introduced. This is called regression testing. In principle, all tests

should be performed again but this is often too expensive to do.

Test Planning

Testing needs to be planned, to be cost and time effective. Planning is setting out

standards for tests. Test plans set out the context in which individual engineers can place

their own work. Typical test plan contains:

Overview of testing process

1. Requirements trace ability (to ensure that all requirements are tested)

2. List of item to be tested

3. Schedule

4. Recording procedures so that test results can be audited

5. Hardware and software requirements

6. Constraints

Overview of Testing Strategies

Page 46: E-Comura Documentation

46

Large systems are usually tested using a mixture of strategies. Different strategies may be

needed for different parts of the system or stages of the process.

1. Top-down testing: This approach tests high levels of system before detailed

components. This is appropriate when developing the system top-down and is

likely to show up structural design errors early (and therefore cheaply). But this

often has advantage that a limited, working system is available early on.

Validation (as distinct from verification) can begin early. Its disadvantage is that

stubs need to be generated (extra effort) and might be impracticable if component

is complex (e.g. converting an array into a linked list; unrealistic to generate

random list; therefore end up implementing unit anyway). Test output may be

difficult to observe (needs creation of artificial environment). This is not

appropriate for OO systems (except within a class).

2. Bottom-up testing: This is opposite of top-down testing. This tests low-level

units then works up the hierarchy. Its advantages and disadvantages mirror those

of top-down testing. In this testing there is need to write test drivers for each unit.

These are as reusable as the unit itself. Combining top-down development with

bottom-up testing means that all parts of system must be implemented before

testing can begin, which does not accord with incremental approach discussed

above. Bottom-up testing is less likely to reveal architectural faults early on.

However, bottom-up testing of critical low-level components is almost always

necessary. Appropriate for OO systems.

3. Stress testing: Tests system's ability to cope with a specified load (e.g.

transactions per second). Tests should be planned to increase load incrementally.

This type of testing goes beyond design limit until system fails (this test is

particularly important for distributed systems like checking degradation of

performance a s network traffic increases).

4. Back-to-back testing: Comparison of test results from different versions of the

system (e.g. compare with prototype, previous version or different configuration).

Process – Run first system, saving test case results. Run second system, again

saving its results. Compare result files. The key point to be noted is that no

Page 47: E-Comura Documentation

47

difference does not mean no bugs. Both systems may have made the same

mistake.

5. Defect testing: A successful defect test is a test that causes the system to behave

incorrectly. Defect testing is not intended to show that a program meets its

specification. If tests do not show up defects it may mean that the tests are not

exhaustive enough. Exhaustive testing is not always practically applicable. Subset

has to be defined (this should be part of the test plan, not left to the individual

programmer).

5.2 Validation

You validate a program by checking it against the published user or system requirements.

System testing and integrity testing are validation tests.

Integration Testing: The next level testing that was performed is often referred to as

integration testing. During this phase many unit tested modules were combined into

subsystems, which were then tested. The goal here was to see if modules can be

integrated properly. Here the emphasis was on testing interfaces between different

constituent modules of system.

Test Case Design

The primary objective of test case design is to derive a set of tests that have the highest

likelihood of uncovering errors in software. The test case specification is the major

activity in the testing process. Careful selection of test cases that satisfy the criterion on

approach specified is essential for proper testing. Various characteristics of test cases that

are required for portal are:

1. A good test has a high probability of finding an error.

2. A good test is not redundant.

3. A good test should be ―Best of Breed‖.

4. A good test should be neither too simple not too complex.

Page 48: E-Comura Documentation

48

Structure Of Test Case

A formal written test case can be divided into three main parts:

Information

Information consists of general information about the test case such as a case identifier,

case creator info, test case version, formal name of the test case, purpose or brief

description of the test case and test case dependencies. It should also include specific

hardware and software requirements (if any) and setup or configuration requirements.

Activities

This part consists of the actual test case activities such as the environment that should

exist during testing, activities to be done at the initialization of the test, activities to be

done after test case is performed, step-by-step actions to be done while testing and the

input data that is to be supplied for testing.

Results

Results are the outcomes of a performed test case. Result data consists of information

about expected results, which is the criteria necessary for the program to pass the test and

the actual recorded results.

Page 49: E-Comura Documentation

49

5.2 Test Case For Login Module

Test Case ID Description Expected Actual

1 Enter valid

username and

empty password

Message displayed

saying incorrect

id/pwd

Message displayed

saying incorrect

id/pwd

2 Enter valid

password and

empty username

Message displayed

saying incorrect

id/pwd

Message displayed

saying incorrect

id/pwd

3 Enter valid

password and

username

User will be

redirected to

his/her dashboard

depending on the

type of user

User will be

redirected to

his/her dashboard

depending on the

type of user

4 After successful

login copy and

paste the URL in

another browser

The page should

expire i.e. user will

again be redirected

to login page

The page should

expire i.e. user will

again be redirected

to login page

Page 50: E-Comura Documentation

50

CHAPTER 6

CONCLUSION AND FUTURE

ENHANCEMENTS

Page 51: E-Comura Documentation

51

6.1 Summary of work done

Towards the end of my project, we would like to say that the target which was initially

setup, was achieved to a good extent. The project made me realize the significance of

developing software for client, where all the eventualities have to be taken care of unlike

at educational institutions, where the sole aim is to learn. What may seem to be software

complete in all respects may end up throwing a user into disarray because of very minor

flaws.we were required to meet the stringent demands of clients and that too with the

stipulated deadline. Though this seemed tough at first. we realized that pressure goaded

us on to develop better and better application. This section provides me an opportunity to

do self-introspection of what value we have added to our knowledge and skill set and to

the project.

During the project the real importance for following all the principles of system analysis

and design dawned on me. we felt the necessity of going through the several stages

because only such a process could makes one understand the problem at hand, more so

due stores involved in their manipulation.

6.2 Proposal/scope of future enhancement

Completion of the development process will result in a software package that will

provide user-friendly environment, which is very easy to work with, even for people with

very little knowledge of computer. Management of various tasks is incorporated in the

package and will deliver the required information in a very easy to use and easy to access

manner. This package will provide accuracy, efficiency, speed and easiness to the end

user. Since the system is verified with valid as well as invalid data and is run with an

insight into the necessary modifications that may require in the future, it can be

maintained successfully without much hassles.

Page 52: E-Comura Documentation

52

References

1. Unleashed ASP.NET

2. WROX Professional ASP.NET 3.5

3. HTML for Dummies

4. www.educationsun.com

5. SQL for Dummies

6. www.google.com

7. www.paypal.com

8. www.wikipedia.com

9. www.youtube.com

Page 53: E-Comura Documentation

53

Appendix

CODE

Login and Registration:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using nsE-Comura;

using System.Web.Security;

public partial class _Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

protected void Button3_Click(object sender, EventArgs e)

{

clsusr obj = new clsusr();

char typ;

Int32 grpcod;

Int32 a = obj.chkgrp(TextBox1.Text, TextBox2.Text, out grpcod,out

typ);

if (a == -1)

{

Label1.Text = "invalid id/password";

}

else

Page 54: E-Comura Documentation

54

{

Session["cod"] = a;

Session["grpcod"] = grpcod;

FormsAuthenticationTicket tk = new FormsAuthenticationTicket(1,

TextBox1.Text, DateTime.Now, DateTime.Now.AddHours(5),

false,typ.ToString());

string s = FormsAuthentication.Encrypt(tk);

HttpCookie ck = new

HttpCookie(FormsAuthentication.FormsCookieName, s);

Response.Cookies.Add(ck);

if (typ == 'A')

{

Response.Redirect("admin/frmcol.aspx");

}

else if (typ == 'T')

{

Response.Redirect("teacher/frmdshbrd.aspx");

}

else if (typ == 'S')

{

Response.Redirect("student/frmasg.aspx");

}

}

}

}

Registration:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using nsE-Comura;

public partial class _Default : System.Web.UI.Page

{

Page 55: E-Comura Documentation

55

protected void Page_Load(object sender, EventArgs e)

{

}

protected void RadioButtonList1_SelectedIndexChanged(object sender,

EventArgs e)

{

if (RadioButtonList1.SelectedIndex == 0)

{

Label1.Visible = false;

txtgrpjoncod.Visible = false;

}

else

{

Label1.Visible = true;

txtgrpjoncod.Visible = true;

}

}

private void clear_rec()

{

txtconpwd.Text = string.Empty;

txteml.Text = string.Empty;

txtfstnam.Text = string.Empty;

txtgrpjoncod.Text = string.Empty;

txtlstnam.Text = string.Empty;

txtpwd.Text = string.Empty;

txtusrnam.Text = string.Empty;

TextBox1.Text = string.Empty;

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs

e)

{

clsusr obj = new clsusr();

clsprpusr p = new clsprpusr();

p.p_usrnam = txtusrnam.Text;

p.p_usrpwd = txtpwd.Text;

p.p_urseml = txteml.Text;

p.p_usrfstnam = txtfstnam.Text;

Page 56: E-Comura Documentation

56

p.p_usrlstnam = txtlstnam.Text;

p.p_usrtyp = Convert.ToChar(RadioButtonList1.SelectedValue);

p.p_usrsecques = DropDownList1.SelectedItem.ToString();

p.p_usrsecans = TextBox1.Text;

if (RadioButtonList1.SelectedIndex == 0)

{

p.p_usrgrpcod = -1;

}

else

{

clsgrp obj1 = new clsgrp();

Int32 a = obj1.chkgrp(txtgrpjoncod.Text);

if (a == -1)

{

Label2.Text = "invalid grpjoncod";

return;

}

p.p_usrgrpcod = a;

}

obj.save_rec(p);

Label2.Text = "registration succesful";

clear_rec();

}

protected void ImageButton2_Click(object sender, ImageClickEventArgs

e)

{

clear_rec();

Label2.Text = string.Empty;

}

}

Page 57: E-Comura Documentation

57

Admin:

1.Country.aspx:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using nsE-Comura;

public partial class admin_Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

protected void GridView1_RowEditing(object sender,

GridViewEditEventArgs e)

{

clscnt obj=new clscnt();

List<clsprpcnt> k =

obj.find_rec(Convert.ToInt32(GridView1.DataKeys[e.NewEditIndex][0]));

if (k.Count > 0)

{

TextBox1.Text = k[0].p_cntnam;

ImageButton1.ImageUrl= "~/images/update_button.png";

ViewState["cod"] = GridView1.DataKeys[e.NewEditIndex][0];

}

e.Cancel = true;

}

protected void GridView1_RowDeleting(object sender,

GridViewDeleteEventArgs e)

{

clscnt obj = new clscnt();

clsprpcnt p = new clsprpcnt();

p.p_cntcod = Convert.ToInt32(GridView1.DataKeys[e.RowIndex][0]);

Page 58: E-Comura Documentation

58

obj.delete_rec(p);

GridView1.DataBind();

e.Cancel = true;

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs

e)

{

clsprpcnt p = new clsprpcnt();

clscnt obj = new clscnt();

p.p_cntnam = TextBox1.Text;

Int32 a=obj.save_rec(p);

if (ImageButton1.ImageUrl == "~/images/submit_button.png")

{

if (a == 1)

{

obj.save_rec(p);

}

else

{

//use custom validation over here.

// PlaceHolder1.("already exists");

System.Windows.Forms.MessageBox.Show("Country Name

Already Exists");

}

}

else

{

p.p_cntcod = Convert.ToInt32(ViewState["cod"]);

obj.update_rec(p);

ImageButton1.ImageUrl = "~/images/submit_button.png";

}

TextBox1.Text = string.Empty;

GridView1.DataBind();

}

protected void ImageButton2_Click(object sender, ImageClickEventArgs

e)

{

TextBox1.Text = string.Empty;

Page 59: E-Comura Documentation

59

ImageButton1.ImageUrl = "~/images/submit_button.png";

}

Page 60: E-Comura Documentation

60

College.aspx

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using nsE-Comura;

public partial class admin_Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

protected void GridView1_RowEditing(object sender,

GridViewEditEventArgs e)

{

clscol obj = new clscol();

Int32 colcod =

Convert.ToInt32(GridView1.DataKeys[e.NewEditIndex][0]);

List<clsprpcol> k = obj.find_rec(colcod);

if (k.Count > 0)

{

TextBox1.Text = k[0].p_colnam;

TextBox2.Text = k[0].p_colpstcod;

ViewState["cod"] = colcod;

ImageButton1.ImageUrl = "~/images/update_button.png";

}

e.Cancel = true;

}

protected void GridView1_RowDeleting(object sender,

GridViewDeleteEventArgs e)

{

clsprpcol p = new clsprpcol();

clscol obj = new clscol();

Page 61: E-Comura Documentation

61

p.p_colcod = Convert.ToInt32(GridView1.DataKeys[e.RowIndex][0]);

obj.delete_rec(p);

GridView1.DataBind();

e.Cancel = true;

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs

e)

{

clscol obj=new clscol();

clsprpcol p=new clsprpcol();

p.p_colcntcod = Convert.ToInt32(DropDownList1.SelectedValue);

p.p_colnam = TextBox1.Text;

p.p_colpstcod = TextBox2.Text;

Int32 a = obj.save_rec(p);

if (ImageButton1.ImageUrl == "~/images/submit_button.png")

{

if (a == 1)

{

obj.save_rec(p);

}

else

{

System.Windows.Forms.MessageBox.Show("College Exists");

}

}

else

{

p.p_colcod = Convert.ToInt32(ViewState["cod"]);

obj.update_rec(p);

ImageButton1.ImageUrl = "~/images/submit_button.png";

}

TextBox1.Text = string.Empty;

TextBox2.Text = string.Empty;

GridView1.DataBind();

}

protected void ImageButton2_Click(object sender, ImageClickEventArgs

e)

{

Page 62: E-Comura Documentation

62

TextBox1.Text = string.Empty;

TextBox2.Text = string.Empty;

ImageButton1.ImageUrl = "~/images/submit_button.png";

}

}

Page 63: E-Comura Documentation

63

Teacher Module:

Master page.master.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using nsE-Comura;

using System.Data;

using System.Web.Security;

public partial class student_MasterPage_student :

System.Web.UI.MasterPage

{

protected void Page_Load(object sender, EventArgs e)

{

clsprf obj = new clsprf();

DataSet ds = obj.find_prf(Convert.ToInt32(Session["cod"]));

if (ds.Tables[0].Rows.Count > 0)

{

Image1.ImageUrl = "~/prfpics/" + Session["cod"] +

ds.Tables[0].Rows[0]["prfpic"];

Label2.Text = ds.Tables[0].Rows[0]["usrfstnam"].ToString();

}

else

{

Image1.ImageUrl = "~/images/pic1.jpg";

}

}

protected void lk1_Click(object sender, EventArgs e)

{

Session.Abandon();

FormsAuthentication.SignOut();

FormsAuthentication.RedirectToLoginPage();

}

protected void Image1_Click(object sender, ImageClickEventArgs e)

{

Page 64: E-Comura Documentation

64

}

}

Trash.aspx

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using nsE-Comura;

using System.Data;

using System.Data.SqlClient;

public partial class teacher_Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

if (Page.IsPostBack == false)

{

grid_bind();

gridasg_bind();

}

}

public void gridasg_bind()

{

clsasg obj = new clsasg();

DataSet ds =

(DataSet)(obj.dspasgtrash(Convert.ToInt32(Session["cod"])));

GridView2.DataSource = ds;

GridView2.DataBind();

}

private void grid_bind()

{

clsgrp obj = new clsgrp();

Page 65: E-Comura Documentation

65

DataSet ds =

(DataSet)(obj.dspgrptrsh(Convert.ToInt32(Session["cod"])));

GridView1.DataSource = ds;

GridView1.DataBind();

}

protected void LinkButton1_Click(object sender, EventArgs e)

{

Panel1.Visible = true;

Panel2.Visible = false;

grid_bind();

}

protected void GridView1_RowEditing(object sender,

GridViewEditEventArgs e)

{

Int32 grpcod =

Convert.ToInt32(GridView1.DataKeys[e.NewEditIndex][0]);

clsgrp obj = new clsgrp();

clsprpgrp p = new clsprpgrp();

p.p_grpcod = grpcod;

p.p_grpsts = 'O';

obj.updgrpsts(p);

grid_bind();

e.Cancel = true;

}

protected void GridView1_RowDeleting(object sender,

GridViewDeleteEventArgs e)

{

Int32 grpcod =

Convert.ToInt32(GridView1.DataKeys[e.RowIndex][0]);

clsgrp obj = new clsgrp();

clsprpgrp p = new clsprpgrp();

p.p_grpcod = grpcod;

obj.delete_rec(p);

grid_bind();

}

protected void LinkButton2_Click(object sender, EventArgs e)

{

Page 66: E-Comura Documentation

66

Panel1.Visible = false;

Panel2.Visible = true;

}

protected void GridView2_RowEditing(object sender,

GridViewEditEventArgs e)

{

Int32 a = Convert.ToInt32(GridView2.DataKeys[e.NewEditIndex][0]);

clsasg obj = new clsasg();

clsprpasg p = new clsprpasg();

p.p_asgcod = a;

p.p_asgsts = 'U';

obj.updasgsts(p);

gridasg_bind();

e.Cancel = true;

}

protected void GridView2_RowDeleting(object sender,

GridViewDeleteEventArgs e)

{

Int32 a = Convert.ToInt32(GridView2.DataKeys[e.RowIndex][0]);

clsasg obj = new clsasg();

clsprpasg p = new clsprpasg();

p.p_asgcod = a;

obj.delete_rec(p);

gridasg_bind();

e.Cancel = true;

}

}

Frmshrasg.aspx

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using nsE-Comura;

public partial class teacher_Default : System.Web.UI.Page

{

Page 67: E-Comura Documentation

67

protected void Page_Load(object sender, EventArgs e)

{

if (Page.IsPostBack == false)

{

clsasg obj = new clsasg();

List<clsprpasg> k =

obj.find_rec(Convert.ToInt32(Request.QueryString["acod"]));

Label3.Text = k[0].p_asgtit.ToUpper();

}

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs

e)

{

clsasgshr obj = new clsasgshr();

clsprpasgshr p = new clsprpasgshr();

p.p_asgshrtyp = 'G';

p.p_asgshrcod1 = Convert.ToInt32(DropDownList1.SelectedValue);

p.p_asgshrduedat = Convert.ToDateTime(TextBox1.Text);

p.p_asgshrasgcod = Convert.ToInt32(Request.QueryString["acod"]);

obj.save_rec(p);

TextBox1.Text = string.Empty;

GridView1.DataBind();

}

protected void ImageButton2_Click(object sender, ImageClickEventArgs

e)

{

Response.Redirect("frmasg.aspx");

}

}

Frmquz.aspx

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using nsE-Comura;

Page 68: E-Comura Documentation

68

public partial class teacher_Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

protected void LinkButton1_Click(object sender, EventArgs e)

{

Response.Redirect("frmnewquz.aspx");

}

protected void GridView1_RowDeleting(object sender,

GridViewDeleteEventArgs e)

{

Int32 a = Convert.ToInt32(GridView1.DataKeys[e.RowIndex][0]);

clsquz obj = new clsquz();

clsprpquz p=new clsprpquz();

p.p_quzcod = a;

obj.delete_rec(p);

GridView1.DataBind();

e.Cancel = true;

}

protected void GridView1_RowEditing(object sender,

GridViewEditEventArgs e)

{

Int32 a = Convert.ToInt32(GridView1.DataKeys[e.NewEditIndex][0]);

Response.Redirect("frmnewquz.aspx?qcod=" + a.ToString());

}

protected void GridView1_SelectedIndexChanged(object sender,

EventArgs e)

{

Int32 a =

Convert.ToInt32(GridView1.DataKeys[GridView1.SelectedIndex][0]);

Response.Redirect("frmasgquz.aspx?qcod="+a.ToString());

}

protected void Button1_Click(object sender, EventArgs e)

{

Response.Redirect("frmnewquz.aspx");

}

}

Page 69: E-Comura Documentation

69

Frmpst.aspx

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using nsE-Comura;

public partial class teacher_Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

protected void GridView1_RowDataBound(object sender,

GridViewRowEventArgs e)

{

if (e.Row.RowType == DataControlRowType.DataRow)

{

string s = GridView1.DataKeys[e.Row.RowIndex][1].ToString();

LinkButton lk1 = (LinkButton)(e.Row.FindControl("lk1"));

if (s == "")

{

lk1.Visible = true;

}

else

{

lk1.Visible = false;

}

}

}

protected void GridView1_RowDeleting(object sender,

GridViewDeleteEventArgs e)

{

Int32 pstcod =

Convert.ToInt32(GridView1.DataKeys[e.RowIndex][0]);

ViewState["pstcod"] = pstcod;

ModalPopupExtender1.Show();

Page 70: E-Comura Documentation

70

e.Cancel = true;

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs

e)

{

clspst obj = new clspst();

clsprppst p = new clsprppst();

p.p_pstcod = Convert.ToInt32(ViewState["pstcod"]);

p.p_pstrep = TextBox1.Text;

string s = FileUpload1.FileName;

if (s != null)

{

s = s.Substring(s.LastIndexOf('.'));

p.p_pstfil = s;

obj.update_rec(p);

}

if (s != null)

{

FileUpload1.PostedFile.SaveAs(Server.MapPath("../pstfil" +"//"

+p.p_pstcod+s));

}

TextBox1.Text = string.Empty;

GridView1.DataBind();

}

public string getvis(string s)

{

if (s != null)

{

return "visibility:visible";

}

else

{

return "visibility:hidden";

}

}

}

Frmprf.aspx

Page 71: E-Comura Documentation

71

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Data;

using nsE-Comura;

public partial class teacher_Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

if (Page.IsPostBack == false)

{

clsprf obj = new clsprf();

DataSet d = obj.find_prf(Convert.ToInt32(Session["cod"]));

if (d.Tables[0].Rows.Count > 0)

{

DropDownList1.DataBind();

DropDownList1.SelectedIndex = -1;

DropDownList1.Items.FindByValue(d.Tables[0].Rows[0]["cntcod"].ToStrin

g()).Selected = true;

// DropDownList2.SelectedIndex = -1;

DropDownList2.DataBind();

DropDownList2.Items.FindByValue(d.Tables[0].Rows[0]["prfcolcod"].ToSt

ring()).Selected = true;

DropDownList3.SelectedIndex = -1;

DropDownList3.DataBind();

DropDownList3.Items.FindByValue(d.Tables[0].Rows[0]["prftimzon"].ToS

tring()).Selected = true;

ImageButton1.ImageUrl = "images/update_button.png";

ViewState["pic"] = d.Tables[0].Rows[0]["prfpic"];

ViewState["cod"] = d.Tables[0].Rows[0]["cntcod"];

Label3.Visible = true;

}

Page 72: E-Comura Documentation

72

else

{

Label3.Visible = false;

}

}

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs

e)

{

clsprpprf p = new clsprpprf();

clsprf obj = new clsprf();

p.p_prfcolcod = Convert.ToInt32(DropDownList2.SelectedValue);

p.p_prftimzon = DropDownList3.SelectedValue;

p.p_prfusrcod = Convert.ToInt32(Session["cod"]);

string s;

s = FileUpload1.FileName;

if (s !="")

s = s.Substring(s.LastIndexOf('.'));

if (ImageButton1.ImageUrl == "images/submit_button.png")

{

p.p_prfpic = s;

obj.save_rec(p);

}

else

{

p.p_prfpic = ViewState["pic"].ToString();

p.p_prfcod = Convert.ToInt32(ViewState["cod"]);

obj.update_rec(p);

}

if (s !="")

{

FileUpload1.PostedFile.SaveAs(Server.MapPath("../prfpics" + "//" +

Session["cod"] + s));

}

Response.Redirect("frmdshbrd.aspx");

Page 73: E-Comura Documentation

73

}

protected void ImageButton2_Click(object sender, ImageClickEventArgs

e)

{

Response.Redirect("frmdshbrd.aspx");

}

protected void Button1_click(object sender, EventArgs e)

{

clsusr obj = new clsusr();

clsprpusr p = new clsprpusr();

Int32

a=Convert.ToInt32(obj.updpwd(Convert.ToInt32(Session["cod"]),Textbox1.

Text));

if (a == 1)

{

p.p_usrcod = Convert.ToInt32(Session["cod"]);

p.p_usrpwd = TextBox2.Text;

obj.aftrchkpwd(p);

Label6.Text = "Password Succesfully Changed";

}

else

{

Label6.Text = "Old password Incorrect";

}

Textbox1.Text = string.Empty;

TextBox2.Text = string.Empty;

TextBox3.Text = string.Empty;

// Label6.Text = string.Empty;

}

protected void img_Click(object sender, ImageClickEventArgs e)

{

Label6.Text = string.Empty;

Textbox1.Text = string.Empty;

TextBox2.Text = string.Empty;

TextBox3.Text = string.Empty;

}

}

Page 74: E-Comura Documentation

74

Frmnewquz.aspx

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using nsE-Comura;

public partial class teacher_Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

if (Page.IsPostBack == false)

{

bind();

bind_option();

if (Request.QueryString["qcod"] == null)

{

Label5.Text = "CREATE NEW QUIZ";

}

else

{

Label5.Text = "UPDATE QUIZ";

clsquz obj = new clsquz();

List<clsprpquz> k =

obj.find_rec(Convert.ToInt32(Request.QueryString["qcod"]));

txtquztit.Text = k[0].p_quztit.ToString();

txtquzdur.Text =k[0].p_quzdur.ToString();

txtscr.Text = k[0].p_quztotscr.ToString();

txttotscr.Text = k[0].p_quztotscr.ToString();

txtcutoffscr.Text = k[0].p_quzcutoffscr.ToString();

ImageButton1.ImageUrl = "~/teacher/images/update_button.png";

ViewState["cod"] = k[0].p_quzcod;

Label3.Text = k[0].p_quztit;

Panel2.Visible = true;

bind();

}

Page 75: E-Comura Documentation

75

}

}

private void clear_rec()

{

txtcutoffscr.Text = string.Empty;

txtqstdsc.Text = string.Empty;

txtquzdur.Text = string.Empty;

txtquztit.Text = string.Empty;

txtscr.Text = string.Empty;

txttotscr.Text = string.Empty;

}

private void clear_recpanel2()

{

txtqstdsc.Text = string.Empty;

txtscr.Text = string.Empty;

}

public void bind()

{

clsquzdet obj = new clsquzdet();

GridView1.DataSource =

obj.disp_rec(Convert.ToInt32(ViewState["cod"]));

GridView1.DataBind();

}

protected void GridView1_RowDeleting(object sender,

GridViewDeleteEventArgs e)

{

clsquzdet obj = new clsquzdet();

clsprpquzdet p = new clsprpquzdet();

Int32 a = Convert.ToInt32(GridView1.DataKeys[e.RowIndex][0]);

p.p_quzdetcod = a;

obj.delete_rec(p);

bind();

e.Cancel = true;

}

Page 76: E-Comura Documentation

76

protected void GridView1_RowEditing(object sender,

GridViewEditEventArgs e)

{

clsquzdet obj = new clsquzdet();

List<clsprpquzdet> k =

obj.find_rec(Convert.ToInt32(GridView1.DataKeys[e.NewEditIndex][0]));

RadioButtonList1.SelectedIndex = -1;

RadioButtonList1.Items.FindByValue(k[0].p_quzdetqsttyp.ToString()).Selec

ted = true;

txtqstdsc.Text = k[0].p_quzqstdsc.ToString();

DropDownList1.SelectedIndex = -1;

DropDownList1.Items.FindByValue(k[0].p_quzqstord.ToString()).Selected

= true;

txtscr.Text = k[0].p_quzqstscr.ToString();

ViewState["quzdetcod"] = GridView1.DataKeys[e.NewEditIndex][0];

ImageButton3.ImageUrl = "~/teacher/images/update_button.png";

e.Cancel = true;

}

protected void GridView1_SelectedIndexChanged(object sender,

EventArgs e)

{

Int32 a =

Convert.ToInt32(GridView1.DataKeys[GridView1.SelectedIndex][0]);

ViewState["qstcod"] = a;

Panel2.Visible = false;

Panel3.Visible = true;

clsquzdet cls = new clsquzdet();

List<clsprpquzdet> l = cls.find_rec(a);

Label4.Text = l[0].p_quzqstdsc;

bind_option();

}

private void bind_option()

{

clsquzdetopt obj = new clsquzdetopt();

GridView2.DataSource =

obj.disp_rec(Convert.ToInt32(ViewState["qstcod"]));

GridView2.DataBind();

}

Page 77: E-Comura Documentation

77

protected void GridView2_RowEditing(object sender,

GridViewEditEventArgs e)

{

clsquzdetopt obj = new clsquzdetopt();

Int32 a = Convert.ToInt32(GridView2.DataKeys[e.NewEditIndex][1]);

List<clsprpquzdetopt> k = obj.find_rec(a);

txtoptdsc.Text = k[0].p_quzdetoptdsc;

if (k[0].p_quzdetoptsts == 'T')

{

CheckBox1.Checked = true;

}

else

{

CheckBox1.Checked = false;

}

ViewState["optcod"] = a;

ImageButton5.ImageUrl = "~/teacher/images/update_button.png";

bind_option();

e.Cancel = true;

}

protected void GridView2_RowDeleting(object sender,

GridViewDeleteEventArgs e)

{

clsquzdetopt obj = new clsquzdetopt();

clsprpquzdetopt p = new clsprpquzdetopt();

p.p_quzdetoptcod =

Convert.ToInt32(GridView2.DataKeys[e.RowIndex][1]);

obj.delete_rec(p);

bind_option();

e.Cancel = true;

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs

e)

{

clsquz obj = new clsquz();

clsprpquz p = new clsprpquz();

p.p_quztit = txtquztit.Text;

p.p_quzdur = Convert.ToInt32(txtquzdur.Text);

p.p_quztotscr = Convert.ToInt32(txttotscr.Text);

p.p_quzcutoffscr = Convert.ToInt32(txtcutoffscr.Text);

Page 78: E-Comura Documentation

78

p.p_quzusrcod = Convert.ToInt32(Session["cod"]);

if (ImageButton1.ImageUrl=="~/teacher/images/submit_button.png")

{

Int32 a = obj.save_rec(p);

ViewState["cod"] = a;

Panel1.Visible = false;

Panel2.Visible = true;

Label3.Text = txtquztit.Text.ToUpper();

}

else

{

p.p_quzcod = Convert.ToInt32(ViewState["cod"]);

obj.update_rec(p);

}

clear_rec();

}

protected void ImageButton2_Click(object sender, ImageClickEventArgs

e)

{

clear_rec();

}

protected void ImageButton3_Click(object sender, ImageClickEventArgs

e)

{

clsquzdet obj = new clsquzdet();

clsprpquzdet p = new clsprpquzdet();

p.p_quzdetquzcod = Convert.ToInt32(ViewState["cod"]);

p.p_quzdetqsttyp = Convert.ToChar(RadioButtonList1.SelectedValue);

p.p_quzqstdsc = txtqstdsc.Text;

p.p_quzqstord = Convert.ToInt32(DropDownList1.SelectedValue);

p.p_quzqstscr = Convert.ToInt32(txtscr.Text);

if (ImageButton3.ImageUrl=="~/teacher/images/submit_button.png")

{

obj.save_rec(p);

}

else

{

p.p_quzdetcod = Convert.ToInt32(ViewState["quzdetcod"]);

obj.update_rec(p);

Page 79: E-Comura Documentation

79

ImageButton3.ImageUrl="~/teacher/images/submit_button.png";

}

clear_recpanel2();

bind();

}

protected void ImageButton4_Click(object sender, ImageClickEventArgs

e)

{

clear_recpanel2();

}

protected void ImageButton5_Click(object sender, ImageClickEventArgs

e)

{

clsquzdetopt obj = new clsquzdetopt();

clsprpquzdetopt p = new clsprpquzdetopt();

p.p_quzdetquzdetcod = Convert.ToInt32(ViewState["qstcod"]);

p.p_quzdetoptdsc = txtoptdsc.Text;

if (CheckBox1.Checked == true)

{

p.p_quzdetoptsts = 'T';

}

else

{

p.p_quzdetoptsts = 'F';

}

if (ImageButton5.ImageUrl=="~/teacher/images/submit_button.png")

{

obj.save_rec(p);

}

else

{

p.p_quzdetoptcod = Convert.ToInt32(ViewState["optcod"]);

obj.update_rec(p);

ImageButton5.ImageUrl = "~/teacher/images/submit_button.png";

}

txtoptdsc.Text = string.Empty;

Page 80: E-Comura Documentation

80

CheckBox1.Checked = false;

bind_option();

}

protected void ImageButton6_Click(object sender, ImageClickEventArgs

e)

{

Panel2.Visible = true;

Panel3.Visible = false;

}

}

Frmnewgrp.aspx

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using nsE-Comura;

public partial class teacher_Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

if (Page.IsPostBack == false)

{

if (Request.QueryString["gcod"] == null)

{

Label4.Text = "CREATE NEW GROUP";

}

else

{

Label4.Text = "EDIT GROUP";

clsgrp obj = new clsgrp();

Page 81: E-Comura Documentation

81

List<clsprpgrp> k =

obj.find_rec(Convert.ToInt32(Request.QueryString["gcod"]));

TextBox1.Text = k[0].p_grpnam;

TextBox2.Text = k[0].p_grpsub;

DropDownList1.SelectedIndex = -1;

DropDownList1.Items.FindByText(k[0].p_grpgrd).Selected =

true;

string s = k[0].p_grpmgtreg;

string[] r = s.Split(',');

for (Int32 i = 0; i < r.Count(); i++)

{

CheckBoxList1.Items.FindByValue(r[i]).Selected = true;

}

ImageButton1.ImageUrl = "~/teacher/images/update_button.png";

}

}

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs

e)

{

clsgrp obj = new clsgrp();

clsprpgrp t = new clsprpgrp();

t.p_grpusrcod=Convert.ToInt32(Session["cod"]);

t.p_grpnam = TextBox1.Text;

t.p_grpgrd = DropDownList1.SelectedValue;

t.p_grpsub = TextBox2.Text;

t.p_grpsts = 'O';

t.p_grpcrtdat = DateTime.Now;

string s = Guid.NewGuid().ToString();

t.p_grpjoncod = s;

string p = "";

int i;

for (i = 0; i < CheckBoxList1.Items.Count; i++)

{

if (CheckBoxList1.Items[i].Selected == true)

{

p = p + CheckBoxList1.Items[i].Value + ",";

}

Page 82: E-Comura Documentation

82

}

if (p.Length > 0)

{

p = p.Substring(0, p.Length - 1);

}

t.p_grpmgtreg = p;

Int32 a = Convert.ToInt32(obj.save_rec(t));

if (ImageButton1.ImageUrl == "~/teacher/images/create_button.png")

{

if (a == 1)

{

obj.save_rec(t);

}

else

{

System.Windows.Forms.MessageBox.Show("Group Name

Exists");

}

Label3.Text = "GROUP JOINING CODE:" + s;

}

else

{

t.p_grpcod = Convert.ToInt32(Request.QueryString["gcod"]);

obj.update_rec(t);

}

TextBox1.Text = string.Empty;

TextBox2.Text = string.Empty;

}

}

Frmlib.aspx

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

Page 83: E-Comura Documentation

83

using System.Web.UI;

using System.Web.UI.WebControls;

using nsE-Comura;

public partial class teacher_Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

protected void LinkButton1_Click(object sender, EventArgs e)

{

Panel1.Visible = true;

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs

e)

{

clslibres obj = new clslibres();

clsprplibres p = new clsprplibres();

p.p_libresusrcod = Convert.ToInt32(Session["cod"]);

p.p_librestyp = Convert.ToChar(DropDownList1.SelectedValue);

p.p_libresdsc = TextBox1.Text;

p.p_libresshrsts = Convert.ToChar(RadioButtonList2.SelectedValue);

obj.save_rec(p);

TextBox1.Text = string.Empty;

Panel1.Visible = false;

GridView1.DataBind();

}

protected void ImageButton2_Click(object sender, ImageClickEventArgs

e)

{

Panel1.Visible = false;

}

}

Frmdshbrd.aspx

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

Page 84: E-Comura Documentation

84

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Data;

using System.Data.SqlClient;

using nsE-Comura;

using System.Net.Mail;

public partial class teacher_Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

if (Page.IsPostBack == false)

{

clsprf obj = new clsprf();

DataSet d = obj.find_prf(Convert.ToInt32(Session["cod"]));

if (d.Tables[0].Rows.Count == 0)

{

Response.Redirect("frmprf.aspx");

}

}

}

public string grpnos(Int32 grpcod)

{

clsgrp obj = new clsgrp();

DataSet ds = obj.dspgrpstu(grpcod);

return ds.Tables[0].Rows.Count.ToString();

}

protected void GridView1_RowDeleting(object sender,

GridViewDeleteEventArgs e)

{

clsgrp obj = new clsgrp();

clsprpgrp p = new clsprpgrp();

p.p_grpcod = Convert.ToInt32(GridView1.DataKeys[e.RowIndex][0]);

p.p_grpsts = 'C';

obj.updgrpsts(p);

GridView1.DataBind();

e.Cancel = true;

}

Page 85: E-Comura Documentation

85

protected void GridView1_SelectedIndexChanged(object sender,

EventArgs e)

{

string s =

GridView1.DataKeys[GridView1.SelectedIndex][1].ToString();

ViewState["joncod"] = s;

}

protected void Button1_Click(object sender, EventArgs e)

{

string s = TextBox1.Text;

string[] emlids = s.Split(',');

for (Int32 i = 0; i < emlids.Count(); i++)

{

MailMessage mm = new MailMessage("[email protected]",

emlids[i], "joingroup", "u r requested to join this group.the unique joining

code for thr group is" + ViewState["joncod"] + "<a href=frmreg.aspx>click

here</a>");

mm.IsBodyHtml = true;

SmtpClient c = new SmtpClient("mail.connectzone.in", 25);

c.Send(mm);

}

}

}

Frmasgquz.aspx

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using nsE-Comura;

public partial class teacher_Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

if (Page.IsPostBack == false)

{

Page 86: E-Comura Documentation

86

clsquz obj=new clsquz();

List<clsprpquz> k =

obj.find_rec(Convert.ToInt32(Request.QueryString["qcod"]));

Label3.Text = k[0].p_quztit.ToUpper();

}

}

protected void GridView1_RowDeleting(object sender,

GridViewDeleteEventArgs e)

{

Int32 a = Convert.ToInt32(GridView1.DataKeys[e.RowIndex][0]);

clsquzasg obj = new clsquzasg();

clsprpquzasg p = new clsprpquzasg();

p.p_quzasgcod = a;

obj.delete_rec(p);

GridView1.DataBind();

e.Cancel = true;

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs

e)

{

clsquzasg obj = new clsquzasg();

clsprpquzasg p = new clsprpquzasg();

p.p_quzasgquzcod = Convert.ToInt32(Request.QueryString["qcod"]);

p.p_quzasggrpcod = Convert.ToInt32(DropDownList1.SelectedValue);

p.p_quzasgdat = Convert.ToDateTime(TextBox1.Text);

//Int32 a=obj.save_rec(p);

//if (a == 1)

//{

obj.save_rec(p);

//}

//else

//{

// System.Windows.Forms.MessageBox.Show("Quiz Already

Assigned Once");

//}

GridView1.DataBind();

TextBox1.Text = string.Empty;

}

Page 87: E-Comura Documentation

87

protected void ImageButton2_Click(object sender, ImageClickEventArgs

e)

{

TextBox1.Text = string.Empty;

DropDownList1.SelectedIndex = -1;

}

}

Frmasg.aspx

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using nsE-Comura;

public partial class teacher_Default : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

protected void LinkButton1_Click(object sender, EventArgs e)

{

Panel1.Visible = true;

}

protected void GridView1_RowDeleting(object sender,

GridViewDeleteEventArgs e)

{

clsasg obj = new clsasg();

clsprpasg p = new clsprpasg();

p.p_asgcod = Convert.ToInt32(GridView1.DataKeys[e.RowIndex][0]);

p.p_asgsts = 'T';

obj.updasgsts(p);

GridView1.DataBind();

e.Cancel = true;

Page 88: E-Comura Documentation

88

}

protected void GridView1_RowEditing(object sender,

GridViewEditEventArgs e)

{

Int32 a = Convert.ToInt32(GridView1.DataKeys[e.NewEditIndex][0]);

Response.Redirect("frmshrasg.aspx?acod=" + a.ToString());

}

protected void ImageButton1_Click(object sender, ImageClickEventArgs

e)

{

clsasg obj = new clsasg();

clsprpasg p = new clsprpasg();

p.p_asgtit = TextBox1.Text;

p.p_asgdsc = TextBox2.Text;

string s = FileUpload1.FileName;

if (s != "")

{

s = s.Substring(s.LastIndexOf('.'));

}

p.p_asgfil = s;

p.p_asgusrcod = Convert.ToInt32(Session["cod"]);

p.p_asgsts = 'U';

obj.save_rec(p);

List<clsprpasg> k = obj.disp_rec(Convert.ToInt32(Session["cod"]));

Int32 a = Convert.ToInt32(k[0].p_asgcod);

if (s != "")

{

FileUpload1.PostedFile.SaveAs(Server.MapPath("../asgfiles" + "//" +

a.ToString() + s));

}

GridView1.DataBind();

TextBox1.Text = string.Empty;

TextBox2.Text = string.Empty;

Panel1.Visible = false;

}

Page 89: E-Comura Documentation

89

protected void ImageButton2_Click(object sender, ImageClickEventArgs

e)

{

TextBox1.Text = string.Empty;

TextBox2.Text = string.Empty;

Panel1.Visible = false;

}

}

Page 90: E-Comura Documentation

90

References

1. Unleashed ASP.NET

2. WROX Professional ASP.NET 3.5

3. HTML for Dummies

4. www.educationsun.com

5. SQL for Dummies

6. www.google.com

7. www.paypal.com

8. www.wikipedia.com

9. www.youtube.com