Main Project
Main Project
Submitted By
Name: VINODHINI D
(REG NO:812000043)
Submitted By
Name : VINODHINI D
BONAFIDE CERTIFICATE
This is to certify that the Project report entitled “SCHEDULE INCIDENT SYSTEM
MANAGEMENT" is being carried out by VINODHINI D (REG NO: 812000043)
in partial fulfillment of the requirements for the degree of MASTER OF
COMPUTER APPLICATIONS University of Madras, Chennai, in during the year
of February 2022 - May 2022 under the guidance and supervision of me the work
done by her is original and has not been submitted elsewhere.
I would like to thank all those who gave me their time, care and guidance
to whom I owe a debt, which can never be repaid. The following dignitaries
deserve a special mention.
I express my hearty thanks our respected Vice Principal Dr. O.S. AYSHA,
M.Sc., M.Phil., Ph.D., SET., for his Continuous encouragement, help and also
providing all the resources.
I also grateful to Asst. Prof. Mrs. I. Arivazhagi, MCA., M.Phil., for her
continuous encouragement, guidance and also providing all the resources needed
for my successful completion of the project.
I also take this opportunity to give thanks to all others who have given us
support for the project.
VINODHINI D
(812000043)
INDEX
S.NO CONTENTS PAGE. NO
1. Introduction
1.1 Scope of the project 10
1.2 About the Project
3 Development Environment
3.1 Hardware Requirements 21
3.2 Software Requirements
4 System Design
4.1 Database Design 31
4.2 Dataflow Diagram
6 System Testing
6.1 Implementation
6.2 Unit Testing 111
6.3 Integration Testing
6.4 Acceptance Testing
7 Conclusion 117
8|Page
ABSTRACK
9|Page
SCHEDULE INCIDENT MANAGEMENT SYSTEM
ABSTRACT
Schedule’s:
Example: IT software company.
10 | P a g e
INTRODUCTION
11 | P a g e
1.INTRODUCTION
This chapter gives an overview about the aim, objectives, background and operation
environment of the system.
PROJECT AIMS AND OBJECTIVES
The project aims and objectives that will be achieved after completion of this project
are discussed in this subchapter. The aims and objectives are as follows:
• Data management
• Report Management
• Easy communication between client and user
• Giving possible solution
• User roll-based work flow
• Managing super admin process
• An Admin/manager login to manage the incident and assign to the employer
• A Client login have authorization to change status of particular Scheduled incident
and also, they can Escalate & Close the incident.
• Employee can also create their own scheduled incident and complete.
12 | P a g e
1.1 SCOPE OF THE PROJECT
This project has many features which are like facility of user login (client) and
a facility of employee’s login. It also has a facility of manager/admin login through which
the manager/admin can monitor the whole system. It also has facility of an employee’s
can also create their own scheduled incident and complete (i.e) employee can assign their
work by itself and complete the task. The project involved in Scheduled Incident
Management system that tracks the Scheduled incident details. We therefore intend to
provide a solution by developing a software web application which helps to create a
scheduled incident, assign incident to Employees, track the scheduled incident history
and close the scheduled incident.
All these modules are able to help admin/manager to manage the track or assign or
creating or solving incidents with more convenience
This project of ours is being developed to help the incident tracker as well as
manager/admin of company to maintain the scheduled incident is completed or not in the
best way possible and also reduce the human efforts.
13 | P a g e
Functional components of the project:
• Customer must have a valid user ID and password to login to the system.
• After the valid user login credentials. it displays the receptive page in the
after the login page like client login describe the incident creation page etc.
• Client can perform the create /escalate/close the incident and manager/
admin can assign the works to the employees as well as close the incident
create the user etc. and employee can update incident status and also
create their own scheduled incident and complete.
In our proposed system we have the provision for adding the details of client details
of email address, mobile number etc. then we will give the login details to them, they can
access the incident portal then they can able to create the incident /escalate/close their
incident.
It is a burden to store the all these details and view the records.as you can see, it is a
very time consuming process and its cost wise its really low for the company.
14 | P a g e
SYSTEM STUDY AND
ANALYSIS
15 | P a g e
2. SYSTEM STUDY AND ANALYSIS
1) Operational Feasibility
2) Technical Feasibility
3) Economical Feasibility
OPERATIONAL FEASIBILITY
Operational feasibility is the measure of how well a proposed system solves the
problems, and takes advantage of the opportunities identified during scope definition and
how it satisfies the requirements identified in the requirements analysis phase of system
development.
The operational feasibility assessment focuses on the degree to which the proposed
development projects fits in with the existing business environment and objectives with
regard to development schedule, delivery date, corporate culture and existing business
processes. To ensure success, desired operational outcomes must be imparted during
design and development.
16 | P a g e
These include such design-dependent parameters as reliability, maintainability,
supportability, usability, producibility, disposability, sustainability, affordability and
others. These parameters are required to be considered at the early stages of design if
desired operational behaviors are to be realized.
A system may serve its intended purpose soft effectively when its technical and
operating characteristics are engineered into the design. Therefore, operational feasibility
is a critical aspect of systems engineering that needs to be an integral part of the early
design phases.
TECHNICAL FEASIBILITY
This involves questions such as whether the technology needed for the system
exists, how difficult it will be to build, and whether the firm has enough experience using
that technology.
The application is the fact that it has been developed on windows XP platform and
a high configuration of 1GB RAM on Intel Pentium Dual core processor. This is
technically feasible .
17 | P a g e
The technical feasibility assessment is focused on gaining an understanding of the
present technical resources of the organization and their applicability to the expected
needs of the proposed system.
It is an evaluation of the hardware and software and how it meets the need of the
proposed system.
ECONOMICAL FEASIBILITY
The first problem is that there are loads of hard copied documents being generated.
This brings us to the age-old discussion of keeping information in the form databases
versus keeping the same on sheets of paper. Keeping the information in the form of hard-
copied documents leads to the following problems.
18 | P a g e
2.2.1 DRAWBACKS OF EXISTING SYSTEM:
1. Lack of space – It becomes a problem in itself to find space to keep the sheets
of paper being generated as a result of the ongoing discussion. The documents being
generated are too important to be ill-treated.
3. Filtering is not easy – It becomes hard to filter relevant documents for the
irrelevant ones if the count of the same crosses a certain manageable number.
This Web Application provides facility to conduct online incident system to world
wide. It saves time as it allows number of client to give the incident at a time and assign
to the employee management will take care of the process. It help to manage to client and
management relationship
19 | P a g e
2.2.1 FEATURES OF PROPOSED SYSTEM
FUNCTIONAL CAPABILITIES:
The ultimate aim of this project is to help the incident analysis and facilitate the
faculties to faculties for easy evaluation of the employee and generation of the automatic
report for future enhancement. It displays the category for which the employee is assigned
to the task, incident status and we can management the process of the incident system like
assigning, creating and managing .
PERFORMANCE LEVEL
The scope of this project gives immense opportunity for the client and management
to know their relationship.
DATA STRUCTURES:
The data in this project are maintained in the tabular form using MSSQL in the
form of database. It provides easy access to the user. Easy category questions are
maintained in the database which provides easy for the user to access and choose the
category.
SAFETY: No data loss occurs in the scheduled incident management system.
• It is very much protected in such a way that it gives permission to the client ,
employee and management to access only when the username and password is correct.
• The results are produced electronically so that nobody is prone to mistakes.
20 | P a g e
RELIABILITY
QUALITY
The project is developed with the help of software which meets the requirement of
the user, the project is checked whether the phases individually have a served its purpose.
21 | P a g e
DEVELOPMENT
ENVIRONMENT
22 | P a g e
3 . DEVELOPMENT ENVIRONMENT
In this chapter, we will discuss and analyze about the developing process of
Scheduled Incident Management System including software requirement specification
(SRS) and comparison between existing and proposed system. The functional and
nonfunctional requirements are included in SRS part to provide complete description and
overview of system requirement before the developing process is carried out.
Besides that, existing vs proposed provides a view of how the proposed system will
be more efficient than the existing one.
3.1.1GENERAL DESCRIPTION
PRODUCT DESCRIPTION:
• File lost- When computerized system is not implemented file is always lost
because of human environment. Sometimes due to some human error there may
be a loss of records.
23 | P a g e
• File damaged When a computerized system is not their file is always lost due
to some accident like spilling of water by some member on file accidentally.
Besides some natural disaster like floods or fires may also damage the files.
• Difficult to search record(incident/task)
• When there is no computerized system there is always a difficulty in searching
of records if the records are large in number.
• Space consuming
• After the number of records become large the space for physical storage of file
and records also increases if no computerized system is implemented.
• Cost consuming
• As there is no computerized system the to add each record paper will be needed
which will increase the cost for the management of service request.
24 | P a g e
3.1.3 SYSTEM REQUIREMENTS
Product Requirements
EFFICIENCY REQUIREMENT
When a Scheduled incident management system will be implemented super admin
and user will easily access service request - incident as creating and tracking/assignation
of incident will be very faster.
RELIABILITY REQUIREMENT
The system should accurately perform member registration, member validation,
assignation, creating and tracking.
USABILITY REQUIREMENT
The system is designed for a user-friendly environment so that client, manager and
employee of service request can perform the various tasks easily and in an effective way.
Product Requirements
25 | P a g e
EFFICIENCY REQUIREMENT
When a Scheduled incident management system will be implemented super admin
and user will easily access service request - incident as creating and tracking/assignation
of incident will be very faster.
RELIABILITY REQUIREMENT
The system should accurately perform member registration, member validation,
assignation, creating and tracking.
USABILITY REQUIREMENT
The system is designed for a user-friendly environment so that client, manager and
employee of service request can perform the various tasks easily and in an effective way.
ORGANIZATIONAL REQUIREMENT
IMPLEMENTATION REQUIREMNTS
In implementing whole system, it uses html in front end with C# as server-side
programing language which will be used for database connectivity and the backend ie the
database part is developed using mssql.
DELIVERY REQUIREMENTS
The whole system is expected to be delivered in two months of time with a weekly
evaluation by the project guide.
26 | P a g e
3.1.4.2 FUNCTIONAL REQUIREMENTS
1.NORMAL USER
Description of Features
This feature used by the user to login into system. They are required to enter email id and
password before they are allowed to enter the system. The email id and password will be
verified and if invalid id is their user is allowed to not enter the system.
Functional requirements
• email id is provided when they register
• The system must only allow user with valid email id and password to enter the
system
• The system performs authorization process which decides what user level can
access to.
• The user must be able to logout after they finished using system.
Description of Features
This feature can be performed by admin can register new user to create account.
Functional Requirements
27 | P a g e
1.2 REGISTER INCIDENT
Description of Features
This feature allows to add new incident to the system.
Functional requirements
Description of feature
This feature is found in Incident details part. we can search incident based on
incident code, incident name, employee, assignee and date.
Description of feature
This feature is gives the report of all details related the client (how many
incident they created / how many is closed / how many is pending) details,
incident (how many incident is created as per the date is given /whom its assigned
/ how many is pending / how many is completed /which is not assigned / status of
the incident ) details and employee’s (how many is completed by them /how many
they create the self-ticket /escalation date) details and also we can filtered the
different operation like (HR works , Finance, etc.).
28 | P a g e
1.5 FORGOT PASSWORD
Description of feature
This feature is giving the user login to when they forgot the password,
they can login using the link and reset the password.
Here we need give the register email id and submit it. It will send the
password reset link to the respective mail. Using that link we can set reset the
password.
Description of feature
This feature is giving the user to reset the password, we need give the
register email id and submit it. It will send the password reset link to the respective
mail. Using that link we can set reset the password.
This feature is also helping to send the invoice to the respective client
through mail. Thus it help the client to pay the amount the company .
Functional requirements
• System must be able to search the database based on select search type
• System must be able to filter incident based on keyword entered
• System must be able to show the filtered book in table view
29 | P a g e
1.7 REGISTERED INCIDENTS AND COMPLETIONS OF INCIDENTS
Description of feature
This feature allows to registered incident and completions of incident and also view
reports of registered incident.
Functional requirements
Description of feature
This feature allows to create the invoice for client, and the client can have bill
or invoice for the what they pay. it may be useful to us and as well as client for future
reference.
Functional requirements
This section describes the software and hardware requirements of the system
• Intel core i5 2nd generation is used as a processor because it is fast than other
processors an provide reliable and stable and we can run our pc for longtime.
By using this processor, we can keep on developing our project without any
worries.
• Ram 1 gb is used as it will provide fast reading and writing capabilities and
will in turn support in processing
31 | P a g e
SYSTEM DESIGN
32 | P a g e
4 SYSTEM DESIGN
33 | P a g e
INCIDENT_MSTR TABLE FOR INCIDENT INFORMATION
34 | P a g e
USER_MSTR TABLE TO KEEP USER LOGIN INFORMATION
35 | P a g e
INVOICE MASTER FOR INVOICE INFORMATION
36 | P a g e
4.2 DATAFLOW DIAGRAM
User’s Responsibility
Client
Create/Escalate/Close/Re
port creation
Admin/Manager Create/Assign/Reassign/Escalate/
Close/Report & Invoice creation Schedule
Create/Finish/Report creation
Employee
37 | P a g e
DATA FLOW DIAGRAM FOR ALL LOGIN
YES
NO
ERROR
Run the program in Visual studio, then they are asking to enter the email id and
password and if he/she is a valid user then a respective login page will be displayed.
38 | P a g e
DATA FLOW DIAGRAM FOR CLIENT LOGIN
INCIDENT CHANGE
CREATIONS/ STATUS/ESCALATE/CH
LOGIN ANGE OF PLANNED CLOSE
REPORT
DATE OF INCIDENT THE
CREATIONS
INCIDENT
CAN EDIT
THEIR PROFILE
LOGOUT
In this Data Flow Diagram where after entering the CLIENT LOGIN page, he/she can
create an incident with respective type, change status of incident/escalate/change of planned date
of incident completions and also close the incident after the incident completed. He/she can edit
their profile.
39 | P a g e
DATA FLOW DIAGRAM FOR EMPLOYEE LOGIN
WORKED ON
ASSIGNED CHANGE THE
LOGIN INCIDENT/CREATE STATUS OF
INCIDENT AND INCIDENT TO
REPORT FINISH
CAN EDIT
THEIR PROFILE LOGOU
T
In this Data Flow Diagram where after entering the EMPLOYEE LOGIN page, he/she can
create an incident with respective type, worked on assigned incident and also change status of
incident to finish. He/she can also edit their profile.
40 | P a g e
DATA FLOW DIAGRAM FOR MANAGER LOGIN
LOGIN
ASSIGN INCIDENT GENERATE
CREATE USER
TO EMPLOYEES EMPLOYEE,CLIE
(Client, employee ,
NT STATUS
manager)
BASED REPORTS
DISABLE/DELETE USER
(EXPECT CLIENT)
INCIDENT,
REPORT AND LOGOUT
INVOICE
CREATIONS
In this Data Flow Diagram where after entering the MANAGER LOGIN page, he/she can
create a user and incident, edit all user properties, disable/delete user (expert client), assign
incident to employees, change status of incident /escalate/change of planned date of incident.
He/she can also edit their profile.
41 | P a g e
DATA FLOW DIAGRAM FOR SUPER ADMIN LOGIN
REPORT GENERATION
- USER LEVEL
- INCIDENT LEVEL
In this Data Flow Diagram where after entering the SUPER ADMIN LOGIN page, he/she
can create a user and incident, edit all user properties, disable/delete user, generate the reports ,
view the manager level escalations , report generation (user level/incident level) . He/she can
also edit their profile.
42 | P a g e
SYSTEM IMPLEMENTATION AND
CODING
43 | P a g e
5 .SYTEM IMPLEMENTATION AND CODING
The whole Project is divided in two parts the front end and the back end.
• HTML- HTML or Hyper Text Markup Language is the main markup language for
creating web pages and other information that can be displayed in a web browser.HTML
is written in the form of HTML elements consisting of tags enclosed in angle brackets
(like <html>), within the web page content. HTML tags most commonly come in pairs
like <h1> and </h1>, although some tags represent empty elements and so are unpaired,
for example <img>. The first tag in a pair is the start tag, and the second tag is the end
tag (they are also called opening tags and closing tags). In between these tags web
designers can add text, further tags, comments and other types of text-based content.
The purpose of a web browser is to read HTML documents and compose them into
visible or audible web pages. The browser does not display the HTML tags, but uses the
tags to interpret the content of the page.HTML elements form the building blocks of all
websites. HTML allows images and objects to be embedded and can be used to create
interactive forms. It provides a means to create structured documents by denoting
structural semantics for text such as headings, paragraphs, lists, links, quotes and other
items. It can embed scripts written in languages such as JavaScript which affect the
behavior of HTML web pages. The Hyper Text Markup Language or HTML is the
standard markup language for documents designed to be displayed in a web browser. It
can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting
languages such as JavaScript. Web browsers receive HTML documents from a web
server or from local storage and render the documents into multimedia web pages.
HTML describes the structure of a web page semantically and originally included cues
44 | P a g e
for the appearance of the document. HTML elements are the building blocks of HTML
pages. With HTML constructs, images and other objects such as interactive forms may
be embedded into the rendered page. HTML provides a means to create structured
documents by denoting structural semantics for text such as headings, paragraphs,
lists, links, quotes and other items. HTML elements are delineated by tags, written
using angle brackets. Tags such as <img /> and <input /> directly introduce content into
the page. Other tags such as <p> surround and provide information about document text
and may include other tags as sub-elements. Browsers do not display the HTML tags
but use them to interpret the content of the page.
• CSS- Cascading Style Sheets (CSS) is a style sheet language used for describing the
look and formatting of a document written in a markup language. While most often used
to style web pages and interfaces written in HTML and XHTML, the language can be
applied to any kind of XML document, including plain XML, SVG and XUL. CSS is a
cornerstone specification of the web and almost all web pages use CSS style sheets to
describe their presentation.CSS is designed primarily to enable the separation of
document content from document presentation, including elements such as the layout,
colors, and fonts. This separation can improve content accessibility, provide more
flexibility and control in the specification of presentation characteristics, enable
multiple pages to share formatting, and reduce complexity and repetition in the
structural content (such as by allowing for table less web design).CSS can also allow
the same markup page to be presented in different styles for different rendering methods,
such as on-screen, in print, by voice (when read out by a speech-based browser or screen
reader) and on Braille-based, tactile devices. It can also be used to allow the web page
to display differently depending on the screen size or device on which it is being viewed.
While the author of a document typically links that document to a CSS file, readers can
use a different style sheet, perhaps one on their own computer, to override the one the
45 | P a g e
author has specified. However, if the author or the reader did not link the document to
a specific style sheet the default style of the browser will be applied.CSS specifies a
priority scheme to determine which style rules apply if more than one rule matches
against a particular element. In this so-called cascade, priorities or weights are
calculated and assigned to rules, so that the results are predictable.
• JQUERY -jQuery is a fast, small, and feature-rich JavaScript library. It makes things
like HTML document traversal and manipulation, event handling, animation, and Ajax
much simpler with an easy-to-use API that works across a multitude of browsers. With
46 | P a g e
a combination of versatility and extensibility, jQuery has changed the way that millions
of people write JavaScript. jQuery is a JavaScript library designed to
simplify HTML DOM tree traversal and manipulation, as well as event handling, CSS
animation, and Ajax. It is free, open-source software using the permissive MIT
License. As of May 2019, jQuery is used by 73% of the 10 million most popular
websites. Web analysis indicates that it is the most widely deployed JavaScript library
by a large margin, having at least 3 to 4 times more usage than any other JavaScript
library. jQuery's syntax is designed to make it easier to navigate a document,
select DOM elements, create animations, handle events, and develop Ajax applications.
jQuery also provides capabilities for developers to create plug-ins on top of the
JavaScript library. This enables developers to create abstractions for low-level
interaction and animation, advanced effects and high-level, theme-able widgets. The
modular approach to the jQuery library allows the creation of powerful dynamic web
pages and Web applications. The set of jQuery core features—DOM element selections,
traversal, and manipulation—enabled by its selector engine (named "Sizzle" from v1.3),
created a new "programming style", fusing algorithms and DOM data structures. This
style influenced the architecture of other JavaScript frameworks like YUI v3 and Dojo,
later stimulating the creation of the standard Selectors API. Later, this style has been
enhanced with a deeper algorithm-data fusion in an heir of jQuery, the D3.js framework.
Microsoft and Nokia bundle jQuery on their platforms. Microsoft includes it
with Visual Studio for use within Microsoft's ASP.NET AJAX and ASP.NET
MVC frameworks while Nokia has integrated it into the Web Run-Time widget
development platform.
47 | P a g e
emerging software design practices. At its core, C# is an object-oriented language.
Several C# features help create robust and durable applications. Garbage
collection automatically reclaims memory occupied by unreachable unused
objects. Nullable types guard against variables that don't refer to allocated
objects. Exception handling provides a structured and extensible approach to error
detection and recovery. Lambda expressions support functional programming
techniques. Language Integrated Query (LINQ) syntax creates a common pattern for
working with data from any source. Language support for asynchronous
operations provides syntax for building distributed systems. C# has a unified type
system. All C# types, including primitive types such as int and double, inherit from a
single root object type. All types share a set of common operations. Values of any type
can be stored, transported, and operated upon in a consistent manner. Furthermore, C#
supports both user-defined reference types and value types. C# allows dynamic
allocation of objects and in-line storage of lightweight structures. C# supports generic
methods and types, which provide increased type safety and performance. C# provides
iterators, which enable implementers of collection classes to define custom behaviors
for client code .C# emphasizes versioning to ensure programs and libraries can evolve
over time in a compatible manner. Aspects of C#'s design that were directly influenced
by versioning considerations include the separate virtual and override modifiers, the
rules for method overload resolution, and support for explicit interface member
declarations.
The back end is designed using mssql which is used to design the databases
• Database: A database is a collection of tables, with related data.
• Table: A table is a matrix with data. A table in a database looks like a simple
spa sheet.
• Column: One column (data element) contains data of one and the same kind,
48 | P a g e
for example the column postcode.
• Row: A row (= tuple, entry or record) is a group of related data, for example
the data of one subscription.
49 | P a g e
PROCESSOR INTEL CORE PROCESSOR OR BETTER
PERFORMANCE
50 | P a g e
CODING
Module Implementation
Login Page
@model IMS.Models.UserModel
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Login</title>
</head>
<body class="text-center">
<style>
.myform {
margin-top: 12px;
max-width: 330px;
padding: 15px;
margin: auto;
}
</style>
<link href="@Url.Content("~/Content/bootstrap-5.0.0-dist/css/bootstrap.min.css")"
rel="stylesheet" />
<script src="@Url.Content("~/Scripts/jquery-3.4.1.min.js")"></script>
<script src="@Url.Content("~/Content/bootstrap-5.0.0-
dist/js/bootstrap.bundle.min.js")"></script>
<div class="container" style="padding: 11%;">
<div class="row">
<div class="col-lg-12">
<div class="account-wall">
<section class="align-lg-center">
<div class="site-logo"></div>
<h1 class="h3 mb-3 fw-normal">SIMS</h1>
@*<h1 class="login-title" style="margin-left: 11%;"><span>IMS</span></h1>*@
</section>
51 | P a g e
<div>
<span style="color: red; font-size: large; text-align: center;" id="error"></span>
<form method="post" style="" onsubmit="return Validation();" class="form myform"
action="../User/Login">
@*<table>*@
@*<tr class="mb-3">
<td>
<label>Email</label>
</td>
<td>
<input type="text" class="form-control" name="USR_EMAIL_ID" id="emailid" />
</td>
</tr>*@
<div class="form-floating col-sm-5" style="width:100%">
<input type="email" name="USR_EMAIL_ID" style="width:100%" class="form-control"
id="emailid" placeholder="[email protected]">
<label for="emailid">Email address</label>
</div>
<div class="form-floating col-sm-5" style="width:100%">
<input type="password" name="USR_PWD" style="width:100%" class="form-control"
id="password" placeholder="Password">
<label for="password">Password</label>
</div>
@*<tr>
<td>
<label>Password</label>
</td>
<td>
<input type="password" class="form-control" name="USR_PWD" id="password" />
</td>
</tr>
<tr>*@
@*<td>
</td>
<td>*@
<input class="mt-5 mb-3 btn btn-lg btn-primary" type="submit" value="Signin" />
<input class="mt-5 mb-3 btn btn-lg btn-primary" type="reset" value="Clear" />
@*</td>
</tr>
</table>*@
52 | P a g e
</form>
<script>
function Validation() {
var emailid = $("#emailid").val();
var pwd = $("#password").val();
if (emailid == "") {
$("#error").text("EmailAddress is required");
return false;
}
else if (!(isValidEmail(emailid))) {
$("#error").text("EmailAddress is Invalid");
return false;
}
else if (pwd == "") {
$("#error").text("Password is required");
return false;
}
else {
return true;
}
}
</script>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
@model IMS.Models.UserModel
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
53 | P a g e
@{
var Cookie_Inf =
IMS.Controllers.cookieInfo.GetUserInfo(System.Web.HttpContext.Current.Request);
int usr_id = 0;
int usr_role_typ = 0;
string usr_token = "";
if (Cookie_Inf.USR_ID > 0)
{
usr_id = Cookie_Inf.USR_ID;
usr_role_typ = Cookie_Inf.USR_ROLE_TYP;
usr_token = Cookie_Inf.USR_TOKEN;
}
else
{
Response.Redirect("~/User");
}
}
<style>
.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper
.dataTables_paginate .paginate_button.current:hover {
color: blue !important;
background: none;
border: none;
}
</style>
<script>
$(document).ready(function () {
$('#userdatatable').DataTable();
});
$(function () {
$("#ROLE_TYP").change(function () {
window.location.href = '../User/index?typ=' + $("#ROLE_TYP").val() + '';
});
});
</script>
<div>
</div>
54 | P a g e
<div class="row g-3" style="margin-bottom: 1%;">
@if (usr_role_typ == 3)
{
@*<a href="../User/index?typ=3" style="text-decoration: none;" class="btn btn-
primary">Admins</a>
<a href="../User/index?typ=1" style="text-decoration: none;" class="btn btn-
primary">Employees</a>
<a href="../User/index?typ=2" style="text-decoration: none;" class="btn btn-
primary">Clients</a>*@
<div class="col-sm">
<label class="col-form-label">Select Role</label>
<select id="ROLE_TYP" class="form-select">
<option value="0">All</option>
<option value="1">Employee Level1</option>
<option value="4">Employee Level2</option>
<option value="2">Client</option>
<option value="3">Manager</option>
<option value="5">Senior Manager/VP</option>
<option value="6">Management Team</option>
</select>
</div>
}
<div class="col-sm" align="right">
<a align="right" href="../User/Manage?id=0" class="btn btn-primary">Add</a>
</div>
</div>
<div>
<table id="userdatatable" class="table table-striped table-hover" style="width:100%">
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">Name</th>
<th scope="col">Role</th>
<th scope="col">Email address</th>
<th scope="col">Phone number</th>
<th scope="col">Region</th>
55 | P a g e
@*<th>Department</th>*@
@*<th>Designation</th>*@
<th></th>
</tr>
</thead>
<tbody>
@foreach (var v in Model.allUserDetails)
{
<tr>
<td scope="row">@v.USER_CODE</td>
<td>@v.USR_NAME</td>
<td>@v.USR_ROLE_TYP_NAME</td>
<td>@v.USR_EMAIL_ID</td>
<td>@v.USR_PHONE_NO</td>
<td>@v.USR_REGION_NAME</td>
@*<td>@v.USR_DEPT_NAME</td>*@
@*<td>@v.USR_DESIGNATION</td>*@
<td><a href="../user/[email protected]_ID" class="btn btn-primary">Open</a></td>
</tr>
}
</tbody>
@*<tfoot>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</tfoot>*@
</table>
</div>
<script>
$(document).ready(function () {
var roletype = parseInt(@ViewBag.ROLE_TYP);
$("#ROLE_TYP").val(roletype);
});
56 | P a g e
var table = $('#userdatatable').DataTable();
$('.dataTables_filter input').unbind().keyup(function (e) {
var value = $(this).val();
if (value.length > 3) {
table.search(value).draw();
}
else {
//optional, reset the search if the phrase
//is less then 3 characters long
table.search('').draw();
}
});
</script>
@model IMS.Models.UserModel
@{
ViewBag.Title = "Manage";
Layout = "~/Views/Shared/_Layout.cshtml";
}
@if (Model != null)
{
var obj = Model.userDetail;
<div class="panel-tools fully color" align="" data-toolscolor="#6CC3A0" style="">
<h2>User <a href="../User/[email protected]_ROLE_TYP" style="margin-left: 25%;"
class="btn btn-primary">Back</a></h2>
@*@if (obj.USR_ROLE_TYP == 1)
{
<h2>User <a href="../User/[email protected]_ROLE_TYP" style="margin-left: 17%;"
class="btn btn-primary">Back</a></h2>
}
else
{
<h2>Client<a href="../User/[email protected]_ROLE_TYP" style="margin-left: 17%;"
class="btn btn-primary">Back</a></h2>
57 | P a g e
}*@
</div>
<div class="container" style="margin-top:3%">
<div class="body">
<div class="col-lg-12 col-md-12 col-sm-12 col-xm-12">
<div>
<span style="color: red; font-size: large; text-align: center;margin-left: 11%;"
id="error"></span>
<form method="post" style="margin-top:12px;" onsubmit="return Validation();" class="form"
action="../User/SaveUser">
<table>
<input type="hidden" value="@obj.USR_ID" name="USR_ID" />
@if (obj.USR_ID > 0)
{
<tr colspan="2">
<td>
<label>ID</label>
</td>
<td>
<span>@obj.USER_CODE</span>
</td>
</tr>
}
<tr colspan="2">
<td>
<label>Name</label>
</td>
<td>
<input class="form-control" value="@obj.USR_NAME" name="USR_NAME"
placeholder="Name" type="text" id="USR_NAME" />
</td>
</tr>
<tr colspan="2">
<td>
<label>Role</label>
</td>
@*@Html.DropDownList(.USR_ROLE_TYP_NAME, ViewBag.usrRoleEnumList as
SelectList, new { @id = "USR_ROLE_TYP" })*@
58 | P a g e
<td>
<select id="USR_ROLE_TYP" class="form-select" name="USR_ROLE_TYP">
<option value="0">Select</option>
<option value="1">Employee Level1</option>
<option value="4">Employee Level2</option>
<option value="2">Client</option>
<option value="3">Manager</option>
<option value="5">Senior Manager/VP</option>
<option value="6">Management Team</option>
</select>
</td>
</tr>
<tr colspan="2">
<td class="col-md-6">
<label>Email Address</label>
</td>
<td class="col-md-6">
<input value="@obj.USR_EMAIL_ID" name="USR_EMAIL_ID" class="form-control"
placeholder="Email Address" type="text" id="USR_EMAIL_ID" />
<input type="hidden" value="@obj.USR_EMAIL_ID" id="oldemailid" />
</td>
</tr>
<tr colspan="2">
<td class="col-md-6">
<label>Password</label>
</td>
<td class="col-md-6">
<input value="@obj.USR_PWD" class="form-control" placeholder="Password"
name="USR_PWD" type="password" id="USR_PWD" />
</td>
</tr>
<tr colspan="2">
<td class="col-md-6">
<label>Confirm Password</label>
</td>
<td class="col-md-6">
<input value="@obj.USR_PWD" class="form-control" placeholder="Confirm Password"
name="CNFRM_USR_PWD" type="password" id="CNFRM_USR_PWD" />
59 | P a g e
</td>
</tr>
<tr colspan="2">
<td class="col-md-6">
<label>Phone Number</label>
</td>
<td class="col-md-6">
<input value="@obj.USR_PHONE_NO" class="form-control" placeholder="Phone Number"
name="USR_PHONE_NO" type="text" id="USR_PHONE_NO" />
</td>
</tr>
<tr>
<td>
<label>Region</label>
</td>
<td>
<select id="USR_REGION" class="form-select" name="USR_REGION">
<option value="0">Select</option>
<option value="1">Chennai</option>
<option value="2">Pondi</option>
<option value="3">Madurai</option>
<option value="4">Hosur</option>
<option value="5">Bangalore</option>
<option value="6">AP</option>
</select>
</td>
</tr>
<tr colspan="2">
<td>
<label>Designation</label>
</td>
<td>
<input class="form-control" placeholder="Designation" value="@obj.USR_DESIGNATION"
name="USR_DESIGNATION" type="text" id="USR_DESIGNATION" />
</td>
</tr>
@*<tr>
<td>
60 | P a g e
</td>
<td>
<input type="checkbox" name="IsAdmin" /><span style="margin-left:1%">Create as
Admin</span>
</td>
</tr>*@
<tr>
<td>
</td>
<td>
<input type="submit" class="btn btn-primary" value="Save" />
<input type="reset" class="btn btn-primary" id="reset" value="Reset" />
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
var userroletype = @Html.Raw(Json.Encode(Model.userDetail));
$("#USR_ROLE_TYP").val(userroletype.USR_ROLE_TYP);
$("#USR_REGION").val(userroletype.USR_REGION);
});
function Validation() {
if (isEmailExists()) {
var usrname = $("#USR_NAME").val();
var designtn = $("#USR_DESIGNATION").val();
var region = $("#USR_REGION").val();
var emailid = $("#USR_EMAIL_ID").val();
var role = $("#USR_ROLE_TYP").val();
var usrpwd = $("#USR_PWD").val();
var confrmpwd = $("#CNFRM_USR_PWD").val();
if (usrname == "") {
$("#error").text("Name is required");
return false;
61 | P a g e
}
else if (role == 0) {
$("#error").text("Role is required");
return false;
}
else if (emailid == "") {
$("#error").text("EmailAddress is required");
return false;
}
else if (!(isValidEmail(emailid))) {
$("#error").text("EmailAddress is Invalid");
return false;
}
else if (usrpwd == "") {
$("#error").text("Password is required");
return false;
}
else if (confrmpwd == "") {
$("#error").text("Confirm Password is required");
return false;
}
else if (usrpwd != confrmpwd) {
$("#error").text("Password & Confirm password is not matching");
return false;
}
else if (region == 0) {
$("#error").text("Region is required");
return false;
}
else if (designtn == "") {
$("#error").text("Designation is required");
return false;
}
else {
return true;
}
}
}
62 | P a g e
function isEmailExists() {
var emailid = $("#USR_EMAIL_ID").val();
var oldemailid = $("#oldemailid").val();
if (emailid != oldemailid) {
try {
$.ajax({
url: '../User/IsUserExists',
type: 'POST',
contentType: 'application/json;',
dataType: "json",
data: JSON.stringify({ "emailid": emailid }),
success: function (data) {
if (data == false) {
$("#error").text("EmailAddress already exists");
return false;
}
else {
return true;
}
},
error: function (jqxhr, status, error) {
console.log("e :" + status + " " + error);
},
});
}
catch (e) {
console.log(e);
}
}
return true;
}
</script>
}
@model IMS.Models.IncidentModel
@{
63 | P a g e
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
@{
var Cookie_Inf =
IMS.Controllers.cookieInfo.GetUserInfo(System.Web.HttpContext.Current.Request);
int usr_id = 0;
int usr_role_typ = 0;
string usr_token = "";
if (Cookie_Inf.USR_ID > 0)
{ usr_id = Cookie_Inf.USR_ID;
usr_role_typ = Cookie_Inf.USR_ROLE_TYP;
usr_token = Cookie_Inf.USR_TOKEN;
}
else
{
Response.Redirect("~/User");
}
}
<style>
.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper
.dataTables_paginate .paginate_button.current:hover {
color: blue !important;
background: none;
border: none;
}
</style>
<script>
$(document).ready(function () {
$('#incidentdatatable').DataTable({
"pagingType": "simple"
});
$('.dataTables_length').addClass('bs-select');
});
</script>
<div class="col-md-12"><h2>Incident</h2></div>
<div class="panel-tools fully color" align="right" data-toolscolor="#6CC3A0" style="margin-
bottom: 2%;">
64 | P a g e
<a href="../Incident/Manage?id=0" class="btn btn-primary">Add</a>
</div>
<div>
<table id="incidentdatatable" class="table table-striped table-hover table-sm"
style="width:100%;">
<thead>
<tr>
<th scope="col">ID</th>
<th scope="col">Title</th>
@*<th>Desription</th>*@
<th scope="col">Type</th>
@if (usr_role_typ != 2)
{
<th scope="col">Start date</th>
<th scope="col">End date</th>
<th scope="col">Assignor</th>
<th scope="col">Assignee</th>
}
<th scope="col">Status</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
@foreach (var v in Model.allIncidentdetails)
{
<tr scope="row">
<td>@v.INCIDENT_CODE</td>
<td>@v.INCIDENT_TITLE</td>
@*<td>@v.INCIDENT_DESC</td>*@
<td>@v.INCIDENT_TYP_NAME</td>
@if (usr_role_typ != 2)
{
<td>@v.ACTUAL_START_DATE.ToString("dd/MM/yyyy")</td>
<td>@v.ACTUAL_END_DATE.ToString("dd/MM/yyyy")</td>
<td>@v.INCIDENT_ASSIGNOR_NAME</td>
<td>@v.INCIDENT_ASSIGNEE_NAME</td>
}
<td>@v.INCIDENT_STATUS_NAME</td>
65 | P a g e
<td><a href="../incident/[email protected]_ID" class="btn btn-
primary">Open</a></td>
</tr>
}
</tbody>
@*<tfoot>
<tr>
<th>Title</th>
<th>Desription</th>
<th>Region</th>
<th>Start date</th>
<th>End date</th>
<th>Status</th>
<th>Assignor</th>
<th>Assignee</th>
<th></th>
</tr>
</tfoot>*@
</table>
</div>
<script>
var table = $('#incidentdatatable').DataTable();
$('.dataTables_filter input').unbind().keyup(function (e) {
var value = $(this).val();
if (value.length > 3) {
table.search(value).draw();
} else {
//optional, reset the search if the phrase
//is less then 3 characters long
table.search('').draw();
}
});
</script>
@model IMS.Models.IncidentModel
@{
66 | P a g e
ViewBag.Title = "Manage";
Layout = "~/Views/Shared/_Layout.cshtml";
}
@{
Var Cookie_Inf=
IMS.Controllers.cookieInfo.GetUserInfo(System.Web.HttpContext.Current.Request);
int usr_id = 0;
int usr_role_typ = 0;
string usr_token = "";
if (Cookie_Inf.USR_ID > 0)
{
usr_id = Cookie_Inf.USR_ID;
usr_role_typ = Cookie_Inf.USR_ROLE_TYP;
usr_token = Cookie_Inf.USR_TOKEN;
}
else
{
Response.Redirect("~/User");
}
}
<div class="panel-tools fully color" align="" data-toolscolor="#6CC3A0" style="">
<h2>Incident <a href="../Incident/index" style="margin-left: 17%;" class="btn btn-
primary">Back</a></h2>
</div>
@if (Model != null)
{
var obj = Model.incidentdetails;
<div class="container" style="margin-top:3%">
<div class="body">
<div class="col-lg-12 col-md-12 col-sm-12 col-xm-12">
<div>
<form method="post" onsubmit="return Validation();" class="form"
action="../Incident/SaveIncident">
<table>
@if (obj.INCIDENT_ID > 0)
{
<tr colspan="4">
<td>
67 | P a g e
<label>Code</label>
</td>
<td>
<span>@obj.INCIDENT_CODE</span>
</td>
</tr>
}
<tr colspan="4">
<td>
<label>Title</label>
</td>
<td>
<input type="hidden" value="@obj.INCIDENT_ID" name="INCIDENT_ID" />
<input class="form-control" placeholder="Title" value="@obj.INCIDENT_TITLE"
name="INCIDENT_TITLE" type="text" id="INCIDENT_TITLE" />
</td>
</tr>
<tr>
<td>
<label>Description</label>
</td>
<td>
<input type="text" class="form-control" placeholder="Description"
value="@obj.INCIDENT_DESC" name="INCIDENT_DESC" id="INCIDENT_DESC" />
</td>
</tr>
<tr>
<td>
<label>Client</label>
</td>
<td>
<select id="CLNT_ID" class="form-select" name="CLNT_ID">
<option value="0">Select</option>
</select>
</td>
</tr>
@if((usr_role_typ != 1) && (usr_role_typ != 4))
{
68 | P a g e
<tr>
<td>
<label>Employee</label>
</td>
<td>
<select id="INCIDENT_ASSIGNEE" class="form-select" name="INCIDENT_ASSIGNEE">
<option value="0">Select</option>
</select>
</td>
</tr>
}
<tr>
<td>
<label>Type</label>
</td>
<td>
<select id="INCIDENT_TYP" class="form-select" name="INCIDENT_TYP">
<option value="0">Select</option>
<option value="1">HR</option>
<option value="2">Admin</option>
<option value="3">Operations</option>
<option value="4">Compliance</option>
<option value="5">Accounts</option>
<option value="6">Others</option>
</select>
</td>
</tr>
@*<tr>
<td>
<label>Region</label>
</td>
<td>
<select id="INCIDENT_REGION" class="form-select" name="INCIDENT_REGION">
<option value="0">Select</option>
<option value="1">Chennai</option>
<option value="2">Pondi</option>
<option value="3">Madurai</option>
<option value="4">Hosur</option>
69 | P a g e
<option value="5">Bangalore</option>
<option value="6">AP</option>
</select>
</td>
</tr>*@
<tr>
<td>
<label>Actual Start Date</label>
</td>
<td>
<input type="date" class="form-control" placeholder="Actual StartDate"
value="[email protected]_START_DATE" id="ACTUAL_START_DATE"
name="ACTUAL_START_DATE">
</td>
</tr>
<tr>
<td>
<label>Actual End Date</label>
</td>
<td>
<input type="date" class="form-control" placeholder="Actual EndDate"
value="@obj.ACTUAL_END_DATE" id="ACTUAL_END_DATE"
name="ACTUAL_END_DATE">
</td>
</tr>
<tr>
<td>
<label>Planned Start Date</label>
</td>
<td>
<input type="date" class="form-control" placeholder="Planned StartDate"
value="@obj.PLANNED_START_DATE" id="PLANNED_START_DATE"
name="PLANNED_START_DATE">
</td>
</tr>
<tr>
<td>
<label>Planned End Date</label>
70 | P a g e
</td>
<td>
<input type="date" class="form-control" placeholder="Planned EndDate"
value="@obj.PLANNED_END_DATE" id="PLANNED_END_DATE"
name="PLANNED_END_DATE">
</td>
</tr>
@if ((usr_role_typ != 1) && (usr_role_typ != 4))
{
<tr>
<td>
<label>Status</label>
</td>
<td>
<select id="INCIDENT_STATUS" class="form-select" name="INCIDENT_STATUS">
<option value="0">Select</option>
<option value="1">Open</option>
<option value="2">Assigned</option>
<option value="3">WIP</option>
<option value="4">Closure</option>
<option value="5">Approval</option>
<option value="6">Closed</option>
<option value="7">Reopen</option>
</select>
</td>
</tr>
}
@if ((obj.INCIDENT_ID > 0) && (usr_role_typ == 4))
{
<tr id="iscloserow">
<td>
</td>
<td>
@*<input type="checkbox" class="form-control" id="escalatebx" /><span style="margin-
left:1%">Escalate</span>*@
<input class="form-check-input" type="checkbox" value="" id="closechkbx">
<input type="hidden" id="isclosehdn" name="INCIDENT_STATUS" />
<label class="form-check-label" for="closechkbx">
71 | P a g e
Close
</label>
</td>
</tr }
@if ((usr_role_typ != 1) && (usr_role_typ != 4))
{
<tr id="escalated" style="display:none">
<td>
</td>
<td>
@*<input type="checkbox" class="form-control" id="escalatebx" /><span style="margin-
left:1%">Escalate</span>*@
<input class="form-check-input" type="checkbox" value="" id="escalatebx">
<label class="form-check-label" for="escalatebx">
Escalate
</label>
</td>
</tr>
<tr class="escalationpart" style="display:none">
<td>
<label>Escalate Date</label>
</td>
<td>
<span id="escalatedate"> @obj.ESCALATN_DATE.ToString("dd/MM/yyyy") </span>
</td>
</tr>
<tr class="escalationpart" style="display:none">
<td>
<label>Escalate Level</label>
</td>
<td>
<select id="ESCALATN_TYP" class="form-select" name="ESCALATN_TYP">
<option value="0">Select</option>
<option value="1">level1</option>
<option value="2">level2</option>
<option value="3">level3</option>
</select>
</td>
72 | P a g e
</tr>
}
<span style="color: red; font-size: large; text-align: center;margin-left: 11%;"
id="error"></span>
<tr>
<td>
</td>
<td>
<input class="btn btn-primary" type="submit" value="Save" />
<input class="btn btn-primary" type="reset" id="reset" value="Reset" />
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
var incdetail = @Html.Raw(Json.Encode(Model.incidentdetails));
var usrlist = @Html.Raw(Json.Encode(Model.userlist));
var options = new Array();
var clntoptions = new Array();
$.each(usrlist, function (index, option) {
if ((option.USR_ROLE_TYP == 1) || (option.USR_ROLE_TYP == 4)) {
options.push('<option value="' + option.USR_ID + '">' + option.USR_NAME + '</option>');
}
if (option.USR_ROLE_TYP == 2) {
clntoptions.push('<option value="' + option.USR_ID + '">' + option.USR_NAME + '</option>')
}
});
$('#INCIDENT_ASSIGNEE').append(options);
$('#CLNT_ID').append(clntoptions);
$("#INCIDENT_TYP").val(incdetail.INCIDENT_TYP);
$("#INCIDENT_REGION").val(incdetail.INCIDENT_REGION);
$("#ESCALATN_TYP").val(incdetail.ESCALATN_TYP);
$("#INCIDENT_ASSIGNEE").val(incdetail.INCIDENT_ASSIGNEE);
73 | P a g e
$('#INCIDENT_STATUS').val(incdetail.INCIDENT_STATUS);
$("#CLNT_ID").val(incdetail.CLNT_ID);
var acst = new Date(parseInt(incdetail.ACTUAL_START_DATE.substr(6)));
var acstday = ("0" + acst.getDate()).slice(-2);
var acstmonth = ("0" + (acst.getMonth() + 1)).slice(-2);
var acstdt = acst.getFullYear() + "-" + (acstmonth) + "-" + (acstday);
$('#ACTUAL_START_DATE').val(acstdt);
var acend = new Date(parseInt(incdetail.ACTUAL_END_DATE.substr(6)));
var acendday = ("0" + acend.getDate()).slice(-2);
var acendmonth = ("0" + (acend.getMonth() + 1)).slice(-2);
var acenddt = acend.getFullYear() + "-" + (acendmonth) + "-" + (acendday);
$('#ACTUAL_END_DATE').val(acenddt);
var plnedst = new Date(parseInt(incdetail.PLANNED_START_DATE.substr(6)));
var plndstday = ("0" + plnedst.getDate()).slice(-2);
var plndstmonth = ("0" + (plnedst.getMonth() + 1)).slice(-2);
var plandst = plnedst.getFullYear() + "-" + (plndstmonth) + "-" + (plndstday);
$('#PLANNED_START_DATE').val(plandst);
var plnedend = new Date(parseInt(incdetail.PLANNED_END_DATE.substr(6)));
var plnedendday = ("0" + plnedend.getDate()).slice(-2);
var plnedendmonth = ("0" + (plnedend.getMonth() + 1)).slice(-2);
var plnedenddt = plnedend.getFullYear() + "-" + (plnedendmonth) + "-" + (plnedendday);
$('#PLANNED_END_DATE').val(plnedenddt);
if (incdetail.ESCALATN_TYP > 0) {
$(".escalationpart").show();
$("#escalatebx").prop("checked", true);
}
if (incdetail.INCIDENT_STATUS==6) {
$("#closechkbx").prop("checked", true);
}
if (incdetail.INCIDENT_ID > 0) {
$("#escalated").show();
}
});
document.getElementById("ACTUAL_START_DATE").onchange = function () {
var input = document.getElementById("ACTUAL_END_DATE");
input.setAttribute("min", this.value);
}
document.getElementById("PLANNED_START_DATE").onchange = function () {
74 | P a g e
var input = document.getElementById("PLANNED_END_DATE");
input.setAttribute("min", this.value);
}
$('#iscloserow input[type=checkbox]').change(function () {
var id = $(this).is(':checked')
if (!id) {
$("#isclosehdn").val(1);
}
else {
$("#isclosehdn").val(6);
}
});
$('#escalated input[type=checkbox]').change(function () {
var id = $(this).is(':checked')
if (!id) {
$(".escalationpart").hide();
}
else {
var today = new Date();
var dd = String(today.getDate()).padStart(2, '0');
var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
var yyyy = today.getFullYear();
today = mm + '/' + dd + '/' + yyyy;
$("#escalatedate").text(today);
$(".escalationpart").show();
}
});
function Validation() {
var inctitle = $("#INCIDENT_TITLE").val();
var incdesc = $("#INCIDENT_DESC").val();
var incassignee = $("#INCIDENT_ASSIGNEE").val();
var inctype = $("#INCIDENT_TYP").val();
var incregion = $("#INCIDENT_REGION").val();
var incactstrtdt = $("#ACTUAL_START_DATE").val();
var incactenddt = $("#ACTUAL_END_DATE").val();
var incplstrtdt = $("#PLANNED_START_DATE").val();
var incplenddt = $("#PLANNED_END_DATE").val();
var incesctyp = $("#ESCALATN_TYP").val();
75 | P a g e
var incstatus = $("#INCIDENT_STATUS").val();
if ($('#escalatebx').is(":checked")) {
if (incesctyp == 0) {
$("#error").text("Escalation Type is required");
return false;
}
return true;
}
if (inctitle == "") {
$("#error").text("Title is required");
return false;
}
else if (incdesc == "") {
$("#error").text("Description is required");
return false;
}
else if (incassignee == 0) {
$("#error").text("Employee is required");
return false;
}
else if (inctype == 0) {
$("#error").text("Type is required");
return false;
}
else if (incregion == 0) {
$("#error").text("Region is required");
return false;
}
else if (incactstrtdt == "") {
$("#error").text("ActualStart date is required");
return false;
}
else if (incactenddt == "") {
$("#error").text("ActualEnd date is required");
return false;
}
else if (incplstrtdt == "") {
$("#error").text("PlannedStart date is required");
76 | P a g e
return false;
}
else if (incplenddt == "") {
$("#error").text("PlannedEnd date is required");
return false;
}
else if (incstatus == 0) {
$("#error").text("Status is required");
return false;
}
else {
return true;
}
}
</script>
}
@{
var Cookie_Inf =
IMS.Controllers.cookieInfo.GetUserInfo(System.Web.HttpContext.Current.Request);
int usr_id =0;
int usr_role_typ=0;
string usr_token = "";
string usr_name = "";
if (Cookie_Inf.USR_ID > 0)
{
usr_id = Cookie_Inf.USR_ID;
usr_role_typ = Cookie_Inf.USR_ROLE_TYP;
usr_name = Cookie_Inf.USR_NAME;
}
else
{
Response.Redirect("~/User");
}
}
<!DOCTYPE html>
77 | P a g e
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title</title>
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
@*<link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css"
/>*@
<link href="@Url.Content("~/Content/dataTables.min.css")" rel="stylesheet" />
@*<link href="@Url.Content("~/Content/bootstrap-5.0.0-dist/css/bootstrap.min.css")"
rel="stylesheet" />*@
<link href="@Url.Content("~/Content/bootstrap-5.0.0-dist/css/bootstrap.min.css")"
rel="stylesheet" />
<script src="@Url.Content("~/Content/bootstrap-5.0.0-
dist/js/bootstrap.bundle.min.js")"></script>
<script src="@Url.Content("~/Scripts/Jquery-v3.5.1.js")"></script>
<script src="@Url.Content("~/Content/bootstrap-5.0.0-dist/js/bootstrap.min.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.dataTables.min.js")"></script>
</head>
<body>
<script>
function isValidEmail($email) {
var emailReg = /^([\w-\.]+@@([\w-]+\.)+[\w-]{2,4})?$/;
return emailReg.test($email);
}
</script>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<nav class="navbar navbar-dark bg-primary navbar-expand-lg" style="width:100%">
<div class="container-fluid">
<a class="navbar-brand" href="#">IMS</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-
target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle
navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
78 | P a g e
@*<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Home</a>
</li>*@
@if ((usr_role_typ == 3)|| (usr_role_typ == 5)|| (usr_role_typ == 6))
{
<li class="nav-item">
<a class="nav-link" href="../User/Index?typ=0">User</a>
</li> }
<li class="nav-item">
<a class="nav-link" href="../Incident/Index">Incident</a>
</li>
<li class="nav-item">
<a class="nav-link" href="../User/MyAccount">MyAccount</a>
</li>
@*<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" tabindex="-1" href="#" id="navbarDropdownMenuLink"
role="button" data-bs-toggle="dropdown" aria-expanded="false">
Hi, @usr_name
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a class="dropdown-item" href="../User/SignOut">SignOut</a></li>*@
@*<li><a class="dropdown-item" href="#">Another action</a></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>*@
@*</ul>
</li>*@
@*<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>*@
</ul>
<form action="../User/SignOut">
<spn>Hi, @usr_name</spn>
<input class="btn btn-primary" type="submit" value="SignOut" />
</form>
@*<button class="btn btn-outline-success" type="submit">SignOut</button>*@
@*<a class="dropdown-item" href="../User/SignOut">SignOut</a>*@
</div>
</div>
</nav>
79 | P a g e
@*<div class="navbar-header">*@
@*<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-
collapse">
<span class="icon-bar">test</span>
<span class="icon-bar">test2</span>
<span class="icon-bar">test3</span>
</button>*@
@*</div>*@
@*<div class="navbar-collapse collapse">
<ul class="nav navbar-nav" style="width:100%">
<li>@Html.ActionLink("IMS", "Index", "Incident", new { area = "" }, new { @class = "navbar-
brand" })</li>
@if (usr_role_typ == 3)
{
<li>@Html.ActionLink("User", "Index", "User", new { typ = 1 }, null)</li>*@
@*<li>@Html.ActionLink("Clients", "Index", "User", new { typ = 2 }, null)</li>*@
@*}
<li>@Html.ActionLink("Incident", "Index", "Incident")</li>
<li>@Html.ActionLink("MyAccount", "MyAccount", "User")</li>
<li style="margin-left:16%"><a href=""><i class="fa fa-sign-out"></i> Hi, @usr_name
</a></li>
<li style="margin-left:20%"><label style="color: white;margin-top: 15px;"> Hi,
@usr_name</label></li>
<li style="margin-left:38%"><a href="../User/SignOut"><i class="fa fa-sign-out"></i> Signout
</a></li>*@
@*<li>@Html.ActionLink("About", "About", "Home")</li>
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>*@
@*</ul>*@
</div>
</div>
</div>
<div class="container body-content">
@RenderBody()
<hr />
<footer style="">
<p>© @DateTime.Now.Year</p>
</footer>
</div>
80 | P a g e
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
</body>
</html>
My Account Page
@model IMS.Models.UserModel
@{
ViewBag.Title = "MyAccount";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>MyAccount</h2>
@if (Model != null)
{
var obj = Model.userDetail;
<div class="container" style="margin-top:3%">
<div class="body">
<div class="col-lg-12 col-md-12 col-sm-12 col-xm-12">
<div>
<span style="color: red; font-size: large; text-align: center;margin-left: 11%;"
id="error">@ViewBag.SuccessMsg</span>
<form method="post" style="margin-top:12px;" onsubmit="return Validation();" class="form"
action="../User/SaveMyAccount">
<table>
<input type="hidden" value="@obj.USR_ID" name="USR_ID" />
@if (obj.USR_ID > 0)
{
<tr colspan="2">
<td>
<label>ID</label>
</td>
<td>
<span>@obj.USER_CODE</span>
</td>
</tr>
}
81 | P a g e
<tr colspan="2">
<td>
<label>Name</label>
</td>
<td>
<input placeholder="Name" class="form-control" value="@obj.USR_NAME"
name="USR_NAME" type="text" id="USR_NAME" />
</td>
</tr>
<tr colspan="2">
<td class="col-md-6">
<label>Email Address</label>
</td>
<td class="col-md-6">
<input value="@obj.USR_EMAIL_ID" class="form-control" placeholder="Email Address"
name="USR_EMAIL_ID" type="text" id="USR_EMAIL_ID" />
<input type="hidden" value="@obj.USR_EMAIL_ID" id="oldemailid" />
</td>
</tr>
<tr colspan="2">
<td class="col-md-6">
<label>Password</label>
</td>
<td class="col-md-6">
<input value="@obj.USR_PWD" class="form-control" placeholder="Password"
name="USR_PWD" type="password" id="USR_PWD" />
</td>
</tr>
<tr colspan="2">
<td class="col-md-6">
<label>Confirm Password</label>
</td>
<td class="col-md-6">
<input value="@obj.USR_PWD" class="form-control" placeholder="Confirm Password"
name="CNFRM_USR_PWD" type="password" id="CNFRM_USR_PWD" />
</td>
</tr>
<tr colspan="2">
82 | P a g e
<td class="col-md-6">
<label>Phone Number</label>
</td>
<td class="col-md-6">
<input value="@obj.USR_PHONE_NO" class="form-control" placeholder="Phone Number"
name="USR_PHONE_NO" type="text" id="USR_PHONE_NO" />
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="submit" class="btn btn-primary" value="Save" />
<a class="btn btn-primary" href="../Incident/index" role="button">Cancel</a>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
<script>
function Validation() {
if (isEmailExists()) {
var usrname = $("#USR_NAME").val();
var emailid = $("#USR_EMAIL_ID").val();
var usrpwd = $("#USR_PWD").val();
var confrmpwd = $("#CNFRM_USR_PWD").val();
if (usrname == "") {
$("#error").text("Name is required");
return false;
}
else if (emailid == "") {
$("#error").text("EmailAddress is required");
return false;
}
else if (!(isValidEmail(emailid))) {
83 | P a g e
$("#error").text("EmailAddress is Invalid");
return false;
}
else if (usrpwd == "") {
$("#error").text("Password is required");
return false;
}
else if (confrmpwd == "") {
$("#error").text("Confirm Password is required");
return false;
}
else if (usrpwd != confrmpwd) {
$("#error").text("Password & Confirm password is not matching");
return false;
}
else {
return true;
}
}
}
function isEmailExists() {
var emailid = $("#USR_EMAIL_ID").val();
var oldemailid = $("#oldemailid").val();
if (emailid != oldemailid) {
try {
$.ajax({
url: '../User/IsUserExists',
type: 'POST',
contentType: 'application/json;',
dataType: "json",
data: JSON.stringify({ "emailid": emailid }),
success: function (data) {
if (data == false) {
$("#error").text("EmailAddress already exists");
return false;
}
else {
return true;
84 | P a g e
}
},
error: function (jqxhr, status, error) {
console.log("e :" + status + " " + error);
},
});
}
catch (e) {
console.log(e);
}
}
return true;
}
</script>
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Login</title>
</head>
<body class="text-center">
<style>
.myform {
margin-top: 12px;
max-width: 330px;
padding: 15px;
margin: auto;
}
</style>
<link href="/Content/bootstrap-5.0.0-dist/css/bootstrap.min.css" rel="stylesheet" />
85 | P a g e
<script src="/Scripts/jquery-3.4.1.min.js"></script>
<script src="/Content/bootstrap-5.0.0-dist/js/bootstrap.bundle.min.js"></script>
<div class="container" style="padding: 11%;">
<div class="row">
<div class="col-lg-12">
<div class="account-wall">
<section class="align-lg-center">
<div class="site-logo"></div>
<h1 class="login-title" style=""><span>SIMS</span></h1>
</section>
<div id="logindiv">
<span style="color: red; font-size: large; text-align: center;" id="error"></span>
<form method="post" style="" onsubmit="return Validation();" class="form myform"
action="../User/Login">
<div class="form-floating col-sm-5" style="width:100%">
<input type="email" name="USR_EMAIL_ID" style="width:100%" class="form-control"
id="emailid" placeholder="[email protected]">
<label for="emailid">Email address</label>
</div>
<div class="form-floating col-sm-5" style="width:100%">
<input type="password" name="USR_PWD" style="width:100%" class="form-control"
id="password" placeholder="Password">
<label for="password">Password</label>
</div>
<input class="mt-5 mb-3 btn btn-lg btn-primary" type="submit" value="Signin" />
<input class="mt-5 mb-3 btn btn-lg btn-primary" type="reset" value="Clear" />
<div>
<a href="#" onclick="return forgotpassword()">Forgot password?</a>
</div>
</form>
</div>
86 | P a g e
<div id="forgotpwddiv" style="display:none">
<form class="form myform">
<span style="color: red; font-size: large; text-align: center;" id="fgpwderror"></span>
<div class="form-floating col-sm-5" style="width:100%">
<input type="email" style="width:100%" class="form-control" id="forgotpwdemailid"
placeholder="[email protected]">
<label for="forgotpwdemailid">Email address</label>
</div>
<input class="mt-5 mb-3 btn btn-lg btn-primary" type="button" id="fgpwdbtn" onclick="return
sendforgotpwdlink()" value="Submit" />
<input class="mt-5 mb-3 btn btn-lg btn-primary" type="reset" value="Clear" />
<div>
<a href="#" onclick="return showlogin()">Login ?</a>
</div>
</form>
</div>
<div id="resetpwddiv" style="display:none">
<form class="form myform">
<span style="color: red; font-size: large; text-align: center;" id="resetpwderror"></span>
<input type="hidden" id="resetpwdemail" />
<div class="form-floating col-sm-5" style="width:100%">
<input type="password" style="width:100%" class="form-control" id="resetpwd"
placeholder="Password">
<label for="resetpwd">Password</label>
</div>
<div class="form-floating col-sm-5" style="width:100%">
<input type="password" style="width:100%" class="form-control" id="confirmpwd"
placeholder="Confirm Password">
<label for="confirmpwd">Confirm Password</label>
</div>
<input class="mt-5 mb-3 btn btn-lg btn-primary" type="button" id="fgpwdbtn" onclick="return
resetpassword()" value="Submit" />
<input class="mt-5 mb-3 btn btn-lg btn-primary" type="reset" value="Clear" />
87 | P a g e
<div>
<a href="#" onclick="return showlogin()">Login ?</a>
</div>
</form>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
debugger;
var exist = JSON.parse('null');
var email = JSON.parse('null');
$("#resetpwdemail").val(email);
if (exist == true) {
$("#logindiv").hide();
$("#forgotpwddiv").hide();
$("#resetpwddiv").show();
}
else {
$("#logindiv").show();
$("#forgotpwddiv").hide();
$("#resetpwddiv").hide();
}
});
function resetpassword() {
var pwd = $("#resetpwd").val();
var confirmpwd = $("#confirmpwd").val();
if (pwd == "") {
$("#resetpwderror").text("Password is required");;
return false;
88 | P a g e
}
else if (confirmpwd == "") {
$("#resetpwderror").text("Confirm Password is required");
return false;
}
else if (pwd != confirmpwd) {
$("#resetpwderror").text("Password does not match");
return false;
}
else {
try {
$.ajax({
url: '../User/Saveresetpassword',
type: 'POST',
contentType: 'application/json;',
dataType: "json",
data: JSON.stringify({ "emailid": $("#resetpwdemail").val(),"pwd": pwd }),
success: function (data) {
$("#error").css("color", "green").text("Password has been changed.Please login again..!");
$("#logindiv").show();
$("#forgotpwddiv").hide();
$("#resetpwddiv").hide();
},
error: function (jqxhr, status, error) {
console.log("e :" + status + " " + error);
},
});
}
catch (e) {
console.log(e);
}
}
89 | P a g e
}
function forgotpassword() {
$("#logindiv").hide();
$("#forgotpwddiv").show();
}
function sendforgotpwdlink() {
debugger;
var emailid = $("#forgotpwdemailid").val();
if (emailid == "") {
$("#fgpwderror").text("EmailAddress is required");
return false;
}
else if (!(isValidEmail(emailid))) {
$("#fgpwderror").text("EmailAddress is Invalid");
return false;
}
else {
$("#fgpwdbtn").prop('disabled', true);
try {
$.ajax({
url: '../User/Forgotpassword',
type: 'POST',
contentType: 'application/json;',
dataType: "json",
data: JSON.stringify({ "emailid": emailid }),
success: function (data) {
debugger;
if (data == false) {
$("#fgpwderror").text("EmailAddress not exists");
$("#fgpwdbtn").prop('disabled', false);
return false;
90 | P a g e
}
else {
$("#fgpwderror").css("color", "green").text("Password link has been sent.");
$("#fgpwdbtn").prop('disabled', false);
return true;
}
},
error: function (jqxhr, status, error) {
console.log("e :" + status + " " + error);
},
});
}
catch (e) {
console.log(e);
}
}
}
function showlogin() {
$("#logindiv").show();
$("#forgotpwddiv").hide();
$("#resetpwddiv").hide();
}
function Validation() {
var emailid = $("#emailid").val();
var pwd = $("#password").val();
if (emailid == "") {
$("#error").text("EmailAddress is required");
return false;
}
else if (!(isValidEmail(emailid))) {
$("#error").text("EmailAddress is Invalid");
91 | P a g e
return false;
}
else if (pwd == "") {
$("#error").text("Password is required");
return false;
}
else {
return true;
}
}
function isValidEmail($email) {
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
return emailReg.test($email);
}
</script>
</body>
</html>
@model IMS.Models.IncidentModel
@{
ViewBag.Title = "Report";
Layout = "~/Views/Shared/_Layout.cshtml";
}
@{
var Cookie_Inf =
IMS.Controllers.cookieInfo.GetUserInfo(System.Web.HttpContext.Current.Request);
int usr_id = 0;
int usr_role_typ = 0;
string usr_token = "";
92 | P a g e
if (Cookie_Inf.USR_ID > 0)
{
usr_id = Cookie_Inf.USR_ID;
usr_role_typ = Cookie_Inf.USR_ROLE_TYP;
usr_token = Cookie_Inf.USR_TOKEN;
}
else
{
Response.Redirect("~/User");
}
}
<style>
.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper
.dataTables_paginate .paginate_button.current:hover {
color: blue !important;
background: none;
border: none;
}
</style>
<script>
$(document).ready(function () {
$('#incidentdatatable').DataTable({
"pagingType": "simple"
});
$('.dataTables_length').addClass('bs-select');
});
</script>
<div class="col-md-12"><h2>Report</h2></div>
<div>
<div class="container" style="margin-top:3%">
<div class="body" style="background-color: aliceblue;">
<div class="col-lg-12 col-md-12 col-sm-12 col-xm-12">
<form method="post" class="form" action="../Incident/Report">
<table class="" style="margin-left: auto;">
<tr>
@if ((usr_role_typ != 1) && (usr_role_typ != 4) && (usr_role_typ != 2))
93 | P a g e
{
<td>
<label style="font-weight: bold">Employee</label>
</td>
<td>
<select id="INCIDENT_ASSIGNEE" class="form-select" name="INCIDENT_ASSIGNEE">
<option value="0">Select</option>
</select>
</td>
}
@if ((usr_role_typ != 2))
{
<td>
<label style="font-weight: bold">Client</label>
</td>
<td>
<select id="CLNT_ID" class="form-select" name="CLNT_ID">
<option value="0">Select</option>
</select>
</td>
}
<td>
<label style="font-weight: bold">Type</label>
</td>
<td>
<select id="INCIDENT_TYP" class="form-select" name="INCIDENT_TYP">
<option value="0">Select</option>
<option value="1">HR</option>
<option value="2">Admin</option>
<option value="3">Operations</option>
<option value="4">Compliance</option>
<option value="5">Accounts</option>
<option value="6">Others</option>
</select>
</td>
<td>
<label style="font-weight: bold">Start Date</label>
</td>
94 | P a g e
<td>
<input type="date" class="form-control" placeholder="StartDate" value=""
id="START_DATE" name="START_DATE">
</td>
<td>
<label style="font-weight: bold">End Date</label>
</td>
<td>
<input type="date" class="form-control" placeholder="EndDate" value="" id="END_DATE"
name="END_DATE">
</td>
</tr>
</table>
<div class="panel-tools fully color" align="right" data-toolscolor="#6CC3A0" style="margin-
top: 1%;margin-bottom: 2%;">
<input class="btn btn-primary" type="submit" value="GET" />
<input class="btn btn-primary" type="submit" value="CLEAR" />
</div>
</form>
</div>
</div>
</div>
<div class="container" style="margin-top:3%">
<div class="body">
<div class="col-lg-12 col-md-12 col-sm-12 col-xm-12">
<table id="incidentdatatable" class="table table-striped table-hover table-sm"
style="width:100%;">
<thead>
<tr>
<th scope="col">ID</th>
@*<th scope="col">Title</th>*@
@*<th>Desription</th>*@
<th scope="col">Type</th>
<th scope="col">Start date</th>
<th scope="col">End date</th>
@if (usr_role_typ != 2)
{
95 | P a g e
<th scope="col">Assignor</th>
<th scope="col">Employee</th>
<th scope="col">Client</th>
}
<th scope="col">Status</th>
@*<th scope="col"></th>*@
</tr>
</thead>
<tbody>
@foreach (var v in Model.allIncidentdetails)
{
<tr scope="row">
<td>@v.INCIDENT_CODE</td>
@*<td>@v.INCIDENT_TITLE</td>*@
@*<td>@v.INCIDENT_DESC</td>*@
<td>@v.INCIDENT_TYP_NAME</td>
<td>@v.ACTUAL_START_DATE.ToString("dd/MM/yyyy")</td>
<td>@v.ACTUAL_END_DATE.ToString("dd/MM/yyyy")</td>
@if (usr_role_typ != 2)
{
<td>@v.INCIDENT_ASSIGNOR_NAME</td>
<td>@v.INCIDENT_ASSIGNEE_NAME</td>
<td>@v.CLNT_NAME</td>
}
<td>@v.INCIDENT_STATUS_NAME</td>
@*<td><a href="../incident/[email protected]_ID" class="btn btn-
primary">Open</a></td>*@
</tr>
}
</tbody>
@*<tfoot>
<tr>
<th>Title</th>
<th>Desription</th>
<th>Region</th>
<th>Start date</th>
<th>End date</th>
<th>Status</th>
96 | P a g e
<th>Assignor</th>
<th>Assignee</th>
<th></th>
</tr>
</tfoot>*@
</table>
</div>
</div>
</div>
</div>
<script>
var table = $('#incidentdatatable').DataTable();
$('.dataTables_filter input').unbind().keyup(function (e) {
var value = $(this).val();
if (value.length > 3) {
table.search(value).draw();
} else {
//optional, reset the search if the phrase
//is less then 3 characters long
table.search('').draw();
}
});
$(document).ready(function () {
var usrlist = @Html.Raw(Json.Encode(Model.userlist));
var options = new Array();
var clntoptions = new Array();
$.each(usrlist, function (index, option) {
if ((option.USR_ROLE_TYP == 1) || (option.USR_ROLE_TYP == 4)) {
options.push('<option value="' + option.USR_ID + '">' + option.USR_NAME + '</option>');
}
if (option.USR_ROLE_TYP == 2) {
clntoptions.push('<option value="' + option.USR_ID + '">' + option.USR_NAME + '</option>')
}
});
$('#INCIDENT_ASSIGNEE').append(options);
$('#CLNT_ID').append(clntoptions);
});
97 | P a g e
//$(function () {
// var dtToday = new Date();
// var month = dtToday.getMonth() + 1;
// var day = dtToday.getDate();
// var year = dtToday.getFullYear();
// if (month < 10)
// month = '0' + month.toString();
// if (day < 10)
// day = '0' + day.toString();
// var maxDate = year + '-' + month + '-' + day;
// $('#START_DATE').attr('max', maxDate);
//});
</script>
@model IMS.Models.IncidentModel
@{
ViewBag.Title = "Invoice";
Layout = "~/Views/Shared/_Layout.cshtml";
}
@{
var Cookie_Inf =
IMS.Controllers.cookieInfo.GetUserInfo(System.Web.HttpContext.Current.Request);
int usr_id = 0;
int usr_role_typ = 0;
string usr_token = "";
if (Cookie_Inf.USR_ID > 0)
{
usr_id = Cookie_Inf.USR_ID;
usr_role_typ = Cookie_Inf.USR_ROLE_TYP;
usr_token = Cookie_Inf.USR_TOKEN;
}
else
{
Response.Redirect("~/User");
}
98 | P a g e
}
<style>
.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper
.dataTables_paginate .paginate_button.current:hover {
color: blue !important;
background: none;
border: none;
}
</style>
<script>
$(document).ready(function () {
$('#invoicedatatable').DataTable({
"pagingType": "simple"
});
$('.dataTables_length').addClass('bs-select');
});
</script>
<div class="col-md-12"><h2>Invoice</h2></div>
@if (usr_role_typ == 5 || usr_role_typ == 6)
{
<div class="panel-tools fully color" align="right" data-toolscolor="#6CC3A0" style="margin-
bottom: 2%;">
<a href="../Incident/InvManage?id=0" class="btn btn-primary">Add</a>
</div>
<div>
<table id="invoicedatatable" class="table table-striped table-hover table-sm"
style="width:100%;">
<thead>
<tr>
<th scope="col">InvoiceCode</th>
<th scope="col">IncidentCode</th>
<th scope="col">IncidentTitle</th>
<th scope="col">Client</th>
<th scope="col">Amount</th>
<th scope="col">InvoiceDate</th>
<th scope="col"></th>
<th scope="col"></th>
</tr>
99 | P a g e
</thead>
<tbody>
@foreach (var v in Model.allInvoicedetails)
{
<tr scope="row">
<td>@v.INVC_CODE</td>
<td>@v.INCIDENT_CODE</td>
<td>@v.INCIDENT_TITLE</td>
<td>@v.CLNT_NAME</td>
<td>@v.INVC_AMOUNT</td>
<td>@v.INVC_DATE.ToString("dd/MM/yyyy")</td>
<td><a href="../incident/[email protected]_ID" class="btn btn-
primary">Open</a></td>
<td><a href="../incident/[email protected]_ID" class="btn btn-primary">Send
Invoice</a></td>
</tr>
}
</tbody>
@*<tfoot>
<tr>
<th>Title</th>
<th>Desription</th>
<th>Region</th>
<th>Start date</th>
<th>End date</th>
<th>Status</th>
<th>Assignor</th>
<th>Assignee</th>
<th></th>
</tr>
</tfoot>*@
</table>
</div>
}
<script>
$(document).ready(function () {
var msg = JSON.parse('@Html.Raw(Json.Encode(TempData["emailmsg"]))');
if (msg != null) {
100 | P a g e
alert(msg);
}
});
var table = $('#invoicedatatable').DataTable();
}
catch (Exception EX)
{
throw EX;
}
return RedirectToAction("loginIndex", "User");
}
101 | P a g e
SCREEN SHOTS:
login page:
102 | P a g e
Incident Index Page:
103 | P a g e
User’s Creation Page :
104 | P a g e
User Modification Page:
105 | P a g e
Incident Creation Page :
106 | P a g e
Incident Modification Page:
107 | P a g e
My Account Page:
Invoice page:
108 | P a g e
Invoice Mailing Page:
109 | P a g e
Admin/Manager Report Page:
110 | P a g e
Employee Report Page:
111 | P a g e
Reset password Page:
112 | P a g e
SYSTEM TESTING
113 | P a g e
6.SYSTEM TESTING
6.1 IMPLEMENTATION
Testing is a set of activities that can be planned in advance and conducted systematically
testing requires that the developer discard preconceived notations of the correctness of the
software just developed and overcome a conflict of interest that occurs when errors are
encountered. Testing also provides the main objective of our project and understand the risk of
implementation. Testing is a process of investigation on the incident on behalf of clients,
managers and management, that is intended to reveal flow related information about the incident
with respect to the context in which it is intended to operate.
Testing is the process of executing a program or an application with an intent of finding an
error or bugs. Testing can be stated as the process of validating and verifying thata software
program/application/product.
Test Plan
Test plan will describe about the scope and activities of our modules in the project .We
must plan the test plans in the starting of our project. It will provide a unique identifier for our
document. Testing should begin in “small” and proceeds in the “large”.
Specify the goals/objectives/constraints. Our project has six modules. So, we will do testing
from the starting phase itself. We are preforming unit testing, integration testing and regression
testing.
114 | P a g e
6.1 UNIT TESTING:
Unit testing is used to test or verify the functionality of specific section of code. This is
written by the developers to ensure that specific function is working or not. A unit is the smallest
part of an application Unit tests are created by programmers or occasionally by whiteboxtesters
during the development process.
Integration testing (sometimes called Integration and Testing, abbreviated "I&T") is the
phase in software testing in which individual software modules are combined and tested as a
group. It occurs after unit testing and before validation testing. Integration testing takes as its
input modules that have been unit tested, groups them in larger aggregates, applies tests defined
in an integration test plan to those aggregates, and delivers as its output the integrated system
ready for system testing.
Integration testing is a type of software that seeks to verify the interface between
components. The components are integrated in an iterative way.Integration testing will allow the
interface to find the issues more quickly and fixed.It works to expose defects in the interfaces and
interaction between integrated components (Modules).
REGRESSION TESTING:
Regression testing is a type of testing where you can verify that the changes made in the
codebase do not impact the existing software functionality. For example, these code changes
could include adding new features, fixing bugs, or updating a current feature.
115 | P a g e
In other words, regression testing means re-executing test cases that have been cleared in
the past against the new version to ensure that the app’s functionalities are working correctly.
Moreover, regression testing is a series of tests and not a single test performed whenever you add
a new code.
If the user is just visiting our website, then he /she can access only the home page.
If the user has joined into our website they will be provided with an user email And using
that they can access their account.
If the user wants to take a test then they can login as user and select their incident and can
proceed to next step.
VALIDATION TESTING:
While verification is a quality control process, quality assurance process carried out before
the software is ready for release is known as validation testing. The validation testing goals is to
validate and be confident about the software product or system, that it fulfills the requirements
given by the client . The acceptance of the software from the end client is also a part of validation
testing. Validation testing answers the question, "Are you building the right software system".
Another question, which the entire process of validation testing in software engineering
answers is, "Is the deliverable fit for purpose".
116 | P a g e
In other words, does the software system provide the right solution to the problem.
Therefore, often the testing activities are introduced early in the software development life cycle.
The two major areas, when validation testing should take place are in the early stages of software
development and towards the end, when the product is ready for release. In other words, it is
acceptance testing which is a part of validation testing.
Acceptance testing, a testing technique performed to determine whether or not the software
system has met the requirement specifications. The main purpose of this test is to evaluate the
system's compliance with the business requirements and verify if it is has met the required criteria
for delivery to end users.
The following diagram explains the fitment of acceptance testing in the software
development life cycle.
117 | P a g e
FUTURE ENHANCEMENTS
• The main aim of our project is create a good interaction between the client and
management.
• We are trying to do the project at best level to satisfy all the end users
• In our future we are decided to provide more security to our websitewhich may not
be hacked.
118 | P a g e
CONCLUSION
119 | P a g e
7.CONCLUSION
This scheduled incident management system provides facility to manage the incidents
and client management relationship. It saves time to track the incident status and
details. Every users can have their own login credentials, so that they can create and
modify the incident at any time. It allows multiple users can login at the same time.
User management or manager can create and modify the user and then the created
user can login in their own account and also every user can have their own profile
page to edit the details by its own.
120 | P a g e
BIBLIOGRAPHY AND
REFERENCES
121 | P a g e
8. BIBLIOGRAPHY AND REFERENCES:
• http://ftp.fi.muni.cz/pub/bibliography/Misc/csharp.html
• www.w3schools.com › html/css
• https://stackoverflow.com/
• https://www.microsoft.com/en-in/sql-server/
122 | P a g e