45
A Project Report On TOS Solution Manager Website Submitted in partial fulfillment of the requirements for the award of the degree of Bachelor of Technology in Computer Science & Engineering Under the supervision of- Mr. Subal Mitra IT Executive ADANI ® LOGISTICS LTD. Submitted by - SOUHAM BISWAS Enrollment Number – 11AU/1103 July, 2013 J.K INSTITUTE OF APPLIED PHYSICS AND TECHNOLOGY, UNIVERSITY OF ALLAHABAD, ALLAHABAD

2nd year Summer Training Report

Embed Size (px)

Citation preview

Page 1: 2nd year Summer Training Report

A Project ReportOn

TOS Solution Manager WebsiteSubmitted in partial fulfillment of the requirements for the award of

the degree of

Bachelor of Technologyin

Computer Science & Engineering

Under the supervision of-Mr. Subal MitraIT Executive

ADANI®

LOGISTICS LTD.

Submitted by -SOUHAM BISWAS

Enrollment Number – 11AU/1103

July, 2013

J.K INSTITUTE OF APPLIED PHYSICS AND TECHNOLOGY,UNIVERSITY OF ALLAHABAD, ALLAHABAD

Page 2: 2nd year Summer Training Report

Index

Contents

1. Company Profile

2. Project Introduction

i. Existing System

ii. Proposed System

iii. Feasibility Study

3. System Analysis

i. System Requirements Specification

4. System Design

i. Screen Layouts

5. Code

6. Testing & Quality Assurance

7. Implementation

8. Maintenance

9. Conclusions and Future Scope

10. Bibliography/References

Page 3: 2nd year Summer Training Report

Company Profile

The Adani Group (BSE: 512599) is a global integrated infrastructure player with businesses in Resources, Logistics and Energy sectors. The Adani group has interests in agribusiness too. It owns Fortune India’s largest edible oil brand through a joint venture with Willmar in Singapore.

The Flagship Company of the Adani group is Adani Enterprises Limited. Adani is an Indian conglomerate, having its footprint across the world. First generation entrepreneur Mr. Gautam Adani is the founder & chairman of Adani Group. The corporate headquarters of the company is situated in the city of Ahmedabad, India.

The corporate headquarters of the company are in the city of Ahmedabad, India.

The various companies under the group are:• Adani Gas Limited• Adani Enterprises• Adani Power• Adani Wilmar• Adani Mining• Gujarat Adani Port• Adani Ports & SEZ Limited• Adani Agri Logistics• Adani Agri Fresh• Adani Properties• Adani Welspun• Adani Logistics Limited

Page 4: 2nd year Summer Training Report

Adani Logistics Ltd. (ALL) -

Adani Logistics Limited (ALL) provides integrated logistics solutions for movement of commodities. Towards its mission, Adani has secured an all-India license to manage container train operations on Indian Railways. In order to provide pan-India multi-modal-logistics services, Adani Logistics Limited, has developed the facilities for movement of goods in containers by train, road and sea. ALL is also developing logistics parks for providing various ground facilities, including aggregation, warehousing, holding, inspection, custom bonding, stuffing/de-stuffing of Export import (EXIM) and Domestic cargo, and loading/unloading onto railway wagons.

Adani Logistics offers comprehensive end to end logistics solutions for handling a wide range of cargo including containers, break bulk dry and liquid cargo, perishables and project cargo, in the form of full train load, full container load and less than container load. ALL is already operating regular train services from Rajasthan and National Capital Region to Mundra and JNPT(Mumbai) by deploying the fleet of six rakes.

ALL encourages other train operators to commence their operations from Adani Logistics Parks (ALP) to improve frequency of service to gateway ports and in turn facilitate EXIM trade.

Page 5: 2nd year Summer Training Report

Project IntroductionThe project focuses on performing upgradation work on the existing website handling Issue tracking activities, used by all the Adani® functional units accross India.

Existing System -The websites are developed in ASP .NET with the original website developed in Visual Basic .NET.The website is linked to a back-end centralized Oracle Database Server, which maintains all data pertaining to the website. The website provides an interface between users facing specific issues, and the people who are capable of resolving them.

Company employees can login using their user-ids, and may choose to enter an issue they are facing into the system, or choose to tend to the problems faced by someone else. The user logging in an issue, has the option to direct it to a specific person who might resolve it.The website also provides functionality to upload files pertaining to any issue and the user can also choose to send a given issue-resolving employee a system-generated e-mail containing the details of the problem.

Proposed System -The upgradation work involved porting the entire website from VB.NET to C#.NET, coupled with complete redesign of the User Interface and server-side code optimizations.

The implementation of code-optimizations resulted in a more than 50% reduction of the size of the server-side Code-behind files, and has also improved the performance by modularisation and algorithmic tweaks introduced in the code.

Page 6: 2nd year Summer Training Report

Feasability Study-The optimizations introduced in the system increase the speed and well as reduce the memory utilised while processing user-requests. Moreover, they also reduce the depency of the website on a constant connection to the central database, hence reducing server load, while at the same time, reducing the risk of information snooping by minimizing the active database connection time.

The new user-interface also provides a lively look and feel as compared to the old one. The new system is more efficient in terms of speed and at the same time more aesthetically appealing, hence undoubtedly making it much more feasable than the older system.

Page 7: 2nd year Summer Training Report

System Analysis

System Requirements Specification-

1. General Requirements-

1.1 Usage Scenario-This website will exclusively tend to the needs of the employees of Adani Corporation. Users should be able to login to the system from multiple branches accross the places of operation of the company, and log the problems they are facing into the system.

Employees logging in problems should have the option to direct their issues to specific persons to tend to their problems. Also, the website should provide the means to send a system generated email describing the problem to the person in concern, alongwith providing the means to upload files to the system to describe the problem more vividly.

1.2 Operational Requirements-The interface should provide means to perform all the CRUD (Creation, Updation, Deletion) operations on the database while maintaining operational consistency.The data with which the database operations will be dealing with, will primarily be of the type VARCHAR.

The main dashboard page of the site should be having bookmark links pointing to the set of issues which are related to the user currently logged in.

Page 8: 2nd year Summer Training Report

1.2.1. Database Interfacing-1.2.1.1. All functions relating to performing CRUD

operations on the database should be abstracted from the rest of the website code, and be encapsulated within one class (“DBConnect”) inside a namespace (“Issuetracker”) whose reference shall be added to all the codefiles interacting with the database.

1.2.1.2. The system will be using the System.Oledb assembly for performing Database operations.

2. Client and Server Requirements-

2.1 Client2.1.1. Software -

Any Internet browser, which supports ASP.NET.

2.1.2. Hardware - A system which can fluidly run any internet browser, and a minimum connection speed of 256Kbps.

2.2 Server2.2.1. Software -

Windows Server 2003 64-bit Operating System, Oracle 10g as the back-end Database

2.2.2. Hardware - A minimum RAM space of 8GB, with 2Ghz Intel Xeon Processor.

Page 9: 2nd year Summer Training Report

System Design

Screen Layouts -1. Login Page (default.aspx)-

2. TOS Solution Manager HomePage (reporthome.aspx)- default->reporthome

Page 10: 2nd year Summer Training Report

3. Dashboard (SolutionMgr.aspx)- default->reporthome->SolutionMgr(Dashboard link)

4. Add New Issue Page (AddNewIssue.aspx)- default->reporthome->SolutionMgr->AddNewIssue(Add New Issue link under DataGrid)

Page 11: 2nd year Summer Training Report

5. Response Page (Response.aspx)- default->reporthome->SolutionMgr->Response(Links on the DataGrid)

6. Context Switch Page (SwitchContext.aspx)- default->reporthome->SwitchContext(top right “plus” shaped ImageButton)

Page 12: 2nd year Summer Training Report

7. TOS Task Manager HomePage (reporthome.aspx)- default->reporthome->SwitchContext->reporthome(taskmanager)

Page 13: 2nd year Summer Training Report

Code

Provided below are the .aspx markup files alongwith their code-behind files-

Issuetracker Assembly (DBConnect.cs)-using System;using System.Data;using System.Data.OleDb;using System.Web.UI.WebControls;using System.Net.Mail;

namespace IssueTracker{ public class DBConnect { public static string connectionString = "Data Source=tt;Persist Security Info=True;User ID=roroapp ;Password=roroapp;Unicode=True;provider=MSDAORA"; public static OleDbConnection con1 { get; set; } public static string userRealName{ get; set; } public static string uploadPath { get { return "\\Uploads\\"; } } public static int currentPage { get; set; }

public DBConnect() { con1 = new OleDbConnection(connectionString); }

public static void sendEmail(string fromMailId, string toMailid, string mailSubject, string mailMessage, string mailServer, int mailPort) { MailMessage objMailMessage = new MailMessage(fromMailId, toMailid, mailSubject, mailMessage); objMailMessage.IsBodyHtml = true; SmtpClient objsmtpclient = new SmtpClient(mailServer, mailPort); objsmtpclient.UseDefaultCredentials = true; objsmtpclient.Send(objMailMessage); }

public static void DropDownBind(DropDownList dl, string query) //Performs DataBinding on DropDown List 'dl' { DataTable dt = new DataTable(); executeCommand(query, ref dt); dl.DataSource = dt; dl.DataTextField = dt.Columns[0].ToString(); dl.DataValueField = dt.Columns[1].ToString(); dl.DataBind(); }

public static bool OpenConnection() { try { con1.Open(); return true; } catch (Exception e) { return false; } }

Page 14: 2nd year Summer Training Report

public static void CloseConnection() { try { con1.Close(); } catch (Exception e) { } }

public static OleDbDataAdapter performDataAction(string query) { OleDbCommand cmd = new OleDbCommand(query, con1); OleDbDataAdapter da = new OleDbDataAdapter(cmd); return da; }

public static void executeCommand(string query, ref DataTable dt) { dt = new DataTable(); if (OpenConnection()) { try { performDataAction(query).Fill(dt); } catch (Exception e) { } CloseConnection(); } }

public static void executeCommand(string query) { if (OpenConnection()) { try { performDataAction(query); } catch (Exception e) { } CloseConnection(); } }

public static void executeModCommand(string query) { if (OpenConnection()) { OleDbCommand command = new OleDbCommand(); command.Connection = con1; command.CommandText = query; command.ExecuteNonQuery(); CloseConnection(); } } }}

Default.aspx-<%@ Page Title="Login Page" Language="C#" AutoEventWireup="false" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<form id="form1" runat="server">

<div>

Page 15: 2nd year Summer Training Report

<p align="center"> <strong><span style="color: #5D7B9D" dir="rtl">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<asp:Image ID="Image1" runat="server" Height="46px" ImageUrl="~/Images/AdaniLogo2.gif" Width="155px" ImageAlign="Middle" />&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; </span></strong> </td> </tr> </p> <p align="center" style="font-family: Georgia; font-size: 17px; color: #000080; background-color: #CCFFCC;"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TOS SOLUTION MANAGER LOGIN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p></div>

<div style="height: 545px; background-color: #CCCCFF;" align="center"> &nbsp;<br /> <br /> <br /> <asp:Login ID="Login1" onauthenticate="Login1_Authenticate" runat="server" BackColor="#9999FF" align="center" Font-Names="Calibri" Font-Size="Medium" BorderPadding="1" ForeColor="#333F33" Height="161px" BorderColor="#9966FF" BorderStyle="None" Font-Bold="False" Width="291px"> <TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" Font-Size="0.9em" /> <TextBoxStyle Font-Size="0.8em" BorderStyle="Solid" BorderWidth="1px" /> <LabelStyle ForeColor="#CC6600" /> <LoginButtonStyle BackColor="#7A96DF" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="White" Font-Bold="True" /> <CheckBoxStyle BackColor="#E2BCFA" /> <InstructionTextStyle Font-Italic="True" ForeColor="Black" /> </asp:Login> <br /> <asp:Label ID="Label1" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label> <br /> <br /> <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Image ID="Image3" runat="server" Height="126px" ImageUrl="~/Images/AdaniPortal.JPG" Width="443px" /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /> <br /> <br /> <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /> <br /> <br /></div>

Page 16: 2nd year Summer Training Report

</form>

Default.aspx.cs-using System.Data;using System.Web.UI.WebControls;using IssueTracker;

public partial class _Default : System.Web.UI.Page{ public static DBConnect connectionObj = new DBConnect(); //public static string user1, username1, uid1, email1, fromemail1, toemail1, security1, allow_upload1, default_task1;

protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { string sql = "Select USER_ID,USER_NAME,LOGIN,PASS,EMAIL,SECURITY_LEVEL,ALLOW_UPLOAD,DEFAULT_TASK From roroapp.userinfo where UPPER(LOGIN)='" + Login1.UserName.ToString().ToUpper() + "' and PASS='" + Login1.Password.ToString() + "' and DEFAULT_TASK is not null "; DataTable dt = new DataTable(); DBConnect.executeCommand(sql, ref dt); if (dt.Rows.Count > 0) { Session["name"] = Login1.UserName.ToString(); DBConnect.userRealName = dt.Rows[0][1].ToString(); Session["uid"] = dt.Rows[0][0].ToString(); Session["email"] = dt.Rows[0][4].ToString(); Session["security"] = dt.Rows[0][5].ToString(); Session["allow_upload"] = dt.Rows[0][6].ToString(); Session["default_task"] = dt.Rows[0][7].ToString(); onLoginAction(); } else Label1.Text = "Wrong Username/Password"; }

private void onLoginAction() { Response.Redirect("reporthome.aspx"); }}

reporthome.aspx-<%@ Page Language="C#" AutoEventWireup="true" CodeFile="reporthome.aspx.cs" Inherits="reporthome" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<form id="form1" runat="server"> <div align="left" style="height: 76px"> <asp:Image ID="Image2" runat="server" ImageAlign="Right" ImageUrl="~/Images/ITSFinalWhite.png" Height="63px" Width="71px" /> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <asp:Image ID="Image1" runat="server" Height="31px" ImageUrl="~/Images/AdaniLogo2.gif" Width="90px" /> <br /> <asp:Label ID="Label25" runat="server" Font-Bold="True" Font-Names="Bell MT" Text="TOS Solution Manager" Width="178px"></asp:Label>

Page 17: 2nd year Summer Training Report

<br /> <br /> </div> <div style="height: 27px" align="right"> <asp:Label ID="CornerLabel" runat="server" Font-Names="Arial"></asp:Label> </div> <div align="right"> <asp:ImageButton ID="ImageButton3" runat="server" Height="20px" ImageUrl="~/Images/tabswitch.jpg" onclick="ImageButton3_Click" Visible="False" Width="16px" /> <asp:ImageButton ID="ImageButton2" runat="server" Height="19px" ImageUrl="~/Images/signout.jpg" onclick="ImageButton2_Click" Width="16px" /> <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/home.jpg" onclick="ImageButton1_Click" /> </div> <div style="background-color: #CCCCFF; height: 552px;" align="right"> </br> </br> </br> </br> <table align="right" cellpadding="0" cellspacing="0" style="position: static; width: 18%; height: 88px; background-image: url(Images/HeaderBg.gif); font-family: Calibri;" id="TABLE1" onclick="return TABLE1_onclick()"> <tr bgcolor="#f5f5f5"> <td colspan="2" style="font-weight: bold; font-size: small; width: 1277px; color: white; font-family: Verdana; height: 11px; background-image: url(Images/HeaderBg.gif);" align="center"> HOME</td> </tr> <tr bgcolor="#f5f5f5"> <td colspan="2" style="font-weight: bold; font-size: small; width: 1277px; color: #5d7b9d; font-family: Verdana"> <asp:DataGrid ID="GridView1" runat="server" Font-Names="Calibri" Font-Size="Small" HorizontalAlign="Center" Style="position: static" width="97%" AutoGenerateColumns="False" Height="80px" ShowHeader="False" BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" GridLines="None" Visible="False" Font-Bold="True"> <Columns> <asp:TemplateColumn> <ItemTemplate> <asp:Image ID="IMG1" runat="server" ImageUrl="~/Images/arrow-next.gif"/> <asp:HyperLink ID="Link1" runat="server" ToolTip='<%# Eval("description") %>' Font-Names="Tahoma" Text='<%# Eval("page_name") %>' NavigateUrl ='<%# Eval("URL") %>' Font-Size="Small" > </asp:HyperLink> </ItemTemplate> </asp:TemplateColumn> </Columns> <FooterStyle BackColor="#C6C3C6" ForeColor="Black" /> <SelectedItemStyle BackColor="#9471DE" Font-Bold="False" ForeColor="White" /> <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" /> <ItemStyle BackColor="#DEDFDE" ForeColor="Black" /> <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" /> </asp:DataGrid></td> </tr> </table>

Page 18: 2nd year Summer Training Report

<br /> </div> </form></html>

reporthome.aspx.cs-using System;using System.Data;using System.Web.UI;using IssueTracker;

public partial class reporthome : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { CornerLabel.Text = "Welcome " + DBConnect.userRealName + "!"; if (Convert.ToInt32(Session["default_task"]) != 1) Label25.Text = "TOS Task Manager"; int value = Convert.ToInt32(Session["switch"]); string sql; if ((value == 1) || (value == 2)) { Label25.Text = "TOS " + Session["switch_name"].ToString(); sql = "select r.role_id,ri.page_id,p.page_name,p.description,p.url from roles r,roleinfo ri,pages p where r.role_id =ri.role_id and ri.page_id=p.page_id and user_id='" + Session["uid"] + "' and p.tab_id='" + Session["switch"] + "'"; } else sql = "select r.role_id,ri.page_id,p.page_name,p.description,p.url from roles r,roleinfo ri,pages p where r.role_id =ri.role_id and ri.page_id=p.page_id and user_id='" + Session["uid"] + "' and p.tab_id='" + Session["default_task"] + "'"; DataTable dt = new DataTable(); DBConnect.executeCommand(sql, ref dt); GridView1.DataSource = dt; GridView1.DataBind(); if (GridView1.Items.Count > 0) GridView1.Visible = true; DBConnect.executeCommand("select distinct i.tab_id from roles r,roleinfo i where r.role_id=i.role_id and user_id='" + Session["uid"] + "' ", ref dt); if (dt.Rows.Count > 1) ImageButton3.Visible = true; }

protected void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Response.Redirect("reporthome.aspx"); }

protected void ImageButton2_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Response.Redirect("logout.aspx"); } protected void ImageButton3_Click(object sender, ImageClickEventArgs e) { Response.Redirect("SwitchContext.aspx"); }}

Page 19: 2nd year Summer Training Report

AddNewIssue.aspx-<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddNewIssue.aspx.cs" Inherits="AddNewIssue" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head> <style type="text/css"> .style1 { width: 163px; height: 63px; } .style2 { width: 317px; height: 63px; } .style3 { width: 163px; height: 40px; } .style4 { width: 317px; height: 40px; } .style5 { width: 163px; height: 28px; } .style6 { width: 317px; height: 28px; } .style7 { width: 163px; height: 29px; } .style8 { width: 317px; height: 29px; } .style9 { height: 40px; } .style10 { height: 153px; } </style></head><form id="form1" runat="server"> <div align="left" style="height: 76px"> <asp:Image ID="Image2" runat="server" ImageAlign="Right" ImageUrl="~/Images/ITSFinalWhite.png" Height="63px" Width="71px" /> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <asp:Image ID="Image1" runat="server" Height="31px" ImageUrl="~/Images/AdaniLogo2.gif" Width="90px" /> <br /> <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Names="Bell MT" Text="TOS Solution Manager" Width="178px"></asp:Label>

Page 20: 2nd year Summer Training Report

<br /> <br /> </div> <div style="height: 27px" align="right"> <asp:Label ID="Label3" runat="server" Font-Names="Arial"></asp:Label> </div> <div align="right"> <asp:ImageButton ID="ImageButton2" runat="server" Height="19px" ImageUrl="~/Images/signout.jpg" onclick="ImageButton2_Click" Width="16px" /> <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/home.jpg" onclick="ImageButton1_Click" /> </div> <div style="height: 704px; background-color: #ccccFF;"> <table align="center" style="width: auto; height: auto; background-color: #007BAA;"> <tr bgcolor="#f5f5f5"> <td align="justify" colspan="2" style="height: 36px; background-color: #B9B9FF; font-family: 'Courier New'; font-size: 21px;"> <b dir="rtl" style="text-align: center">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Add New Issue</b></td> </tr> <tr bgcolor="#f5f5f5"> <td class="style1" style="background-color: #EAEAFF;"> Issue*</td> <td class="style2" style="font-family: Corbel; font-size: 15px; background-color: #D7D7FF"> <asp:TextBox ID="TextBox1" runat="server" Font-Bold="False" Font-Names="Calibri" Height="40px" Width="288px"></asp:TextBox> </td> </tr> <tr bgcolor="#f5f5f5"> <td class="style1" style="background-color: #EAEAFF;"> Description*</td> <td class="style2" style="font-family: Corbel; font-size: 15px; background-color: #D7D7FF"> <asp:TextBox ID="TextBox2" runat="server" Font-Bold="False" Font-Names="Calibri" TextMode="MultiLine"></asp:TextBox> </td> </tr> <tr bgcolor="#f5f5f5"> <td class="style3" style="background-color: #EAEAFF;"> Impact*</td> <td class="style4" style="font-family: Corbel; font-size: 15px; background-color: #D7D7FF"> <asp:TextBox ID="TextBox3" runat="server" Font-Bold="False" Font-Names="Calibri" Width="176px"></asp:TextBox> </td> </tr> <tr bgcolor="#f5f5f5"> <td class="style3" style="background-color: #EAEAFF;"> Priority</td> <td class="style4" style="font-family: Corbel; font-size: 15px; background-color: #D7D7FF"> <asp:DropDownList ID="DropDownList1" runat="server" Font-Bold="False" Font-Names="Corbel"> <asp:ListItem Value="1">Highest</asp:ListItem> <asp:ListItem Value="2">High</asp:ListItem> <asp:ListItem Value="2">Normal</asp:ListItem> <asp:ListItem Value="3">Low</asp:ListItem> <asp:ListItem Value="4">Lowest</asp:ListItem> </asp:DropDownList> </td>

Page 21: 2nd year Summer Training Report

</tr> <tr bgcolor="#f5f5f5"> <td class="style3" style="background-color: #EAEAFF;"> Status</td> <td class="style4" style="font-family: Corbel; font-size: 15px; background-color: #D7D7FF"> <asp:DropDownList ID="DropDownList2" runat="server" AppendDataBoundItems="True" Font-Bold="False" Font-Names="Corbel"> </asp:DropDownList> </td> </tr> <tr bgcolor="#f5f5f5"> <td class="style3" style="background-color: #EAEAFF;"> Issue Type</td> <td class="style4" style="font-family: Corbel; font-size: 15px; background-color: #D7D7FF"> <asp:DropDownList ID="DropDownList5" runat="server" AppendDataBoundItems="True" Font-Bold="False" Font-Names="Corbel"> </asp:DropDownList> </td> </tr> <tr bgcolor="#f5f5f5"> <td class="style3" style="background-color: #EAEAFF;"> Assigned &nbsp;To</td> <td class="style4" style="font-family: Corbel; font-size: 15px; background-color: #D7D7FF"> <asp:DropDownList ID="DropDownList3" runat="server" AppendDataBoundItems="True" Font-Bold="False" Font-Names="Corbel"> </asp:DropDownList> </td> </tr> <tr bgcolor="#f5f5f5"> <td class="style9" style="background-color: #EAEAFF;"> Assigned &nbsp;By</td> <td class="style9" style="font-family: Corbel; font-size: 15px; background-color: #D7D7FF"> <asp:DropDownList ID="DropDownList4" runat="server" AppendDataBoundItems="True" Font-Bold="False" Font-Names="Corbel"> </asp:DropDownList> </td> </tr> <tr bgcolor="#f5f5f5"> <td class="style5" style="background-color: #EAEAFF;"> User Submitting&nbsp;</td> <td class="style6" style="font-family: Corbel; font-size: 15px; background-color: #D7D7FF"> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> </td> </tr> <tr bgcolor="#f5f5f5"> <td class="style5" style="background-color: #EAEAFF;"> Submitted</td> <td class="style6" style="font-family: Corbel; font-size: 15px; background-color: #D7D7FF"> <asp:Label ID="Label4" runat="server" Font-Names="Calibri" Text="Label"></asp:Label> </td> </tr> <tr bgcolor="#f5f5f5"> <td class="style7" style="background-color: #EAEAFF;" valign="top">

Page 22: 2nd year Summer Training Report

File&nbsp; </td> <td class="style8" style="font-family: Corbel; font-size: 15px; background-color: #D7D7FF" valign="top"> <asp:FileUpload ID="FileUpload1" runat="server" Font-Bold="False" Font-Names="Constantia" /> </td> </tr> <tr bgcolor="#f5f5f5"> <td align="center" colspan="2" style="font-family: Calibri; font-size: 12px" class="style10"> &nbsp;<asp:Button ID="Button1" runat="server" Font-Bold="True" Font-Names="Calibri" onclick="Button1_Click" Text="Add" /> &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<asp:Button ID="Button2" runat="server" Font-Bold="True" Font-Names="Calibri" Text="Cancel" onclick="Button2_Click" /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<asp:Button ID="Button3" runat="server" Font-Bold="True" Font-Names="Calibri" Text="Mail" onclick="Button3_Click" /> &nbsp; &nbsp;<br /> <br /> Fields marked with * are compulsory<br /> <br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <asp:Label ID="Label5" runat="server" Font-Bold="True" Font-Names="Arial" Height="20px" Width="117px"></asp:Label> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </td> </tr> </table> </div>

</form>

AddNewIssue.aspx.cs-using System;using IssueTracker;

public partial class AddNewIssue : System.Web.UI.Page{ private string CurrentPath = DBConnect.uploadPath;

protected void Page_Load(object sender, EventArgs e) { Label3.Text = "Welcome " + DBConnect.userRealName + "!"; Label1.Text = DBConnect.userRealName; Label4.Text = DateTime.Now.ToString(); DBConnect.DropDownBind(DropDownList2, "select status,status_id from roroapp.statuses"); //Status DBConnect.DropDownBind(DropDownList5, "select issuetype,issuetype_id from roroapp.issuetype"); //IssueType DBConnect.DropDownBind(DropDownList3, "select user_name,user_id from roroapp.userinfo"); //AssignedTo DBConnect.DropDownBind(DropDownList4, "select user_name,user_id from roroapp.userinfo where login='" + Session["name"] + "'"); }

protected void Button1_Click(object sender, EventArgs e) { if ((TextBox1.Text == "") || (TextBox2.Text == "") || (TextBox3.Text == "") || (DropDownList1.Text == "") || (DropDownList2.Text == "") || (DropDownList3.Text == "")) {

Page 23: 2nd year Summer Training Report

writeToReqdFieldLabel("All Fields are required.", System.Drawing.Color.Red); return; } if (Session["allow_upload"].ToString() != "0") { string sql; if (FileUpload1.HasFile) { CurrentPath += FileUpload1.FileName; FileUpload1.SaveAs(CurrentPath); sql = "insert into roroapp.issues (issue_name,issue_desc,user_id,priority_id,status,assigned_to_orig,file_name,assigned_by,priority_name,date_submitted,issuetype,impact) values ('" + TextBox1.Text + "','" + TextBox2.Text + "','" + Session["uid"] + "' ," + DropDownList1.SelectedValue + "," + DropDownList2.SelectedValue + "," + DropDownList3.SelectedValue + ", '" + CurrentPath + "' ," + DropDownList4.SelectedValue + "," + DropDownList1.SelectedValue + ",To_DATE(to_char(sysdate,'DD/MM/YYYY HH:MI:SS AM'),'DD/MM/YYYY HH:MI:SS AM'),'" + DropDownList5.SelectedItem.Text + "','" + TextBox3.Text + "')"; } else sql = "insert into roroapp.issues (issue_name,issue_desc,user_id,priority_id,status,assigned_to_orig,assigned_by,priority_name,date_submitted,issuetype,impact) values ('" + TextBox1.Text + "','" + TextBox2.Text + "','" + Session["uid"] + "' ," + DropDownList1.SelectedValue + ", " + DropDownList2.SelectedValue + "," + DropDownList3.SelectedValue + "," + DropDownList4.SelectedValue + "," + DropDownList1.SelectedValue + ",To_DATE(to_char(sysdate,'DD/MM/YYYY HH:MI:SS AM'),'DD/MM/YYYY HH:MI:SS AM'),'" + DropDownList5.SelectedItem.Text + "','" + TextBox3.Text + "')"; newIssueAddSequence(sql); } if (Session["allow_upload"].ToString() != "1") { if (FileUpload1.HasFile) writeToReqdFieldLabel("You can not upload the file", System.Drawing.Color.Red); else { newIssueAddSequence("insert into roroapp.issues (issue_name,issue_desc,user_id,priority_id,status,assigned_to_orig,assigned_by,priority_name,date_submitted,issuetype,impact) values ('" + TextBox1.Text + "','" + TextBox2.Text + "','" + Session["uid"] + "' ,'" + DropDownList1.Text + "','" + DropDownList2.Text + "','" + DropDownList3.SelectedValue + "','" + DropDownList4.Text + "','" + DropDownList1.SelectedItem.Text + "',To_DATE(to_char(sysdate,'DD/MM/YYYY HH:MI:SS AM'),'DD/MM/YYYY HH:MI:SS AM'),'" + DropDownList5.SelectedItem.Text + "','" + TextBox3.Text + "')"); clearTextFields(); } } Session["fromemail"] = DropDownList3.Text; Session["toemail"] = DropDownList4.Text; if ((TextBox1.Text == "") || (TextBox2.Text == "") || (TextBox3.Text == "") || (DropDownList1.Text == "")) writeToReqdFieldLabel("Fill All The Required Fields", System.Drawing.Color.Red); }

private void newIssueAddSequence(string query) { DBConnect.executeModCommand(query); writeToReqdFieldLabel("New Issue Added Successfully", System.Drawing.Color.Green); }

private void clearTextFields() { TextBox1.Text = ""; TextBox2.Text = ""; TextBox3.Text = ""; }

private void writeToReqdFieldLabel(string s, System.Drawing.Color c) { Label5.Visible = true; Label5.ForeColor = c;

Page 24: 2nd year Summer Training Report

Label5.Text = s; }

protected void Button2_Click(object sender, EventArgs e) { clearTextFields(); Label3.Visible = false; }

protected void Button3_Click(object sender, EventArgs e) { Response.Redirect("Mailer.aspx"); }

protected void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Response.Redirect("reporthome.aspx"); }

protected void ImageButton2_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Response.Redirect("logout.aspx"); }}

ExportGrid.aspx-<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ExportGrid.aspx.cs" Inherits="ExportGrid" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"><form id="form1" runat="server"> <div align="left" style="height: 76px"> <asp:Image ID="Image2" runat="server" ImageAlign="Right" ImageUrl="~/Images/ITSFinalWhite.png" Height="63px" Width="71px" /> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <asp:Image ID="Image1" runat="server" Height="31px" ImageUrl="~/Images/AdaniLogo2.gif" Width="90px" /> <br /> <asp:Label ID="Label25" runat="server" Font-Bold="True" Font-Names="Bell MT" Text="TOS Solution Manager" Width="178px"></asp:Label> <br /> <br /> </div> <div style="height: 27px" align="right"> <asp:Label ID="Label3" runat="server" Font-Names="Arial"></asp:Label> </div> <div align="right"> <asp:ImageButton ID="ImageButton2" runat="server" Height="19px" ImageUrl="~/Images/signout.jpg" onclick="ImageButton2_Click" Width="16px" /> <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/home.jpg" onclick="ImageButton1_Click" /> </div> <div style="height: 750px; background-color: #CCCCFF;" align="center"> <asp:DataGrid ID="GridView1" runat="server" AllowCustomPaging="True" AllowSorting="True" AutoGenerateColumns="False" BorderColor="White" BorderStyle="Solid" CellPadding="4" Font-Names="Verdana" Font-Size="Small" ForeColor="#333333" GridLines="None" Height="184px" HorizontalAlign="Left" ShowFooter="True" Style="position: static" Width="97%"> <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />

Page 25: 2nd year Summer Training Report

<EditItemStyle BackColor="#999999" /> <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /> <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /> <AlternatingItemStyle BackColor="White" ForeColor="#284775" /> <ItemStyle BackColor="#F7F6F3" ForeColor="#333333" /> <Columns> <asp:BoundColumn DataField="issue_id" HeaderText="Issue#"></asp:BoundColumn> <asp:BoundColumn DataField="issue_name" HeaderText="Issue"></asp:BoundColumn> <asp:BoundColumn DataField="get_name(status)" HeaderText="Status"></asp:BoundColumn> <asp:BoundColumn DataField="priority_name" HeaderText="Priority"></asp:BoundColumn> <asp:BoundColumn DataField="get_uname(Assigned_to_orig)" HeaderText="Assigned To"></asp:BoundColumn> <asp:BoundColumn DataField="Date_Submitted" HeaderText="Submitted"></asp:BoundColumn> <asp:BoundColumn DataField="Date_Modified" HeaderText="Last Update"></asp:BoundColumn> <asp:BoundColumn DataField="ISSUETYPE" HeaderText="Issue Type"></asp:BoundColumn> </Columns> <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> </asp:DataGrid> </div> </form> </html>

ExportGrid.aspx.cs-using System;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using IssueTracker;using System.Data;

public partial class ExportGrid : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { Label3.Text = "Welcome " + DBConnect.userRealName + "!"; exportToExcel(ref GridView1, "Solman"); }

private void exportToExcel(ref DataGrid DGrid, string fileName) { if(Session["name"] == "") { Response.Write("<script>top.frames['top'].location ='login.aspx' </script>"); Response.End(); } DataTable dt = new DataTable(); DBConnect.executeCommand(Session["sql1"].ToString(), ref dt); if (dt.Rows.Count > 0) { DGrid.Visible = true; DGrid.DataSource = dt; DGrid.DataBind(); } Response.AddHeader("content-disposition", String.Format("attachment;filename={0}.xls", fileName)); Response.Charset = ""; Response.ContentType = "application/vnd.xls"; System.IO.StringWriter strWr = new System.IO.StringWriter(); HtmlTextWriter HtmlWr = new HtmlTextWriter(strWr); DGrid.RenderControl(HtmlWr);

Page 26: 2nd year Summer Training Report

Response.Write(strWr.ToString()); Response.End(); }

protected void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Response.Redirect("reporthome.aspx"); }

protected void ImageButton2_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Response.Redirect("logout.aspx"); }}

Response.aspx-<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Response.aspx.cs" Inherits="Response" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><head></head><form id="form1" runat="server"> <div align="left" style="height: 76px"> <asp:Image ID="Image2" runat="server" ImageAlign="Right" ImageUrl="~/Images/ITSFinalWhite.png" Height="63px" Width="71px" /> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <asp:Image ID="Image1" runat="server" Height="31px" ImageUrl="~/Images/AdaniLogo2.gif" Width="90px" /> <br /> <asp:Label ID="Label25" runat="server" Font-Bold="True" Font-Names="Bell MT" Text="TOS Solution Manager" Width="178px"></asp:Label> <br /> <br /> </div> <div style="height: 27px" align="right"> <asp:Label ID="CornerLabel" runat="server" Font-Names="Arial"></asp:Label> </div> <div align="right"> <asp:ImageButton ID="ImageButton2" runat="server" Height="19px" ImageUrl="~/Images/signout.jpg" onclick="ImageButton2_Click" Width="16px" /> <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/home.jpg" onclick="ImageButton1_Click" /> </div> <div align="left" style="background-color: #CCCCff; height: 1126px;"> <table width="100%"> <tr> <td style="width: 418px"> <table bordercolor="#5d7b9d" style="border: thin solid #6666FF; width: 455px"> <tr bgcolor="#f5f5f5"> <td colspan="2" style="font-family: 'Lucida Bright'; font-size: 17px; font-weight: bold;" valign="top" align="justify" bgcolor="#CAFFD3"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; <asp:Label ID="lblheader" runat="server" Font-Bold="True" ForeColor="Black" Font-Names="Arial"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td colspan="2"

Page 27: 2nd year Summer Training Report

style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: normal;" valign="top" bgcolor="#EAFFEE"> <asp:Label ID="Label21" runat="server" Font-Bold="True" ForeColor="MidnightBlue" Width="440px" BackColor="#DFFFE4"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td colspan="2" style="font-family: 'Lucida Bright'; font-size: 17px; font-weight: 600;" valign="top" bgcolor="#DFFFE4"> <asp:Label ID="Label22" runat="server" Font-Italic="True" Width="440px" Font-Bold="False" BackColor="#DFFFE4"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: 600;" valign="top" bgcolor="#99FFCC"> User Submitting</td> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: normal;" bgcolor="#CCFFCC"> <asp:Label ID="Label1" runat="server" Font-Names="Calibri"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: 600;" valign="top" bgcolor="#99FFCC"> Submitted</td> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: normal;" bgcolor="#CCFFCC"> <asp:Label ID="Label2" runat="server" Font-Names="Calibri"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: 600;" valign="top" bgcolor="#99FFCC"> Issue Type</td> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: normal;" bgcolor="#CCFFCC"> <asp:Label ID="Label3" runat="server" Font-Names="Calibri"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: 600;" valign="top" bgcolor="#99FFCC"> Tested</td> <td style=" font-family: 'Lucida Bright'; font-size: 16px; font-weight: normal;" bgcolor="#CCFFCC"> <asp:Label ID="Label4" runat="server" Font-Names="Calibri"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: 600;" valign="top" bgcolor="#99FFCC"> Approved</td> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: normal;" bgcolor="#CCFFCC"> <asp:Label ID="Label5" runat="server" Font-Names="Calibri"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5">

Page 28: 2nd year Summer Training Report

<td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: 600;" valign="top" bgcolor="#99FFCC"> Assigned To Orig.</td> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: normal;" bgcolor="#CCFFCC"> <asp:Label ID="Label6" runat="server" Font-Names="Calibri"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: 600;" valign="top" bgcolor="#99FFCC"> Assigned</td> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: normal;" bgcolor="#CCFFCC"> <asp:Label ID="Label7" runat="server" Font-Names="Calibri"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: 600;" valign="top" bgcolor="#99FFCC"> Priority</td> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: normal;" bgcolor="#CCFFCC"> <asp:Label ID="Label8" runat="server" Font-Names="Calibri"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: 600;" valign="top" bgcolor="#99FFCC"> Status</td> <td style="font-family: 'Lucida Bright'; font-size: 16px; font-weight: normal;" bgcolor="#CCFFCC"> <asp:Label ID="Label9" runat="server" Font-Names="Calibri"></asp:Label></td> </tr> </table> </br> </br> <table id="TABLE1" style="border: thin solid #6666FF" > <tr bgcolor="#f5f5f5"> <td colspan="2" align="justify" bgcolor="#CAFFD3" style="font-family: fantasy; font-size: 17px; font-weight: bold"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <b style="font-family: Calibri">Response</b></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-family: 'Courier New', Courier, monospace; font-size: 17px; font-weight: 600;" bgcolor="#99FFAA"> Response*</td> <td style="width: 240px; height: 42px;" bgcolor="#99FFCC"> <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Width="360px" Font-Names="Calibri"></asp:TextBox></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-family: 'Courier New', Courier, monospace; font-size: 17px; font-weight: 600;" bgcolor="#99FFAA"> Assigned To*</td> <td style="width: 240px; height: 21px" bgcolor="#99FFCC"> <asp:DropDownList ID="DropDownList1" runat="server"

Page 29: 2nd year Summer Training Report

AppendDataBoundItems="True" Font-Names="Calibri"> </asp:DropDownList></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-family: 'Courier New', Courier, monospace; font-size: 17px; font-weight: 600;" bgcolor="#99FFAA"> Priority*</td> <td style="width: 240px" bgcolor="#99FFCC"> <asp:DropDownList ID="DropDownList2" runat="server" Font-Names="Calibri"> <asp:ListItem Value="0">Highest</asp:ListItem> <asp:ListItem Value="1">High</asp:ListItem> <asp:ListItem Value="2">Normal</asp:ListItem> <asp:ListItem Value="3">Lowest</asp:ListItem> <asp:ListItem Value="4">Low</asp:ListItem> </asp:DropDownList></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-family: 'Courier New', Courier, monospace; font-size: 17px; font-weight: 600;" bgcolor="#99FFAA"> Status*</td> <td style="width: 240px" bgcolor="#99FFCC"> <asp:DropDownList ID="DropDownList3" runat="server" AppendDataBoundItems="True" Font-Names="Calibri"> </asp:DropDownList></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-weight: bold;" bgcolor="#99FFAA"> Issue Type</td> <td style="width: 240px; height: 21px" bgcolor="#99FFCC"> <asp:DropDownList ID="DropDownList4" runat="server" AppendDataBoundItems="True" Font-Names="Calibri" AutoPostBack="True"> </asp:DropDownList></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-weight: bold;" bgcolor="#99FFAA"> Tested</td> <td style="width: 240px; height: 21px" bgcolor="#99FFCC"> <asp:CheckBox ID="CheckBox1" runat="server" Font-Names="Calibri" /></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-weight: bold;" bgcolor="#99FFAA"> Approved</td> <td style="width: 240px" bgcolor="#99FFCC"> <asp:CheckBox ID="CheckBox2" runat="server" Font-Names="Calibri" /></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-weight: bold;" bgcolor="#99FFAA"> File</td> <td style="width: 240px; height: 25px" bgcolor="#99FFCC"> <asp:FileUpload ID="FileUpload1" runat="server" Height="24px" Width="368px" Font-Names="Calibri" /></td> </tr> <tr bgcolor="#f5f5f5"> <td colspan="2" style="height: 25px" align="center" bgcolor="#CAFFD3"> &nbsp;&nbsp; &nbsp;<asp:Label ID="lblmsg" runat="server" Font-Bold="True" Width="216px"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td colspan="2" style="height: 28px" bgcolor="#CAFFD3"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

Page 30: 2nd year Summer Training Report

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;<asp:Button ID="Button1" runat="server" Text="Add" Width="56px" Font-Bold="True" Font-Names="Candara" onclick="Button1_Click" /> &nbsp; &nbsp; &nbsp; <asp:Button ID="Button2" runat="server" Text="Mail" Width="64px" Font-Bold="True" Font-Names="Candara" onclick="Button2_Click" /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; </td> </tr> </table> </td> <td style="width: 100px; font-family: Calibri;" valign="top"> &nbsp;<asp:DataList ID="DataList1" runat="server" ShowHeader="False" RepeatColumns ="1" RepeatDirection="Horizontal" BackColor="#666633" GridLines="Both" onitemdatabound="DataList1_ItemDataBound"> <ItemTemplate> <table border="1" style="width: 232px" datapagesize="3"> <tr bgcolor="#f5f5f5"> <td colspan="2"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; <b>Response History</b></td> </tr> <tr bgcolor="#f5f5f5"> <td colspan="2" style="height: 21px"> <asp:Label ID="Label20" runat="server" Width="216px"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td style="width: 101px; height: 21px"> <asp:Label ID="Label15" runat="server">User Submitting</asp:Label></td> <td style="width: 110px; height: 21px"> <asp:Label ID="Label10" runat="server"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td style="width: 101px; height: 21px"> <asp:Label ID="Label16" runat="server">Response Date</asp:Label></td> <td style="width: 110px; height: 21px"> <asp:Label ID="Label11" runat="server"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td style="width: 101px"> <asp:Label ID="Label17" runat="server">Assigned To</asp:Label></td> <td style="width: 110px"> <asp:Label ID="Label12" runat="server"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td style="width: 101px"> <asp:Label ID="Label18" runat="server">Priority</asp:Label></td> <td style="width: 110px"> <asp:Label ID="Label13" runat="server"></asp:Label></td> </tr> <tr bgcolor="#f5f5f5"> <td style="width: 101px; height: 21px"> <asp:Label ID="Label19" runat="server">Status</asp:Label></td> <td style="width: 110px; height: 21px"> <asp:Label ID="Label14" runat="server"></asp:Label></td> </tr> </table> </ItemTemplate> <AlternatingItemStyle BackColor="#99FF99" /> <ItemStyle Wrap="True" /> </asp:DataList> &nbsp; &nbsp; &nbsp; <asp:Label ID="Label23" runat="server" Text="0" Visible="False"

Page 31: 2nd year Summer Training Report

Width="20px"></asp:Label> &nbsp; <asp:Label ID="Label24" runat="server" Text="0" Visible="False" Width="20px"></asp:Label>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<asp:ImageButton ID="PrevPageButton" runat="server" ImageUrl="~/Images/LeftNEW.PNG" Width="26px" Height="17px" style="margin-top: 0px" onclick="PrevPageButton_Click" /> &nbsp; <asp:ImageButton ID="NextPageButton" runat="server" ImageUrl="~/Images/RightNEW.PNG" Height="18px" Width="27px" onclick="NextPageButton_Click" /> &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </td> </tr> </table> </div></form>

Response.aspx.cs-using System;using System.Data;using System.Web.UI.WebControls;using IssueTracker;

public partial class Response : System.Web.UI.Page{ private Label[] lbl = new Label[12]; private DataTable[] DataPages; private string str, CurrentPath = DBConnect.uploadPath; private DataTable globalTable = new DataTable(); private int pageSize = 3;

private int findNoOfPages(DataTable input) { double tmp = (double)input.Rows.Count / pageSize; int noOfPages = input.Rows.Count / pageSize; if (tmp > noOfPages) noOfPages++; return noOfPages; }

private void refreshPageNavButtons(int pageNo) { NextPageButton.Visible = true; PrevPageButton.Visible = true; if (pageNo <= 0) { PrevPageButton.Visible = false; if (DataPages.Length == 1) NextPageButton.Visible = false; } else if (pageNo >= (DataPages.Length - 1)) NextPageButton.Visible = false; }

protected void Page_Load(object sender, EventArgs e) { CornerLabel.Text = CornerLabel.Text = "Welcome " + DBConnect.userRealName + "!"; str = Request.QueryString["ID"]; Session["response_issue"] = str; lblheader.Text = "#Issue " + str; if (!IsPostBack) { bindDropDowns(); bind(); } else if (IsPostBack) {

Page 32: 2nd year Summer Training Report

DBConnect.executeCommand("select tab1.user_name,tab1.date_response,tab1.priority_id,get_name(tab1.status),tab1.response,tab1.assigned_to from (select rownum as sr,tab.* from (select u.user_name,r.date_response,r.priority_id,r.status,r.response,r.assigned_to from responses r,userinfo u where issue_id='" + str + "' and u.user_id=r.assigned_to order by r.date_response desc) tab) tab1 ", ref globalTable); splitToPages(globalTable, ref DataPages); } Label1.Text = Session["name"].ToString(); DBConnect.executeCommand("select tab.*,iss.date_submitted,iss.issuetype,iss.priority_name,iss.issue_name,iss.issue_desc from (select u.user_name,i.issue_id,u.user_id,s.status as status_name, i.status from userinfo u,issues i,statuses s where u.user_id=i.user_id and s.status_id=i.status and i.issue_id='" + str + "')tab,roroapp.issues iss where tab.issue_id=iss.issue_id", ref globalTable); if (globalTable.Rows.Count > 0) { Label2.Text = globalTable.Rows[globalTable.Rows.Count - 1][5].ToString(); Label3.Text = globalTable.Rows[globalTable.Rows.Count - 1][6].ToString(); Label8.Text = globalTable.Rows[globalTable.Rows.Count - 1][7].ToString(); Label9.Text = globalTable.Rows[globalTable.Rows.Count - 1][3].ToString(); Label21.Text = globalTable.Rows[globalTable.Rows.Count - 1][8].ToString(); Label22.Text = globalTable.Rows[globalTable.Rows.Count - 1][9].ToString(); } DBConnect.executeCommand(" select u.user_name,i.assigned_to_orig from userinfo u,issues i where u.user_id=i.assigned_to_orig and issue_id='" + str + "'", ref globalTable); if (globalTable.Rows.Count > 0) { Label6.Text = globalTable.Rows[globalTable.Rows.Count - 1][0].ToString(); } DBConnect.executeCommand("select u.user_name,r.tested,r.approved,r.assigned_to from responses r ,userinfo u where r.issue_id='" + str + "' and r.assigned_to=u.user_id", ref globalTable); if (globalTable.Rows.Count > 0) { Label4.Text = "Yes"; Label5.Text = "Yes"; Label7.Text = globalTable.Rows[globalTable.Rows.Count - 1][0].ToString(); if (globalTable.Rows[globalTable.Rows.Count - 1][1].ToString() == "0") Label4.Text = "No"; if (globalTable.Rows[globalTable.Rows.Count - 1][2].ToString() == "0") Label5.Text = "No"; } }

private void bindDropDowns() { DBConnect.DropDownBind(DropDownList1, "select user_name,user_id from roroapp.userinfo"); DBConnect.DropDownBind(DropDownList3, "select status,status_id from roroapp.statuses"); DBConnect.DropDownBind(DropDownList4, "select issuetype,issuetype_id from roroapp.issuetype"); }

private int a;

private void setCurrentPageView(int pageNo, ref DataList dl) { if ((pageNo >= 0) && (pageNo < DataPages.Length)) { dl.DataSource = DataPages[pageNo]; a = DataPages[pageNo].Rows.Count - 1; DBConnect.currentPage = pageNo; dl.DataBind(); refreshPageNavButtons(pageNo); } }

private void bindDataList(ref DataList dl, DataTable dt) { if (dt.Rows.Count > 0) {

Page 33: 2nd year Summer Training Report

dl.Visible = true; splitToPages(dt, ref DataPages); setCurrentPageView(0, ref dl); } else { PrevPageButton.Visible = false; NextPageButton.Visible = false; } }

private void splitToPages(DataTable input, ref DataTable[] pages) { int pageNum = 0, i = 0; pages = new DataTable[findNoOfPages(input)]; try { pages[0] = new DataTable(); issuesInit(ref pages[0], input); foreach (DataRow d in input.Rows) { pages[pageNum].Rows.Add(pages[pageNum].NewRow()); pages[pageNum].Rows[i++].ItemArray = d.ItemArray; if ((i == pageSize) && (pageNum < (pages.Length - 1))) { i = 0; pages[++pageNum] = new DataTable(); issuesInit(ref pages[pageNum], input); } } } catch (Exception e) { } }

private void issuesInit(ref DataTable dt, DataTable inp) { dt = inp.Clone(); }

private void bind() { //initializePageNos(); DBConnect.executeCommand("select tab1.user_name,tab1.date_response,tab1.priority_id,get_name(tab1.status),tab1.response,tab1.assigned_to from (select rownum as sr,tab.* from (select u.user_name,r.date_response,r.priority_id,r.status,r.response,r.assigned_to from responses r,userinfo u where issue_id='" + str + "' and u.user_id=r.assigned_to order by r.date_response desc) tab) tab1 ", ref globalTable); bindDataList(ref DataList1, globalTable); }

protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e) { int i = 0; lbl[i++] = (Label)e.Item.FindControl("Label15"); lbl[i++] = (Label)e.Item.FindControl("Label16"); lbl[i++] = (Label)e.Item.FindControl("Label17"); lbl[i++] = (Label)e.Item.FindControl("Label18"); lbl[i++] = (Label)e.Item.FindControl("Label19"); lbl[i++] = (Label)e.Item.FindControl("Label10"); lbl[i++] = (Label)e.Item.FindControl("Label11"); lbl[i++] = (Label)e.Item.FindControl("Label12"); lbl[i++] = (Label)e.Item.FindControl("Label13"); lbl[i++] = (Label)e.Item.FindControl("Label14"); lbl[i] = (Label)e.Item.FindControl("Label20"); i = 6; lbl[i++].Text = DataPages[DBConnect.currentPage].Rows[a][1].ToString(); lbl[i++].Text = DataPages[DBConnect.currentPage].Rows[a][0].ToString(); lbl[i++].Text = DataPages[DBConnect.currentPage].Rows[a][2].ToString(); lbl[i++].Text = DataPages[DBConnect.currentPage].Rows[a][3].ToString(); lbl[i++].Text = DataPages[DBConnect.currentPage].Rows[a--][4].ToString();

Page 34: 2nd year Summer Training Report

lbl[5].Text = Session["name"].ToString(); }

protected void Button1_Click(object sender, EventArgs e) { if (FileUpload1.HasFile) { FileUpload1.SaveAs(CurrentPath + FileUpload1.FileName); } int app = Convert.ToInt16(CheckBox1.Checked), tes = Convert.ToInt16(CheckBox2.Checked); if (TextBox1.Text == "") writeTolblmsg("Fill All The Required Fields", System.Drawing.Color.Red); else { DBConnect.executeModCommand("insert into roroapp.responses (issue_id,response,user_id,priority_id,status,approved,tested,assigned_to,date_response) values ('" + str + "','" + TextBox1.Text + "','" + Session["uid"] + "','" + DropDownList2.SelectedValue + "','" + DropDownList3.SelectedValue + "','" + app + "','" + tes + "','" + DropDownList1.Text + "',To_DATE(to_char(sysdate,'DD/MM/YYYY HH:MI:SS AM'),'DD/MM/YYYY HH:MI:SS AM'))"); DBConnect.executeModCommand("update roroapp.issues set approved='" + app + "',tested='" + tes + "',assigned_to='" + DropDownList1.Text + "' where issue_id='" + str + " '"); writeTolblmsg("Response Is Added", System.Drawing.Color.Green); } DBConnect.executeCommand("select u.user_name,r.date_response,r.priority_id,get_name(r.status),r.response,r.assigned_to from responses r,userinfo u where issue_id='" + str + "' and u.user_id=r.assigned_to order by r.response_id desc ", ref globalTable); bindDataList(ref DataList1, globalTable); }

private void writeTolblmsg(string text, System.Drawing.Color colour) { lblmsg.Visible = true; lblmsg.ForeColor = colour; lblmsg.Text = text; }

protected void NextPageButton_Click(object sender, System.Web.UI.ImageClickEventArgs e) { setCurrentPageView(DBConnect.currentPage + 1, ref DataList1); }

protected void PrevPageButton_Click(object sender, System.Web.UI.ImageClickEventArgs e) { setCurrentPageView(DBConnect.currentPage - 1, ref DataList1); }

protected void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Response.Redirect("reporthome.aspx"); }

protected void ImageButton2_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Response.Redirect("logout.aspx"); }

protected void Button2_Click(object sender, EventArgs e) { Response.Redirect("ResponseMailer.aspx"); }}

Page 35: 2nd year Summer Training Report

ResponseMailer.aspx-<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ResponseMailer.aspx.cs" Inherits="ResponseMailer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"><head> <style type="text/css"> .style1 { width: 110px; height: 40px; } .style2 { width: 56px; height: 40px; } .style3 { height: 39px; } </style></head><form id="form1" runat="server"> <div align="left" style="height: 76px"> <asp:Image ID="Image2" runat="server" ImageAlign="Right" ImageUrl="~/Images/ITSFinalWhite.png" Height="63px" Width="71px" /> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <asp:Image ID="Image1" runat="server" Height="31px" ImageUrl="~/Images/AdaniLogo2.gif" Width="90px" /> <br /> <asp:Label ID="Label25" runat="server" Font-Bold="True" Font-Names="Bell MT" Text="TOS Solution Manager" Width="178px"></asp:Label> <br /> <br /> </div> <div align="left" style="height: 76px"> <asp:Image ID="Imag2" runat="server" ImageAlign="Right" ImageUrl="~/Images/ITSFinalWhite.png" Height="63px" Width="71px" /> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <asp:Image ID="Imag1" runat="server" Height="31px" ImageUrl="~/Images/AdaniLogo2.gif" Width="90px" /> <br /> <asp:Label ID="LeftLabel" runat="server" Font-Bold="True" Font-Names="Bell MT" Text="TOS Solution Manager" Width="178px"></asp:Label> <br /> <br /> </div> <div style="height: 27px" align="right"> <asp:Label ID="CornerLabel" runat="server" Font-Names="Arial"></asp:Label> </div> <div align="right"> <asp:ImageButton ID="ImageButton2" runat="server" Height="19px" ImageUrl="~/Images/signout.jpg" onclick="ImageButton2_Click" Width="16px" /> <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/home.jpg" onclick="ImageButton1_Click" /> </div> <div style="background-color: #CCCCFF; height: 552px;"> <asp:Label ID="Label1" runat="server" Width="472px"></asp:Label><br /> <br /> <asp:Label ID="Label2" runat="server"></asp:Label><br /> <asp:Label ID="Label3" runat="server"></asp:Label><br /> <asp:Label ID="Label4" runat="server"></asp:Label><br />

Page 36: 2nd year Summer Training Report

</div></form>

ResponseMailer.aspx.cs-using System;using System.Data;using IssueTracker;

public partial class ResponseMailer : System.Web.UI.Page{ private DataTable gTable = new DataTable();

protected void Page_Load(object sender, EventArgs e) { string ass_to = "", ass_by, from_email = "", to_email = "", resp_name = ""; CornerLabel.Text = "Welcome " + DBConnect.userRealName + "!"; try { string sqlget = "select r.response,get_uname(r.assigned_to),u.email from responses r,userinfo u where r.issue_id='" + Session["response_issue"] + "' and u.user_id='" + Session["uid"] + "'"; DBConnect.executeCommand(sqlget, ref gTable); if (gTable.Rows.Count > 0) { ass_to = gTable.Rows[gTable.Rows.Count - 1][1].ToString(); resp_name = gTable.Rows[gTable.Rows.Count - 1][0].ToString(); from_email = gTable.Rows[gTable.Rows.Count - 1][2].ToString(); } ass_by = Session["name"].ToString(); string sqlto = "select u.email from userinfo u,responses r where u.user_id='" + Session["assignedto"] + "'"; DBConnect.executeCommand(sqlto, ref gTable); if (gTable.Rows.Count > 0) to_email = gTable.Rows[gTable.Rows.Count - 1][0].ToString(); string mailMessage = "<table width='50%' align=center><tr><td colspan='3'><font face=verdana size=2 color=red>Dear Sir<br /><br />" + "New response has been added having response name &nbsp;" + resp_name + " and now assigned to &nbsp;" + ass_to + "<br /><br /></td></tr></tr><tr><td colspan='3'><font face=verdana size=2 color=red><br /><br />Regards<br /><br /><br />" + ass_by + "<br /></td></tr></table></form></table>"; DBConnect.sendEmail(from_email, to_email, "New Response Has Been Assigned", mailMessage, "10.80.9.13", 1980); } catch (Exception) { Label1.Text = "No action taken place. Please check any item for approval."; } }

protected void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Response.Redirect("reporthome.aspx"); }

protected void ImageButton2_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Response.Redirect("logout.aspx"); }}

Page 37: 2nd year Summer Training Report

Mailer.aspx-<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Mailer.aspx.cs" Inherits="Mailer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"><head> <style type="text/css"> .style1 { width: 110px; height: 40px; } .style2 { width: 56px; height: 40px; } .style3 { height: 39px; } </style></head><form id="form1" runat="server"> <div align="left" style="height: 76px"> <asp:Image ID="Image2" runat="server" ImageAlign="Right" ImageUrl="~/Images/ITSFinalWhite.png" Height="63px" Width="71px" /> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <asp:Image ID="Image1" runat="server" Height="31px" ImageUrl="~/Images/AdaniLogo2.gif" Width="90px" /> <br /> <asp:Label ID="Label25" runat="server" Font-Bold="True" Font-Names="Bell MT" Text="TOS Solution Manager" Width="178px"></asp:Label> <br /> <br /> </div> <div style="height: 27px" align="right"> <asp:Label ID="CornerLabel" runat="server" Font-Names="Arial"></asp:Label> </div> <div align="right"> <asp:ImageButton ID="ImageButton2" runat="server" Height="19px" ImageUrl="~/Images/signout.jpg" onclick="ImageButton2_Click" Width="16px" /> <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/home.jpg" onclick="ImageButton1_Click" /> </div> <div style="background-color: #CCCCFF; height: 552px;"> <asp:Label ID="Label1" runat="server" Width="472px"></asp:Label><br /> <br /> <asp:Label ID="Label2" runat="server"></asp:Label><br /> <asp:Label ID="Label3" runat="server"></asp:Label><br /> <asp:Label ID="Label4" runat="server"></asp:Label><br /> </div></form>

Page 38: 2nd year Summer Training Report

Mailer.aspx.cs-using System;using System.Data;using IssueTracker;

public partial class Mailer : System.Web.UI.Page{ private DataTable gTable = new DataTable(); private string ass_to, ass_by, iss_name, iss_id, from_email, to_email;

protected void Page_Load(object sender, EventArgs e) { CornerLabel.Text = "Welcome " + DBConnect.userRealName + "!"; try { string sqlget = " select get_uname(i.assigned_to_orig),i.issue_name,i.issue_id,u.email from issues i,userinfo u where issue_id='" + Session["curid"] + "' and u.user_id=i.assigned_to_orig"; string sqlto = " select get_uname(i.assigned_by),i.issue_name,i.issue_id,u.email from issues i,userinfo u where issue_id='" + Session["curid"] + "' and u.user_id=i.assigned_by"; DBConnect.executeCommand(sqlget, ref gTable); if (gTable.Rows.Count > 0) iss_name = gTable.Rows[gTable.Rows.Count - 1][1].ToString(); DBConnect.executeCommand(sqlto, ref gTable); if (gTable.Rows.Count > 0) { ass_by = gTable.Rows[gTable.Rows.Count - 1][0].ToString(); } string mailMessage = "<table width='50%' align=center><tr><td colspan='3'><font face=verdana size=2 color=red>Dear Sir<br /><br />New Issue is assigned to &nbsp; " + ass_to + "&nbsp;by &nbsp;" + ass_by + "&nbsp;having issue name &nbsp;" + iss_name + "<br /><br /></td></tr></tr><tr><td colspan='3'><font face=verdana size=2 color=red><br /><br />Regards<br /><br /><br />" + ass_by + "<br /></td></tr></table></form></table>"; DBConnect.sendEmail("[email protected]", "[email protected]", "New Issue Has Been Added", mailMessage, "10.80.9.13", 1980); } catch (Exception) { Label1.Text = "No action taken place. Please check any item for approval."; } }

protected void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Response.Redirect("reporthome.aspx"); }

protected void ImageButton2_Click(object sender, System.Web.UI.ImageClickEventArgs e) { Response.Redirect("logout.aspx"); }}

SwitchContext.aspx-<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SwitchContext.aspx.cs" Inherits="SwitchContext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

Page 39: 2nd year Summer Training Report

<style type="text/css"> .style1 { width: 100px; height: 38px; } </style></head>

<form id="form1" runat="server"><div align="left" style="height: 76px"> <asp:Image ID="Image2" runat="server" ImageAlign="Right" ImageUrl="~/Images/ITSFinalWhite.png" Height="63px" Width="71px" /> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp; <asp:Image ID="Image1" runat="server" Height="31px" ImageUrl="~/Images/AdaniLogo2.gif" Width="90px" /> <br /> <br /> <br /> </div> <div style="height: 27px" align="right"> <asp:Label ID="CornerLabel" runat="server" Font-Names="Arial"></asp:Label> </div> <div align="right"> <asp:ImageButton ID="ImageButton2" runat="server" Height="19px" ImageUrl="~/Images/signout.jpg" onclick="ImageButton2_Click" Width="16px" /> </div> <div style="height: 704px; background-color: #ccccFF;" align="center"> </br> </br> </br> </br> </br> </br> </br> <table align="center" > <tr bgcolor="#f5f5f5"> <td colspan="2" align="center"> <b style="font-family: Calibri">Switch Context<br /> <br /> <br /> </b></td> </tr> <tr bgcolor="#f5f5f5"> <td style="font-family: Calibri;" class="style1"> <asp:Label ID="Label1" runat="server" Text="Select Tab:" Width="104px" Font-Bold="True" Height="28px"></asp:Label></td> <td class="style1"> <asp:DropDownList ID="DropDownList1" runat="server" Font-Names="Calibri" Height="18px" Width="145px"> </asp:DropDownList></td> </tr> <tr bgcolor="#f5f5f5"> <td colspan="2" align="center"> <asp:Button ID="Button1" runat="server" Text="Submit" Font-Names="Calibri" onclick="Button1_Click" /></td> </tr> </table> </div> </form> </html>

Page 40: 2nd year Summer Training Report

SwitchContext.aspx.cs-using System;using System.Web.UI;using IssueTracker;

public partial class SwitchContext : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { CornerLabel.Text = "Welcome " + DBConnect.userRealName + "!"; DBConnect.DropDownBind(DropDownList1, "select distinct t.description ,t.tab_id from roles r,roleinfo i,tabs t where r.role_id=i.role_id and t.tab_id=i.tab_id and user_id='" + Session["uid"] + "' "); DropDownList1.SelectedValue = Request.Form["DropDownList1"]; }

protected void Button1_Click(object sender, EventArgs e) { Session["switch"] = DropDownList1.SelectedValue; Session["switch_name"] = DropDownList1.SelectedItem.Text; Response.Redirect("reportHome.aspx"); }

protected void ImageButton2_Click(object sender, ImageClickEventArgs e) { Response.Redirect("logout.aspx"); }}

logout.aspx-<%@ Page Language="C#" AutoEventWireup="true" CodeFile="logout.aspx.cs" Inherits="logout" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> </div> </form></body></html>

logout.aspx.cs-using System;

public partial class logout : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { Session.Clear(); IssueTracker.DBConnect.userRealName = ""; if (Session["name"] == "") Response.Redirect("Default.aspx"); }}

Page 41: 2nd year Summer Training Report

Testing and Quality Assurance

The system has undergone rigorous testing procedures such as robustness and mutation testing and has been optimized to the maximum extend so as to provide a smooth and consistent experience to the user.

It has been tested with invalid/incompetent data values as inputs, and the system had promptly produced desirable results without compromising the server or the database functionality.

The tests were conducted on a client machine having Windows XP 32-bit Operating System, 3 Ghz Intel Pentium 4 Processor and 1 GB RAM space.The website has been tested to work on both Google Chrome and Internet Explorer, although performance has been observed to be better on Internet Explorer.

Given that the system has been tested to work on a system having lesser than average configuration, quality of the same can be assured with confidence on any average system having similiar or higher configuration.

Page 42: 2nd year Summer Training Report

Implementation

The website has been deployed to the Server residing withing the premises of Adani House Building, Gurgaon.Issues logged in by multiple employees accross the country are fluidly logged into the server which is then queried by the concerned persons working in the Adani House Branch, and appropriate action is taken.

The employees within the premises of Adani House, Gurgaon have the advantage of getting faster access to the database as it is local.Since this system is completely web-based, no special software is needed on the client-machine to exploit all thwe fucntionalities.

Most functions regarding fetching specific sets of data have been abstracted to functions at the database-level, which allows for small modifications to be made to the data-query operations of the website without rebuilding the entire website.

Page 43: 2nd year Summer Training Report

Maintenance

To maintain database consistency, there should be present a database administrator at the same location where the website is housed.

The Database Administrator may utilise the software “PL/SQL Developer” to query and ensure consistency of data on the database on a relatively low-level.

The database admistrator might be required to modify those parts of the database from which data is fetched while initializing few controls such as combo-boxes etc, as and when required.

Also, the database level functions being queried maybe required to be changed according to usage requirements.

Maximum effort has been made so as to minimize to the maximum extent, the need to rebuild and re-deploy the website, as hard-coding techniques have been avoided, and most elements have been programmed to dynamically bind with the data residing on the database, as it is much easier to introduce changes at the database level than at the website-code level.

Page 44: 2nd year Summer Training Report

Conclusion and Future Scope

This website has been successfully certified for industrial-level deployment.

In the future, this can be integrated into existing systems performing other data-related activities.Moreover, it maybe possible for other systems to share the name assemblies this system is using, to reduce the server-memory footprint, also because the assemblies used in this project have been successfully tested and certified to be much efficient than the existing ones.

The design and back-end code structure of this project maybe used to spawn other projects, as a very general approach was adopted while developing this project.

Also, the database level procedures utilised by this project can modified according to requirements, or to improve efficiency.

Page 45: 2nd year Summer Training Report

Bibliography/References

• www.stackoverflow.com • www.wikipedia.org • www.codeproject.com