52
SUMMER INTERNSHIP PROJECT ON GAIL Planning and Control at GAIL JUBILEE TOWER, Sector 1, NOIDA SUBMITTED BY: HIMANSHU GARG COMPUTER SCIENCE ENGINEERING JAYPEE INSTITUTE OF INFORMATION TECHNOLOGY Sector 62, Noida

report_HimanshuGarg

Embed Size (px)

Citation preview

SUMMER INTERNSHIP PROJECT

ON

GAIL Planning and Control at GAIL JUBILEE TOWER, Sector 1,

NOIDA

SUBMITTED BY: HIMANSHU GARG

COMPUTER SCIENCE ENGINEERING JAYPEE INSTITUTE OF INFORMATION TECHNOLOGY

Sector 62, Noida

CERTIFICATE

This to certify that Mr. Himanshu Garg of Jaypee Institute of Information Technology, Sector 62, Noida (Declared Deemed To Be University Under Section 3 of UGC Act) has done his summer internship project from 09th of June till 01st of August 2016 in GAIL info hub in Noida. He completed his project under Computer Science department. The same is hereby approved.

Manojit Saha

Chief Manager (BIS) GAIL (INDIA) Ltd., Info hub

ACKNOWLEDGEMENTS

I gratefully acknowledge the valuable contribution of the individuals and the organization GAIL INDIA LTD, which helped me to complete my project. I am thankful to Mr. Manojit Saha and Mr. Sumeet Kureel for supporting me to do the project and providing useful information for the project. The acknowledgements are also due to the staff members who gave their full contribution in making me understand the things, and encouraged to do the project. People and atmosphere in GAIL is very co-operative.

Himanshu Garg (CSE-13103432)

Contents Chapter Page No.

Title Page i Certificate ii Acknowledgement iii List of Figures vi Abstract vii 1. Introduction 1 1.1 Intro to GAIL 1.2 Web 2.0 Harnessing Web

For providing Services 1.3 Services: Understanding Context 1.3.1 1.3.2 1.3.3 1.4 Technology: Understanding Usage

2. Software Requirement Specification 2.1 Introduction 2.2 Purpose 2.3 Scope 2.4 Overview 2.4.1 Overall Description 2.4.2 User Characteristics 2.4.3 General Constraints 2.5 Performance Requirements 2.6 Tracking Data Flow

3. Software Design Specification 3.1 Introduction 3.2 Goals and Objectives 3.3 Scope 3.4 Project Category 4. Technology Used ASP.NET Oracle Database: Database Architecture. 5. Results and Observations 6. Conclusion 7. Future Scope 8. References 9. Appendix A: Screen Shots B: Source Code

Abstract

The Website that is the GAIL Project Planning and Control Project aims to provide a holistic and complete environment that provides tailor made solutions for the Gail IT department as well as the fellow members. The service that this site intends to provide a platform for projects that are deployed from Noida and to serve the needs of the employees for both the purposes of relaying internal as well as external information i.e. Information intended for employees of GAIL. Also the aim is to take the whole interaction between the Noida and other branches of GAIL. The aim is to use the power of Web 2.0 to provide a bouquet of services that can improve the interactions between the company authorities and branches of GAIL.

Chapter 1

INTRODUCTION

INTRODUCTION

The GAIL (India) Limited, formally known as “Gas Authority of India Limited” was founded on 16th August, 1984 to create gas sector infrastructure for sustained development of the natural gas sector in the country. In the year 2009 GAIL has completed its 25 glorious years of service to the nation.

The 2800 km Hazira-Vijaipur-Jagdishpur (HVJ) pipeline becomes operational in 1991. During 1991-93, three LPG plants were constructed and some regional pipeline acquired, enabling GAIL to begin its regional gas distribution in various parts of India.

GAIL began its city gas distribution in Delhi in 1997 by setting up nine CNG stations, catering to the city’s vast public transport fleet.

In 1999, GAIL set up northern India’s only petrochemical plant at pata.

GAIL became the first infrastructure provider category II licensee and signed the country’s first service level agreement for leasing bandwidth in the Delhi-Vijaypur sector in 2001, through its Telecom business GAILTEL. In 2001 GAIL commissioned world’s longest and India’s first cross country LPG transmission pipeline from Jamnagar to Loni.

GAIL today has reached new milestones with its strategic diversification into petrochemicals, telecom and liquid hydrocarbons besides gas infrastructure. The company has also extended its presence in power, Liquefied Natural Gas regasification, city gas distribution and exploration & production through equity and joint ventures participation. Incorporating the new found energy into its corporate identity, Gas authority of India was renamed GAIL (India) Limited on 22November 2002.

Since 1984, GAIL has made significant contributions to the nation’s economy by supplying natural gas across country through its pipeline network for

Generation of over 87,000 MW of power.

Production of over 145 million tons of Urea.

Production of LPG for over 7 crore households in the country.

Over 5.75 lakh vehicles in the country today running on CNG supplied by GAIL and over 7 lakh households on Piped Natural Gas (PNG) in the country.

Production of petrochemicals of around 400,000 MTs which is used in plastics industry.

GAIL enabled the use of natural gas as a new energy resource in the country, which was earlier being flared in the offshore fields of Bombay High. The natural gas infrastructure of about 7,000 km. accounting for over 82% of the total pipeline infrastructure in India, set up so far by GAIL has contributed enormously to the economically and socially critical sectors such as fertilizers and power. GAIL also has the distinction of pioneering the clean fuel revolution for transport sector in the country with the introduction of CNG in Delhi and Mumbai which has significantly helped in reducing pollution levels in these two Metro cities. The pipeline network of GAIL supplies natural gas to various sector consumers equivalent to 204 million barrels of oil equivalent per year, thus not only contributing to import substitution but also providing environment friendly fuel. The natural gas infrastructure of GAIL plays a significant role in serving the nation by facilitating equitable geographical distribution of economic benefits. It provides ready market access to the domestic gas producers, making gas available to the customers. Including those who are remotely located, facilitating monetization and development of gas fields which are otherwise scattered and devoid of market access. The pipeline network has created choice for customers by providing cheaper, environment-friendly alternative fuel and has created choice for customers by providing cheaper, environment friendly alternative fuel and has reduced import-dependency as natural gas has substituted liquid fuel such as Naphtha, fuel oil, etc. GAIL has also spearheaded the spread of City Gas and Piped Gas network in the country which has helped in bringing down pollution levels in metros such as Delhi and Mumbai. GAIL’s pipeline network caters to the gas consumers in the states of Gujarat, Maharashtra, Rajasthan, Madhya Pradesh, Delhi, Haryana, Uttar Pradesh, Andhra Pradesh, Tamil Nadu, Assam and Tripura. In addition to supplying Natural Gas to various consumers, Gail has also setup 7 LPG plants and a petrochemical plant to extract value added products from gas. GAIL produces around 1.35 MMTPA of Liquid Hydrocarbon including LPG for domestic consumption. GAIL is now an integrated energy company along the natural value chain with global footprints. Today GAIL has interests in the business of natural gas, LPG, liquid hydrocarbons and petrochemicals, the latter being value-added products. The company has also entered in telecom sector by leasing bandwidth available through the OFC which is laid along the gas pipelines for their operations and maintenance. GAIL has also diversified into exploration & production, city gas distribution and is steadily developing an overseas presence. In the area of corporate social responsibility, one of the major projects of GAIL has been setting up of Air Pollution Related Disease Diagnostics Centers (APRDCs)

in over 20 cities in various parts of the country, at a cost of about Rs. 4 crore. Under this programmed, the diagnostic centers equipped with modern diagnostic amenities related to respiratory and cardio-vascular diseases and well trained medical personnel have been set up in partnership with reputed government / trust managed hospitals / institutions to provide diagnostic facilities and treatment to the people who are not able to afford baseline investigations for diagnosis. APRDC also works as R&D for development of facilities for diagnosing suspended particles, which are known to cause acute heart diseases. In more recent times, GAIL has initiated steam conversion project based on waste heat recovery system from GAIL’s gas turbines. This rare, multi-benefit project not only utilizes clean development mechanism (CDM) for power generation, but also leads to conservation of gas as well as increased energy efficiency. GAIL has a consistent track-record of dividend payment. So far, GAIL has disbursed dividend of Rs.6230 crore to the shareholders including Government of India, which is more than seven times the original investment of Rs. 845.65 crore by the Government on its equity capital. The history of GAIL (India) Limited, erstwhile Gas Authority of India Limited, is closely aligned to the growth of the petroleum industry in India. Till the mid-eighties, state owned Public Sector Undertakings in the Upstream & Downstream Segments were concentrating on effective sourcing and utilization of the oil resources of the country. ONGC has already made important gas discoveries in the western offshore South Basin fields which could not be utilized in absence of gas piping infrastructure. The Government embarked upon a planned and focused development of the natural gas sector in the country. Today, GAIL’s Business Portfolio includes:

7,700 km of Natural Gas high pressure trunk pipeline with a capacity to carry 157 MMSCMD of natural gas across the country.

7 LPG Gas Processing Units to produce 1.2 MMTPA of LPG and other liquid hydrocarbons.

North India's only gas based integrated Petrochemical complex at Pata with a capacity of producing 4, 10,000 TPA of Polymers.

1,922 km of LPG Transmission pipeline network with a capacity to transport 3.8 MMTPA of LPG.

27 oil and gas Exploration blocks and 3 Coal Bed Methane Blocks.

13,000 km of OFC network offering highly dependable bandwidth for telecom service providers.

Joint venture companies in Delhi, Mumbai, Hyderabad, Kanpur, Agra, Lucknow, Bhopal, Agartala and Pune, for supplying Piped Natural Gas

(PNG) to households and commercial users, and Compressed Natural Gas (CNG) to the transport sector.

Participating stake in the Dahej LNG Terminal and the upcoming Kochi LNG Terminal in Kerala.

GAIL has been entrusted with the responsibility of reviving the LNG terminal at Dabhol as well as sourcing LNG.

Established presence in the CNG and City Gas sectors in Egypt through equity participation in three Egyptian companies: Fayum Gas Company SAE, Shell CNG SAE and National Gas Company SAE.

Stake in China Gas Holding to explore opportunities in the CNG sector in mainland China.

A wholly-owned subsidiary company GAIL Global (Singapore) Pvt. Ltd in Singapore.

Incorporated 16th Aug,1984 Turnover (2009-10) Rs. 24,966 crore Net Profit (2009-10) Rs. 3140 crore Employees 3,480 Corporate Office 16 Bhikaiji Cama Place, R.K. Puram, New

Delhi 110066 Market Shares 78% Market Share in Natural Gas

Transmission

70% Market Share in Natural Gas Marketing

1.2 Web 2.0 Harnessing Web for providing Services

Web 2.0 describes World Wide Web sites that emphasize user-generated content, usability, and interoperability. The term was popularized by Tim O'Reilly and Dale Dougherty at the O'Reilly Media Web 2.0 Conference in late 2004, though it was first coined by Darcy DiNucci in 1999. Although Web 2.0 suggests a new version of the World Wide Web, it does not refer to an update to any technical specification, but rather to cumulative changes in the way Web pages are made and used.

A Web 2.0 site may allow users to interact and collaborate with each other in a social media dialogue as creators of user-generated content in a virtual community, in contrast to Web sites where people are limited to the passive viewing of content. Examples of Web 2.0 include social networking sites, blogs, wikis, folksonomies, video sharing sites, hosted services, Web applications, and mashups.

Whether Web 2.0 is substantively different from prior Web technologies has been challenged by World Wide Web inventor Sir Tim, who describes the term as jargon. His original vision of the Web was "a collaborative medium, a place where we [could] all meet and read and write". On the other hand, the term Semantic Web (sometimes referred to as Web 3.0)

was coined by Tim Berners-Lee for a web of data that can be processed by machines.

Services Offered

LOGIN PAGE

CORDINATOR IT-HEAD OTHER

DEPARTMNET

ASP.NET(C# pages)

ORACLE Database Server

Web APIs

Chapter 2

SOFTWARE REQUIREMENT SPECIFICATION

2.1 Introduction

The introduction of the Software Requirements Specification (SRS) provides an overview of the entire SRS with purpose, scope, definitions, acronyms, abbreviations, references and overview of the SRS. The aim of this document is to gather and analyze and give an in-depth insight of the complete IEEE by defining the problem statement in detail. Nevertheless, it also concentrates on the capabilities required by stakeholders and their needs while defining high-level product features.

2.2 Purpose

The service that this site intends to provide a platform for projects that are deployed from Noida and to serve the needs of the employees for both the purposes of relaying internal as well as external information i.e. Information intended for employees of GAIL.

In short, the purpose of this SRS document is to provide a detailed overview of our software product, its parameters and goals. This document describes the project's target audience and its user interface, hardware and software requirements. It defines how our client, team and audience see the product and its functionality. Nonetheless, it helps any designer and developer to assist in software delivery lifecycle (SDLC) processes.

2.3 Scope

Primarily, the scope pertains to the product features for making the It department to keep check on the projects deployment and authorization. The future scope is bright as it is cost effective and easy to maintain in years. This SRS is also aimed at specifying requirements of software to be developed but it can also be applied to assist in the selection of in-house and commercial software products. The standard can be used to create software requirements specifications directly or can be used as a model for defining a organization or

project specific standard. It does not identify any specific method, nomenclature or tool for preparing an SRS.

2.4 Overall Description

This document contains the problem statement that the current system is facing which is hampering the growth opportunities of the company. It further contains a list of the stakeholders and users of the proposed solution. It also illustrates the needs and wants of the stakeholders that were identified in the brainstorming exercise as part of the requirements workshop. It further lists and briefly describes the major features and a brief description of each of the proposed system. The following SRS contains the detail product perspective from different stakeholders. It provides the detail product functions of E-Store with user characteristics permitted constraints, assumptions and dependencies and requirements subsets

2.5 Specific Requirements

The specific requirements are –

Functionality

Introduction – This subsection contains the requirements for the e-store. These requirements are organized by the features discussed in the vision document. Features from vision documents are then refined into use case diagrams and to sequence diagram to best capture the functional requirements of the system. All these functional requirements can be traced using tractability matrix.

2.6 Performance

The product shall be based on web and has to be run from a web server. The product shall take initial load time depending on internet connection strength which also depends on the media from which the product is run. The performance shall depend upon hardware components of the client/customer.

2.7 Security

2.7.1 Data Transfer

The system shall use secure sockets in all transactions that include any confidential customer information. The system shall automatically log out all customers after a period of inactivity. The system shall confirm all transactions with the customer’s web browser. The system shall not leave any cookies on the customer’s computer containing the user’s password. The system shall not leave any cookies on the customer’s computer containing any of the user’s confidential information.

2.7.2 Data Storage

The employee’s web browser shall never display a employee’s password. It shall always be echoed with special characters representing typed characters. The system’s back-end servers shall never display a employee’s password. The employee’s password may be reset but never shown. The system’s back-end servers shall only be accessible to authenticated administrators. The system’s back-end databases shall be encrypted.

2.8 Tracking Data Flow: Data Flow Diagrams

It is common practice to draw the context-level data flow diagram first, which shows the interaction between the system and external agents which act as data sources and data sinks. This helps to create an accurate drawing in the context diagram. The system's interactions with the outside world are modelled purely in terms of data flows across the system boundary. The context diagram shows the entire system as a single process, and gives no clues as to its internal organization.

This context-level DFD is next "exploded", to produce a Level 1 DFD that shows some of the detail of the system being modelled. The Level 1 DFD shows how the system is divided into sub-systems (processes), each of which deals with one or more of the data flows to or from an external agent, and which together provide all of the functionality of the system as a whole. It also identifies internal data stores that must be present in order for the system to do its job, and shows the flow of data between the various parts of the system.

Data flow diagrams are one of the three essential perspectives of the structured-systems analysis and design method SSADM. The sponsor of a project and the end users will need to be briefed and consulted throughout all stages of a system's evolution. With a data flow diagram, users are able to visualize how the system will operate, what the system will accomplish, and how the system will be implemented. The old system's dataflow diagrams can be drawn up and compared with the new system's data flow diagrams to draw comparisons to implement a more efficient system. Data flow diagrams can be used to provide the end user with a physical idea of where the data they input ultimately has an effect upon the structure of the whole system from order to dispatch to report. How any system is developed can be determined through a data flow diagram model.

In the course of developing a set of levelled data flow diagrams the analyst/designers is forced to address how the system may be decomposed into component sub-systems, and to identify the transaction data in the data model.

Fig. 2.1 Level 1 DFD for Home Page and data Display

Fig. 2.2 Level 1 DFD for new entry

USER LOGIN Web

FORM XML Sheet or ORACLE Table

Validate USER DASHBOARD

USER Specific Data

USER New ENTRY Web

FORM HTML Sheets

Chapter 3

SOFTWARE DESIGN SPECIFICATION

3.1 INTRODUCTION

This section provides an overview of the entire design document. This document describes all data, architectural, interface and component-level design for the software.

3.2 Goals and objectives

To create a front-end for a set of relational databases that provides service through the Internet.

3.3 Statement of scope

The software will retrieve data from an ORACLE server upon user defined queries. The users should have quick response time to the data. This will be used by the software to create reports. These reports can be viewed from possibly any browser and/or printed and/or exported.

3.4 Software context

This end product will be provided via the Intranet to GAIL employees to access data that will provide up to date information on dealership locations around the country, customer profile information. (I.e. Added, terminated, compliances pending and completed).

3.5 Project Category

Web Based Applications

A web application or web app is any program that runs in a web browser. It is created in a browser-supported programming language(such as the combination of JavaScript, HTML and CSS) and relies on a web browser to render the application.

Web applications are popular due to the ubiquity of web browsers, and the convenience of using a web browser as a client to update and maintain web applications without distributing and installing software on potentially thousands of client computers is a key reason for their popularity, as is the inherent support for cross-platform compatibility. Common web applications include webmail, online retail sales, online auctions, wikis and many other functions.

3.6 Project Life Cycle

Fig. 3.1 Software Development Life Cycle: The Embedded Waterfall Model

The software development life cycle (SDLC), or software development process in systems engineering, information systems and software engineering, is a process of creating or altering information systems, and the models and methodologies that people use to develop these systems.

Chapter 4

TECHNOLOGY USED

ASP.NET(Active Server Pages):- Asp.net is an open-source server-side Web application framework designed for Web development to produce dynamic Web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, web applications and web services.

It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET language. The ASP.NET SOAP extension framework allows ASP.NET components to process SOAP messages.

ASP.NET is in the process of being re-implemented as a modern and modular web framework, together with other frameworks like Entity. The new framework will make use of the new open-source .NET Compiler Platform (code-name "Roslyn") and be cross platform. ASP.NET MVC, ASP.NET Web API, and ASP.NET Web Pages (a platform using only Razor pages) will merge into a unified MVC 6.The project is called "ASP.NET vNext".

The ASPX and other resource files are placed in a virtual host on an Internet Information Services server (or other compatible ASP.NET servers; see Other implementations, below). The first time a client requests a page, the .NET Framework parses and compiles the file(s) into a .NET assembly and sends the response; subsequent requests are served from the DLL files. By default ASP.NET will compile the entire site in batches of 1000 files upon first request. If the compilation delay is causing problems, the batch size or the compilation strategy may be tweaked.

Database Architecture:

Oracle Database (commonly referred to as Oracle RDBMS or simply as Oracle) is an object-relational database management system produced and marketed by Oracle Corporation.

Larry Ellison and his two friends and former co-workers, Bob Miner and Ed Oates, started a consultancy called Software Development Laboratories (SDL) in 1977. SDL developed the original version of the Oracle software. The name Oracle comes from the code-name of a CIA-funded project Ellison had worked on while previously employed by Ampex.

The design of a DBMS depends on its architecture. It can be centralized or

decentralized or hierarchical. The architecture of a DBMS can be seen as either

single tier or multi-tier. An n-tier architecture divides the whole system into

related but independent n modules, which can be independently modified,

altered, changed, or replaced.

In 1-tier architecture, the DBMS is the only entity where the user directly sits on

the DBMS and uses it. Any changes done here will directly be done on the DBMS

itself. It does not provide handy tools for end-users. Database designers and

programmers normally prefer to use single-tier architecture.

If the architecture of DBMS is 2-tier, then it must have an application through

which the DBMS can be accessed. Programmers use 2-tier architecture where

they access the DBMS by means of an application. Here the application tier is

entirely independent of the database in terms of operation, design, and

programming.

Chapter 5

RESULTS AND OBSERVATIONS

1. The website was designed with an aim to make use of

the cornerstones of Web 2.0 technology so as to enable

the customers to take its crucial information disbursal

and communication online.

2. In line with the above aim, several modules were

instituted so as to come up with a website that provides

a holistic and easy to use environment that will help to

achieve the stated goals.

Information Forms, Reports, and Tables: The module has

achieved with the task of letting the employers of GAIL to

keep track of ongoing projects thus moving it into a more

paperless environment.

Chapter 6

CONCLUSION

1. The website can be used for communication

and information dissemination in an

environment that includes IT-heads,

coordinators and other small Departments.

2. The various modules that are incorporated

can be used for making a link between the

employees and IT-head.

Chapter 7

FUTURE SCOPE

1. The project was developed keeping in view the future

requirements of the client.

2. The same system can be expanded to include complete

office automation system of the organization.

Chapter 8

REFERENCES

1. Stack Overflow

2. Code Guru

3. Microsoft Support

4. C# Programmer’s CookBook

5. W3schools

6. CSS Tricks

7. Oracle Support

8. Toad World

APPENDIX A: (Screen Shots)

Login Page:

IT-head:

Coodinator:

Sub Group:

APPENDIX B: (Source Code) IT-Head using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using DALC4NET; using System.Data; using System.Diagnostics; using System.Text; using System.Web.UI; using System.Windows.Input; using System.Windows.Markup; using System.Web.UI.WebControls; using System.Configuration; namespace ProductGail { public partial class it_head2 : System.Web.UI.Page { protected DBHelper _dbHelper = DBHelper.GetInstance(); public static string x; int id = 0; public static string loc; public static string c; public static string c2; public static string selectedValue = "Noida"; public static string farzi = "fz"; protected void Page_Load(object sender, EventArgs e) { if (Session["user"] != null) LinkButton1.Text = "Welcome, " + Session["user"].ToString(); if (!IsPostBack) { this.BindRepeater(); // databinding code here } } protected void lout_Click(object sender, EventArgs e) { Session["user"] = null; Response.Redirect("login.aspx"); } private void BindRepeater() {

try { id = Int32.Parse(ConfigurationManager.AppSettings["userid"]); string ithead = Session["user"].ToString(); string q1 = "select location_name from users where user_id = " + id; loc = _dbHelper.ExecuteScalar(q1).ToString(); } catch (System.ArgumentNullException) { } if (Session["user"] != null) { try { string constr1 = "select products.product_name,products.description,round(avg(feedback.percentage_completion),0) as percentage from products full outer join feedback on products.product_id = feedback.feedback_id where approval = 'YES' group by products.product_name,products.description order by products.product_name"; Repeater2.DataSource = _dbHelper.ExecuteDataTable(constr1); Repeater2.DataBind(); string constr = "select products.product_name,products.description,round(avg(feedback.percentage_completion),0) as percentage from products full outer join feedback on products.product_id = feedback.feedback_id where approval = 'NO' group by products.product_name,products.description order by products.product_name"; Repeater1.DataSource = _dbHelper.ExecuteDataTable(constr); Repeater1.DataBind(); } catch (Exception e) { string constr1 = "select products.product_name,products.description,round(avg(feedback.percentage_completion),0) as percentage from products full outer join feedback on products.product_id = feedback.feedback_id where approval = 'YES' group by products.product_name,products.description order by products.product_name"; Repeater2.DataSource = _dbHelper.ExecuteDataTable(constr1); Repeater2.DataBind(); string constr = "select products.product_name,products.description,round(avg(feedback.percentage_completion),0) as percentage from products full outer join feedback on products.product_id = feedback.feedback_id where approval = 'NO' group by products.product_name,products.description order by products.product_name"; Repeater1.DataSource = _dbHelper.ExecuteDataTable(constr); Repeater1.DataBind(); } }

else { try { string constr1 = "select products.product_name,products.description,round(avg(feedback.percentage_completion),0) as percentage from products full outer join feedback on products.product_id = feedback.feedback_id where approval = 'YES' group by products.product_name,products.description order by products.product_name"; Repeater2.DataSource = _dbHelper.ExecuteDataTable(constr1); Repeater2.DataBind(); string constr = "select products.product_name,products.description,round(avg(feedback.percentage_completion),0) as percentage from products full outer join feedback on products.product_id = feedback.feedback_id where approval = 'NO' group by products.product_name,products.description order by products.product_name"; Repeater1.DataSource = _dbHelper.ExecuteDataTable(constr); Repeater1.DataBind(); } catch (Exception e) { string constr1 = "select products.product_name,products.description,round(avg(feedback.percentage_completion),0) as percentage from products full outer join feedback on products.product_id = feedback.feedback_id where approval = 'YES' group by products.product_name,products.description order by products.product_name"; Repeater2.DataSource = _dbHelper.ExecuteDataTable(constr1); Repeater2.DataBind(); string constr = "select products.product_name,products.description,round(avg(feedback.percentage_completion),0) as percentage from products full outer join feedback on products.product_id = feedback.feedback_id where approval = 'NO' group by products.product_name,products.description order by products.product_name"; Repeater1.DataSource = _dbHelper.ExecuteDataTable(constr); Repeater1.DataBind(); } } } protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "approve") { Button btn1 = (Button)e.Item.FindControl("button"); Label l = (Label)e.Item.FindControl("Label1"); DropDownList dd = e.Item.FindControl("DropDownList1") as DropDownList; DropDownList d = e.Item.FindControl("DropDownList2") as DropDownList; c = d.SelectedValue.ToString(); c2 = dd.SelectedValue.ToString();

string z = "select user_id from users where name = '"+c+"' and location_name = '"+c2+"'"; int i = Int32.Parse(_dbHelper.ExecuteScalar(z).ToString()); string zz = "UPDATE products SET user_id = " + i + ", approval = 'YES' where product_name = '" + l.Text + "'"; _dbHelper.ExecuteScalar(zz); z = "select feedback_id from products where product_name = '"+l+"'"; i = Int32.Parse(_dbHelper.ExecuteScalar(z).ToString()); z = "insert into feedback(feedback_id,location,percentage_completion,completion) values("+i+",'"+c2+"',0,'NO')"; _dbHelper.ExecuteScalar(z); Response.Redirect("it-head2.aspx"); this.BindRepeater(); } } protected void Repeater1_ItemCreated(object sender, RepeaterItemEventArgs e) { } protected void Repeater2_ItemCommand(object source, RepeaterCommandEventArgs e) { farzi = "dsf"; } protected void Repeater2_ItemCreated(object sender, RepeaterItemEventArgs e) { farzi = "dsf"; } protected void RadioButton1_CheckedChanged(object sender, EventArgs e) { } protected void Repeater4_ItemCommand(object source, RepeaterCommandEventArgs e) { farzi = "dsf"; } protected void Repeater4_ItemCreated(object sender, RepeaterItemEventArgs e) { farzi = "dsf"; } protected void Repeater2_ItemDataBound(object sender, RepeaterItemEventArgs e) {

Label l1 = (Label)e.Item.FindControl("Label5"); if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { Repeater rpeater = e.Item.FindControl("Repeater4") as Repeater; string q1 = "select product_id from products where product_name = '"+l1.Text+"'"; int i = Int32.Parse(_dbHelper.ExecuteScalar(q1).ToString()); string constr3 = "select unique f.percentage_completion,f.total_users,f.location from feedback f,products p where f.feedback_id="+i+" and p.product_id = "+i+""; rpeater.DataSource = _dbHelper.ExecuteDataTable(constr3); rpeater.DataBind(); } } protected void Button1_Click(object sender, EventArgs e) { } protected void button_Click(object sender, EventArgs e) { } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { DropDownList ddl = (DropDownList)sender; selectedValue = ddl.SelectedValue.ToString(); this.BindRepeater(); } protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { var d1 = e.Item.FindControl("DropDownList1") as DropDownList; var d2 = e.Item.FindControl("DropDownList2") as DropDownList; d2.Items.Clear(); d2.Items.Insert(0, "--Select Your Coordinator--"); string s = "select unique location_name from users where designation = 'Co-ordinator'"; DataTable dt = _dbHelper.ExecuteDataTable(s); string query2 = "select count(unique location_name) from users where designation = 'Co-ordinator'"; int i = Int32.Parse(_dbHelper.ExecuteScalar(query2).ToString()); for (int j = 0; j < i;j++ ) { d1.Items.Add(dt.Rows[j][0].ToString()); }

string s1 = "select name from users where location_name = '" + selectedValue + "' and designation = 'Co-ordinator'"; DataTable dt1 = _dbHelper.ExecuteDataTable(s1); string query3 = "select count(name) from users where location_name = '" + selectedValue + "' and designation = 'Co-ordinator'"; int i1 = Int32.Parse(_dbHelper.ExecuteScalar(query3).ToString()); for (int j = 0; j < i1; j++) { d2.Items.Add(dt1.Rows[j][0].ToString()); } } } } }

Coordinator: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using DALC4NET; using System.Data; using System.Diagnostics; using System.Text; using System.Web.UI; using System.Windows.Input; using System.Windows.Markup; using System.Web.UI.WebControls; using System.Configuration; namespace ProductGail { public partial class coordinator : System.Web.UI.Page { protected DBHelper _dbHelper = DBHelper.GetInstance(); public static string x; int id = 0; public static string loc; public static string farzi = "fz"; protected void Page_Load(object sender, EventArgs e) { if (Session["user"] != null) LinkButton1.Text = "Welcome, " + Session["user"].ToString(); if (!IsPostBack) { this.BindRepeater(); } } protected void lout_Click(object sender, EventArgs e)

{ Session["user"] = null; Response.Redirect("login.aspx"); } private void BindRepeater() { try { id = Int32.Parse(ConfigurationManager.AppSettings["userid"]); string coordinator = Session["user"].ToString(); string q1 = "select location_name from users where user_id = " + id; loc = _dbHelper.ExecuteScalar(q1).ToString(); } catch (System.ArgumentNullException) { } if (Session["user"] != null) { try { string constr = "select p.product_name,p.description,f.target_user,round(avg(f.percentage_completion),0) as percentage_completion from products p full outer join feedback f on f.feedback_id=p.product_id where p.user_id= " + id + " group by p.product_name,p.description,f.target_user order by p.product_name"; Repeater1.DataSource = _dbHelper.ExecuteDataTable(constr); Repeater1.DataBind(); string constr1 = "select p.product_name,p.description,f.target_user,round(avg(f.percentage_completion),0) as percentage_completion from products p full outer join feedback f on f.feedback_id=p.product_id where p.user_id= " + id + " group by p.product_name,p.description,f.target_user order by p.product_name"; Repeater2.DataSource = _dbHelper.ExecuteDataTable(constr1); Repeater2.DataBind(); } catch (Exception e) { string constr = "select p.product_name,p.description,f.target_user,round(avg(f.percentage_completion),0) as percentage_completion from products p full outer join feedback f on f.feedback_id=p.product_id where p.user_id= " + id + " group by p.product_name,p.description,f.target_user order by p.product_name"; Repeater1.DataSource = _dbHelper.ExecuteDataTable(constr); Repeater1.DataBind();

string constr1 = "select p.product_name,p.description,f.target_user,round(avg(f.percentage_completion),0) as percentage_completion from products p full outer join feedback f on f.feedback_id=p.product_id where p.user_id= " + id + " group by p.product_name,p.description,f.target_user order by p.product_name"; Repeater2.DataSource = _dbHelper.ExecuteDataTable(constr1); Repeater2.DataBind(); } } else { try { string constr = "select p.product_name,p.description,f.target_user,round(avg(f.percentage_completion),0) as percentage_completion from products p full outer join feedback f on f.feedback_id=p.product_id where p.user_id= " + id + " group by p.product_name,p.description,f.target_user order by p.product_name"; Repeater1.DataSource = _dbHelper.ExecuteDataTable(constr); Repeater1.DataBind(); string constr1 = "select p.product_name,p.description,f.target_user,round(avg(f.percentage_completion),0) as percentage_completion from products p full outer join feedback f on f.feedback_id=p.product_id where p.user_id= " + id + " group by p.product_name,p.description,f.target_user order by p.product_name"; Repeater2.DataSource = _dbHelper.ExecuteDataTable(constr1); Repeater2.DataBind(); } catch (Exception e) { string constr = "select p.product_name,p.description,f.target_user,round(avg(f.percentage_completion),0) as percentage_completion from products p full outer join feedback f on f.feedback_id=p.product_id where p.user_id= " + id + " group by p.product_name,p.description,f.target_user order by p.product_name"; Repeater1.DataSource = _dbHelper.ExecuteDataTable(constr); Repeater1.DataBind(); string constr1 = "select p.product_name,p.description,f.target_user,round(avg(f.percentage_completion),0) as percentage_completion from products p full outer join feedback f on f.feedback_id=p.product_id where p.user_id= " + id + " group by p.product_name,p.description,f.target_user order by p.product_name"; Repeater2.DataSource = _dbHelper.ExecuteDataTable(constr1); Repeater2.DataBind(); } } } protected void Repeater1_ItemCreated(object sender, RepeaterItemEventArgs e) { }

protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { } protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e) { } protected void Repeater2_ItemCreated(object sender, RepeaterItemEventArgs e) { } protected void Repeater2_ItemDataBound(object sender, RepeaterItemEventArgs e) { } protected void Repeater2_ItemCommand(object source, RepeaterCommandEventArgs e) { if(e.CommandName == "update") { Button btn1 = (Button)e.Item.FindControl("Button1"); TextBox t = (TextBox)e.Item.FindControl("enduser"); TextBox t1 = (TextBox)e.Item.FindControl("perctage"); Label l = (Label)e.Item.FindControl("Label5"); int n1 = Int32.Parse(t1.Text); int n2 = Int32.Parse(t.Text); int i = n2 *100 / n1; string yy = "select feedback_id from products where product_name = '"+l.Text+"'"; int i1 = Int32.Parse(_dbHelper.ExecuteScalar(yy).ToString()); string zz = "UPDATE feedback SET total_users = "+n2+", target_user = "+n1+", percentage_completion = "+i+" where feedback_id = "+i1+""; _dbHelper.ExecuteScalar(zz); this.BindRepeater(); } } protected void Repeater4_ItemCommand(object source, RepeaterCommandEventArgs e) { farzi = "dsf"; } protected void Repeater4_ItemCreated(object sender, RepeaterItemEventArgs e) { farzi = "dsf"; } protected void Button1_Click(object sender, EventArgs e) { } }

} Login: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using DALC4NET; using System.Data; using System.Diagnostics; using System.Configuration; namespace ProductGail { public partial class login : System.Web.UI.Page { protected DBHelper _dbHelper = DBHelper.GetInstance(); public int temp = 0; public static string x; public static string y; public static string query3; protected void Page_Load(object sender, EventArgs e) { if (Session["user"] != null) Response.Redirect("login.aspx"); } protected void Button1_Click(object sender, EventArgs e) { try { string query = "select designation from users where password='" + lpassword.Text + "' and user_id='" + lemail.Text + "'"; string user_id; string query1 = "Select name from USERS where USER_ID = '" + lemail.Text + "' AND PASSWORD = '" + lpassword.Text + "'"; if (_dbHelper.ExecuteScalar(query1) != null) { user_id = lemail.Text; ConfigurationManager.AppSettings["userid"] = user_id.ToString(); } if (_dbHelper.ExecuteScalar(query) != null) y = _dbHelper.ExecuteScalar(query).ToString(); if (_dbHelper.ExecuteScalar(query1) != null) Session["user"] = _dbHelper.ExecuteScalar(query1).ToString(); if (y == "IT-Head") Response.Redirect("it-head2.aspx");

if (y == "Co-ordinator") Response.Redirect("coordinator.aspx"); if (y == "subgroup") Response.Redirect("subgroup.aspx"); else { Response.Write("<script>alert('Invalid Credentials');</script>"); } } catch (Exception ww) { Response.Write(ww.Message.ToString()); } } } }

Sub-Group: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using DALC4NET; using System.Data; using System.Diagnostics; using System.Text; using System.Web.UI; using System.Windows.Input; using System.Windows.Markup; using System.Web.UI.WebControls; using System.Configuration; namespace ProductGail { public partial class subgroup : System.Web.UI.Page { protected DBHelper _dbHelper = DBHelper.GetInstance(); public static string x; int id = 0; public static string loc; public static string farzi = "fz"; protected void Page_Load(object sender, EventArgs e) { if (Session["user"] != null) LinkButton1.Text = "Welcome, " + Session["user"].ToString(); if (!IsPostBack) { this.BindRepeater(); // databinding code here } }

protected void lout_Click(object sender, EventArgs e) { Session["user"] = null; Response.Redirect("login.aspx"); } private void BindRepeater() { try { id = Int32.Parse(ConfigurationManager.AppSettings["userid"]); string coordinator = Session["user"].ToString(); string q1 = "select location_name from users where user_id = " + id; loc = _dbHelper.ExecuteScalar(q1).ToString(); } catch (System.ArgumentNullException) { } if (Session["user"] != null) { try { string constr = "select p.product_name,p.description,f.target_user,round(avg(f.percentage_completion),0) as percentage_completion from products p full outer join feedback f on f.feedback_id=p.product_id where p.user_id= " + id + " group by p.product_name,p.description,f.target_user order by p.product_name"; Repeater1.DataSource = _dbHelper.ExecuteDataTable(constr); Repeater1.DataBind(); } catch (Exception e) { string constr = "select p.product_name,p.description,f.target_user,round(avg(f.percentage_completion),0) as percentage_completion from products p full outer join feedback f on f.feedback_id=p.product_id where p.user_id= " + id + " group by p.product_name,p.description,f.target_user order by p.product_name"; Repeater1.DataSource = _dbHelper.ExecuteDataTable(constr); Repeater1.DataBind(); } } else { try {

string constr = "select p.product_name,p.description,f.target_user,round(avg(f.percentage_completion),0) as percentage_completion from products p full outer join feedback f on f.feedback_id=p.product_id where p.user_id= " + id + " group by p.product_name,p.description,f.target_user order by p.product_name"; Repeater1.DataSource = _dbHelper.ExecuteDataTable(constr); Repeater1.DataBind(); } catch (Exception e) { string constr = "select p.product_name,p.description,f.target_user,round(avg(f.percentage_completion),0) as percentage_completion from products p full outer join feedback f on f.feedback_id=p.product_id where p.user_id= " + id + " group by p.product_name,p.description,f.target_user order by p.product_name"; Repeater1.DataSource = _dbHelper.ExecuteDataTable(constr); Repeater1.DataBind(); } } } protected void Repeater1_ItemCreated(object sender, RepeaterItemEventArgs e) { } protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { } protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e) { } } }