Anda di halaman 1dari 112

MAJOR PROJECT REPORT ON GAC-A Web Application Tool

Submitted in partial fulfilment of the award of degree of Bachelor Of Technology in Computer Science and Engineering. Logo Batch(2007-2011)

CERTIFICATE

This is to certify that Rani(180), bonafide students of Bachelor of Technology in Computer Engineering being run by Haryana Engineering College, Jagadhri of batch 2007 2011 has completed their major project entitled GAC-A Web Application Tool at HEC, Jagadhri under the supervision of Er. Niraj Madan.

Date..

Dr. Neeraj Garg Chairperson

CERTIFICATE

This is to certify that Rani bonafide students of Bachelor of Technology in Computer Engineering being run by Haryana Engineering College, Jagadhri of batch 2007 2011 has completed their major project entitled GAC-A Web Application Tool at HEC, Jagadhri under my supervision & guidance.
It is further certified that the work done in this dissertation is a result of candidates own efforts. I wish them all success in their life.

Date .. College.

CERTIFICATE

I herby certify that the work which is presented in the Major Project entitled GAC-A Web Application Tool in fulfillment of the requirement for the award of the Degree of Bachelor of Technology and submitted to the Department of Computer Science & Engineering of Haryana Engineering College (HEC), Jagadhri affiliated to Kurukshetra University, Kurukshetra is an authentic record of my own, carried out during a period from August, 2011 to November, 2011, under the supervision of Er. Niraj Madan. The matter presented in this report has not been submitted by me for the award of any other degree of this or any other Institute/University.

PREFACE

Today, we are passing through the knowledge of revolution. Any person with unique, enterprising and profitable idea is venturing in the formation range in one way or another. One of the passages is through development of software or what many calls solutions for the particular things. Having got a descent exposure to various computer concepts and language in our curriculum, we want to have a platform where we can give some practical shape to our Knowledge and creative capabilities. The requirements of submission of a project as final

year of B.Tech. curriculum, gave us chance, time to achieve what we wanted to do. On the above lines, we make a project titled as GAC-A Web Application Tool We are thankful to all the members of computer science and engineering department, who spared their valuable time for guiding us for the project. We are thankful to Er Madan for their valuable guidance and worthy suggestions which pushed me forward to complete the minor project and course report for which Im greatly indebted to him. We will welcome suggestions from the users of our project for its further improvement.

ACKNOWLEDGEMENT

Perseverance, inspiration and motivation have always played a great role in the success of any venture. At this level of understanding, it is often difficult to understand the wide spectrum of technology without proper guidance and advice. This report conveys our heartiest thanks to the cooperative lecturers, Head of the Department of the college and all other concerned to guide us with the requirements of present scenario of development. Preparing a project is never a unilateral effort thus our gratitude is conveyed to all those who have helped us to reach the stage where we have an immense confidence to launch our career in the competitive world of Information Technology. We acknowledge the role of the Almighty God to favour our destiny, our parents who have always bolstered our ambitious pondering.

Aa(

Rani(

LIST OF FIGURES

1. Three Tier Architecture 2. .Net Framework 3. Architecture

15 21 29

LIST OF TABLES

1. Asp.Net framework versions

18

TABLE OF CONTENTS
1. Introduction 1.1 Statement about the problem 1.2 Why is the particular topic chosen 1.3 Objectives and Scope of the project 2. Literature Survey 2.1 Working Environment 2.2 Master Pages 2.3 Content Pages 2.4 Asp.Net framework versions 2.5 Benefits of using Asp.Net 2.6 Microsoft Sql Server 2005 3. System Design 3.1 Methodology Adopted 3.2 System implementation 3.3 Software used 3.4 System maintainance 3.5 Data flow diagrams 4. Project Details with Requirements 4.1 User requirements 4.2 Hardware and Software requirements 4.3 Hardware and Software to be used 5. Partial Code 6. Result 7. Conclusion 8. References 11 11 12 12 14 14 17 17 18 20 22 26 26 27 27 32 34 39 39 39 41 44 98 108 110

INTRODUCTION

10

CHAPTER 1 INTRODUCTION
GAC: A Web Application Tool is a computerized, online solution to the various problems faced by Users/Clients (may be a Company) wishing to outsource their software development work to a Provider at an economical cost, thus achieving high performance, accuracy, reliability and high speed of data retrieval. In this system, there is a registration process each for the Client and the Provider. The Administrator of the site verifies the Provider after his registration and if satisfied, assigns him an ID and password. Once the Clients have registered themselves, they can post the projects they wish to get developed. Different registered Providers can then view these projects and post their biddings in response. The Clients, after viewing these biddings, can assign the software development work to a particular Provider, best suitable to their needs and budget. The Provider then assigns the work to his Employees who develop the project and participate in discussions with the Client regarding the project. The Client, in return, send feedback of Employees to the Provider.

The concept of Master Pages and Content Pages is used. Web User Controls are used to enhance Reusability. Different companies can place their Advertisements after paying the requisite amount of fees. The concept of Polling is used to attract visitors and to make the site more fascinating. Provision of Emailing is also provided.

1.1 STATEMENT ABOUT THE PROBLEM A Client/User who wishes to get his software/project developed has to contact different Providers either physically or telephonically before deciding upon a particular Provider that best suit his needs, requirements and budget. Moreover, most of the work involved in the software development process has to be done manually which is very time consuming and 11

cumbersome and also, it reduces the efficiency, accuracy and speed of retrieval of data. It is not that no effort has been made towards this end. An attempt to get the complete working automated failed as the system could not be integrated into a functional whole. I felt this shortcoming becoming glaringly evident. A discussion with my project guide produced enthusiastic response and I decided to take the challenge.

1.2 WHY IS THE PARTICULAR TOPIC CHOSEN This topic is chosen as it is going to give me a lifetime experience studying and developing a full fledged Web Application as per today trends and help me choking out a nice career for myself.

1.3 OBJECTIVES AND SCOPE OF THE PROJECT


The following objectives have been set: Smooth flow of data without any hurdles. Adequate validation checks for data entry. Adequate security of data. Facility to update data from time to time. Prompt and specific retrieval of data. Flexibility in the system according to the changing environment. Controlling redundancy in storing the same data multiple times. Accuracy, timeliness and comprehensiveness of the system output. Stability and operability by people of average intelligence. Enhancement in the completion of work within the constraints of time.

The scope of the system is quite wide. It can be implemented on a WAP enabled mobile handset, thus providing the Clients and the Providers, the ease of accessing the projects and their status without any difficulty and within no time.

12

LITERATURE SURVEY

13

CHAPTER 2 LITERATURE SURVEY

2.1 : WORKING ENVIRONMENT

Understanding .Net Frame Work: DEFINITION:


The .Net framework can be defined as a language neutral platform designed to provide a number of rich and powerful application development tools and technologies. It has an extensive class library that provides wide-ranging support for data access. .Net framework has an independent code execution and management environment called the Common Language Runtime (CLR) which ensures that code is safe to run, and provides an abstract layer on top of the operating system, which allows the elements of the .Net framework to run on many operating systems and devices.

The Microsoft .NET Framework is a software framework that can be installed on computers running Microsoft Windows operating systems. It includes a large library of coded solutions to common programming problems and a virtual machine that manages the execution of programs written specifically for the framework. The .NET Framework is a Microsoft offering and is intended to be used by most new applications created for the Windows platform. The framework's Base Class Library provides a large range of features including user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, and network communications. The class library is used by programmers, who combine it with their own code to produce applications. Programs written for the .NET Framework execute in a software environment that manages the program's runtime requirements. Also part of the .NET Framework, this runtime environment is known as the Common Language Runtime (CLR). The CLR provides the appearance of an application virtual machine so that programmers need not consider the

14

capabilities of the specific CPU that will execute the program. The CLR also provides other important services such as security, memory management, and exception handling. The class library and the CLR together constitute the .NET Framework.
2.1.1: THE .NET VISION

The basic idea behind the development of the .Net framework is that a global broadband network will someday globally connect all devices and the software will become a service provided over this network. The .Net framework provides the foundation and the plumbing on which the Microsoft .Net vision is built. The vision is about having a global network and open standards like XML to make it easier for parties to exchange data and work together. Now devices will use common languages like XML over standardized or shared protocols such as HTTP and these devices will be running a multitude of software on sun, IBM. The .Net framework provides the tools and the technologies needed to write applications that can seamlessly and easily communicate over the Internet using open standards like XML and SOAP. It also aims at solving the various problems that are faced by developers while working on applications made using the windows DNA. It provides a solution to problems such as registering of components and shutting down applications in order to upgrade them. various operating systems. This is not limited to Microsoft but also to other operating systems such as

2.1.2 : Three-tier architecture:

Figure1: Three Tier Architecture.

15

Three-tier is a Client Server Architecture in which the user interface, functional process logic ("business rules"), computer data storage and data access are developed and maintained as independent modules, most often on separate platforms. It was developed by John J. Donovan in Open Environment Corporation (OEC), a tools company he founded in Cambridge, MA. The three-tier model is a software architecture and a software design pattern. Apart from the usual advantages of modular software with well-defined interfaces, the threetier architecture is intended to allow any of the three tiers to be upgraded or replaced independently as requirements or technology change. For example, a change of operating system in the presentation tier would only affect the user interface code. Three-tier architecture has the following three tiers:

Presentation tier

This is the topmost level of the application. The presentation tier displays information related to such services as browsing merchandise, purchasing, and shopping cart contents. It communicates with other tiers by outputting results to the browser/client tier and all other tiers in the network. Presentation layer contains pages like .aspx or windows form where data is presented to the user or input is taken from the user.

Application tier (business logic, logic tier, data access tier, or middle tier)

The logic tier is pulled out from the presentation tier and, as its own layer, it controls an applications functionality by performing detailed processing. BAL contains business logic, validations or calculations related with the data, if needed. I will call it Business Access Layer in my demo.

Business Logic Layer This layer consist of dll(dynamic link library) naming Class Library having namespace nsbugtrc and one class naming clscon for connection with sqlserver database and 11 interfaces naming int-tablename having property declaration for each field in the respective 16

table, class naming 11 property class naming cls-tablename-prp which inherit its respective interface for definition of each property declared in the interface, class naming 11 methods class naming cls-tablename which inherit class clscon for definition of methods like : save_rec(), update_rec(), delete_rec(), display_rec(), find_rec() etc. Methods.

Data tier

This tier consists of database servers. Here information is stored and retrieved. This tier keeps data neutral and independent from application servers or business logic. Giving data its own tier also improves scalability and performance. DAL contains methods that helps business layer to connect the data and perform required action, might be returning data or manipulating data (insert, update, delete etc). For this demo application, I have taken a very simple example. I am assuming that I have to play with record of persons (First Name, Last Name, Age) and I will refer only these data throughout this article. 2.2 : MASTER PAGES 1. Master Page is Common Template that can be implemented on more than one Page. We can make changes whenever needed. 2. Master page extension is. Master 3. It can never be start up page. 4. We can create properties, methods, classes in master pages. 5. Multiple master pages can be there in single application. 2.3 : CONTENT PAGES 1. Content pages are web pages which can be made as startup page. 2. Content page extension is .aspx 3. Multiple content pages can be there in single master page

17

2.4: ASP .NET FRAMEWORK VERSIONS The ASP.NET releases history tightly correlates with the .NET Framework releases:

18

Date

Version

Remarks

New ASP.NET related features

Object

oriented web application

development supporting Inheritance, Polymorphi smand other standard OOP features

Developers are no longer forced to and use type Server.CreateObject(...), so

First version January 16, 2002 1.0 released with Visual .NET together Studio

early-binding

safety are possible. Based on Windows programming; the developer can make use of DLL class libraries and other features of the web server to build more robust applications that do more than simply rendering HTML (e.g. exception handling)

released 2003 1.1 released with Visual .NET 2003

together Mobile controls Automatic input validation

withWindows Server April 24, 2003

together Studio

New data controls (GridView, FormView, DetailsView) New technique for declarative data access controls) (SqlDataSource, ObjectDataSource, XmlDataSource Navigation controls Master pages Login controls Themes Skins Web parts Personalization services Full pre-compilation New localization technique 19

codename Whidbey released November 7, 2005 2.0 with Visual Developer together Studio Express

2005 and Visual Web and SQL Server 2005

Table 1: Asp.Net framework versions 2.5: BENEFITS OF USING .NET: The windows platform is inherently complex and may pose several problems for programmers. However the .Net platform is used as it provides solutions to many such problems and offers an Internet centric platform. The following are the benefits of using .Net platform:

1) Multiple platform Support .Net platform has been designed keeping multiple platform support as a key feature. For version 2.0 this means that the code written using the .Net platform can run on all versions of Windows. i.e. Windows 98,95,NT,2000 and so on. Microsoft has included rich support for all the platforms. Also this code shall also work on any 64-bit processor that may be used by Microsoft later. It is also expected that .Net shall run on other platforms like UNIX also, however it is not for sure that all functionality will be available for the same.

2) . Net as a clean start

On the windows platform, the technologies available often depend on the programming language that they are written in, so they are very different. Depending on the chosen programming language, these technologies can be restrictive. The problem with this approach is that it makes the Windows platform harder to understand.

20

Using .Net there is just one simple object oriented way of accessing the functionality of the .Net Framework.

. Net Framework

VB FORM

MFC

ASP

Windows API

Figure 2: .Net Framework.

3) Performance . Net has been designed to provide great performance and scalability. For .Net to succeed, the companies must be able to migrate their applications and not suffer due to the way the CLR works. To ensure this CLR converts the code into native machine code. So the conversion can take step-by-step method and will make use of the given machines resources and processor features. As newer versions of the CLR are released and technologies like windows forms are released, each release will have a better performance and smaller memory footprints. Also .Net has succeeded in replacing completely the older technologies like COM with better and efficient design equivalents. At the heart of the .Net platform is the CLR.

21

2.6: MICROSOFT SQL SERVER 2005

Microsoft SQL Server 2005 is a full-featured relational database management system (RDBMS) that offers a variety of administrative tools to ease the burdens of database development, maintenance and administration. In this article, we'll cover six of the more frequently used tools: Enterprise Manager, Query Analyzer, SQL Profiler, Service Manager, Data Transformation Services and Books Online. SQL Server is one of the most popular and advanced database systems currently available. Microsoft SQL Server is sometimes called as "Sequel Server". It can be managed using Structured Query Language. While MS Access is meant for small applications, SQL Server supports large applications with millions of users or huge databases. SQL Server is much more powerful than Access and provides several other advanced features and much better security. SQL Server is compatible with MS Access. You can easily import/export data between these two.SQL Server is a Relational database where data is stored and retrieved very efficiently.

Components of Microsoft SQL Server 2005

Enterprise Manager: is the main administrative console for SQL Server installations. It provides you with a graphical "birds-eye" view of all of the SQL Server installations on your network. You can perform high-level administrative functions that affect one or more servers, schedule common maintenance tasks or create and modify the structure of individual databases.

Query Analyzer: offers a quick and dirty method for performing queries against any of your SQL Server databases. It's a great way to quickly pull information out of a database in response to a user request, test queries before implementing them in other applications, create/modify stored procedures and execute administrative tasks.

22

SQL Profiler: provides a window into the inner workings of your database. You can monitor many different event types and observe database performance in real time. SQL Profiler allows you to capture and replay system "traces" that log various activities. It's a great tool for optimizing databases with performance issues or troubleshooting particular problems.

Service Manager: is used to control the MS-SQL Server (the main SQL Server process), MSDTC (Microsoft Distributed Transaction Coordinator) and SQL Server Agent processes. An icon for this service normally resides in the system tray of machines running SQL Server. You can use Service Manager to start, stop or pause any one of these services.

Data Transformation Services (DTS): provide an extremely flexible method for importing and exporting data between a Microsoft SQL Server installation and a large variety of other formats. The most commonly used DTS application is the "Import and Export Data" wizard found in the SQL Server program group.

Books Online: is an often overlooked resource provided with SQL Server that contains answers to a variety of administrative, development and installation issues. It's a great resource to consult before turning to the Internet or technical support.

Features of Microsoft SQL Server 2005

User-Defined Functions: SQL Server 2000 introduces the long-awaited support for userdefined functions. User-defined functions can take zero or more input parameters and return a single valueeither a scalar value like the system-defined functions, or a table result. Tablevalued functions can be used anywhere table or view expressions can be used in queries, and they can perform more complex logic than is allowed in a view.

Indexed Views: Views are often used to simplify complex queries, and they can contain joins and aggregate functions. In SQL Server 2000 Enterprise or Developer Edition, you can define indexes on views to improve query performance against the view. When creating an index on a view, the result set of the view is stored and indexed in the database. Existing

23

applications can take advantage of the performance improvements without needing to be modified.

24

SYSTEM DESIGN

CHAPTER 3

25

SYSTEM DESIGN

The main objective of the system design is to make the system user friendly. After discussing with some of the technical persons, friends, guide; it was concluded that the design of the application should be 3 tier which means that the system will be developed in orientation to three things: Data: It includes Database, Stored Procedures, and Cursors etc. Business: It includes the logic that will actually process the data but it should be in the form of objects and classes that will help in providing the application components reusability, abstraction and other Object Oriented features. Presentation: It includes the front end that links the user to the whole system.

Generally, it is said that if the design is made well, the whole system will work well. So, I have tried my best to put my effort on this phase properly.

3.1 METHODOLOGY ADOPTED Prototyping Model has been used for software development according to which a throwaway prototype of the proposed system, based on the currently known requirements, is given to the user so that he has a fair idea about how the proposed system is going to be like. This will help him in deciding the interface, input and output requirements. It can be easily adjudged that inputs and outputs are big in number, can increase exponentially and may create a big chaos if not restricted properly. As the user spends some time on the prototype, he will become more precise about his own input and output requirements. This prototype will provide him with an environment analogous to the proposed systems environment. Because of object oriented support in .NET, various concepts (like reusability, polymorphism, isolation etc.) are already there but for the efficient management of system components, Component based Software Engineering will also be exercised which will help

26

in a resultant library of components, the benefit of which will be reusability and fast development. Because of lack of hierarchical structure in object oriented approach, there is no meaning of Bottom-up or Top-down testing. Testing will begin from the most rudimentary levels of the system and will move towards higher level components which will be based on design phase rather than coding phase. In little words, it can be said that CLUSTER Testing will be exercised to scrutinize all the parts and their associative functionality.

3.2 SYSTEM IMPLEMENTATION: Implementation implies what configurations are required to implement the given software at the end users site. There must be a LAN available on which the system can work. There must be .Net Framework 2.0 loaded on all the computers that will provide the system using its installer. There must be SQL Server 2000 installed on the system to provide the support of database. on

After the system is implemented, a review of the system is conducted by the users and the analysts alike to determine how well the system is working, how it has been accepted and whether any adjustments are needed. It is also important to gather information for the maintenance of the system.

3.3 SOFTWARE USED: What is .NET and Why .NET? .NET is an environment/platform designed specially for Internet applications although Desktop applications are also possible. It is not platform independent. Interoperability between languages and execution environments. Uniformity in schema or formats for Data Exchange using XML, XSL.

27

Extend or use existing code that is valid. Programming complexity of environment is reduced.

What is .NET Framework? A component model for the Internet. The new approach to building large scale distributed systems for the Internet. Provides the capability to integrate multiple devices. Built around the tools and protocols (XML, WSDL, SOAP, HTTP) that are becoming standard on the Internet. Thus, .NET Framework is a collection of tools, technologies and languages which work together to communicate on multiple platforms. It is composed of classes and services that form a layer between applications and operating system. All applications developed under the .NET Framework; including ASP.NET applications, have certain key features that ensure compatibility, security and stability.

.NET Framework Design Goals: Component Development for the Internet "Cross-Language Development Inheritance, Debugging, Exception handling Reliability and Security Simple Development and Deployment Device-agnostic

28

Fig. 3 - .NET Framework Architecture

Common Language Runtime (CLR): It is an environment that manages the execution of code. Functions: Memory Management Garbage Collection To support multiple languages

With the .NET Framework and CLR, we write code and compile it. However, instead of compiling it into the language that computer understands, we compile it into a language called Microsoft Intermediate Language (MSIL). When we compile it to MSIL, the application produces something called Metadata. This is descriptive information about the application. It tells what the application can do, where it belongs to, and so on. When you want to run your program, the CLR takes over and compiles the code once again into the computers native language. This way MSIL can go on any type of computer. The CLR can speak many different computer languages and does all the compiling for you. Once you compile your application, you can bring it to any other computer. CLR also provides services such as error handling, security features, versioning and deployment support, as well as crosslanguage integration.

29

Base Class Library (BCL): It is a collection of common/standard classes which we can use in .NET supported languages.

.NET Framework Class Library: It includes reusable, Object Oriented and extensible classes. It is integrated with CLR and is common set of classes across programming languages. These classes can be used to create new classes, to develop the application and to implement cross language inheritance. Classes in it are organized in hierarchical form. At the top most of the hierarchy is the system namespace which contains classes that enable you to perform the following tasks: Converting data types Manipulating parameters Invoking local and remote programs Managing application environment

ASP.NET: ASP.NET is a technology that allows us to build and control dynamic Web pages easily. It also provides many enhancements to take advantage of the new technology as we can interact with databases, personalize Web pages for visitors, display pages on mobile devices (such as cell phones), and even build an entire e-commerce site from scratch. Previously, internet worked on request/response model that is an integral part of client/server model. Although it is a marvelous way of communicating and distributing information, it's rather simple and static. When the process is over, once client receives the requesting page from the server the server has no idea what the client is doing unless it makes another request. There is another model for communicating between server and clients, known as eventdriven model. ASP.NET works on this model, it detects action and responds to them i.e. the server waits around for something to happen on the client. Once it does, the server takes

30

action and performs some piece of functionality. Of course, a Web server can not know what you are thinking, but it can respond to your actions. If you type some text on Web page, the server responds to it. If you click an image, the server responds. Following are some of the significant new features of ASP.NET: ASP.NET uses compiled code written in Common Language Runtime languages not use interpreted scripting languages such as VBScript. ASP.NET pages are built out of server-side controls. Web server controls enable you to represent and program against Hypertext Markup Language (HTML) elements using an intuitive object model. ASP.NET includes a new technology called Web Services. You can use Web Services to access methods and properties and transfer database data across the Internet. ASP.NET is part of Microsoft's .NET Framework. You can access thousands of .NET classes in your code that enable you to perform such wondrously diverse tasks as generating images on-the-fly and saving an array to a file. ASP.NET includes page and data caching mechanisms that enable you to easily and dramatically improve the performance of your Web site. SQL SERVER: SQL Server is an SQL-compliant RDBMS. SQL-compliant means that it uses the ANSI (American National Standard Institute) version of Structured Query Language or SQL. SQL is a command that allows us to modify or retrieve information from the database. SQL Server is designed to store data in the central location (the server) and deliver it on demand to numerous other locations (the client). Following are some of the features of SQL SERVER 2000: Information representation Unique definition of rows Systematic treatment of Null values Guaranteed access High level Update, Insert, and Delete 31 such as

Visual Basic and C#. Unlike previous versions of Active Server Pages, this version does

Retrieving information from the database. Accepting query language statements. Enforcing security specifications. Enforcing data integrity specifications Enforcing transaction consistency Managing data sharing Optimizing queries Enterprise Manager: SQL Server Enterprise Manager is a graphical tool that allows easy configuration and management of Microsoft SQL Server and SQL 2000 program group. It can also be used to: Manage logins, permission and users. Create a database. Take back-up of database and transaction logs. Manage tables. Query Analyzer: The SQL Server Query Analyzer allows us to create adhoc queries and run them interactively. We may also execute Transact-SQL (T-SQL) statements stored in text files and view the result in result plane or result grid. The Query Analyzer also has a color-coded editor to assist the user with checking of syntax. It also has context sensitive help. Queries are processed in two steps:
Interpret- First, the queries are checked for syntax. Execute- Then, the processing takes place.

3.4 SYSTEM MAINTENANCE System maintenance is an extremely important activity in the life of a software product that starts after the implementation phase. It is one form of change or rework. For proper maintenance of this system, I am spending a good time on documentation so that I or 32

some other person can easily understand this system later when there is a need for maintenance. Because of the full development being Object Oriented and MS support with this product, this system can be easily connected to any other MS product with a very small effort. Except Web support, more modules can also be easily added because of the 3 tier approach in design; any development or modification is as simple as creating a new application. We dont have to follow the old patterns; we can just start with a new style and add the new modules in to the older one without any problem.

33

3.5 DATAFLOW DIAGRAMS :

CLIENT / USER View Bidding s

Post Project s SITE Registe r

Send Messages / Discussions

Post Bidding s

Assign Projec t Feedbac k of employe es

View Projects EMPLOYEES Assign Projec t

PROVIDER

Verifies and Assigns ID and Password

ADMINISTRATOR

34

ADMIN

PROVIDER

ADMIN

CLIENT

35

PROVIDER

EMPLOYEES

PROVIDER

CLIENT

36

EMPLOYEES

CLIENT

37

PROJECT DETAILS WITH REQUIREMENTS

38

CHAPTER 4 PROJECT DETAILS WITH REQUIREMENTS

4.1 USER REQUIREMENTS : This software has been designed keeping in view the requirements and ease of the user who is finally going to use it. After all the effort put on analysis phase, I ended up with the following requirements: Easy storage, updation, deletion and retrieval of data. No redundancy of data. Minimal traversal time. User friendly interface. Proper validations and checks for the data to be entered. Generation of certain automatic values.
Compatibility

with

other

Microsoft

based

softwares.

The system is completely user friendly so that the end user who may have very little knowledge of using computers can easily use

4.2 HARDWARE & SOFTWARE REQUIREMENTS : .NET Framework System Requirements To ensure adequate performance, .NET Framework has the following minimum and recommended system requirements for client and server applications: Operating System Requirements:

The .NET Framework is supported on the following platforms: -----------------------------------------------------------------------------------------------------

39

Scenario

Operating System

---------------------------------------------------------------------------------------------------Client MS Windows 98 MS Windows 98 Second Edition MS Windows Millennium Edition MS Windows NT 4.0 Workstation with service pack 6.0a MS Windows NT 4.0 Server with service pack 6.0a or later MS Windows 2000 Professional MS Windows 2000 Server MS Windows 2000 Advanced Server MS Windows 2000 Datacenter Server MS Windows XP Home Edition Professional MS Windows Server 2003 Family Note: On all these systems, MS Internet Explorer 5.01 or later Windows Installer 2.0 or later are also required. MS

Server

MS Windows 2000 Professional with service pack 2.0 MS Windows 2000 Server with service pack 2.0 MS Windows 2000 Advanced Server with service pack 2.0 MS Windows 2000 Datacenter Server with service pack 2.0 MS Windows XP Professional MS Windows Server 2003 Family

Additional Software Requirements: To use additional features such as ASP.Net, COM+ services and SQL Server

.NET Data Provider, you will need the following additional softwares: ----------------------------------------------------------------------------------------------------Scenario Feature Required Software 40

---------------------------------------------------------------------------------------------------Client SQL Server .Net Data Provider Access to system management MS Data Access Components (MDAC) 2.6 or later Windows Management Instrumentation (WMI) (installed with OS on Windows 2000, Windows Millennium Edition and Windows XP) COM+ Services Windows 2000 with service Pack 2.0 Server ASP.Net SQL Server .Net Data MS Data Access Components MS Internet Information Services (IIS) 5.0 Hardware Requirements: ----------------------------------------------------------------------------------------------------Scenario Processor Required Recommended Required RAM Recommended

---------------------------------------------------------------------------------------------------Client Pentium 500 MHz* Pentium 1 GHz 64 MB* 128 MB or higher

Server Pentium 667 MHz* Pentium 1 GHz

128 MB* 256 MB or higher

* Or the minimum required by the operating system, whichever is higher.

4.3 HARDWARE AND SOFTWARE TO BE USED : The system must have the following hardware requirements:

Pentium IV Processors 41

256 MB of RAM 5GB of Hard Disk One SQL based server Client Machine One domain name space to implement Web based services

The system must have the following software requirements:

Client OS with .NET framework 2.0 Server OS with .NET framework 2.0 MS SQL DBMS (2000 / 2005)

42

PARTIAL CODE

43

CHAPTER 5 PARTIAL CODE


ADMIN SIDE: Frmcnt.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Admin_Default : System.Web.UI.Page { nsgetcod.clscnt obj = new nsgetcod.clscnt(); nsgetcod.clscntprp objprp = new nsgetcod.clscntprp(); protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { 44

objprp.cntnam = TextBox1.Text; obj.save_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus(); } protected void Button2_Click(object sender, EventArgs e) { objprp.cntcod = Convert.ToInt32(ListBox1.SelectedValue); objprp.cntnam = TextBox1.Text; obj.update_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus(); } protected void Button3_Click(object sender, EventArgs e) { objprp.cntcod = Convert.ToInt32(ListBox1.SelectedValue); obj.delete_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus(); } protected void Button4_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox1.Focus(); } protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e) { TextBox1.Text = ListBox1.SelectedItem.ToString(); 45

} }

Frmcty.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; public partial class Admin_Default : System.Web.UI.Page { nsgetcod.clscty obj = new nsgetcod.clscty(); nsgetcod.clsctyprp objprp = new nsgetcod.clsctyprp(); protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { objprp.ctynam = TextBox1.Text; objprp.ctystacod = Convert.ToInt32(DropDownList2.SelectedValue); obj.save_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus(); 46

} protected void Button2_Click(object sender, EventArgs e) { objprp.ctycod = Convert.ToInt32(ListBox1.SelectedValue); objprp.ctynam = TextBox1.Text; objprp.ctystacod = Convert.ToInt32(DropDownList2.SelectedValue); obj.update_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus(); } protected void Button3_Click(object sender, EventArgs e) { objprp.ctycod = Convert.ToInt32(ListBox1.SelectedValue); obj.delete_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus(); } protected void Button4_Click(object sender, EventArgs e) { TextBox1.Text = ""; } protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e) { TextBox1.Text = ListBox1.SelectedItem.Text; } } Frmsta.aspx.cs using System; using System.Data; 47

using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; public partial class Admin_Default : System.Web.UI.Page { nsgetcod.clssta obj = new nsgetcod.clssta(); nsgetcod.clsstaprp objprp = new nsgetcod.clsstaprp(); protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { objprp.stanam = TextBox1.Text; objprp.stacntcod = Convert.ToInt32(DropDownList1.SelectedValue); obj.save_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus();

} protected void Button2_Click(object sender, EventArgs e) { objprp.stacod = Convert.ToInt32(ListBox1.SelectedValue); 48

objprp.stanam = TextBox1.Text; objprp.stacntcod = Convert.ToInt32(DropDownList1.SelectedValue); obj.update_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus(); } protected void Button3_Click(object sender, EventArgs e) { objprp.stacod = Convert.ToInt32(ListBox1.SelectedValue); obj.delete_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus(); } protected void Button4_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox1.Focus(); } protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e) { TextBox1.Text = ListBox1.SelectedItem.Text; } } Frmtec.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; 49

using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; public partial class Admin_Default : System.Web.UI.Page { nsgetcod.clstec obj = new nsgetcod.clstec(); nsgetcod.clstecprp objprp = new nsgetcod.clstecprp(); protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { objprp.tecnam = TextBox1.Text; obj.save_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus(); } protected void Button2_Click(object sender, EventArgs e) { objprp.teccod = Convert.ToInt32(ListBox1.SelectedValue); objprp.tecnam = TextBox1.Text; obj.update_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus(); } protected void Button3_Click(object sender, EventArgs e) { 50

objprp.teccod = Convert.ToInt32(ListBox1.SelectedValue); obj.delete_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus(); } protected void Button4_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox1.Focus(); TextBox1.Text = ListBox1.SelectedItem.ToString(); } protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e) { TextBox1.Text = ListBox1.SelectedItem.ToString(); } } Frmtectyp.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; 51

public partial class Admin_Default : System.Web.UI.Page { nsgetcod.clstectyp obj = new nsgetcod.clstectyp(); nsgetcod.clstectypprp objprp = new nsgetcod.clstectypprp(); protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { objprp.teccod = Convert.ToInt32(DropDownList1.SelectedValue); objprp.tectypnam = TextBox1.Text; obj.save_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus(); } protected void Button2_Click(object sender, EventArgs e) { objprp.teccod = Convert.ToInt32(DropDownList1.SelectedValue); objprp.tectypcod = Convert.ToInt32(ListBox1.SelectedValue); objprp.tectypnam = TextBox1.Text; obj.update_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus(); } protected void Button3_Click(object sender, EventArgs e) { objprp.tectypcod = Convert.ToInt32(ListBox1.SelectedValue); 52

obj.delete_rec(objprp); ListBox1.DataBind(); TextBox1.Text = ""; TextBox1.Focus(); } protected void Button4_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox1.Focus(); } protected void ListBox1_DataBinding(object sender, EventArgs e) { } protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e) { TextBox1.Text = ListBox1.SelectedItem.ToString(); } } Frmvrf.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; 53

using System.Xml.Linq; using System.Data.SqlClient; public partial class Admin_Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void RadioButtonList2_SelectedIndexChanged(object sender, EventArgs e) { if (RadioButtonList2.SelectedIndex == 0) { Panel1.Visible = true; Panel2.Visible = false; } else if (RadioButtonList2.SelectedIndex == 1) { Panel2.Visible = true; Panel1.Visible = false; } } protected void Button1_Click(object sender, EventArgs e) { SqlDataAdapter adp = new SqlDataAdapter("select * from tbusr where usrnam ='" + TextBox1.Text + "'", ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); if (ds.Tables[0].Rows.Count > 0) { Label1.Text = "This username is already alloted to some one"; } else 54

{ nsgetcod.clsprv obj = new nsgetcod.clsprv(); nsgetcod.clsprvprp objprp = new nsgetcod.clsprvprp(); if (RadioButtonList2.SelectedIndex == 0) { objprp.prvcod = Convert.ToInt32(DropDownList1.SelectedValue); objprp.prvsts = 'A'; obj.updprvsts(objprp); nsgetcod.clsusr obj1 = new nsgetcod.clsusr(); nsgetcod.clsusrprp objprp1 = new nsgetcod.clsusrprp(); objprp1.usrnam = TextBox1.Text; objprp1.usrpwd = TextBox2.Text; objprp1.usrprvcltcod = Convert.ToInt32(DropDownList1.SelectedValue); objprp1.usrrol = Convert.ToChar(RadioButtonList1.SelectedValue); obj1.save_rec(objprp1); } else if (RadioButtonList2.SelectedIndex == 1) { objprp.prvcod = Convert.ToInt32(DropDownList1.SelectedValue); objprp.prvsts = 'R'; obj.updprvsts(objprp); } } } protected void Button2_Click(object sender, EventArgs e) { } protected void Button3_Click(object sender, EventArgs e) {

55

SqlDataAdapter adp=new SqlDataAdapter("select * from tbusr where usrnam ='"+ TextBox1.Text+"'",ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); if(ds.Tables[0].Rows.Count>0) Label1.Text = "This username is already alloted to some one"; else Label1.Text = "You can use it"; } } Frmhom.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; public partial class Default3 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e)

56

{ nsgetcod.clsusr obj = new nsgetcod.clsusr(); nsgetcod.clsusrprp objprp = new nsgetcod.clsusrprp(); String sts = ""; Int32 a = obj.checkuser(TextBox1.Text, TextBox2.Text, out sts); if (a == -1) { Label1.Text = "Username Password Incorrect"; } else { Session["cod"] = a; if (sts == "A") Response.Redirect("admin/frmcnt.aspx"); else if (sts == "P") Response.Redirect("Provider/frmvewprj.aspx"); else if (sts == "C") Response.Redirect("Client/frmprj.aspx"); else if (sts == "E") Response.Redirect("Employee/frmasprj.aspx"); } } }

Frmprvemp.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; 57

using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { SqlDataAdapter adp = new SqlDataAdapter("select prvcod,prvnam,prvadd ,prvctycod,prvphn,prveml,prvpin,prvprffil,prvsts,prvdsc,prvrat from tbprv,tbusr where usrprvcltcod=prvcod and usrrol='P'", ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); } } protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e) { SqlDataAdapter adp = new SqlDataAdapter("select prvcod,prvnam,prvadd ,prvctycod,prvphn,prveml,prvpin,prvprffil,prvsts,prvdsc,prvrat from tbprv,tbusr where usrprvcltcod=prvcod and usrrol='P' and prvctycod=" + DropDownList3.SelectedValue, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); } 58

protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { Panel1.Visible = true; SqlDataAdapter adp = new SqlDataAdapter("select * from tbprv where prvcod="+GridView1.SelectedDataKey.Value, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DetailsView1.DataSource = ds; DetailsView1.DataBind(); } protected void Button1_Click(object sender, EventArgs e) { nsgetcod.clsemp obj = new nsgetcod.clsemp(); nsgetcod.clsempprp objprp = new nsgetcod.clsempprp(); objprp.empctycod = Convert.ToInt32(DropDownList3.SelectedValue); objprp.empnam = TextBox1.Text; objprp.empphn = Convert.ToInt32(TextBox2.Text); objprp.empadd = TextBox3.Text; objprp.empeml = TextBox4.Text; objprp.empdsc = TextBox5.Text; objprp.empprffil = FileUpload1.FileName; objprp.empsts = 'E'; if (FileUpload1.PostedFile.FileName != "") { String st = Server.MapPath("images"); st = st + "//" + FileUpload1.FileName; FileUpload1.PostedFile.SaveAs(st); } objprp.empprvcod = Convert.ToInt32(GridView1.SelectedDataKey.Value);

59

obj.save_rec(objprp); } }

Frmreg.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; public partial class Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { nsgetcod.clsprv obj = new nsgetcod.clsprv(); nsgetcod.clsprvprp objprp = new nsgetcod.clsprvprp(); objprp.prvnam = TextBox1.Text; objprp.prvadd = TextBox2.Text; objprp.prvctycod = Convert.ToInt32(DropDownList3.SelectedValue); objprp.prvphn = TextBox3.Text; objprp.prveml = TextBox4.Text; 60

objprp.prvpin = TextBox5.Text; objprp.prvdsc = TextBox6.Text; objprp.prvrat = "0"; Int32 a; a = obj.getauto(); objprp.prvcod = a; if (FileUpload1.PostedFile.FileName != "") { objprp.prvprffil = a.ToString() + FileUpload1.FileName.Substring(FileUpload1.FileName.LastIndexOf('.')); String st = Server.MapPath("images") + "//" + objprp.prvprffil; FileUpload1.PostedFile.SaveAs(st); } objprp.prvsts = Convert.ToChar(RadioButtonList1.SelectedValue); obj.save_rec(objprp); TextBox1.Text = ""; TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; TextBox6.Text = ""; TextBox1.Focus(); } protected void Button2_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox2.Text = ""; TextBox3.Text = ""; TextBox4.Text = ""; TextBox5.Text = ""; TextBox6.Text = ""; TextBox1.Focus(); } } 61

Frmcprj.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Client_Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if(Page.IsPostBack == false) { string st = "select prjcod,prjdsc,prjdat,prjfil,tecnam,tectypnam from tbprj,tbtec,tbtectyp where prjteccod=teccod and prjtectypcod=tectypcod and prjprvcod=" + Session["cod"].ToString(); SqlDataAdapter adp = new SqlDataAdapter(st, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); } 62

} protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { Int32 a = Convert.ToInt32(GridView1.DataKeys[e.NewEditIndex][0]); Response.Redirect("frmcprjdet.aspx?pcod=" + a.ToString()); } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { } }

Frmcprjdet.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Client_Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { 63

string st="select biddat,biddsc,bidamt,bidfil,prjdsc,prjdat,prjfil,prvnam,prvadd,prvphn,prveml,prvprffil,tecnam ,tectypnam from tbbid,tbprj,tbprv,tbtec,tbtectyp where bidprvcod=prvcod and bidprjcod=prjcod and bidmsgsts='O'and prjteccod=teccod and prjtectypcod=tectypcod and prjprvcod="+Session["cod"].ToString(); SqlDataAdapter adp = new SqlDataAdapter(st, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DetailsView1.DataSource = ds; DetailsView1.DataBind(); } } protected void Button1_Click(object sender, EventArgs e) { Int32 a = Convert.ToInt32(Request.QueryString["pcod"]); Response.Redirect("frmmsgprv.aspx?pcod=" + a.ToString()); } protected void Button2_Click(object sender, EventArgs e) { Int32 a = Convert.ToInt32(Request.QueryString["pcod"]); Response.Redirect("frmmsgemp.aspx?pcod=" + a.ToString()); } }

Frmmsgemp.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; 64

using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Client_Default2 : System.Web.UI.Page { nsgetcod.clsmsg obj = new nsgetcod.clsmsg(); nsgetcod.clsmsgprp objprp = new nsgetcod.clsmsgprp(); protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { string st = "select empnam,empcod,empeml,prjempcod,prjprjnam from tbprjdet,tbemp where empcod=prjempcod and prjprjcod=" + Request.QueryString["pcod"].ToString(); SqlDataAdapter adp = new SqlDataAdapter(st, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DetailsView1.DataSource = ds; DetailsView1.DataBind(); } } protected void Button1_Click(object sender, EventArgs e) { Panel1.Visible = true; Panel2.Visible = false; } protected void Button2_Click(object sender, EventArgs e) 65

{ Panel1.Visible = false; Panel2.Visible = true; SqlDataAdapter adp1 = new SqlDataAdapter("select msgdsc,msgdat,msgsencod,empnam,prjprjnam from tbprjdet,tbemp,tbmsg where msgsencod=empcod and msgreccod=" + Session["cod"].ToString() + " and prjempcod=" + DetailsView1.DataKey[0].ToString() + " and prjprjcod=" + Request.QueryString["pcod"].ToString(), ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds1 = new DataSet(); adp1.Fill(ds1); GridView1.DataSource = ds1; GridView1.DataBind(); } protected void Button3_Click(object sender, EventArgs e) { objprp.msgdat = Convert.ToDateTime(DateTime.Now); objprp.msgdsc = TextBox1.Text; objprp.msgsencod = Convert.ToInt32(Session["cod"]); objprp.msgreccod = Convert.ToInt32(DetailsView1.DataKey[0]); obj.save_rec(objprp); } protected void Button4_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox1.Focus(); } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { objprp.msgdat = Convert.ToDateTime(DateTime.Now); 66

objprp.msgdsc = TextBox2.Text; objprp.msgsencod = Convert.ToInt32(Session["cod"]); objprp.msgreccod = Convert.ToInt32(DetailsView1.DataKey[0]); obj.save_rec(objprp); } }

Frmmsgprv.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Client_Default : System.Web.UI.Page { nsgetcod.clsmsg obj = new nsgetcod.clsmsg(); nsgetcod.clsmsgprp objprp = new nsgetcod.clsmsgprp(); protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { string st = "select prvnam,prveml,prjprprvcod,prjprjnam from tbprjdet,tbprv where prvcod=prjprprvcod and prjprjcod=" + Request.QueryString["pcod"].ToString();

67

SqlDataAdapter adp = new SqlDataAdapter(st, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DetailsView1.DataSource = ds; DetailsView1.DataBind(); } } protected void Button1_Click(object sender, EventArgs e) { Panel1.Visible = true; Panel2.Visible = false; } protected void Button2_Click(object sender, EventArgs e) { Panel1.Visible = false; Panel2.Visible = true; SqlDataAdapter adp1 = new SqlDataAdapter("select msgdsc,msgdat,msgsencod,prvnam,prjprjnam from tbprjdet,tbprv,tbmsg where msgsencod=prvcod and msgreccod=" + Session["cod"].ToString() + " and prjprprvcod=" + DetailsView1.DataKey[0].ToString() + " and prjprjcod=" + Request.QueryString["pcod"].ToString(), ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds1 = new DataSet(); adp1.Fill(ds1); GridView1.DataSource = ds1; GridView1.DataBind(); } protected void Button3_Click(object sender, EventArgs e) { objprp.msgdat = Convert.ToDateTime(DateTime.Now); objprp.msgdsc = TextBox1.Text; 68

objprp.msgsencod = Convert.ToInt32(Session["cod"]); objprp.msgreccod = Convert.ToInt32(DetailsView1.DataKey[0]); obj.save_rec(objprp); } protected void Button4_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox1.Focus(); } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { objprp.msgdat = Convert.ToDateTime(DateTime.Now); objprp.msgdsc = TextBox2.Text; objprp.msgsencod = Convert.ToInt32(Session["cod"]); objprp.msgreccod = Convert.ToInt32(DetailsView1.DataKey[0]); obj.save_rec(objprp); } }

Frmprj.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; 69

using System.Data.SqlClient; public partial class Client_Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { SqlDataAdapter adp = new SqlDataAdapter("select prvnam,prvcod from tbprv,tbusr where prvcod=usrprvcltcod and usrrol='P'", ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); CheckBoxList1.DataSource = ds; CheckBoxList1.DataTextField = "prvnam"; CheckBoxList1.DataValueField = "prvcod"; CheckBoxList1.DataBind(); } protected void Button1_Click(object sender, EventArgs e) { nsgetcod.clsprj obj = new nsgetcod.clsprj(); nsgetcod.clsprjprp objprp = new nsgetcod.clsprjprp(); Int32 a = obj.getauto(); objprp.prjcod = a; objprp.prjdsc = TextBox1.Text; objprp.prjbidopndat = Convert.ToDateTime(TextBox2.Text); objprp.prjdat = DateTime.Now; objprp.prjfil = FileUpload1.FileName; objprp.prjprvcod = Convert.ToInt32(Session["cod"]); objprp.prjteccod = Convert.ToInt32(DropDownList1.SelectedValue); objprp.prjtectypcod = Convert.ToInt32(DropDownList2.SelectedValue); objprp.prjsts = Convert.ToChar(RadioButtonList1.SelectedValue); obj.save_rec(objprp); if (FileUpload1.PostedFile.FileName != "") { 70

String st = Server.MapPath("../images"); st = st + "//" + FileUpload1.FileName; FileUpload1.PostedFile.SaveAs(st); } //if (RadioButtonList1.SelectedIndex == 1) //{ // // // // // // // // // // // //} } protected void Button2_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox2.Text = ""; TextBox1.Focus(); } } } } nsgetcod.clsprjdet obj1 = new nsgetcod.clsprjdet(); nsgetcod.clsprjdetprp objprp1 = new nsgetcod.clsprjdetprp(); for (Int32 i = 0; i < CheckBoxList1.Items.Count; i++) { if (CheckBoxList1.Items[i].Selected == true) { objprp1.prjdetprjcod = a; objprp1.prjdetprvcod = Convert.ToInt32(CheckBoxList1.Items[i].Value); obj1.save_rec(objprp1);

Frmviebid.aspx.cs using System; 71

using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Client_Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { SqlDataAdapter adp = new SqlDataAdapter("select * from tbprj where prjprvcod=" + Session["cod"].ToString(), ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DropDownList1.DataSource = ds; DropDownList1.DataTextField = "prjdsc"; DropDownList1.DataValueField = "prjcod"; DropDownList1.DataBind(); } } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { String st = "select bidcod,biddat,prvnam,bidamt,biddsc,bidfil from tbbid,tbprv where bidprvcod=prvcod and bidprjcod=" + DropDownList1.SelectedValue; 72

SqlDataAdapter adp = new SqlDataAdapter(st, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); } protected void Button1_Click(object sender, EventArgs e) { nsgetcod.clsbid obj = new nsgetcod.clsbid(); nsgetcod.clsbidprp objprp = new nsgetcod.clsbidprp(); for (Int32 i = 0; i < GridView1.Rows.Count; i++) { CheckBox c = (CheckBox)(GridView1.Rows[i].FindControl("ck1")); if (c.Checked == true) { objprp.bidcod = Convert.ToInt32(GridView1.DataKeys[i][0]); objprp.bidmsgsts = 'O'; obj.update_rec(objprp); } } } protected void Button2_Click(object sender, EventArgs e) { nsgetcod.clsbid obj = new nsgetcod.clsbid(); nsgetcod.clsbidprp objprp = new nsgetcod.clsbidprp(); for (Int32 i = 0; i < GridView1.Rows.Count; i++) { CheckBox c = (CheckBox)(GridView1.Rows[i].FindControl("ck1")); if (c.Checked == true) { objprp.bidcod = Convert.ToInt32(GridView1.DataKeys[i][0]); objprp.bidmsgsts = 'R'; obj.update_rec(objprp); 73

} } } }

Frmasprj.aspc.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Employee_Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { string st = "select prjcod,prjdsc,prjfil,prjteccod,prjtectypcod,prjprprvcod,tecnam,tectypnam from tbtec,tbtectyp,tbprj,tbprjdet where prjcod=prjprjcod and teccod=prjteccod and tectypcod=prjtectypcod and prjempcod=" + Session["cod"].ToString(); SqlDataAdapter adp = new SqlDataAdapter(st, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); 74

adp.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); } } protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { Int32 a = Convert.ToInt32(GridView1.DataKeys[e.NewEditIndex][0]); Response.Redirect("frmasprjdet.aspx?pcod=" + a.ToString()); } }

Frmasprjtdet.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Employee_Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) 75

{ string st = "select tecnam,tectypnam,prjdsc,prjfil,prjteccod,prjtectypcod,prjclprvcod,prvnam,prvcod,prveml from tbtec,tbtectyp,tbprv,tbprj,tbprjdet where teccod=prjteccod and tectypcod=prjtectypcod and prjclprvcod=prvcod and prjprjcod=prjcod and prjempcod=" + Session["cod"].ToString() + "and prjprjcod=" + Request.QueryString["pcod"].ToString(); SqlDataAdapter adp = new SqlDataAdapter(st, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DetailsView1.DataSource = ds; DetailsView1.DataBind(); } } protected void Button2_Click(object sender, EventArgs e) { Int32 a = Convert.ToInt32(Request.QueryString["pcod"]); Response.Redirect("frmeprvmsg.aspx?pcod=" + a.ToString()); } protected void Button1_Click(object sender, EventArgs e) { Int32 a = Convert.ToInt32(Request.QueryString["pcod"]); Response.Redirect("frmecltmsg.aspx?pcod=" + a.ToString()); } }

Frmecltmsg.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; 76

using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Employee_Default2 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {

if (Page.IsPostBack == false) { string st = "select prjclprvcod,prjprjcod,prjprjnam,prvcod,prvnam,prvphn,prveml from tbprv,tbprjdet where prvcod=prjclprvcod and prjprjcod=" + Request.QueryString["pcod"].ToString(); SqlDataAdapter adp = new SqlDataAdapter(st, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DetailsView1.DataSource = ds; DetailsView1.DataBind(); } } protected void Button1_Click(object sender, EventArgs e) { Panel1.Visible = true; Panel2.Visible = false; 77

} protected void Button2_Click(object sender, EventArgs e) { Panel1.Visible = false; Panel2.Visible = true; SqlDataAdapter adp = new SqlDataAdapter(" select msgdsc,msgdat,msgsencod,prvnam,prjprjnam from tbprjdet,tbprv,tbmsg where msgsencod=prjclprvcod and prvcod=prjclprvcod and msgreccod=" + Session["cod"].ToString() + " and prjclprvcod=" + DetailsView1.DataKey[0].ToString() + " and prjprjcod=" + Request.QueryString["pcod"].ToString(), ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); } protected void Button3_Click(object sender, EventArgs e) { nsgetcod.clsmsg obj = new nsgetcod.clsmsg(); nsgetcod.clsmsgprp objprp = new nsgetcod.clsmsgprp(); objprp.msgdat = Convert.ToDateTime(DateTime.Now); objprp.msgdsc = TextBox1.Text; objprp.msgsencod = Convert.ToInt32(Session["cod"]); objprp.msgreccod = Convert.ToInt32(DetailsView1.DataKey[0]); obj.save_rec(objprp);

} protected void Button4_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox1.Focus(); } 78

protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { nsgetcod.clsmsg obj = new nsgetcod.clsmsg(); nsgetcod.clsmsgprp objprp = new nsgetcod.clsmsgprp(); objprp.msgdat = Convert.ToDateTime(DateTime.Now); objprp.msgdsc = TextBox2.Text; objprp.msgsencod = Convert.ToInt32(Session["cod"]); objprp.msgreccod = Convert.ToInt32(DetailsView1.DataKey[0]); obj.save_rec(objprp); } } Frmeprvmsg.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient;

public partial class Employee_Default3 : System.Web.UI.Page { nsgetcod.clsmsg obj = new nsgetcod.clsmsg(); nsgetcod.clsmsgprp objprp = new nsgetcod.clsmsgprp(); protected void Page_Load(object sender, EventArgs e)

79

{ if (Page.IsPostBack == false) { string st = "select prvnam,prveml,prjprprvcod,prjprjnam from tbprjdet,tbprv where prvcod=prjprprvcod and prjprjcod=" + Request.QueryString["pcod"].ToString(); SqlDataAdapter adp = new SqlDataAdapter(st, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DetailsView1.DataSource = ds; DetailsView1.DataBind(); } } protected void Button1_Click(object sender, EventArgs e) { Panel1.Visible = true; Panel2.Visible = false; } protected void Button2_Click(object sender, EventArgs e) { Panel1.Visible = false; Panel2.Visible = true; SqlDataAdapter adp1 = new SqlDataAdapter("select msgdsc,msgdat,msgsencod,prvnam,prjprjnam from tbprjdet,tbprv,tbmsg where msgsencod=prvcod and prvcod=prjprprvcod and msgreccod=" + Session["cod"].ToString() + " and prjprprvcod=" + DetailsView1.DataKey[0].ToString() + " and prjprjcod=" + Request.QueryString["pcod"].ToString(), ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds1 = new DataSet(); adp1.Fill(ds1); GridView1.DataSource = ds1; GridView1.DataBind(); 80

} protected void Button3_Click(object sender, EventArgs e) { objprp.msgdat = Convert.ToDateTime(DateTime.Now); objprp.msgdsc = TextBox1.Text; objprp.msgsencod = Convert.ToInt32(Session["cod"]); objprp.msgreccod = Convert.ToInt32(DetailsView1.DataKey[0]); obj.save_rec(objprp); } protected void Button4_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox1.Focus(); } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { objprp.msgdat = Convert.ToDateTime(DateTime.Now); objprp.msgdsc = TextBox2.Text; objprp.msgsencod = Convert.ToInt32(Session["cod"]); objprp.msgreccod = Convert.ToInt32(DetailsView1.DataKey[0]); obj.save_rec(objprp); } } Frmempasprj.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq;

81

using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Provider_Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { string st = "select prjdsc,prjfil,tecnam,tectypnam,bidamt,prvnam,prvadd,prvphn,prveml,prjprvcod from tbprj,tbtec,tbtectyp,tbbid,tbprv where prjteccod=teccod and prjtectypcod=tectypcod and prjprvcod=prvcod and prjcod=" + Request.QueryString["pcod"].ToString(); SqlDataAdapter adp = new SqlDataAdapter(st, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DetailsView1.DataSource = ds; DetailsView1.DataBind(); } } protected void Button3_Command(object sender, CommandEventArgs e) { } protected void Button3_Click(object sender, EventArgs e) { 82

Panel1.Visible = true; string st="select empnam,empphn,empdsc,empprffil,empcod,empeml,usrnam from tbemp,tbusr where empcod=usrprvcltcod and empprvcod="+Session["cod"].ToString(); SqlDataAdapter adp1=new SqlDataAdapter(st,ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds=new DataSet(); adp1.Fill(ds); DropDownList1.DataSource=ds; DropDownList1.DataBind(); } protected void Button4_Click(object sender, EventArgs e) { Int32 a = Convert.ToInt32(Request.QueryString["pcod"]); Response.Redirect("frmpcltmsg.aspx?pcod=" + a.ToString()); } protected void Button5_Click(object sender, EventArgs e) { Int32 a = Convert.ToInt32(Request.QueryString["pcod"]); Response.Redirect("frmempmsg.aspx?pcod=" + a.ToString()); } protected void Button1_Click(object sender, EventArgs e) { nsgetcod.clsprjdet obj1 = new nsgetcod.clsprjdet(); nsgetcod.clsprjdetprp objprp1 = new nsgetcod.clsprjdetprp(); objprp1.prjprprvcod =Convert.ToInt32(Session["cod"]); objprp1.prjempcod =Convert.ToInt32(DropDownList1.SelectedValue); objprp1.prjprjcod = Convert.ToInt32(Request.QueryString["pcod"]); objprp1.prjprjnam = DetailsView1.Rows[0].Cells[1].Text; objprp1.prjclprvcod = Convert.ToInt32(DetailsView1.DataKey[0]); obj1.save_rec(objprp1); } protected void Button2_Click(object sender, EventArgs e) 83

{ } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { SqlDataAdapter adp = new SqlDataAdapter("select * from tbemp where empcod=" + DropDownList1.SelectedValue, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DetailsView2.DataSource = ds; DetailsView2.DataBind(); } } Frmempmsg.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Provider_Default : System.Web.UI.Page { nsgetcod.clsmsg obj = new nsgetcod.clsmsg(); nsgetcod.clsmsgprp objprp = new nsgetcod.clsmsgprp();

84

protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { string st = "select empnam,empcod,empeml,prjempcod,prjprjnam from tbprjdet,tbemp where empcod=prjempcod and prjprjcod=" + Request.QueryString["pcod"].ToString(); SqlDataAdapter adp = new SqlDataAdapter(st, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DetailsView1.DataSource = ds; DetailsView1.DataBind(); } } protected void Button2_Click(object sender, EventArgs e) { Panel1.Visible = false; Panel2.Visible = true; SqlDataAdapter adp1 = new SqlDataAdapter("select msgdsc,msgdat,msgsencod,empnam,prjprjnam from tbprjdet,tbemp,tbmsg where msgsencod=empcod and msgreccod=" + Session["cod"].ToString() + " and prjempcod=" + DetailsView1.DataKey[0].ToString() + " and prjprjcod=" + Request.QueryString["pcod"].ToString(), ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds1 = new DataSet(); adp1.Fill(ds1); GridView1.DataSource = ds1; GridView1.DataBind(); } protected void Button1_Click(object sender, EventArgs e) { Panel1.Visible = true; Panel2.Visible = false; 85

} protected void Button3_Click(object sender, EventArgs e) { objprp.msgdat = Convert.ToDateTime(DateTime.Now); objprp.msgdsc = TextBox1.Text; objprp.msgsencod = Convert.ToInt32(Session["cod"]); objprp.msgreccod = Convert.ToInt32(DetailsView1.DataKey[0]); obj.save_rec(objprp); } protected void Button4_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox1.Focus(); } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { objprp.msgdat = Convert.ToDateTime(DateTime.Now); objprp.msgdsc = TextBox2.Text; objprp.msgsencod = Convert.ToInt32(Session["cod"]); objprp.msgreccod = Convert.ToInt32(DetailsView1.DataKey[0]); obj.save_rec(objprp); } } Frmempvrf.aspx.cs using System;

86

using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Provider_Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { SqlDataAdapter adp = new SqlDataAdapter("select empnam,empcod from tbemp where empprvcod=" + Session["cod"].ToString(), ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DropDownList1.DataSource = ds; DropDownList1.DataBind(); } } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { } 87

protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e) { if (RadioButtonList1.SelectedIndex == 0) { Panel1.Visible = true; Panel2.Visible = false; } else if (RadioButtonList1.SelectedIndex == 1) { Panel2.Visible = true; Panel1.Visible = false; } } protected void Button1_Click(object sender, EventArgs e) { nsgetcod.clsemp obj = new nsgetcod.clsemp(); nsgetcod.clsempprp objprp = new nsgetcod.clsempprp(); if (RadioButtonList1.SelectedIndex == 0) { nsgetcod.clsusr obj1 = new nsgetcod.clsusr(); nsgetcod.clsusrprp objprp1 = new nsgetcod.clsusrprp(); objprp.empcod = Convert.ToInt32(DropDownList1.SelectedValue); objprp.empsts = 'A'; obj.updatsts(objprp); objprp1.usrnam = TextBox1.Text; objprp1.usrprvcltcod = Convert.ToInt32(DropDownList1.SelectedValue); objprp1.usrpwd = TextBox2.Text; objprp1.usrrol = 'E'; obj1.save_rec(objprp1); } 88

else if (RadioButtonList1.SelectedIndex == 1) { objprp.empcod = Convert.ToInt32(DropDownList1.SelectedValue); objprp.empsts = 'R'; obj.update_rec(objprp); } } protected void Button2_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox2.Text = ""; TextBox3.Text = ""; TextBox1.Focus(); } } Frmpcltmsg.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Provider_Default2 : System.Web.UI.Page { nsgetcod.clsmsg obj = new nsgetcod.clsmsg();

89

nsgetcod.clsmsgprp objprp = new nsgetcod.clsmsgprp(); protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { string st = "select prjclprvcod,prjprjcod,prjprjnam,prvcod,prvnam,prvphn,prveml from tbprv,tbprjdet where prvcod=prjclprvcod and prjprjcod=" + Request.QueryString["pcod"].ToString(); SqlDataAdapter adp = new SqlDataAdapter(st, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); DetailsView1.DataSource = ds; DetailsView1.DataBind(); } } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { objprp.msgdat = Convert.ToDateTime(DateTime.Now); objprp.msgdsc = TextBox2.Text; objprp.msgsencod = Convert.ToInt32(Session["cod"]); objprp.msgreccod = Convert.ToInt32(DetailsView1.DataKey[0]); obj.save_rec(objprp); } protected void Button1_Click(object sender, EventArgs e) { Panel1.Visible = true; Panel2.Visible = false; } protected void Button2_Click(object sender, EventArgs e) { 90

Panel1.Visible = false; Panel2.Visible = true; SqlDataAdapter adp = new SqlDataAdapter(" select msgdsc,msgdat,msgsencod,prvnam,prjprjnam from tbprjdet,tbprv,tbmsg where msgsencod=prvcod and msgreccod=" + Session["cod"].ToString() + " and prjclprvcod="+DetailsView1.DataKey[0].ToString()+" and prjprjcod="+Request.QueryString["pcod"].ToString(),ConfigurationManager.ConnectionStri ngs["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); } protected void Button3_Click(object sender, EventArgs e) { objprp.msgdat = Convert.ToDateTime(DateTime.Now); objprp.msgdsc = TextBox1.Text; objprp.msgsencod = Convert.ToInt32(Session["cod"]); objprp.msgreccod = Convert.ToInt32(DetailsView1.DataKey[0]); obj.save_rec(objprp); } protected void Button4_Click(object sender, EventArgs e) { TextBox1.Text = ""; TextBox1.Focus(); } } Frmprjbycl.aspx.cs using System; using System.Data; using System.Configuration;

91

using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Provider_Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { String st = "select bidcod,biddat,bidamt,prjdsc,prjcod,prjteccod,prjtectypcod,prjprvcod,prjfil,prvnam,prvadd,prv phn,prveml,prvprffil from tbprv,tbbid,tbprj where prjprvcod=prvcod and bidprjcod=prjcod and bidmsgsts='O'and bidprvcod=" + Session["cod"].ToString(); SqlDataAdapter adp = new SqlDataAdapter(st, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); String st1 = "select bidcod,biddat,bidamt,prjdsc,prjteccod,prjtectypcod,prjprvcod,prjfil from tbbid,tbprj where bidprjcod=prjcod and bidmsgsts='R'and bidprvcod=" + Session["cod"].ToString(); SqlDataAdapter adp1 = new SqlDataAdapter(st1, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds1 = new DataSet(); adp1.Fill(ds1); 92

GridView2.DataSource = ds1; GridView2.DataBind(); } } protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) {

} protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { Int32 a = Convert.ToInt32(GridView1.DataKeys[e.NewEditIndex][0]); Response.Redirect("frmempasprj.aspx?pcod=" + a.ToString()); } }

Frmprjdet.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Provider_Default : System.Web.UI.Page { 93

protected void Page_Load(object sender, EventArgs e) { } public String getprv(Int32 prvcod) { SqlDataAdapter adp = new SqlDataAdapter("select prvnam from tbprv where prvcod=" + prvcod.ToString(), ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); String s = ds.Tables[0].Rows[0][0].ToString(); return s; } protected void Button1_Click(object sender, EventArgs e) { //SqlDataAdapter adp = new SqlDataAdapter("select bidmsgsts from tbbid where bidprjcod=" + Request.QueryString["pcod"].ToString()+ " and bidprvcod =" + Session["cod"].ToString(), ConfigurationManager.ConnectionStrings["cn"].ConnectionString); //DataSet ds = new DataSet(); //adp.Fill(ds); //string s = ds.Tables[0].Rows[0][0].ToString(); //if (s == "N") //{ // //} //else if (s == "O") //{ // //} //else if (s == "R") //{ Label1.Text = "You have already submit request for this project & your request is accepted by client,CONGRATS"; Label1.Text = "You have already send request for that project";

94

// //}

Label1.Text = "You have already submit request for this project & your request is

rejected by client"; //else //{ nsgetcod.clsbid obj = new nsgetcod.clsbid(); nsgetcod.clsbidprp objprp = new nsgetcod.clsbidprp(); objprp.biddat = DateTime.Now; objprp.bidprjcod = Convert.ToInt32(Request.QueryString["pcod"]); objprp.bidprvcod = Convert.ToInt32(Session["cod"]); objprp.bidmsgsts = 'N'; objprp.bidfil = FileUpload1.FileName; objprp.biddsc = TextBox2.Text; objprp.bidamt = TextBox1.Text; obj.save_rec(objprp); if (FileUpload1.PostedFile.FileName != "") { String st = Server.MapPath("../images"); st = st + "//" + FileUpload1.FileName; FileUpload1.PostedFile.SaveAs(st); } } } Frmvewprj.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Linq; using System.Web;

95

using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Xml.Linq; using System.Data.SqlClient; public partial class Provider_Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { String st = "select prjcod,prjdsc,tecnam,tectypnam from tbprj,tbtec,tbtectyp where prjteccod=teccod and prjtectypcod=tectypcod and prjsts='O' and prjbidopndat<=getdate()"; //String st1 = "select prjcod,prjdsc,tecnam,tectypnam from tbprj,tbtec,tbtectyp where prjteccod=teccod and prjtectypcod=tectypcod and prjsts='S' and prjbidopndat<=getdate() and prjcod in(select prjdetprjcod from tbprjdet where prjdetprvcod=" + Session["cod"].ToString() + ")"; SqlDataAdapter adp = new SqlDataAdapter(st, ConfigurationManager.ConnectionStrings["cn"].ConnectionString); DataSet ds = new DataSet(); adp.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); //GridView2.DataSource = ds.Tables[1]; //GridView2.DataBind(); } } protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { Int32 a = Convert.ToInt32(GridView1.DataKeys[e.NewEditIndex][0]); Response.Redirect("frmprjdet.aspx?pcod=" + a.ToString()); 96

} protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { } }

97

RESULT

98

CHAPTER 6 RESULT
Home Page:-

99

Registration Page:-

Admin Page:Country Page:-

100

101

State Page:-

City Page:-

102

Technology Page:-

Tech Type:-

103

Verification Page:-

104

Client page:For Post Project:-

105

View Bid:-

Provider Pages:To View Project:-

106

107

For Send Bid:-

108

CONCLUSION

109

CHAPTER 7 CONCLUSION

The system has been developed for the given condition and is found working effectively. The developed system is flexible and changes can be made easily whenever required. Using the facilities and functionalities of .Net, the software has been developed in a neat and simple manner, thereby reducing the operators work. The speed and accuracy are maintained in proper way. The user-friendly nature of this software developed in .Net framework is very easy to work with both the higher management as well as other users with little knowledge of computer. The results obtained were fully satisfactory from the user point of view. The system was verified with valid as well as invalid data in each manner. The system is run with an insight into the necessary modifications that may be required in the future. Hence the system can be maintained successfully.

110

REFERENCES

111

CHAPTER 8 REFERENCES

BOOKS Database management system System Analysis and Design SQL Server ASP.NET Javascript Vipin C. Desai Elias M. Awad Microsoft Press Wrox publications Ivan Byross

112

Anda mungkin juga menyukai