Académique Documents
Professionnel Documents
Culture Documents
A Project Report Submitted In Partial Fulfillment of the Requirements For the Degree of BACHELOR OF TECHNOLOGY By SHUBHANGI ASTHANA (0841610050) RICHA CHATURVEDI (0841610406) SHIVALIKA KUKRETY (0841610408) TARUNA SHARMA (0841610413)
Under the Guidance of
MS.VANYA GARG
MAY, 2012
CERTIFICATE
Certified that SHUBHANGI ASTHANA (0841610050), RICHA CHATURVEDI (0841610406), SHIVALIKA KUKRETY (0841610408), TARUNA SHARMA (0841610413), have carried out the work presented in this project report entitled PROJECT ON E-SHOPPING: SHOPPING PARADISE for the award of Bachelor of Technology from Gautam Buddh Technical University, Lucknow under my Guidance. The project embodies results of studies carried out by the student herself and the content of the report do not form the basis for the award of any other degree to the candidate or to anybody else from this or any other University/Institution.
Date:
DECLARATION
This is to certify that project entitled E-Shopping: Shopping Paradise is done by us (SHUBHANGI ASTHANA (0841610050), RICHA CHATURVEDI (0841610406), SHIVALIKA KUKRETY (0841610408), TARUNA SHARMA (0841610413)) is an authentic work carried out for the partial fulfillment of the requirements for the award of the degree of Bachelor of Technology under the guidance of Ms. Vanya Garg. The matter embodied in this project work has not been submitted earlier for award of any degree or diploma to the best of my knowledge and belief.
ACKNOWLEDGEMENT
This is a great opportunity to acknowledge and to thanks all those persons without whose support and help this project would have been impossible. We would like to add a few heartfelt words for the people who were part of this project in numerous ways. I would like to thanks to my project guide Ms. Vanya Garg, for her indefatigable guidance, valuable suggestion, moral support, constant encouragement and contribution of time for the successful completion of project work. I am very grateful to him, for providing all the facilities needed during the project development. At the outset, I sincerely thank all faculty members of my institution for his extra effort to make our session on line inspire of all ideas. I thank my Counselors for his indispensable support and encouragement thought the project. I must thank to respected Ms. Vanya Garg for her valuable suggestion while working on the project. I would like to thank all those who helped me directly or indirectly. Last but not the least, I would like to acknowledge the ongoing support of my parents and my family members, whose patience and encouragement during these long days and night have been paramount in making this project a reality. Thank you SHUBHANGI ASTHANA (0841610050)
I II 8
8
11
11 17 23
CHAPTER 3. SDLC
3.1 Software Development Life Cycle 3.2 SDLC Objectives 3.3 Waterfall Model
31
31 33 40
47
47
CHAPTER 5. SRS
5.1 Software Requirement Specification 5.2 Hardware and Software Requirement 5.3 E-R Diagram 5.4 Data Flow Diagram
51
51 53 54 55
CHAPTER 6. DESIGN
6.1 Homescreen Snapshots 6.2 Database Deign Snapshots
5
62
62 75
CHAPTER 7. CODING
7.1 Web.config page 7.2 Login Page 7.3 Admin 7.4 Category 7.5 Subcategory 7.6 Items 7.7 Crm 7.8 Srm 7.9 Homepage `
79
79 80 81 83 89 94 99 101 102
CHAPTER 8. TESTING
8.1 System Testing
109
111
112
114
114 114
116
116
CHAPTER12. REFERENCE
12.1 Bibliography
118
118
CHAPTER 1. INTRODUCTION
INTRODUCTION
The SHOPPING PARADISE Web site is the application that provides customers with online shopping. Through a Web browser, a customer can browse the catalog, place items to purchase into a virtual shopping cart, create and sign in to a user account, and purchase the shopping cart contents by placing an order with a credit card. The Application is a working demonstration of how to use blueprints principles in a real application design. This document is an online guide to the design and the implementation of the application Enterprise Applications with web technology. Each release of the application maintains consistent design features such as separating logic and presentation, using web component for control and web pages for presentation, using business components, and so on. High-level design features, this document goes deeper into the implementation details of the current application release. This document is provided as an online-only resource so that it may be continually extended and updated. This document begins with a description of the separate applications that the
sample application comprises, describes the modular structure of the EMAT application, and provides an in-depth description of several pieces of the modules. Each SHOPPING PARADISE module has different requirements from the others. This section describes the requirements, design, and implementation of each module. Control modulethe control module dispatches requests to business logic, controls screen flow, coordinates component interactions, and activates user sign on and registration. The control module is implemented by the WAF and application-specific WAF extensions. Shopping cart modulethe shopping cart tracks the items a user has selected for purchase
Sign on modulethe sign on module requires a user to sign on before accessing certain screens, and manages the sign on process Messaging modulethe messaging module asynchronously transmits purchase orders from the pet store to the OPC Catalog modulethe catalog module provides a page-based view of the catalog based on user search criteria Customer modulethe customer module represents customer information: addresses, credit cards, contact information, and so on Control Module Requirements The control module forms the framework underlying the application, so it naturally has the most high-level requirements. Extensibility and maintainability are prime considerations in this module. The control module must be extensible because all real-world enterprise applications change constantly. Because the control module plays a role in virtually every interaction, its code must be well-structured to avoid complexity-related maintenance problems. The requirements of the control module are:
The module must handle all HTTP requests for the application. This module controls a
Web application, and interacts with a user who sends HTTP service requests. The control module is responsible for classifying and dispatching each of these requests to the other modules.
HTTP responses may be of any content type. Web application developers do not want
to be limited to just textual content types. The control module must also be able to produce binary responses.
Business logic must be easily extensible. Enterprise applications are always changing
and growing as business rules and conditions change. A developer familiar with the control module should be able easily to add new functionality with minimal impact on existing functions.
New views must be easy to add. Most business logic changes imply new user views, so
Module must provide application-wide control of look and feel. Manually editing
hundreds or dozens of user views is not a practical way to manage application look and feel.
The control module must provide a way for application screen layout and style to be controlled globally.
structured so that new functions added over time do not result in a thicket of unmentionable spaghetti code. It should be possible to easily understand the control of even an application with several hundred business classes. Application-wide functionality must be easy to add. New application requirements occasionally apply to every operation or view in an application. The control module must be structured so that such requirements can be easily met.
10
code is stored and executed locally, executed locally but Internet-distributed, or executed remotely. * To provide a code-execution environment that minimizes software deployment and versioning conflicts.
11
* To provide a code-execution environment that guarantees safe execution of code, including by an unknown or semi-trusted third party. * To provide a code-execution environment that the performance problems of scripted or interpreted environments * To make the developer experience consistent across widely varying types of applications, such as windows-based applications and Web-based applications. * To build all communication on industry standards to ensure that code based on the .NET Framework can integrate with any other code. The .NET Framework has two main components: The common language runtime and the .NET Framework class library. The common language runtime is the foundation of the .NET Framework. You can think of the runtime as an agent that manages code at execution time, providing core services such as memory management, thread management, and remoting, while also enforcing strict type safety and other forms of code accuracy that ensures security and robustness. In fact, the concept of code management is a fundamental principle of the runtime. Code that targets the runtime is known as managed code, while the code that does not target the runtime is known as unmanaged code. The class library, the other main component of the .NET framework, is a comprehensive, object-oriented collection of reusable types that you can use to develop applications ranging from traditional command-line or graphical user interface (GUI) applications to applications based on the latest innovations provided by ASP.NET, such as web Forms and XML Web services.
12
For more information about compatibility and for a list of the public API modifications to the class library that might affect the compatibility of your application.
ADO.NET
New features in ADO.NET include support for user-defined types (UDT), asynchronous database operations, XML data types, large value types, snapshot isolation, and new attributes that allow applications to support multiple active result sets (MARS) with SQL Server 2005.
ASP.NET
The Microsoft .NET Framework 2.0 includes significant enhancements to all areas of ASP.NET. For Web page development, new controls make it easier to add commonly used functionality to dynamic Web pages. New data controls make it possible to display and edit data on an ASP.NET Web page without writing code. An improved code-behind model makes developing ASP.NET pages easier and more robust. Caching features provide several new ways to cache pages, including the ability to build cache dependency on tables in a SQL Server database.
13
You can now customize Web sites and pages in a variety of ways. Profile properties enable ASP.NET to track property values for individual users automatically. Using Web Parts, you can create pages that users can customize in the browser. You can add navigation menus using simple controls. Improvements to Web site features allow you to create professional Web sites faster and more easily. Master pages allow you to create a consistent layout for all the pages in a site, and themes allow you to define a consistent look for controls and static text. To help protect your sites, you can precompile a Web site to produce executable code from source files (both code files and the markup in .aspx pages). You can then deploy the resulting output, which does not include any source information, to a production server. Enhancements to ASP.NET also include new tools and classes to make Web site management easier for Web site developers, server administrators, and hosters. ASP.NET accommodates a wide variety of browsers and devices. By default, controls render output that is compatible with XHTML 1.1 standards. You can use device filtering to specify different property values on the same control for different browsers.
14
Distributed Computing
In the System.Net namespace, support has been added for FTP client requests, caching of HTTP resources, automatic proxy discovery, and obtaining network traffic and statistical information. The namespace now includes a Web server class that you can use to create a simple Web
server for responding to HTTP requests. Classes that generate network traffic have been instrumented to output trace information for application debugging and diagnostics. Security and performance enhancements have been added to the System.Net.Sockets.Socket and System.Uri classes.
15
In the System.Web.Services namespaces, support for SOAP 1.2 and nullable elements has been added. In the System.Runtime.Remoting.Channels namespaces, channel security features have been added. The TCP channel now supports authentication and encryption, as well as several new features to better support load balancing.
FTP Support
Applications can now access File Transfer Protocol resources using the WebRequest, WebResponse, and WebClient classes.
System.Collections.Generic,
provide
classes
methods.
16
System.Nullable<T> is a standard representation of optional values. Generics are supported in three languages: Visual Basic, C#, and C++. Reflection has been extended to allow runtime examination and manipulation of generic types and methods. New members have been added to System.Type and
System.Reflection.MethodInfo, including IsGenericType to identify generic types (for example, class Gen<T,U> {...}), GetGenericArguments to obtain type parameter lists, and MakeGenericType to create specific types (for example, new Gen<int, long>()).
The following sections describe the main components and features of the .NET Framework in greater detail.
17
Compilers and tools expose the runtime's functionality and enable you to write code that benefits from this managed execution environment. Code that you develop with a language compiler that targets the runtime is called managed code; it benefits from features such as cross-language integration, cross-language exception handling, enhanced security, versioning and deployment support, a simplified model for component interaction, and debugging and profiling services. To enable the runtime to provide services to managed code, language compilers must emit metadata that describes the types, members, and references in your code. Metadata is stored with the code; every loadable common language runtime portable executable (PE) file contains metadata. The runtime uses metadata to locate and load classes, lay out instances in memory, resolve method invocations, generate native code, enforce security, and set run-time context boundaries. The runtime automatically handles object layout and manages references to objects, releasing them when they are no longer being used. Objects whose lifetimes are managed in this way are called managed data. Garbage collection eliminates memory leaks as well as some other common programming errors. If your code is managed, you can use managed data, unmanaged data, or both managed and unmanaged data in your .NET Framework application. Because language compilers supply their own types, such as primitive types, you might not always know (or need to know) whether your data is being managed. The common language runtime makes it easy to design components and applications whose objects interact across languages. Objects written in different languages can communicate with each other, and their behaviors can be tightly integrated. For example, you can define a class and then use a different language to derive a class from your original class or call a method on the original class. You can also pass an instance of a class to a method of a class written in a different language. This cross-language integration is possible because language compilers and tools that target the runtime use a common type system defined by the runtime, and they follow the runtime's rules for defining new types, as well as for creating, using, persisting, and binding to types.
18
As part of their metadata, all managed components carry information about the components and resources they were built against. The runtime uses this information to ensure that your component or application has the specified versions of everything it needs, which makes your code less likely to break because of some unmet dependency. Registration information and state data are no longer stored in the registry where they can be difficult to establish and maintain. Rather, information about the types you define (and their dependencies) is stored with the code as metadata, making the tasks of component replication and removal much less complicated. Language compilers and tools expose the runtime's functionality in ways that are intended to be useful and intuitive to developers. This means that some features of the runtime might be more noticeable in one environment than in another. How you experience the runtime depends on which language compilers or tools you use. For example, if you are a Visual Basic developer, you might notice that with the common language runtime, the Visual Basic language has more object-oriented features than before. Following are some benefits of the runtime:
Performance improvements. The ability to easily use components developed in other languages. Extensible types provided by a class library. New language features such as inheritance, interfaces, and overloading for object-
oriented programming; support for explicit free threading that allows creation of multithreaded, scalable applications; support for structured exception handling and custom attributes. If you use Microsoft Visual C++ .NET, you can write managed code using the Managed Extensions for C++, which provide the benefits of a managed execution environment as well as access to powerful capabilities and expressive data types that you are familiar with. Additional runtime features include:
Cross-language integration, especially cross-language inheritance. Garbage collection, which manages object lifetime so that reference counting is
unnecessary.
19
unnecessary.
The ability to compile once and run on any CPU and operating system that supports
the runtime. You can also write managed code using the C# language, which provides the following benefits:
Complete object-oriented design. Very strong type safety. A good blend of Visual Basic simplicity and C++ power. Garbage collection. Syntax and keywords similar to C and C++. Use of delegates rather than function pointers for increased type safety and security.
Function pointers are available through the use of the unsafe C# keyword and the /unsafe option of the C# compiler (Csc.exe) for unmanaged code and data.
20
The runtime also enforces code robustness by implementing a strict type-and-codeverification infrastructure called the common type system (CTS). The CTS ensures that all managed code is self-describing. The various Microsoft and third-party language compilers generate managed code that conforms to the CTS. This means that managed code can consume other managed types and instances, while strictly enforcing type fidelity and type safety. In addition, the managed environment of the runtime eliminates many common software issues. For example, the runtime automatically handles object layout and manages references to objects, releasing them when they are no longer being used. This automatic memory management resolves the two most common application errors, memory leaks and invalid memory references. The runtime also accelerates developer productivity. For example, programmers can write applications in their development language of choice, yet take full advantage of the runtime, the class library, and components written in other languages by other developers. Any compiler vendor who chooses to target the runtime can do so. Language compilers that target the .NET Framework make the features of the .NET Framework available to existing code written in that language, greatly easing the migration process for existing applications. While the runtime is designed for the software of the future, it also supports software of today and yesterday. Interoperability between managed and unmanaged code enables developers to continue to use necessary COM components and DLLs. The runtime is designed to enhance performance. Although the common language runtime provides many standard runtime services, managed code is never interpreted. A feature called just-in-time (JIT) compiling enables all managed code to run in the native machine language of the system on which it is executing. Meanwhile, the memory manager removes the possibilities of fragmented memory and increases memory locality-of-reference to further increase performance. Finally, the runtime can be hosted by high-performance, server-side applications, such as Microsoft SQL Server and Internet Information Services (IIS). This infrastructure enables
21
you to use managed code to write your business logic, while still enjoying the superior performance of the industry's best enterprise servers that support runtime hosting.
Console applications. Windows GUI applications (Windows Forms). ASP.NET applications. XML Web services. Windows services.
For example, the Windows Forms classes are a comprehensive set of reusable types that vastly simplify Windows GUI development. If you write an ASP.NET Web Form application, you can use the Web Forms classes.
22
23
SQL Server 2008 supports enhancements to distributed partitioned views that allow you to partition tables horizontally across multiple servers. This allows you to scale out one database server to a group of database servers that cooperate to provide the same performance levels as a cluster of database servers. This group, or federation, of database servers can support the data storage requirements of the largest Web sites and enterprise data processing systems. SQL Server 2008 introduces Net-Library support for Virtual Interface Architecture (VIA) system-area networks that provide high-speed connectivity between servers, such as between application servers and database servers. User-Defined Functions The programmability of Transact-SQL can be extended by creating your own Transact-SQL functions. A user-defined function can return either a scalar value or a table. Indexed Views Indexed views can significantly improve the performance of an application where queries frequently perform certain joins or aggregations. An indexed view allows indexes to be created on views, where the result set of the view is stored and indexed in the database. Existing applications do not need to be modified to take advantage of the performance improvements with indexed views. New Data Types SQL Server 2000 introduces three new data types. bigint is an 8-byte integer type. sql_variant is a type that allows the storage of data values of different data types. table is a type that allows applications to store results temporarily for later use. It is supported for variables, and as the return type for user-defined functions. INSTEAD OF and AFTER Triggers INSTEAD OF triggers are executed instead of the triggering action (for example, INSERT, UPDATE, DELETE). They can also be defined on views, in which case they greatly extend
24
the types of updates a view can support. AFTER triggers fire after the triggering action. SQL Server 2008 introduces the ability to specify which AFTER triggers fire first and last. Cascading Referential Integrity Constraints You can control the actions SQL Server 2008 takes when you attempt to update or delete a key to which existing foreign keys point. This is controlled by the new ON DELETE and ON UPDATE clauses in the REFERENCES clause of the CREATE TABLE and ALTER TABLE statements. Full-Text Search Enhancements Full-text search now includes change tracking and image filtering. Change tracking maintains a log of all changes to the full-text indexed data. You can update the full-text index with these changes by flushing the log manually, on a schedule, or as they occur, using the background update index option. Image filtering allows you to index and query documents stored in image columns. The user provides the document type in a column that contains the file name extension that the document would have had if it were stored as a file in the file system. Using this information, full-text search is able to load the appropriate document filter to extract textual information for indexing. Multiple Instances of SQL Server SQL Server 2008 supports running multiple instances of the relational database engine on the same computer. Each computer can run one instance of the relational database engine from SQL Server version 6.5 or 7.0, along with one or more instances of the database engine from SQL Server 2008. Each instance has its own set of system and user databases. Applications can connect to each instance on a computer similar to the way they connect to instances of SQL Servers running on different computers. The SQL Server 2008 utilities and administration tools have been enhanced to work with multiple instances. Net-Library Enhancements The SQL Server 2008 Net-Libraries have been rewritten to virtually eliminate the need to administer Net-Library configurations on client computers when connecting SQL Server 2008
25
clients to instances of SQL Server 2008. The new Net-Libraries also support connections to multiple instances of SQL Server on the same computer, and support Secure Sockets Layer encryption over all Net-Libraries. SQL Server 2008 introduces Net-Library support for Virtual Interface Architecture (VIA) system-area networks that provide high-speed connectivity between servers, such as between application servers and database servers.
Online Transaction Processing (OLTP) systems must be capable of handling thousands of orders placed at the same time.
Increasing numbers of corporations are implementing large Web sites as a mechanism for their customers to enter orders, contact the service department, get information about products, and for many other tasks that previously required contact with employees. These sites require data storage that is secure, yet tightly integrated with the Web.
Organizations are implementing off-the-shelf software packages for critical services such as human resources planning, manufacturing resources planning, and inventory control. These systems require databases capable of storing large amounts of data and supporting large numbers of users.
Organizations have many users who must continue working when they do not have access to the network. Examples are mobile disconnected users, such as traveling sales representatives or regional inspectors. These users must synchronize the data on a notebook or laptop with the current data in the corporate system, disconnect from the network, record the results of their work while in the field, and then finally reconnect with the corporate network and merge the results of their fieldwork into the corporate data store.
26
Managers and marketing personnel need increasingly sophisticated analysis of trends recorded in corporate data. They need robust Online Analytical Processing (OLAP) systems easily built from OLTP data and support sophisticated data analysis.
Independent Software Vendors (ISVs) must be able to distribute data storage capabilities with applications targeted at individuals or small workgroups. This means the data storage mechanism must be transparent to the users who purchase the application. This requires a data storage system that can be configured by the application, and then tune itself automatically so that the users do not need to dedicate database administrators to constantly monitor and tune the application
27
28
Ease of installation, deployment, and use. SQL Server 200 includes a set of administrative and development tools that improve upon the process of installing, deploying, managing, and using SQL Server across several sites. These features allow you to rapidly deliver SQL Server applications that customers can implement with a minimum of installation and administrative overhead. * Create keyboard shortcuts for frequently used queries (custom query shortcuts feature).
29
30
The initiation of a system (or project) begins when a business need or opportunity is identified. A Project Manager should be appointed to manage the project. This business need is documented in a Concept Proposal. After the Concept Proposal is approved, the System Concept Development Phase begins.
3. Planning Phase
The concept is further developed to describe how the business will operate once the approved system is implemented, and to assess how the system will impact employee and customer privacy. To ensure the products and /or services provide the required capability on-time and within budget, project resources, activities, schedules, tools, and reviews are defined. Additionally, security certification and accreditation activities begin with the identification of system security requirements and the completion of a high level vulnerability assessment.
4.
Requirements Analysis
Phase Functional user requirements are formally defined and delineate the requirements in terms of data, system performance, security, and maintainability requirements for the system. All requirements are defined to a level of detail sufficient for systems design to proceed. All requirements need to be measurable and testable and relate to the business need or opportunity identified in the Initiation Phase.
31
5.
Design Phase
The physical characteristics of the system are designed during this phase. The operating environment is established, major subsystems and their inputs and outputs are defined, and processes are allocated to resources. Everything requiring user input or approval must be documented and reviewed by the user. The physical characteristics of the system are specified and a detailed design is prepared. Subsystems identified during design are used to create a detailed structure of the system. Each subsystem is partitioned into one or more design units or modules. Detailed logic specifications are prepared for each software module.
6.
Development Phase
The detailed specifications produced during the design phase are translated into hardware, communications, and executable software. Software shall be unit tested, integrated, and retested in a systematic manner. Hardware is assembled and tested.
7.
The various components of the system are integrated and systematically tested. The user tests the system to ensure that the functional requirements, as defined in the functional requirements document, are satisfied by the developed or modified system. Prior to installing and operating the system in a production environment, the system must undergo certification and accreditation activities.
8.
Implementation Phase
The system or system modifications are installed and made operational in a production environment. The phase is initiated after the system has been tested and accepted. This phase continues until the system is operating in production in accordance with the defined user requirements.
32
9.
The system operation is ongoing. The system is monitored for continued performance in accordance with user requirements, and needed system modifications are incorporated. The operational system is periodically assessed through In-Process Reviews to determine how the system can be made more efficient and effective. Operations continue as long as the system can be effectively adapted to respond to an organizations needs. When modifications or changes are identified as necessary, the system may reenter the planning phase.
10.
Disposition Phase
The disposition activities ensure the orderly termination of the system and preserve the vital information about the system so that some or all of the information may be reactivated in the future if necessary. Particular emphasis is given to proper preservation of the data processed by the system, so that the data is effectively migrated to another system or archived in accordance with applicable records management regulations and policies, for potential future access.
33
data into meaningful information. System is a buzzword today. Everybody talks of the system such as an educational system, transportation system, accounting system, financial system, computer system, and information system. A system is a set of interrelated elements that operate together to achieve an objective. The general model of system has an inputs, process and output. A system can have many inputs and many outputs. Most talk about system is information system. It receives the data and collects the information and instructions, process the data according to the instructions and outputs the result which itself has some information. An information system in which storage methods are also added, the information processing function means not only the transformation of the data into information but also the storage of the data for later use. The information system receives data as input and converts them into information. An information system can comprises of both human and machines. It is not that an information system simply means machine. Information system uses the various tools to collect data. These tools can be humans as well as machines. Then these tools data is processed into information. The data can be processed using some manual methods or electronic method. Then the information that they get after processing of data is the output of that information system. An information system is to an organization, what a nervous system is to the body. They do not operate independently, but exists in organization to support the organization process at different levels. Timely information is required at every level of any organization to take the important decision. To cater the needs of organization, information systems in any organization, are available at different levels. Requirement Analysis:
34
A systematic investigation of a real or planned system to determine the function of the system and how they relate to each other and to any other system is known as system analysis. System analysis is conducted with the following objectives in mind: Identify the customers need, Perform economic and technical analysis, Evaluate the system concept for feasibility, Allocate functions to hardware, software, people, database and other system elements, Establish cost and schedule constraints, Create a system definition that forms the foundation for all subsequent engineering work. System Analysis Overview: Problem recognition means detailed study of the current system being used by the user. A detailed study of system being currently used must be carried out of sessions with customer and end user. It can be termed as a process of recognizing problems and opportunities. A complete understanding of software requirement is essential to the success of a software development effort. The problem evaluation and solution synthesis is the next major area of effort for analysis. It enables the system, engine to redefine the software allocation and build model of process followed Identification of need Preliminary investigation Identification of need:
35
The first step of the System Analysis process involves the identification of need. The analyst meets the customer and the end user (if different from the user). The intent is to understand the products objective and to define the goals required to meet the objectives. Timely Customer-Analyst communication is an important ingredient of a system analysts work. The specific objectives are: Reducing the Duplication during manual Processing Designing and Developing User friendly interfaces through which user will interact with the package Interaction of these GUI with the Database Managing the Database Improve efficiency and quality of services
There are a number of factors that needs to be actively handled, the system must track the data and be able to manage it as well as give the detailed account of the comparative study in the forms of graphs and reports. Every system must have some complexity attached with it, which is needed to be simplified so that we can achieve a system, which is easier, less complex and easily accessible to the less trained user. The above stated complexity being faced by the staff in respect of such a large number of departments and variety of programs being run by each department, each having its own criteria makes it entice the official to look for a system which can operate with a such a complex nature of data and be developed in such a way so that it becomes relatively easier to operate by the end user. Preliminary investigation:
36
During the analysis phase of the project, first we decided to sit/talk /and understand the current workflow. And found that the basic functionality is divided into 12 major modules, which deals with registration management, searching for tender management, supplying and purchasing of tender management, generation of reports for each requirement and searching for many other facilities etc.
This guide was developed to disseminate proven practices to system developers, project managers, program/account analysts and system owners/users throughout the DOJ. The specific objectives expected include the following:
To reduce the risk of project failure To consider system and data requirements throughout the entire life of the system To identify technical and management issues early To disclose all life cycle costs to guide business decisions To foster realistic expectations of what the systems will and will not provide To provide information to better balance programmatic, technical, management, and cost aspects of proposed system development or modification
To encourage periodic evaluations to identify systems that are no longer effective To measure progress and status for effective corrective action To support effective resource management and budget planning To consider meeting current and future business requirements
Key Principles
This guidance document refines traditional information system life cycle management approaches to reflect the principles outlined in the following subsections. These are the foundations for life cycle management.
Life Cycle Management Should be used to Ensure a Structured Approach to Information Systems Development, Maintenance, and Operation
37
This SDLC describes an overall structured approach to information management. Primary emphasis is placed on the information and systems decisions to be made and the proper timing of decisions. The manual provides a flexible framework for approaching a variety of systems projects. The framework enables system developers, project managers, program/account analysts, and system owners/users to combine activities, processes, and products, as appropriate, and to select the tools and methodologies best suited to the unique needs of each project.
38
5. Specific Individuals must be assigned to Perform Key Roles throughout the Life Cycle
Certain roles are considered vital to a successful system project and at least one individual must be designated as responsible for each key role. Assignments may be made on a full- or part-time basis as appropriate. Key roles include program/functional management, quality assurance, security, telecommunications management, data administration, database administration, logistics, financial, systems engineering, test and evaluation, contracts management, and configuration management. For most projects, more than one individual
39
should represent the actual or potential users of the system (that is, program staff) and should be designated by the Program Manager of the program and organization.
The most probable phases through which it progresses downwards are Definition Study/Analysis Basic Design Technical Design/Detailed Design Construction
40
Introduction Before the advent of this method, the software development in the computer companies suffered from a haphazard integrated software network like cluttered knitting. However with this method they hoped to bring clarity in their projects. About the Phases As said earlier the waterfall model has been structured on multiple phases especially to help out the software construction companies to develop an organized system of construction. By following this method, the project will be divided into many stages thus easing out the whole process. For example you start with Phase I and according to this model, one only progresses to the next Phase once the previous one has been completed. This way one moves progressively to the final stage and once that point is reached, you cannot turn back; similar to the water in a waterfall. Brief Description of the Phases of Waterfall Model Definition Study / Analysis: During this phase research is being conducted which includes brainstorming about the software, what it is going to be and what purpose is it going to fulfill. Basic Design: If the first phase gets successfully completed and a well thought out plan for the software development has been laid then the next step involves formulating the basic design of the software on paper. Technical Design / Detail Design: After the basic design gets approved, then a more elaborated technical design can be planned. Here the functions of each of the part are decided
41
and the engineering units are placed for example modules, programs etc. Construction / Implementation: In this phase the source code of the programs is written. Testing: At this phase, the whole design and its construction is put under a test to check its functionality. If there are any errors then they will surface at this point of the process. Integration: in the phase of Integration, the company puts it in use after the system has been successfully tested. Management and Maintenance: Maintenance and management is needed to ensure that the system will continue to perform as desired. Through the above mentioned steps it is clearly shown that the Waterfall model was meant to function in a systematic way that takes the production of the software from the basic step going downwards towards detailing just like a Waterfall which begins at the top of the cliff and goes downwards but not backwards. Advantages of the Waterfall Model Lets look at some of the advantages of this model, The project requires the fulfillment of one phase, before proceeding to the next. Therefore if there is a fault in this software it will be detected during one of the initial phases and will be sealed off for correction. A lot of emphasis is laid on paperwork in this method as compared to the newer methods. When new workers enter the project, it is easier for them to carry on the work from where it had been left. The newer methods dont document their developmental process which makes it difficult for a newer member of the team to understand what step is going to follow next. The Waterfall Model is a straight forward method and lets one know easily what stage is in progress. The Waterfall method is also well known amongst the software developers therefore it is easy to use. It is easier to develop various software through this method in short span of time.
42
Disadvantages of the Waterfall Model There are many disadvantages to the model as well. Lets have a look at those, Many software projects are dependent upon external factors; out of which the client for which the software is being designed is the biggest factor. It happens a lot of times, that the client changes the requirement of the project, thereby influencing an alteration in the normal plan of construction and hence the functionality as well. The Waterfall Model doesnt work well in a situation like this as it assumes no alteration to occur once the process has started according to plan. If, for instance, this happens in a Waterfall Model, then a number of steps would go to waste, and there would arise a need to start everything all over again. Of course this also brings about the aspect of time and money which will all go to waste. Therefore this method will not at all prove to be cost effective. It is not even easy to take out the cost estimate of each step, as each of the phases is quite big. There are many other software developmental models which include many of the same aspects of the Waterfall model. But unlike the Waterfall model, these methods are not largely affected by the outside sources. In the waterfall model, there are many different people working in the different phases of the project like the designers and builders and each carries his own opinion regarding his area of expertise. The design, therefore, is bound to be influenced; however in the Waterfall model, there is no room for that. The other negative aspect of this model is that a huge amount of time is also wasted. For example if we study any software development process, we know that Phase II cannot be executed until Phase I has been successfully completed; so while the designers are still designing the software, time of the builders is completely wasted. Another disadvantage of this method is that the testing period comes quite late in the developmental process; whereas in various other developmental programs the designs would be tested a lot sooner to find the flaw at a time when a lot of time and money has not been wasted.
43
Elaborate documentation during the Waterfall method has its advantages, but it is not without the disadvantages as well. It takes a lot of effort and time, which is why it is not suitable for smaller projects.
Usage of the waterfall model In Royce's original waterfall model, the following phases are followed perfectly in sequential order: Requirements specification Requirements are captured and set in stone. Design A "blueprint" is drawn up for the developers to implement. Implementation Integration Testing Installation Maintenance There exist various software development approaches, aptly defined and designed, which are employed during the development process of a software. These approaches are also referred to as 'Software Development Process Models'. Each process model follows a particular life cycle in order to ensure success in the process of software development. One such approach used in software development is 'The Waterfall Model'. Waterfall
44
approach was first a 'Process Model' to be introduced and followed widely in software engineering to ensure success of the project. In the waterfall approach, the whole process of software development is divided into separate phases. These phases in waterfall model are: Requirement specifications phase Software design Implementation Testing and maintenance All these phases are cascaded to each other so that the second phase is started as and when a defined set of goals are achieved for first phase and it is signed off, and hence the name waterfall model. All the methods and processes undertaken in the waterfall model are more visible. Stages of the Waterfall Model Explained Requirement Analysis and Definition All possible requirements of the system to be developed are captured in this phase. Requirements are a set of functions and constraints that the end user (who will be using the system) expects from the system. The requirements are gathered from the end user at the start of the software development phase. These requirements are analyzed for their validity, and the possibility of incorporating the requirements in the system to be developed is also studied. Finally, a requirement specification document is created which serves the purpose of guideline for the next phase of the model. System and Software Design Before starting the actual coding phase, it is highly important to understand the requirements of the end user and also have an idea of how should the end product looks like. The requirement specifications from the first phase are studied in this phase and a system design is prepared. System design helps in specifying hardware and system requirements and also helps
45
in defining the overall system architecture. The system design specifications serve as an input for the next phase of the model. Implementation and Unit Testing On receiving system design documents, the work is divided in modules/units and actual coding is started. The system is first developed in small programs called units, which are integrated in the next phase. Each unit is developed and tested for its functionality; this is referred to as unit testing. Unit testing mainly verifies if the modules/units meet their specifications. Integration and System Testing As specified above, the system is first divided into units which are developed and tested for their functions. These units are integrated into a complete system during integration phase and tested to check if all modules/units coordinate with each other, and the system as a whole behaves as per the specifications. After successfully testing the software, it is delivered to the customer. Operations & Maintenance This phase of the waterfall model is virtually a never-ending phase. Generally, problems with the system developed (which are not found during the development life cycle) come up after its practical use starts, so the issues related to the system are solved after deployment of the system. Not all the problems come into picture directly but they arise from time to time and need to be solved; hence this process is referred to as maintenance.
46
47
load the software. Hence the organization can implement the new system without any additional expenditure. Hence, it is economically feasible The result of the feasibility study is a formal proposal. This is simply report-a formal document detailing the nature and the scope of the proposed solution. The proposals summarize what is known and what is going to be done. Three key considerations are involved in the feasibility analysis: economic, technical and operational behavior. 2.3.1 Economic Feasibility: Economic analysis is the most frequently used method for evaluating the effectiveness of a candidate system. More determine the benefits and the saving that are expressed from a candidate system and compare those costs. If benefits outweigh costs. Otherwise, further justification or alterations in the proposed system will have to be made if it is to have a chance of being approved. This is an ongoing effort that improves in accuracy at each phase of the system life cycle. 2.3.2 Technical Feasibility: Technical feasibility center around the existing computer system hardware etc. and to what extent it can support the proposed addition. For example, if the current computer is operating at 80% capacity - an arbitrary ceiling then running another application could over load the system or require additional hardware. This involves financial consideration to accommodate technical enhancements. If the budget is a serious constraint then the project is judged not feasible. 2.3.3 Operational Feasibility: It is common knowledge that computer installations have something to do with turnover, transfers, retraining and changes in employee job status. Therefore, it is understandable that the introduction of a candidate system requites special efforts to educate, sell, and train the staff on new ways of conducting business.
48
2.3.4 Choice of Platform? In any organization a lot of data is generated as result of day-to-day operations. In the past, all kind of data be it business of a company. Since the task was performed manually, it was time consuming and error prone. With the advent of computer, the task of maintaining large amount of data has undergoes a sea change. Today computer system have become so user friendly that even first time users can create their own application with the help of tools such as MS-Access, Fox-Pro and SQL Server. These tools are very visual and hence user friendly. They provide a point and click environment for building applications that can interact with large amount of data
Technical Feasibility
It is a measure of the practically of a specific technical solution and the availability of technical resources and expertise The proposed system uses Java as front-end and Sql server 2003 as back-end tool. Oracle is a popular tool used to design and develop database objects such as table views, indexes. The above tools are readily available, easy to work with and widely used for developing commercial application. Hardware used in this project are- p4 processor 2.4GHz, 128 MB RAM, 40 GB hard disk, floppy drive. These hardware were already available on the existing computer system. The software like Sql Server 2003, iis,.net framework and operating system WINDOWS-XP used were already installed On the existing computer system. So no additional hardware and software were required to purchase and it is technically feasible. The technical feasibility is in employing computers to the organization. The organization is equipped with enough computers so that it is easier for updating. Hence the organization has not technical difficulty in adding this system.
Operational Feasibility
49
The system will be used if it is developed well then be resistance for users that undetermined 1. No major training and new skills are required as it is based on DBMS model. 2. It will help in the time saving and fast processing and dispersal of user request and applications. 3. New product will provide all the benefits of present system with better performance. 4. Improved information, better management and collection of the reports. 5. User support. 6. User involvement in the building of present system is sought to keep in mind the user specific requirement and needs. 7. User will have control over there own information. Important information such as payslip can be generated at the click of a button. 8. Faster and systematic processing of user application approval, allocation of IDs, payments, etc. used had greater chances of error due to wrong information entered by mistake.
Behavioral Feasibility
People are inherent to change. In this type of feasibility check, we come to know if the newly developed system will be taken and accepted by the working force i.e. the people who will use it.
50
51
of the software process model that is used. Design is the phase where the quality is fostered in software development. Design provides us with a representation of software that can be assessed for quality. Risk Analysis: These steps are performed in risk analysis for designing the system because: The future of the system is our concern. We identifying what risks might create problem in the life of the system. We also identified that what change in the user requirements, technologies, hardware and all other entries connected to the system will effects the system. Risk Identification: We were able to identifying the risk under the following categories: Project risk Technical risk Business risk Following list was identifying under the categories mentioned above: Enough number of people was available, as estimated, to complete the system. All staff involved in the system was not folly trained on the platform to be used for die development. We also had to study various things about the platform and the system. The staff involved in the system was committed for the entire decision of the project. The entire member worked fulltime on the system. Probability of risk: The probability for the project risks such as schedule, resources, customer, requirement problems and their impact on the system was negligible. There was a risk on the technical grounds because the system was developed with a new technology hence the experience on the tools was taking which faced the management to think whether the choice made was right or wrong. But a survey done on the use of new platform gave us the confidence of continuing on this decision. As we know system design is a solution a how to approach to the creation of a new system. This important phase is composed of several steps. It provides the understanding and procedural details necessary for implementing the system recommended in the feasibility study.
52
Several activities were carried out during Design. They were: Database design Program design
5.2 HARDWARE AND SOFTWARE REQUIREMENTS:Hardware Requirements:A realistic hardware platform for the proposed system is:Hardware specifications:
Intel Pentium III/ Intel Pentium IV / Celeron /AMD 650 MHz 3GB 320GB VGA color monitor
Software Requirements:The following softwares are required for running of the developed system:Software specifications:
53
User _name
Password
create s
Cart_id
Item_id
Category _id
Category_name Created_date
Admin
Emp_name Emp_code
Cart
Contact_no Emp_designation
Category
have
Category_id
Basic_pay
Subcategory_id
Employee
First_name User_id Last_name Password
Subcategory
Emai_id
Are added
item_longdescription
Have
Contact_no Card_no
Category_id
User
Subcategory_id
item_short description
quantity_in_hand
Add items to
Items
Searches in
54
An entity-relationship (ER) diagram is a specialized graphic that illustrates the relationships between entities in a database. ER diagrams often use symbols to represent three different types of information. Boxes are commonly used to represent entities. Diamonds are normally used to represent relationships and ovals are used to represent attributes. There are three types of relationships between entities:
one-to-one: one instance of an entity (A) is associated with one other instance of another entity (B). For example, in a database of employees, each employee name (A) is associated with only one social security number (B). one-to-many: one instance of an entity (A) is associated with zero, one or many instances of another entity (B), but for one instance of entity B there is only one instance of entity A. For example, for a company with all employees working in one building, the building name (A) is associated with many different employees (B), but those employees all share the same singular association with entity A. many-to-many: one instance of an entity (A) is associated with one, zero or many instances of another entity (B), and one instance of entity B is associated with one, zero or many instances of entity A. For example, for a company in which all of its employees work on multiple projects, each instance of an employee (A) is associated with many instances of a project (B), and at the same time, each instance of a project (B) has multiple employees (A) associated with it.
5.4 DATA FLOW DIAGRAM (DFD):Data Flow Diagram Overview DFD is an important tool used by system anal ysts. The main merit of DFD is that it can provide an over view of what data a system would process, what transformation of data are done, what files are used and where the result flows. The graphical representation of the system makes it a user and anal yst. DFDs are structured in such a way that starting from a simple diagram which provides a broad overview at a glance, there can be expanded to a hierarchy of diagrams giving to more and more details
55
Data flow can take place: 1. 2. 3. 4. 5. Between process File to process External entit y to process Process to external entit y Process to file
Data Flow Diagrams show the flow of data from external entities into the system, and from one process to another within the system. There are four symbols for drawing a DFD: 1. Rectangles representing external entities, which are sources or destinations of data. 2. Ellipses representing processes, which take data as input, validate and process it and output it. 3. Arrows representing the data flows, which can either, be electronic data or physical items. 4. Open-ended rectangles or a Disk symbol representing data stores, including electronic stores such as databases or XML files and physical stores such as filing cabinets or stacks of paper.
In the Data Flow Diagram (Context Level) shown in Fig. 1, it has two external users and one process. The two external users are Member and Staff (Administrator) and the process is the online shopping system. We combine some data flows together grouped by similar characteristic function in the context level.
56
In the Data Flow Diagram (Level 0) shown in Fig. 2, it shows our system has five major functions, four data storages and a number of data flows. It includes all the functions for members and administrators. The five major functions are described briefly as follows: Process 1: Login the System Both members and administrators have to use their user IDs and passwords to login the system. Once they enter their IDs and passwords, the system will verify the correctness of data by searching the relevant data source for comparison.
57
Process 2: Complete the Transaction Record When a member wants to purchase a product in the online shopping system, the system provides some product information such as the quantity of each product, the payment methods and the pickup locations. When the member selects the products he wants to purchase, the system displays the transaction information and asks the member for confirmation. Finally, the confirmed transaction information is stored into the invoice data source. Process 3: Browse the System Information Both members and administrators can browse the system information. Besides, the system provides the searching function by using keywords to increase the efficiency. Depending on their assigned authorities, they can browse the information of products, invoice records, members and administrators. Process 4: Maintain the System Information Depending on their assigned authorities, members and administrators can update the system information, such as the information of product, invoice, members, administrators and their passwords. Once an update occurs, the relevant data source will be updated. Process 5: Print the Documents An administrator with the authority right can print out some reports for internal usage, such as the inventory report.
58
MEMBER
2 Transaction Record
2.3
Mainten ance
5.5
5 Print document
5.2 5.1
ADMIN
59
1.1 Member ID and Password 1.2 Admin ID and Password 1.3 Inputted Member Info 1.4 Verified Input Member Info 1.5 Inputted Admin Info 1.6 Verified Input Admin Info
2.2 Confirmed Transaction Info 2.3 Member Info For Shopping 2.4 Product Info for Shopping 2.5 Created New Invoice Record 3.1 Keyword Input from Member 3.2 Searched Output to Member 3.3 Keyword Input from Admin 3.4 Searched Output to Admin 3.5 Searched Member Info 3.6 Searched Admin Info 3.7 Searched Product Info 3.8 Searched Invoice Info 4.1 Modified System Info from Member
60
4.2 Modified System Info from Admin 4.3 Updated Member Info 4.4 Updated Admin Info 4.5 Updated Product Info 5.1 Printing Option 5.2 Printing Result 5.3 Member Info for Printing 5.4 Product Info for Printing 5.5 Invoice Info for Printing
61
CHAPTER 6. DESIGNING
FORMS 6.1 Home screen Snapshots
62
About Us Page
63
64
Careers Page
65
Contact Us Page
66
My Account Page
67
68
Admin Section
Categories
69
CRM
70
SRM
71
72
Manage Categories
73
74
6.2 Database Design Snapshots:In this section, the basic structure of the tables composing the database for the projects are shown along with information about primary and foreign keys.
Admin:
Cart :
Categories:
75
Subcategory:-
Item:-
76
Customer_info:
User_login1:
77
Employee:
78
CHAPTER 7. CODING
7.1 Web.config page <?xml version="1.0"?> <!-For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <connectionStrings> <add name="dbconnect" connectionString="Data Source=TARUNA03-PC;Initial Catalog=shopping;User ID=sa;Password=demo.123" providerName="System.Data.SqlClient"/> <add name="shoppingConnectionString" connectionString="Data Source=TARUNA03PC;Initial Catalog=shopping;Integrated Security=True" providerName="System.Data.SqlClient"/> </connectionStrings> <system.web> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> </assemblies> </compilation> <authentication mode="Forms"> <forms loginUrl="~/Account/Login.aspx" timeout="2880"/> </authentication> <membership> <providers> <clear/> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="true" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/> </providers> </membership> <profile> <providers>
79
<clear/> <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/> </providers> </profile> <roleManager enabled="false"> <providers> <clear/> <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/> <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/> </providers> </roleManager> </system.web> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration>
7.2 Login
Login.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Configuration; public partial class login : System.Web.UI.Page { SQLHelper obj = new SQLHelper(); protected void Page_Load(object sender, EventArgs e) { } protected void submit_Click(object sender, EventArgs e) {
80
DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs("select * from admin where username='" + text1.Text + "' and password='" + text2.Text + "'"); if (ds.Tables[0].Rows.Count > 0) { Session["username"] = text1.Text; Response.Redirect("adminnew.aspx"); } else { Label1.Text="Invalid Username & Passworsd"; } } } 7.3 Admin Adminnew.aspx <%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="adminnew.aspx.cs" Inherits="adminnew" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> <style type="text/css"> .style9 { width: 832px; } .style10 { width: 153px; } </style> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" Runat="Server"> <table > <tr><td valign="top" > <table style="height:403px; margin-top: 0px; backgroundcolor:#565656"> <tr> <td valign="top"> <a>DCM</a> </td> </tr> <tr> <td style="padding-top: 2px; padding-bottom: 2px;">
81
................................. </td> </tr> <tr> <td> <a href="category.aspx" target="iframe1">Category</a> </td> </tr> <tr> <td style="padding-top: 2px; padding-bottom: 2px;"> ................................. </td> </tr> <tr> <td> <a href="customerinfogridview.aspx" target="iframe1">CRM</a> </td> </tr> <tr> <td style="padding-top: 2px; padding-bottom: 2px;"> ................................. </td> </tr> <tr> <td> <a href="SRM.aspx" target="iframe1">SRM</a> </td> </tr> <tr> <td style="padding-top: 2px; padding-bottom: 2px;"> ................................. </td> </tr> <tr> <td> <a href="master.aspx" target="iframe1">Master</a> </td> </tr> <tr> <td style="padding-top: 2px; padding-bottom: 2px;"> ................................. </td> </tr> <tr> <td> <a>Order Tracking</a> </td>
82
</tr> <tr> <td style="padding-top: 2px; padding-bottom: 2px;"> ................................. </td> </tr> <tr> <td> <a>Content Management System</a></td> </tr> <tr> <td style="padding-top: 2px; padding-bottom: 2px;"> ................................. </td> </tr> <tr> <td> <a href="homenew.aspx">Logout</a> </td> </tr> <tr> <td style="padding-top: 2px; padding-bottom: 2px;"> </td> </tr> </table> </td> <td class="style2"> </td> <td class="style9"> <iframe name="iframe1" scrolling="no" src="category.aspx" frameborder="1" style="width: 817px; margin-top: 2px; height: 904px; backgroundcolor: #FFFFFF;"></iframe></td></tr></table> </asp:Content>
7.4 Category
83
using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Configuration; using System.Data.SqlClient; using System.Text; public partial class category : System.Web.UI.Page { SQLHelper obj = new SQLHelper(); string str = "select * from categories"; protected void Page_Load(object sender, EventArgs e) { if (Session["username"] == null) { Response.Redirect("login.aspx"); } if (!IsPostBack) { DateTime timeUtc = System.DateTime.UtcNow; TimeZoneInfo cstZone = TimeZoneInfo.FindSystemTimeZoneById("India Standard Time"); DateTime cstTime = TimeZoneInfo.ConvertTimeFromUtc(timeUtc, cstZone); Label3.Text = cstTime.ToString("dddd, dd MMMM yyyy, hh:mm tt");
taru(); {
} } private void taru() { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str); GridView1.DataSource = ds; GridView1.DataBind();
84
} protected void Button1_Click(object sender, EventArgs e) { str += " where category_name like'" + TextBox1.Text + "%' "; taru(); TextBox1.Text = ""; } protected void Button2_Click(object sender, EventArgs e) { str += " where category_name like'A%'"; taru(); } protected void Button3_Click(object sender, EventArgs e) { str += " where category_name like'B%'"; taru(); } protected void Button4_Click(object sender, EventArgs e) { str += " where category_name like'C%'"; taru(); } protected void Button5_Click(object sender, EventArgs e) { str += " where category_name like'D%'"; taru(); } protected void Button6_Click(object sender, EventArgs e) { str += " where category_name like'E%'"; taru(); } protected void Button7_Click(object sender, EventArgs e) { str += " where category_name like'F%'"; taru(); } protected void Button8_Click(object sender, EventArgs e) { str += " where category_name like'G%'"; taru(); } protected void Button9_Click(object sender, EventArgs e) { str += " where category_name like'H%'"; taru();
85
} protected void Button10_Click(object sender, EventArgs e) { str += " where category_name like'I%'"; taru(); } protected void Button11_Click(object sender, EventArgs e) { str += " where category_name like'J%'"; taru(); } protected void Button12_Click(object sender, EventArgs e) { str += " where category_name like'K%'"; taru(); } protected void Button13_Click(object sender, EventArgs e) { str += " where category_name like'L%'"; taru(); } protected void Button14_Click(object sender, EventArgs e) { str += " where category_name like'M%'"; taru(); } protected void Button15_Click(object sender, EventArgs e) { str += " where category_name like'N%'"; taru(); } protected void Button16_Click(object sender, EventArgs e) { str += " where category_name like'O%'"; taru(); } protected void Button17_Click(object sender, EventArgs e) { str += " where category_name like'P%'"; taru(); } protected void Button18_Click(object sender, EventArgs e) { str += " where category_name like'Q%'"; taru(); } protected void Button19_Click(object sender, EventArgs e) {
86
str += " where category_name like'R%'"; taru(); } protected void Button20_Click(object sender, EventArgs e) { str += " where category_name like'S%'"; taru(); } protected void Button21_Click(object sender, EventArgs e) { str += " where category_name like'T%'"; taru(); } protected void Button22_Click(object sender, EventArgs e) { str += " where category_name like'U%'"; taru(); } protected void Button23_Click(object sender, EventArgs e) { str += " where category_name like'V%'"; taru(); } protected void Button24_Click(object sender, EventArgs e) { str += " where category_name like'W%'"; taru(); } protected void Button25_Click(object sender, EventArgs e) { str += " where category_name like'X%'"; taru(); } protected void Button26_Click(object sender, EventArgs e) { str += " where category_name like'Y%'"; taru(); } protected void Button27_Click(object sender, EventArgs e) { str += " where category_name like'Z%'"; taru(); } protected void Button28_Click(object sender, EventArgs e) { str = "SELECT * FROM categories"; taru(); }
87
protected void Button29_Click(object sender, EventArgs e) { str += " where created_date <= '" + TextBox2.Text + " 23:59:59'"; taru(); TextBox2.Text = ""; }
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { string catid = GridView1.DataKeys[e.RowIndex].Value.ToString(); string deleterecord = "BEGIN "; deleterecord += "delete from item where category_id=" + catid + ";"; deleterecord += "delete from subcategories1 where category_id=" + catid + ";"; deleterecord+=" delete from categories where category_id=" + catid+";"; deleterecord += " END"; SqlConnection myconnection = new SqlConnection(); myconnection.ConnectionString = ConfigurationManager.ConnectionStrings["dbconnect"].ConnectionString; SqlCommand mysqlcommand = myconnection.CreateCommand(); mysqlcommand.CommandText = str; myconnection.Open(); SqlDataAdapter myadapter = new SqlDataAdapter(); myadapter.DeleteCommand = myconnection.CreateCommand(); myadapter.DeleteCommand.CommandText = deleterecord; myadapter.DeleteCommand.ExecuteNonQuery(); taru(); }
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { string catid = GridView1.DataKeys[e.NewEditIndex].Value.ToString(); Response.Redirect("addcategory.aspx?catid="+catid); } protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[1].Text = "<i>" + e.Row.Cells[1].Text + "</i>"; } }
{ } } 7.5 Subcategory
Subcategory.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Configuration; public partial class subcategory : System.Web.UI.Page { SQLHelper obj = new SQLHelper(); string str = "select * from subcategories1"; string categoryID = ""; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Session["username"] == null) { Response.Redirect("login.aspx"); } if (!IsPostBack) { DateTime timeUtc = System.DateTime.UtcNow; TimeZoneInfo cstZone = TimeZoneInfo.FindSystemTimeZoneById("India Standard Time"); DateTime cstTime = TimeZoneInfo.ConvertTimeFromUtc(timeUtc, cstZone); Label3.Text = cstTime.ToString("dddd, dd MMMM yyyy, hh:mm tt");
89
} if (Request.QueryString["catID"] != null) { categoryID = Request.QueryString["catID"].ToString(); str += " where category_id=" + categoryID; taru(); } taru(); } } private void taru() { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str); GridView1.DataSource = ds; GridView1.DataBind(); } protected void Button1_Click(object sender, EventArgs e) { str += " where subcategory_name like'" + TextBox1.Text + "%' "; taru(); } protected void Button2_Click(object sender, EventArgs e) { str += " where subcategory_name like'A%'"; taru(); } protected void Button3_Click(object sender, EventArgs e) { str += " where subcategory_name like'B%'"; taru(); } protected void Button4_Click(object sender, EventArgs e) { str += " where subcategory_name like'C%'"; taru(); } protected void Button5_Click(object sender, EventArgs e) { str += " where subcategory_name like'D%'"; taru(); } protected void Button6_Click(object sender, EventArgs e)
90
{ str += " where subcategory_name like'E%'"; taru(); } protected void Button7_Click(object sender, EventArgs e) { str += " where subcategory_name like'F%'"; taru(); } protected void Button8_Click(object sender, EventArgs e) { str += " where subcategory_name like'G%'"; taru(); } protected void Button9_Click(object sender, EventArgs e) { str += " where subcategory_name like'H%'"; taru(); } protected void Button10_Click(object sender, EventArgs e) { str += " where subcategory_name like'I%'"; taru(); } protected void Button11_Click(object sender, EventArgs e) { str += " where subcategory_name like'J%'"; taru(); } protected void Button12_Click(object sender, EventArgs e) { str += " where subcategory_name like'K%'"; taru(); } protected void Button13_Click(object sender, EventArgs e) { str += " where subcategory_name like'L%'"; taru(); } protected void Button14_Click(object sender, EventArgs e) { str += " where subcategory_name like'M%'"; taru(); } protected void Button15_Click(object sender, EventArgs e) { str += " where subcategory_name like'N%'"; taru();
91
} protected void Button16_Click(object sender, EventArgs e) { str += " where subcategory_name like'O%'"; taru(); } protected void Button17_Click(object sender, EventArgs e) { str += " where subcategory_name like'P%'"; taru(); } protected void Button18_Click(object sender, EventArgs e) { str += " where subcategory_name like'Q%'"; taru(); } protected void Button19_Click(object sender, EventArgs e) { str += " where subcategory_name like'R%'"; taru(); } protected void Button20_Click(object sender, EventArgs e) { str += " where subcategory_name like'S%'"; taru(); } protected void Button21_Click(object sender, EventArgs e) { str += " where subcategory_name like'T%'"; taru(); } protected void Button22_Click(object sender, EventArgs e) { str += " where subcategory_name like'U%'"; taru(); } protected void Button23_Click(object sender, EventArgs e) { str += " where subcategory_name like'V%'"; taru(); } protected void Button24_Click(object sender, EventArgs e) { str += " where subcategory_name like'W%'"; taru(); } protected void Button25_Click(object sender, EventArgs e) {
92
str += " where subcategory_name like'X%'"; taru(); } protected void Button26_Click(object sender, EventArgs e) { str += " where subcategory_name like'Y%'"; taru(); } protected void Button27_Click(object sender, EventArgs e) { str += " where subcategory_name like'Z%'"; taru(); } protected void Button28_Click(object sender, EventArgs e) { str = "SELECT * FROM subcategories1"; taru(); }
protected void Button29_Click(object sender, EventArgs e) { str += " where created_date <= '" + TextBox2.Text + " 23:59:59'"; taru(); TextBox2.Text = ""; } protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { string catid = GridView1.DataKeys[e.NewEditIndex].Value.ToString(); Response.Redirect("newsubcategory.aspx?catid=" + catid); } protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[1].Text = "<i>" + e.Row.Cells[1].Text + "</i>"; } }
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView1.PageIndex = e.NewPageIndex; taru(); } protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
93
{ } }
7.6 Items
Item.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Configuration; public partial class item : System.Web.UI.Page { SQLHelper obj = new SQLHelper(); string str = "select * from item"; string categoryID= ""; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["catID"] != null) { categoryID = Request.QueryString["catID"].ToString(); str += " where subcategory_id=" + categoryID; taru(); } taru(); } } private void taru() { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str);
94
GridView1.DataSource = ds; GridView1.DataBind(); } protected void Button1_Click(object sender, EventArgs e) { str += " where item_name like'" + TextBox1.Text + "%' "; taru(); } protected void Button2_Click(object sender, EventArgs e) { str += " where item_name like'A%'"; taru(); } protected void Button3_Click(object sender, EventArgs e) { str += " where item_name like'B%'"; taru(); } protected void Button4_Click(object sender, EventArgs e) { str += " where item_name like'C%'"; taru(); } protected void Button5_Click(object sender, EventArgs e) { str += " where item_name like'D%'"; taru(); } protected void Button6_Click(object sender, EventArgs e) { str += " where item_name like'E%'"; taru(); } protected void Button7_Click(object sender, EventArgs e) { str += " where item_name like'F%'"; taru(); } protected void Button8_Click(object sender, EventArgs e) { str += " where item_name like'G%'"; taru(); } protected void Button9_Click(object sender, EventArgs e) {
95
str += " where item_name like'H%'"; taru(); } protected void Button10_Click(object sender, EventArgs e) { str += " where item_name like'I%'"; taru(); } protected void Button11_Click(object sender, EventArgs e) { str += " where item_name like'J%'"; taru(); } protected void Button12_Click(object sender, EventArgs e) { str += " where item_name like'K%'"; taru(); } protected void Button13_Click(object sender, EventArgs e) { str += " where item_name like'L%'"; taru(); } protected void Button14_Click(object sender, EventArgs e) { str += " where item_name like'M%'"; taru(); } protected void Button15_Click(object sender, EventArgs e) { str += " where item_name like'N%'"; taru(); } protected void Button16_Click(object sender, EventArgs e) { str += " where item_name like'O%'"; taru(); } protected void Button17_Click(object sender, EventArgs e) { str += " where item_name like'P%'"; taru(); } protected void Button18_Click(object sender, EventArgs e) { str += " where item_name like'Q%'"; taru(); }
96
protected void Button19_Click(object sender, EventArgs e) { str += " where item_name like'R%'"; taru(); } protected void Button20_Click(object sender, EventArgs e) { str += " where item_name like'S%'"; taru(); } protected void Button21_Click(object sender, EventArgs e) { str += " where item_name like'T%'"; taru(); } protected void Button22_Click(object sender, EventArgs e) { str += " where item_name like'U%'"; taru(); } protected void Button23_Click(object sender, EventArgs e) { str += " where item_name like'V%'"; taru(); } protected void Button24_Click(object sender, EventArgs e) { str += " where item_name like'W%'"; taru(); } protected void Button25_Click(object sender, EventArgs e) { str += " where item_name like'X%'"; taru(); } protected void Button26_Click(object sender, EventArgs e) { str += " where item_name like'Y%'"; taru(); } protected void Button27_Click(object sender, EventArgs e) { str += " where item_name like'Z%'"; taru(); } protected void Button28_Click(object sender, EventArgs e) { str = "SELECT * FROM item";
97
taru(); } protected void Button29_Click(object sender, EventArgs e) { str += " where item_price=" + TextBox2.Text + " "; taru(); }
protected void Button30_Click(object sender, EventArgs e) { str += " where created_date <= '" + TextBox3.Text + " 23:59:59'"; taru(); TextBox3.Text = ""; } protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { string catid = GridView1.DataKeys[e.NewEditIndex].Value.ToString(); Response.Redirect("additem.aspx?catid=" + catid); } protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[1].Text = "<i>" + e.Row.Cells[1].Text + "</i>"; } } }
7.7 Crm Customerinfogridview.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI;
98
using System.Web.UI.WebControls; using System.Data; using System.Configuration; using System.Data.SqlClient; using System.Text; public partial class customerinfogridview : System.Web.UI.Page { SQLHelper obj = new SQLHelper(); string str = "select * from userlogin1"; string categoryID = ""; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DateTime timeUtc = System.DateTime.UtcNow; TimeZoneInfo cstZone = TimeZoneInfo.FindSystemTimeZoneById("India Standard Time"); DateTime cstTime = TimeZoneInfo.ConvertTimeFromUtc(timeUtc, cstZone); Label3.Text = cstTime.ToString("dddd, dd MMMM yyyy, hh:mm tt");
if (Request.QueryString["catID"] != null) { categoryID = Request.QueryString["catID"].ToString(); str += " where user_id=" + categoryID; taru(); } taru();
} } private void taru() { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str); GridView1.DataSource = ds; GridView1.DataBind(); } protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { string catid = GridView1.DataKeys[e.RowIndex].Value.ToString();
99
string deleterecord = "BEGIN "; deleterecord += "delete from userlogin1 where user_id=" + catid + ";"; deleterecord += " END"; SqlConnection myconnection = new SqlConnection(); myconnection.ConnectionString = ConfigurationManager.ConnectionStrings["dbconnect"].ConnectionString; SqlCommand mysqlcommand = myconnection.CreateCommand(); mysqlcommand.CommandText = str; myconnection.Open(); SqlDataAdapter myadapter = new SqlDataAdapter(); myadapter.DeleteCommand = myconnection.CreateCommand(); myadapter.DeleteCommand.CommandText = deleterecord; myadapter.DeleteCommand.ExecuteNonQuery(); taru(); }
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e) { string catid = GridView1.DataKeys[e.NewEditIndex].Value.ToString(); Response.Redirect("editcustomerinfo.aspx?catid=" + catid); } protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[1].Text = "<i>" + e.Row.Cells[1].Text + "</i>"; } } protected void Button1_Click(object sender, EventArgs e) { str += " where first_name like'" + TextBox1.Text + "%' "; taru(); TextBox1.Text = ""; } }
100
7.8 Srm: Addrecord.aspx.cs using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; public partial class addrecord : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { { // save image code lblmsg.Visible = false; string strfilename; string filename; filename = System.IO.Path.GetFileName(Fileimage.PostedFile.FileName); strfilename = System.IO.Path.GetFileName(filename); strfilename = "img/" + strfilename; Session["imagelink"] = strfilename; Fileimage.SaveAs(Request.MapPath("./imagespr") + "\\" + filename); //'''' ''''' SqlDataSource1.Insert(); lblmsg.Text = "Record Added Successfully"; lblmsg.Visible = true; } } }
101
Managecategories.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class managecategory : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { try { SqlDataSource2.Insert(); Label1.Text = ""; } catch { Label1.Text = " This brand id is already in table"; } } } 7.9 Home Page
Homenew.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Configuration;
102
public partial class homenew : System.Web.UI.Page { SQLHelper obj = new SQLHelper(); string str = "select*from item"; string itemID; protected void Page_Load(object sender, EventArgs e) { repeat2(); repeat3(); } protected void button1_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str + " where item_name like '" + text1.Text + "%'"); text1.Text = ""; datalist1.DataSource = ds; datalist1.DataBind(); } protected void repeat2() { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs("select top 1 *from item order by item_id desc"); repeater2.DataSource = ds; repeater2.DataBind(); } [System.Web.Services.WebMethod] [System.Web.Script.Services.ScriptMethod] public static AjaxControlToolkit.Slide[] GetSlides() { return new AjaxControlToolkit.Slide[] { new AjaxControlToolkit.Slide("dynamic images/man-and-womanshopping.jpg","",""), new AjaxControlToolkit.Slide("dynamic images/011208082507online_holiday_shopping.jpg","",""), new AjaxControlToolkit.Slide("dynamic images/utah-shopping.jpg","",""), new AjaxControlToolkit.Slide("dynamic images/wpid-1295395303_shopping1.jpg","","")}; } protected void repeat3() { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs("select top 4 *from item "); datalist1.DataSource = ds;
103
datalist1.DataBind(); } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { if (DropDownList1.SelectedValue == "0-500") { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str + " where item_price between 0 and 500"); datalist1.DataSource = ds; datalist1.DataBind(); } else if (DropDownList1.SelectedValue == "500-1000") { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str + " where item_price between 500 and 1000"); datalist1.DataSource = ds; datalist1.DataBind(); } else if (DropDownList1.SelectedValue == "1000-2000") { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str + " where item_price between 1000 and 2000"); datalist1.DataSource = ds; datalist1.DataBind(); } else if (DropDownList1.SelectedValue == "2000-3000") { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str + " where item_price between 2000 and 3000"); datalist1.DataSource = ds; datalist1.DataBind(); } else if (DropDownList1.SelectedValue == "3000-4000") { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str + " where item_price between 3000 and 4000"); datalist1.DataSource = ds; datalist1.DataBind(); } else if (DropDownList1.SelectedValue == "4000-5000") { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str + " where item_price between 4000 and 5000"); datalist1.DataSource = ds; datalist1.DataBind(); } else if (DropDownList1.SelectedValue == "5000-6000")
104
{ DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str + " where item_price between 5000 and 6000"); datalist1.DataSource = ds; datalist1.DataBind(); } else { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str + " where item_price > 6000"); datalist1.DataSource = ds; datalist1.DataBind(); }
} protected void cname_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str + " where category_id=1"); datalist1.DataSource = ds; datalist1.DataBind(); } protected void LinkButton1_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str + " where category_id=2"); datalist1.DataSource = ds; datalist1.DataBind(); } protected void LinkButton2_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str + " where category_id=3"); datalist1.DataSource = ds; datalist1.DataBind(); } protected void LinkButton3_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str + " where category_id=4"); datalist1.DataSource = ds; datalist1.DataBind(); }
105
protected void LinkButton4_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs(str + " where category_id=5"); datalist1.DataSource = ds; datalist1.DataBind(); } }
Allproduct.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Configuration; public partial class allproducts : System.Web.UI.Page { SQLHelper obj = new SQLHelper(); protected void Page_Load(object sender, EventArgs e) { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs("select top 4 * from item"); Repeater1.DataSource = ds; Repeater1.DataBind(); } } Userlogin.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient;
106
using System.Configuration; public partial class userlogin : System.Web.UI.Page { SQLHelper obj = new SQLHelper(); protected void Page_Load(object sender, EventArgs e) { } protected void Button2_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); ds = obj.RunSqlReturnDs("select * from userlogin where email_address='" + TextBox1.Text + "' and password='" + TextBox2.Text + "'"); if (ds.Tables[0].Rows.Count > 0) { Session["username"] = TextBox1.Text; Response.Redirect("homenew.aspx"); } else { Label1.Text = "Invalid Username & Passworsd"; } } } Createaccount.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; using System.Data.SqlClient; using System.Configuration; public partial class createanaccount : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { taru(); {
107
} } private void taru() { SqlDataReader myreader; SqlConnection myconnection = new SqlConnection(); myconnection.ConnectionString = ConfigurationManager.ConnectionStrings["dbconnect"].ConnectionString; SqlCommand mycommand = new SqlCommand(); mycommand.CommandText = "select * from userlogin1"; mycommand.CommandType = CommandType.Text; ; ; mycommand.Connection = myconnection; mycommand.Connection.Open(); myreader = mycommand.ExecuteReader(CommandBehavior.CloseConnection); mycommand.Dispose(); myconnection.Dispose(); } protected void Button1_Click(object sender, EventArgs e) { string str = "insert into userlogin1(first_name,last_name,secret_answer,password,email_address) values('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox6.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "')"; SqlConnection myconnection = new SqlConnection(); myconnection.ConnectionString = ConfigurationManager.ConnectionStrings["dbconnect"].ConnectionString; SqlCommand mysqlcommand = myconnection.CreateCommand(); mysqlcommand.CommandText = str; myconnection.Open(); SqlDataAdapter myadapter = new SqlDataAdapter(); myadapter.InsertCommand = myconnection.CreateCommand(); myadapter.InsertCommand.CommandText = str ; myadapter.InsertCommand.ExecuteNonQuery (); taru(); Label8.Text = "hello" + TextBox1.Text + "! Thanks you for registering in Shopping Paradise"; } }
108
CHAPTER 8. TESTING
8.1 SYSTEM TESTING
System Testing is very important issue in system development. During system testing the system is used experimentally to ensure that the system does not fail and will run according to its specification producing desired outputs as per the user expected from it. In many organization persons other than those who have written it perform testing, so that the software will be more reliable. Following tests can carry out the testing of system: White Box Testing. Black Box Testing.
White Box Testing White Box Testing, sometimes called glass box testing is a test case design method that uses the control structure of the procedural design to derive test cases. White Box Testing considers system to be like a White box, which means that every thing about the system is known to me. The different programs used in the system, Procedures used, inputs supplied and I know the outputs produced by it in advance. Person who has developed it generally carries out White Box testing and he/she tests the system against all odd conditions for extreme values. I tested all the modules independently. In the testing of each module I tested all the functionality. Right from New or Add to Exit or Close and from Move-first to Move-last all were tested. All the if-else structures with various values supplied at various times were checked. I checked all the loops used in the system and checked at their boundaries too. White Box Testing in the application is carried out in two parts: Alpha Test Beta Test
Alpha Test:
109
Alpha test of the application involves testing (checking) the system by testing each and every part of the system separately. In this test the experts or those who have made the system test each module of the system for different types of inputs. Beta Test: Beta test involves testing of the system treating the system as a whole and the complete system is tested for extreme values for finding the output generated by it are as desired or not. I have tested my application by inputting the sample data and found that my application passed Beta test. Black Box Testing: Black Box Testing focuses on the functional requirements of the software. It uncovers a different class of errors than white box testing methods. The end users or the ultimate user carries out Black Box testing for whom the system is made or someone who not knows how the system is being made. Selecting some persons of the organizations who have to operate on the system can perform this testing so that they know what inputs to be given to the system for different options and what should the output generated by the system for those values. To perform this test I selected some persons from the organization including one senior person also and tested the application. They then evaluated that whether the system is working properly or not. They all found the system working according to specification. Someone who neither knows about the work carried out by the system nor about how it is developed can even perform this test. Thus testing of the system by this method can even be done for absurd values, which are unknowingly entered by the user. The testing of this project is also done accordingly to these above methods so that it can fulfill the needs, produce all desired output even in the worst possible condition and can prove to be reliable software. I started the testing of the system right from the Alpha test to Beta test and then Black box test. Initially it was tested for each and every input give to it and how it responds to those inputs. The validation and checks which are masked for certain inputs like Names, Numbers, alpha numeric, floating point numbers, Unique Fields, Maximum Size, Values and other Special Fields and ranges is working or not for each and every entry forms.
110
The testing is then done for the different calculations and queries for the different combinations to find the results in the outputs. By running each individual forms as my software is developed using event based concept
111
112
system. This method is the safest one because it ensures that in case of any problem in using the new system, the user can still fall back to the old system without loss of time and money.
9.6 Maintenance:
Maintenance is the process of eliminating errors in the working system during its working life and to tune the system to any variation in working environment. By proper maintenance I can continue to bring the system to new standards. As my project is error free and produce no bugs for valid data, but I use feature to detect the errors and produce error messages understand by the experienced user and nonprogrammer user. When the user of my project changes its operating platform that is Windows versions then he/she need to reinstall the ONLINE SHOPPING CART Similarly when he/she wants to upgrade his/her Windows version there is no effect of the installation on the Shop Manager. It runs even in later versions of Windows.
113
CHAPTER 10. ADVANTAGES & DISADVANTAGES 10.1 DEMERITS OF THE EXISTING SYSTEM
In the current working system the user faces so many problems. Some of them are given below:1. Limited customers. 2. The use of man power in the existing system is so high because maintaining the details about all the products, stock, transaction and much other process. 3. Need a lot of paper work (registers). 4. Need mush skilled persons to take care all the activities. 5. Calculation mistake are another problem for the system and have drawback of accuracy of result obtained.
Deployment is Easy
114
As compared to ASP application, the deployment is as easy in .NET as there I is no need of registration of DLL.
More Systematic
One could easily find the items they want to purchase from the categories divided.
Convenient to Users
Customers do not have to learn any special thing to operate this application. They could easily shop and could rely on this application regarding security.
Simple Interface
This field allows user to interact with automated system using typed in text via conversational dialogue.Simple interface offers great flexibility to users than menu-driven interface.
Easy Postage
The customer is only required to give the correct postal address for delivery of the product rest he has nothing to worry about and the order is delivered within 2-3 business days.
More Flexible
For the fact the online shopping provides many advantages over the traditional brick and maratar stores like, its open 24*7, the availability of varied products and all services at a single place,fast and easy comparision, etc.
Time Efficient
By using this application customer doesnt have to waste time by visiting the mall or any shop. The customer could simply order the products of his/her interest and those items would be delivered on the shipping address they have provided.
115
116
After you've done some online shopping you'll see how easy it is and you'll quickly get used to it. Soon you will know what the best shopping websites are and you will be able to buy the things you need very easy and fast, saving a lot of time and trouble. Online shopping is the most practical, economical and fun method of shopping, that is perfect for everyone.
117
AUTHOR NAME
1. Visual Studio complete reference 6.0 2. Programming in Visual C# 3. ASP.NET 3.5 4.Professional.ASP.NET.3.5.In. C.Sharp.and.VB 5.www.w3schools.com
Noel Jecke Julie Case Bradley Stephen Walther Bill Evjen,Scott Hanselman,Devin Rader
118