Documente Academic
Documente Profesional
Documente Cultură
A REPORT
ON
DAK MANAGEMENT SYSTEM
AT
SOUTH CENTRAL RAILWAY, LALLAGUDA,
SECUNDERABAD.
An Internship Program-II Station.
HYDERABAD
JUNE-NOVEMBER 2018.
1
[Type text]
Index:
1. INTRODUCTION: …………………………………………………………………………...3
6. DESIGN: ……………………………………………………………………………………..19
9. SUMMARY: …………………………………………………………………………………70
2
[Type text]
1. Introduction:
DAK management system has ability to handle all Incoming and Outgoing
correspondences and also has in-built suitable security Measures and configurable
access control. It also track the inward / outward movement of the letters, files,
documents and circulars etc. within the various departments and units and also to
external parties associated with SCR.
This application is able to provide instant tracking of any letter which may be
incoming or outgoing, on the basis of various parameters like subject, date, section,
file number etc. with generating a unique reference number.
After receiving the receipt the action process starts. The process involves giving
remarks to the receipt received the action needed to be done and by whom. A
target date is given by the user who first receives the receipt. This process
continues till the letter is closed.
After the action part the letter is dispatched to concerned person. The person still
may have some queries so the process may continue.
3
[Type text]
1.4 FUCTIONALITY:
Create letter
Whenever a letter arrives with some query all the details are filled in the “New
message” and sent to the person in the ‘addressed to’ a column.
Action on letter
The person in the “addressed to” column receives the letter in his inbox and
decides how to solve the query.
Remarks
The person chooses the type of file and gives the remarks for it with the date of
remarks and decides whether to dispatch or not.
4
[Type text]
Type of letter
There are five types
Information: - No action needed just kept for information (record maintenance).
Forward: - Received letter is just forwarded to someone no further action needed.
Compliance: - Higher level officer asks for a reply from his subordinates.
Compliance + Reply: - When someone gives both compliance and reply then we
use this field.
Dispatch
After all the action part is done the letter is dispatched to the concerned person.
Tracking letter
The person to whom the letter is dispatched decides to close the letter or to re-send
the letter again.
5
[Type text]
2. Existing System:
Whenever any Letter arrives, it is noted in the register and a serial number is
generated manually, which is referred to as Unique ID. Generally the letter is
forwarded to some Officer or Section to carry out any necessary measures to be
taken and this forwarding process may occur many times for a particular letter.
During the above forwarding process many actions might have been taken, these
actions are tracked in the register by every officer involved in this process. After
the actions are carried out the received letter should be dispatched stating that
necessary actions have been taken. This is also recorded manually in a register by
the concerned officer. This system of maintaining the in and out flow of letters is
referred to as Dak Management System
6
[Type text]
Understanding the requirement for working on IIS Server and SQL Server.
Learning ASP .NET (Razor 3) Basics.
Establishing connection between Sql Server and ASP .NET (Razor 3).
Design a interface which clearly differentiates Receipt , Action and
Dispatch.
Understanding the concept of Action categories.
Design two applications for admin and Clients.
4. TECHNOLOGIES/LANGUAGES USED:
IIS EXPRESS
IIS Express, a lightweight (4.5–6.6 MB) version of IIS, is available as a standalone
freeware server and may be installed on Windows XP with Service Pack 3 and
subsequent versions of Microsoft Windows. IIS 7.5 Express supports only the
HTTP and HTTPS protocols. It is portable, stores its configuration on a per-user
basis, does not require administrative privileges and attempts to avoid conflicting
with existing web servers on the same machine. IIS Express can be downloaded
separately or as a part of Web matrix,or Visual Studio 2012 and later. (In Visual
Studio 2010 and earlier, web developers developing ASP.NET apps used
ASP.NET Development Server, codenamed "Cassini".)By default, IIS Express
only serves local traffic.
7
[Type text]
ASP.NET RAZOR 3
Razor is a markup syntax that lets you embed server-based code (Visual Basic and
C#) into web pages. Server-based code can create dynamic web content on the fly,
while a web page is written to the browser. When a web page is called, the server
executes the server-based code inside the page before it returns the page to the
browser. By running on the server, the code can perform complex tasks, like
accessing databases. Razor is based on ASP.NET, and designed for creating web
applications. It has the power of traditional ASP.NET markup, but it is easier to
use, and easier to learn.
HTML
HTML stands for Hyper Text Markup Language, which is the most widely used
language on Web to develop web pages. HTML was created by Berners-Lee in late
1991 but "HTML 2.0" was the first standard HTML specification which was
published in 1995. HTML 4.01 was a major version of HTML and it was published
in late 1999. Though HTML 4.01 version is widely used but currently we are
having HTML-5 version which is an extension to HTML 4.01, and this version
was published in 2012.
CSS
Cascading Style Sheets (CSS) is a style sheet language used for describing
the presentation of a document written in a markup language like HTML. CSS is a
cornerstone technology of the World Wide Web, alongside HTML and JavaScript.
CSS is designed to enable the separation of presentation and content,
including layout, colors, and fonts. This separation can improve
content accessibility, provide more flexibility and control in the specification of
presentation characteristics, enable multiple web pages to share formatting by
specifying the relevant CSS in a separate. Css file, and reduce complexity and
repetition in the structural content.
8
[Type text]
JAVASCRIPT
JavaScript often abbreviated as JS, is a high-level, interpreted programming
language. It is a language which is also characterized as dynamic, weakly
typed, prototype-based and multi-paradigm.
Alongside HTML and CSS, JavaScript is one of the three core technologies of
the World Wide Web. JavaScript enables interactive web pages and thus is an
essential part of web applications. The vast majority of websites use it, and all
major web browsers have a dedicated JavaScript engine to execute it.
As a multi-paradigm language, JavaScript supports event-driven, functional,
and imperative (including object-oriented and prototype-based) programming
styles. It has an API for working with text, arrays, dates, regular expressions, and
basic manipulation of the DOM, but the language itself does not include any I/O,
such as networking, storage, or graphics facilities, relying for these upon the host
environment in which it is embedded.
9
[Type text]
10
[Type text]
T-SQL
11
[Type text]
VISUAL STUDIO
You can use Visual Studio to write code in C++, C#, Visual Basic, JavaScript,
Typescript, Python, and more, but for the purpose of this overview. You can use
C# in Visual Studio by selecting the .NET Core workload during installation. If
you’ve already installed Visual Studio, you can add the .NET Core workload by
opening the Visual Studio Installer program on your computer and modifying your
installation.
When you open Visual Studio, there are a number of tool windows that let you
interact with your code:
The Properties pane gives additional information and context about selected parts
of your project.
The Output window displays debugging and error messages, compiler warnings,
status messages, and other output.
You can add additional tool windows by using the View menu at the top. For
example, the Bookmarks tool window lets you bookmark lines of code for quick
access. The layout of your tool windows is highly customizable you can add
additional windows, remove the ones you have open, and move them around to
best suit how you work.
12
[Type text]
Menus
At the top of the screen, you’ll see Visual Studio’s menus, which you’ll use to run
various commands.
The File menu contains commands to create, open, and save projects.
The Edit menu contains commands to search, modify, and refactor your code.
The View menu is where you go to open additional tool windows in Visual Studio.
The Project menu lets you add files and dependencies in your project.
The Debug menu contains commands to run your code and use debugger features.
The Tools menu contains commands to change your settings, add functionality to
Visual Studio via extensions, and access various Visual Studio tools.
Toolbar
The Visual Studio toolbar, shown below the menus, provides quick access to the
most common commands.
When you start writing code in Visual Studio, you begin with a project. A project
contains all of the information and files required to create and run a program.
The easiest way to start coding in Visual Studio is by creating a new project from a
template we’ll cover working with existing code in just a moment. Visual Studio
will generate a preconfigured project with recommended tools and settings. You
can create a new project by going to File? New? Project.
13
[Type text]
Use the selectors on the left to choose different types of languages or platforms to
work with.
For example, to create a basic C# project, such as for a “Hello World” application,
select the template Console App (.NET Core) under the Visual C# selector. Name
your project and specify its location, then click OK to create your project.
Besides creating a new project, you can also work with existing code in Visual
Studio using one of the following options:
If you have a code repository using Git, you can use the Team Explorer tool
window to clone your repository and begin working on it. Go to File ? Open ?
Open from Source Control, and make sure you’re in the Manage Connections
screen of the Team Explorer by clicking the green Manage Connections button at
the top of the tool window. Click Clone under Local Git Repositories, then enter
the URL of your git repo to clone your repository.
If you have an existing Visual Studio project, you can open it by going to File ?
Open ? Project/Solution.
For simple C++, C#, or Visual Basic programs that don’t have Visual Studio
project and solution files, you can automatically generate Visual Studio projects
for your code by using the project creation wizard at File ? Open ? Project From
Existing Code.
Opening a folder
If you just want to edit code for an existing project without using Visual Studio’s
project and build systems, you can open a folder through File ? Open ? Folder.
14
[Type text]
Though you won’t have the full support of Visual Studio’s project system, you’ll
be able to use syntax highlighting, navigate through your code, and debug for C++,
C#, Visual Basic, Node.js, and Python projects.
You can learn more about opening a folder on the Visual Studio blog and how to
use it for C++ on the Visual C++ blog.
You can use the arrow keys to select one of the suggestions. Pressing Tab will
insert the selected member.
Squiggles are wavy red lines that appear under potential errors in your code.
Hovering over a squiggle
gives you information about the error it indicates. A light bulb may appear next to
errors and offer quick fixes that Visual Studio can automatically apply.
You can view all errors and warnings in your solution by opening the Error List
through View ? Error List.
You can use Visual Studio to automatically format your code so that your code is
written consistently.
Along with manual code formatting, Visual Studio by default triggers formatting
on user gestures such as entering a new line and pasting code. You can change
15
[Type text]
when Visual Studio automatically formats your code for a given language by using
the options menu and searching for “Formatting”.
Sometimes you don’t get code right the first time – you can use Visual Studio to
rename variable or method names and intelligently update all references with the
new name. To use this feature, right click the variable or method, and select
Rename. Type in the new name and hit Enter to apply your changes.
A search box will appear at the top right of your code editor window – start typing
to search through your code.
By default, Go To will display any item in your solution that matches your search
term.
You can also filter your code search to specific element types by prefacing your
search term with certain characters or selecting one of the icons above the search
box.
Visual Studio’s debugger can help you find problems in your code efficiently.
The debugger lets you run your program and pause it before given lines of code are
run so that you can inspect what your program is doing.
When you’re debugging a program, it’ll pause at lines of code where you add a
breakpoint, which acts as a stop sign for your code. When your program runs into a
breakpoint and pauses, you’ll be able to inspect parts of your program to find
problems in that area of your code.
To set a breakpoint, click to the left of its line number so that a red dot appears.
To start debugging, run your code using the green play button in the toolbar or by
pressing F5.
16
[Type text]
Your program will run until it reaches the first breakpoint that it encounters.
When your program is paused, you can use features of the debugger to check the
values of variables in your code. This way, you can make sure that they’re storing
the values that you expect them to have.
You can use your mouse to hover over a variable in its code to see the current
value that it’s storing.
You can also use the Autos and Locals tool windows to inspect variables.
The Autos tool window shows the type and current value of variables used on the
current line or preceding line.
The Locals window shows variables that are currently in scope. When you’re
debugging, these windows appear in the bottom left of Visual Studio by default,
but you can reopen them using the Debug ? Windows menu.
When your code is paused in the debugger, you can walk through your code step
by step to see what happens when each statement is run. When you’re stepping
through your code, you’ll see a yellow arrow that shows the statement on which
the debugger paused. This statement is the next to be executed.
You can configure Visual Studio’s user interface, code formatting preferences, and
other settings through the options menu. Click Tools ? Options to get started.
When you’re done editing your preferences, press OK to apply them.
When you installed Visual Studio, you probably had the option to install different
workloads.
A workload is a bundle of tools within Visual Studio that helps you be productive
with certain languages or platforms.
For example, the Desktop development with C++ workload includes Visual Studio
features that let you run and debug C++ console applications and see suggestions
for your C++ code.
You can add or remove workloads after your initial installation of Visual Studio to
add support for additional
17
[Type text]
languages and tools. To do so, run the Visual Studio Installer again using the
Windows Start menu, then click Modify.
Besides the features that come with Visual Studio out of the box, Visual Studio
also contains an ecosystem of extensions that let you add extra functionality to
Visual Studio.
You can download and manage extensions by going to Tools ? Extensions and
Updates.
Click the Online tab on the left to view a list of the extensions available on the
Visual Studio Marketplace.
Visual Studio needs to restart to install extensions, so close all open Visual Studio
windows and reopen
18
[Type text]
DESIGN:
1) Admin (Clerk):-
a) Add User
19
[Type text]
b) Existing Users
2) USER
a) Login
20
[Type text]
b)Home
21
[Type text]
c) Forward
22
[Type text]
d)Dispatch
23
[Type text]
e) Receipt
24
[Type text]
f) TimeLine
25
[Type text]
Techniques Designed:
Post/Redirect/Get (PRG) :-
If a web user refreshes before the initial submission has completed because of
server lag, resulting in a duplicate POST request in certain user agents.
26
[Type text]
Bookmarks
User agents (such as browsers) store only the URI of an HTTP request as a
bookmark. Because of this, an HTTP POST request that results in a response based
on the body of the HTTP POST request cannot be bookmarked. By using the PRG
pattern, the URI of the request can safely be bookmarked by a web user.
Proxy Servers
Since redirects are using absolute URIs, one has to take care about proxy servers
(HTTP→HTTPS) and reverse proxy servers. If your application is such that a user
uses an SSL tunnel to reach your site, this can cause problems also. (You may be
able to use the Referer header to discover the domain and port the user is actually
entering.)
27
[Type text]
With web storage, web applications can store data locally within the user's
browser.
Unlike cookies, the storage limit is far larger (at least 5MB) and information is
never transferred to the server.
Web storage is per origin (per domain and protocol). All pages, from one origin,
can store and access the same data.
HTML web storage provides two objects for storing data on the client:
The localStorage object stores the data with no expiration date. The data will not
be deleted when the browser is closed, and will be available the next day, week, or
year.
Example:-
<!DOCTYPE html>
<html>
<body>
<div id="result"></div>
<script>
// Store
28
[Type text]
localStorage.setItem("lastname", "Smith");
// Retrieve
document.getElementById("result").innerHTML =
localStorage.getItem("lastname");
} else {
</script>
</body>
</html>
The sessionStorage object is equal to the localStorage object, except that it stores
the data for only one session. The data is deleted when the user closes the specific
browser tab.
Example:-
<!DOCTYPE html>
<html>
<head>
<script>
function clickCounter() {
if (sessionStorage.clickcount) {
sessionStorage.clickcount = Number(sessionStorage.clickcount)+1;
29
[Type text]
} else {
sessionStorage.clickcount = 1;
} else {
</script>
</head>
<body>
<div id="result"></div>
<p>Close the browser tab (or window), and try again, and the counter is reset.</p>
</body>
</html>
30
[Type text]
W3.CSS
W3.CSS can also speed up and simplify web development because it is easier to
learn, and easier to use than other CSS frameworks. W3.CSS is free to use. No
license is necessary.
TimeLine:-
Timeline is used to represent different stages in Action.
Example:-
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
*{
box-sizing: border-box;
}
body {
background-color: #474e5d;
font-family: Helvetica, sans-serif;
}
31
[Type text]
.timeline {
position: relative;
max-width: 1200px;
margin: 0 auto;
}
32
[Type text]
33
[Type text]
34
[Type text]
/* Full-width containers */
.container {
35
[Type text]
width: 100%;
padding-left: 70px;
padding-right: 25px;
}
36
[Type text]
<body>
<div class="timeline">
<div class="container left">
<div class="content">
<h2>2017</h2>
<p>Lorem ipsum dolor sit amet, quo ei simul congue exerci, ad nec admodum
perfecto mnesarchum, vim ea mazim fierent detracto. Ea quis iuvaret expetendis
his, te elit voluptua dignissim per, habeo iusto primis ea eam.</p>
</div>
</div>
<div class="container right">
<div class="content">
<h2>2016</h2>
<p>Lorem ipsum dolor sit amet, quo ei simul congue exerci, ad nec admodum
perfecto mnesarchum, vim ea mazim fierent detracto. Ea quis iuvaret expetendis
his, te elit voluptua dignissim per, habeo iusto primis ea eam.</p>
</div>
</div>
<div class="container left">
<div class="content">
<h2>2015</h2>
<p>Lorem ipsum dolor sit amet, quo ei simul congue exerci, ad nec admodum
perfecto mnesarchum, vim ea mazim fierent detracto. Ea quis iuvaret expetendis
his, te elit voluptua dignissim per, habeo iusto primis ea eam.</p>
</div>
</div>
37
[Type text]
</body></html>
38
[Type text]
Template Adapted:-
<!DOCTYPE html>
<html lang="en">
<title>W3.CSS Template</title>
<meta charset="UTF-8">
</style>
<body>
39
[Type text]
<div class="w3-container">
<p>Hello, i just wanted to let you know that i'll be home at...</p>
</div>
</a>
<div class="w3-container">
</div>
40
[Type text]
</a>
<div class="w3-container">
<p>Welcome!</p>
</div>
</a>
</div>
</nav>
<!-- Modal that pops up when you click on "New Message" -->
<span onclick="document.getElementById('id01').style.display='none'"
41
[Type text]
<h2>Send Mail</h2>
</div>
<div class="w3-panel">
<label>To</label>
<label>From</label>
<label>Subject</label>
<div class="w3-section">
</div>
</div>
</div>
</div>
42
[Type text]
<!-- Overlay effect when opening the side navigation on small screens -->
<br>
<hr>
43
[Type text]
<p>Hello, i just wanted to let you know that i'll be home at lorem ipsum dolor sit
amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
<br>
<hr>
44
[Type text]
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<p>Forever yours,<br>Jane</p>
</div>
<br>
<hr>
<p>Welcome.</p>
<p>That's it!</p>
</div>
</div>
45
[Type text]
<script>
openInbox.click();
function w3_open() {
document.getElementById("mySidebar").style.display = "block";
document.getElementById("myOverlay").style.display = "block";
function w3_close() {
document.getElementById("mySidebar").style.display = "none";
document.getElementById("myOverlay").style.display = "none";
function myFunc(id) {
var x = document.getElementById(id);
if (x.className.indexOf("w3-show") == -1) {
} else {
46
[Type text]
x.previousElementSibling.className =
openMail("Borge")
function openMail(personName) {
var i;
var x = document.getElementsByClassName("person");
x[i].style.display = "none";
x = document.getElementsByClassName("test");
document.getElementById(personName).style.display = "block";
</script>
47
[Type text]
<script>
openTab.click();
</script>
</body>
</html>
Link:-
https://www.w3schools.com/w3css/tryit.asp?filename=tryw3css_templates_mail&
stacked=h
48
[Type text]
Code Analysis:-
1) Admin Panel:-
Problem :-
Admin and User should have different applications. Whenever admin adds a
user, it should be get updated to User login details table.
Solution:-
Use same connection string for databases in two files. Update the web.config
file for this action to be taken place.
Code:-
a) Register.cshtml
<!DOCTYPE html>
<html>
<title>W3.CSS Template</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link href='https://fonts.googleapis.com/css?family=RobotoDraft' rel='stylesheet'
type='text/css'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/4.7.0/css/font-awesome.min.css">
<style>
html, body, h1, h2, h3, h4, h5 {
font-family: "RobotoDraft", "Roboto", sans-serif
}
.w3-bar-block .w3-bar-item {
padding: 16px
}
body, html {
height: 100%;
color: #0f0f0f;
line-height: 2.0;
}
49
[Type text]
.button {
background-color: white border: none;
color: white;
padding: 16px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
-webkit-transition-duration: 0.4s; /* Safari */
transition-duration: 0.4s;
cursor: pointer;
}
.button1 {
background-color: white;
color: black;
border: 2px solid #4CAF50;
}
.button1:hover {
background-color: grey;
color: white;
}
table {
margin-left: 150px;
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
tr:nth-child(even) {
background-color: #dddddd;
}
</style>
<body>
50
[Type text]
</div>
</a>
<a href="javascript:void(0)" class="w3-bar-item w3-button w3-border-bottom
test w3-hover-light-grey" onclick="openMail('Jane');w3_close();">
<div class="w3-container">
<img class="w3-round w3-margin-right" style="width:15%;"><span
class="w3-opacity w3-large" onclick=" show()">EXISTING USER</span>
</div>
</a>
</nav>
<!-- Modal that pops up when you click on "New Message" -->
<!-- Overlay effect when opening the side navigation on small screens -->
<div class="w3-overlay w3-hide-large w3-animate-opacity" onclick="w3_close()"
style="cursor:pointer" title="Close Sidemenu" id="myOverlay"></div>
<body>
51
[Type text]
</b>
</center>
<div>
<input class="w3-input w3-border" type="text"
placeholder="NAME*" required name="NAME" pattern="[A-Za-z0-9]{4,}">
</div> <br>
<div>
<input class="w3-input w3-border" type="text"
placeholder="DESIGNATION*" required name="DESIGNATION" pattern="[A-Za-z]{4,}">
</div> <br>
<div>
<input class="w3-input w3-border" type="text"
placeholder="DEPARTMENT* " required name="DEPARTMENT" pattern="[A-Za-z0-9/_-]{4,}">
</div> <br>
<div>
<div>
<input class="w3-input w3-border" type="text"
placeholder="USERNAME*" required name="USERNAME" pattern="[A-Za-z0-9.]{4,}">
</div> <br>
<div>
<input class="w3-input w3-border" type="password"
placeholder="PASSWORD*" required name="PASSWORD">
</div> <br>
</textarea></center> <br><br>
<center>
<button class="button button1">S U B M I T </button>
</center>
</form>
</div>
</div>
</div>
</div>
</div>
52
[Type text]
</div>
<script>
var openInbox = document.getElementById("myBtn");
openInbox.click();
function w3_open() {
document.getElementById("mySidebar").style.display = "block";
document.getElementById("myOverlay").style.display = "block";
}
function w3_close() {
document.getElementById("mySidebar").style.display = "none";
document.getElementById("myOverlay").style.display = "none";
}
function myFunc(id) {
var x = document.getElementById(id);
if (x.className.indexOf("w3-show") == -1) {
x.className += " w3-show";
x.previousElementSibling.className += " w3-red";
} else {
x.className = x.className.replace(" w3-show", "");
x.previousElementSibling.className =
x.previousElementSibling.className.replace(" w3-red", "");
}
}
openMail("Borge")
function openMail(personName) {
var i;
var x = document.getElementsByClassName("person");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
x = document.getElementsByClassName("test");
for (i = 0; i < x.length; i++) {
x[i].className = x[i].className.replace(" w3-light-grey", "");
}
document.getElementById(personName).style.display = "block";
event.currentTarget.className += " w3-light-grey";
}
</script>
<script>
var openTab = document.getElementById("firstTab");
openTab.click();
</script>
fuction show()
{
@{
try
53
[Type text]
{
var db = Database.Open("DAK_Data");
var selectQueryString = "SELECT * FROM User_details";
foreach (var row in db.Query(selectQueryString))
{
</table>
</div>
</div>
}
}
catch (Exception e)
{
}}
</body>
</html>
b) Login.cshtml
@{
try
{
string name = Request["Name"];
string designation = Request["Designation"];
string department = Request["Department"];
string username = Request["USERNAME"];
string password = Request["Password"];
bool b1 = string.IsNullOrEmpty(name);
var db = Database.Open("DAK_Data");
if (!b1)
{
54
[Type text]
}
catch (Exception e)
{
2) User Interface:-
Problem:-
Receipt , Action and Dispatch are the three kinds of mail and their interface may
create a trouble due to lot of information to be segregated.
Solution:-
Create a navigation tab for receipt’s inbox and outbox and to find out Action and
Dispatch we used a button to find it out.
Code:-
<nav class="w3-sidebar w3-bar-block w3-collapse w3-white w3-animate-left w3-card"
style="z-index:3;width:320px;" id="mySidebar">
<a href="javascript:void(0)"><img src="~/Images/logo.jpg"
style="width:100%;"></a>
@{
string Demo = Session["User"].ToString();
var db = Database.Open("DAK_Data");
var selectQueryString = "SELECT * FROM Receipt_Table WHERE [To]=\'" +
Demo + "\'";
foreach (var row in db.Query(selectQueryString))
{
55
[Type text]
</div>
@{
// string Demo = Session["User"].ToString();
//var db = Database.Open("DAK_Data");
var selectQueryString1 = "SELECT * FROM Receipt_Table WHERE [From]=\'" +
Demo + "\'";
foreach (var row in db.Query(selectQueryString1))
{
<a href="javascript:void(0)" class="w3-bar-item w3-button w3-border-
bottom test w3-hover-light-grey"
onclick="openMail('@row.Sent_time');w3_close('@row.receipt_id');" id="firstTab1">
<div class="w3-container">
</div>
</nav>
56
[Type text]
Problem :-
Form resubmission and duplicate values in table
Solution:-
PRG technique is used.
Code:-
<form method="post" enctype="multipart/form-data" action="~/Account/inserter.cshtml">
<input class="w3-input w3-border w3-margin-bottom" type="text"
placeholder="Write some tags" name="tags3" onkeypress="return noenter()">
</form>
57
[Type text]
Inserter.cshtml
@using System.Text.RegularExpressions;
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
@{
try
{
<p>@test</p>
bool b1 = string.IsNullOrEmpty(receiptID);
if (!b1)
{
var db = Database.Open("DAK_Data");
foreach (Match match in Regex.Matches(test, "\"([^\"]*)\""))
{
string to = match.ToString();
to = to.Replace("\"","");
var insertquery = "insert into Receipt_Table values(\'" + time +
"\',\'" + receiptID + "\',\'" + letternumber + "\',\'" + letterdate + "\',\'" +
fromofficer + "\',\'" + addressedto + "\',\'" + pdf + "\',\'" + subject + "\',\'" +
receivedfrom + "\',\'" + to + "\',\'" + From + "\')";
db.Query(insertquery);
}
58
[Type text]
Response.Redirect("Home.cshtml");
}
}
catch (Exception e)
{
<p>@e</p>
}
</body>
</html>
Problem:-
Send mail to multiple users at a time
Solution:-
Usage of tagify and tags for clear distinction
Code:-
<script data-name="advance-options">
(function () {
var input = document.querySelector('input[name=tags3]'),
tagify = new Tagify(input, {
delimiters: ",| ", // add new tags when a comma or a space character
suggestionsMinChars: 3,
maxTags: 6,
blacklist: ["fuck", "shit", "pussy"],
keepInvalidTags: true, // do not remove invalid tags (but keep them
marked as invalid)
whitelist: ["temple", "stun", "detective", "sign", "passion",
"routine", "deck", "discriminate", "relaxation", "fraud", "attractive", "soft",
"forecast", "point", "thank", "stage", "eliminate", "effective", "flood", "passive",
"skilled", "separation", "contact", "compromise", "reality", "district", "nationalist",
"leg", "porter", "conviction", "worker", "vegetable", "commerce", "conception",
"particle", "honor", "stick", "tail", "pumpkin", "core", "mouse", "egg", "population",
"unique", "behavior", "onion", "disaster", "cute", "pipe", "sock", "dialect", "horse",
"swear", "owner", "cope", "global", "improvement", "artist", "shed", "constant", "bond",
"brink", "shower", "spot", "inject", "bowel", "homosexual", "trust", "exclude", "tough",
"sickness", "prevalence", "sister", "resolution", "cattle", "cultural", "innocent",
"burial", "bundle", "thaw", "respectable", "thirsty", "exposure", "team", "creed",
"facade", "calendar", "filter", "utter", "dominate", "predator", "discover", "theorist",
"hospitality", "damage", "woman", "rub", "crop", "unpleasant", "halt", "inch",
"birthday", "lack", "throne", "maximum", "pause", "digress", "fossil", "policy",
"instrument", "trunk", "frame", "measure", "hall", "support", "convenience", "house",
"partnership", "inspector", "looting", "ranch", "asset", "rally", "explicit", "leak",
59
[Type text]
function transformaTag(value) {
if (value == 'shit')
return 's✲✲t';
}
})()
</script>
60
[Type text]
Problem:-
Tracker needs a clear interface , but number of stages in it are not constant.
Solution:-
Usage of even odd rule and set each stage on either side of a line like a chat bubble.
Code:-
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
* {
box-sizing: border-box;
}
body {
background-color: #474e5d;
font-family: Helvetica, sans-serif;
}
61
[Type text]
background-color: white;
border: 4px solid #FF9F55;
top: 15px;
border-radius: 50%;
z-index: 1;
}
62
[Type text]
{
left: 31px;
}
/* Full-width containers */
.container {
width: 100%;
padding-left: 70px;
padding-right: 25px;
}
@{
var db = Database.Open("DAK_Data");
string rid = Request["id"];
// int[] uid ;
var list = new List<int>();
var list1 = new List<string>();
var list2 = new List<string>();
var list3 = new List<string>();
var list4 = new List<string>();
var list5 = new List<string>();
var list6 = new List<string>();
var list7 = new List<string>();
var list8 = new List<string>();
int i = 0;
63
[Type text]
list1.Add(row.receiptID);
list2.Add(row.stage);
list3.Add(row.remarks);
list4.Add(row.dremarks.ToString("yyyyMMdd"));
list5.Add(row.sectionname);
list6.Add(row.addressedto);
list7.Add(row.action);
list8.Add(row.time.ToString("yyyyMMdd"));
//uid[i] = row.uid;
list.Add(row.uid);
i++;
}
if (j % 2 == 0)
{
<div class="timeline">
<div class="container left">
<div class="content">
<h2>@receiptID[j]</h2>
<p>@stage[j]</p>
<p>@remarks[j]</p>
<p>@dremarks[j]</p>
<p>@action[j]</p>
<button onclick="forward_form('@receiptID[j]')">Take
Action</button>
</div>
</div>
</div>
}
else
{
<div class="timeline">
<div class="container right">
<div class="content">
<h2>@receiptID[j]</h2>
<p>@stage[j]</p>
<p>@remarks[j]</p>
<p>@dremarks[j]</p>
<p>@action[j]</p>
64
[Type text]
<button onclick="forward_form('@receiptID[j]')">Take
Action</button>
</div>
</div>
</div>
}
}
catch (Exception e)
{
<h1>@j</h1>
}
<script>
function forward_form(id) {
sessionStorage.setItem("rid", id);
</script>
</body>
</html>
Problem:-
Receipt ID should be auto populated in action form.
Solution:-
Usage of session variables and read only
Code:-
@{
if (IsPost)
{
65
[Type text]
var db = Database.Open("DAK_Data");
var insertquery = "insert into Action values(\'" + receiptID + "\',\'" +
stage1 + "\',\'" + remarks1 + "\',\'" + dremarks1 + "\',\'" + sectionname + "\',\'" +
addressedto + "\',\'" + action + "\',\'" + time + "\')";
db.Query(insertquery);
Session["id"] = receiptID;
Response.Redirect("forward_inserter.cshtml");
}
else
{
<div class="w3-content w3-container w3-padding-64" id="contact">
<form method="post">
<script>
var d = new Date();
document.getElementById("demo").innerHTML
= d;
</script>
</b>
</center>
<div>
<div>
<input class="w3-input w3-border" type="text"
placeholder="Stage 1" name="Stage" pattern="[A-Za-z]{4,}">
</div> <br>
<div>
<input class="w3-input w3-border" type="text"
placeholder="Satge 1 Remarks " name="Stage_Remarks" pattern="[A-Za-z]{4,}">
66
[Type text]
</div> <br>
<div>
<div>
<input class="w3-input w3-border" type="date"
placeholder="Date Of Remarks1" name="Date_Of_Remarks" pattern="[0-9]{2}[-]{1}[0-9]{2}[-
]{1}[0-9]{4}">
</div> <br>
<div>
<input class="w3-input w3-border"
type="text" placeholder="Section name " name="Section name" pattern="[A-Za-z]{4,}">
</div> <br>
<div>
<input class="w3-input w3-border"
type="text" placeholder="address to" name="Addressed to" pattern="[A-Za-z]{4,}">
</div> <br>
<div>
<p>Action Type</p><center>
<select name="Action">
<option
value="Information">Information</option>
<option
value="Forward">Forward</option>
<option
value="Reply">Reply</option>
<option
value="Compliance">Compliance</option>
<option value="Reply +
Compliance">Reply + Compliance</option>
</select>
<br><br>
<center>
<button class="button button1">S
U B M I T </button>
</center>
</form>
</div>
}
}
67
[Type text]
<script>
document.getElementsByName("Receipt")[0].value = sessionStorage.getItem("rid");
</script>
Problem:-
No clear difference between read and unread messages.
Solution:-
Create a column read/unread with true and false values in it.
Code:-
@{
var db = Database.Open("DAK_Data");
string rid = Request["id"];
var updateRead = "Update Receipt_Table set [read]=\'true\' where [receipt_id]=\'"
+ rid + "\'";
db.Query(updateRead);
Response.Redirect("home.cshtml");
}
Problem:-
If we have many mails , it will be difficult to search the required letter in it.
Solution:-
Create a search functionality using letter number.
Code:-
@{
if (IsPost)
{
string search = Request["search"];
Session["search"] = search;
Response.Redirect("Search.cshtml");
}
else
{
<form method="post">
<input type="text" name="search" placeholder="Search..">
<button>submit</button>
<!---<input type="button" name="submit" value="submit" onclick="rs()" />-
->
</form>
}
68
[Type text]
Problem :-
Unable to download file using href
Solution:-
Using base64 encoding
Code:-
HttpPostedFileBase file = Request.Files["File"];
69
[Type text]
9. Summary:
Functions of clerk/admin
1. Physically receives the letter and fills all the details in the receipt page.
2. Sends the receipt to the person in the addressed to column.
3. Can send the receipt to multiple persons.
4. Can add more names in received from in receipt form.
5. Can track the letter.
6. Can search the sent letter.
Functions of a user
70
[Type text]
10. Biblography:
https://www.w3schools.com/w3css/tryit.asp?filename=tryw3css_templates_mail&stacked=h
https://www.w3schools.com/asp/webpages_razor.asp
https://www.w3schools.com/asp/webpages_forms.asp
https://en.wikipedia.org/wiki/Microsoft_Visual_Studio
71