You are on page 1of 47

PROJECT REPORT

ON

WEB CONTENT MANAGEMENT SYSTEM


SUBMITTED AS A PART OF COURSE CURRICULUM FOR DEGREE OF BECHELOR OF TECHNOLOGY

IN

INFORMATION TECHNOLOGY

UNDER THE GUIDENCE OF:BY:Er. CHHOTU SHARMA

SUBMITTED
ANIMESH GULATI Roll No. 2209604

Dat ! S "t #$ r 20 20%%

B.T &' (TH SEM. a)*# +',-lat*2(.,#a*l.&o#

DEPARTMENT OF INFORMATION TECHNOLOGY SWAMI DEVI DYAL INSTITUTE OF ENGINEERING & TECHNOLOGY DISTT.- PANCHKULA (BARWALA) HARYANA- 13411

ACKNOWLEDGEMENT
Apart from the efforts of me, the success of my project depends largely on the encouragement and guidelines of many others. I take this opportunity to express my gratitude to the people who have been instrumental in the successful completion of this project. I would like to show my greatest appreciation to my project in-charge, Mrs. Shalini Sharma. I cant say thank you enough for the tremendous support and help. I feel motivated and encouraged every time I attend her meeting. ithout her encouragement and guidance this project work would not have materiali!ed. Im highly grateful to Mr. Chhotu Sharma, chief instructor at CS-InfoTech, for his thorough guidance right from day " till the end of training. #e actually laid the ground for conceptual understanding of technologies used in project.

TA LE O! CONTENTS
S. NO. I II ". TO"IC Trainin# Certificates Ac$no%le&#ement Intro&uction $i% &tatement about the problem'xisting system $ii% (bjectives of )roject $iii% *. orking 'nvironment "-"" " * *-"" "+ ". ". *1 *"-*2 *.-2* "AGE NO.

S'stem Desi#n $i% 'ntity ,elationship -odel $ii% /ata 0low /iagram $iii% /atabase 0iles $iv% ,elations in the /atabases

3. 2.

Co&in# Screen Shots

INT(OD)CTION

"ro*ect Title

WE CONTENT MANAGEMENT S,STEM

"ro*ect Duration+ "ro*ect cate#or'+

eeks

eb 5ased Application

6he project named WE CONTENT MANAGEMENT S,STEM is developed using A&).7'6 during the industrial training. 6his project has been developed in partial fulfilment of ,e8uirements for the degree of 5'. $I6%, from Kuru$shetra )ni-ersit' .Kuru$shetra/

A web content management system $ 9-&% is a software system that provides website authoring, collaboration, and administration tools designed to allow users with little knowledge of web programming languages or mark-up languages to create and manage website content with relative ease. A robust 9-& provides the foundation for collaboration, offering users the ability to manage documents and output for multiple author editing and participation. It uses a database to store page content, metadata, and other information assets that might be needed by the system.

STATEMENT A O)T "(O LEM

A 9-& allows non-technical users to make changes to a website with little training. A 9-& typically re8uires a systems administrator and:or a web developer to set up and add features, but it is primarily a website maintenance tool for non-technical staff.

O 0ECTI1E O! "(O0ECT

O 0ECTI1ES O! "(O0ECT
hether you are using a 9-& to manage an Internet, 'xtranet or Intranet - the business benefits that can be derived from such a solution do of course vary. 6he suggestions below are by no means an exhaustive list of all the benefits and it would be worth reading the documentation on personali!ation, collaboration and portals in combination with the documentation on 9-& as increasingly business benefits can be derived indirectly for these capabilities with the 9-& underpinning them to provide a single solution. 6he website is easy to use and understand by anyone A 9-& enables information to be fresh, consistent ; high 8uality. ,educed customer $internal and external% dissatisfaction created by having incorrect information. ,eduction in legal issues created by displaying incorrect information. Increased value perception of the information provided. 6here is a higher likelihood of a customer re-visiting the site. &ome search engines rank pages that change fre8uently higher in search results. 9-& facilitates the re-use of content.

6he re-use of content across multiple web sites or pages creates an enhanced productivity value. A 9-& enhances productivity and job satisfaction of the web team.

ebmasters can focus on technology and areas such as redesign and functionality.

A more appropriate use of the web team results in lowered production costs. 'nables a 8uick response to changes on competitors web sites. 6here is no specific web browser that you must have or install before using

"LAT!O(M DISC(I"TION

WO(KING EN1I(ONMENT
)n&erstan&in# .Net !rame Wor$
DE!INITION+
6he .7et framework can be defined as a language neutral platform designed to provide a number of rich and powerful application development tools and technologies. It has an extensive class library that provides wide-ranging support for data access. .7et framework has an independent code execution and management environment called the 9ommon <anguage ,untime $9<,% which ensures that code is safe to run, and provides an abstract layer on top of the operating system, which allows the elements of the .7et framework to run on many operating systems and devices.

T2E .NET 1ISION+


6he basic idea behind the development of the .7et framework is that a global broadband network will someday globally connect all devices and the software will become a service provided over this network. 6he .7et framework provides the foundation and the plumbing on which the -icrosoft .7et vision is built. 6he vision is about having a global network and open standards like =-< to make it easier for parties to exchange data and work together. 7ow devices will use common languages like =-< over standardi!ed or shared protocols such as #66) and these devices will be running a multitude of software on

various operating systems. 6his is not limited to -icrosoft but also to other operating systems such as sun, I5-. 6he .7et framework provides the tools and the technologies needed to write applications that can seamlessly and easily communicate over the Internet using open standards like =-< and &(A). It also aims at solving the various problems that are faced by developers while working on applications made using the windows /7A. It provides a solution to problems such as registering of components and shutting down applications in order to upgrade them.

W2, !(ONT END - AS".NET 3.4 "+ AS".NET is inte#rate& %ith the .NET !rame%or$
6he .7'6 0ramework is divided into an almost painstaking collection of functional parts, with a staggering total of more than "1,111 types $the .7'6 term for classes, structures, interfaces, and other core programming ingredients%. 6he massive collection of functionality that the .7'6 0ramework provides is organi!ed in a way that traditional indows programmers will see as a happy improvement. 'ach one of the thousands of classes in the .7'6 0ramework is grouped into a logical, hierarchical container called a namespace. /ifferent namespaces provide different features. 6aken together, the .7'6 namespaces offer functionality for nearly every aspect of distributed development from message 8ueuing to security. 6his massive toolkit is called the class library.

*> AS".NET Is Com5ile&6 Not Inter5rete&


(ne of the major reasons for performance degradation in classic A&) pages is its use of interpreted script code. 'very time an A&) page is executed, a scripting host on the web server needs to

interpret the script code and translate it to lower-level machine code, line by line. A&).7'6 applications are always compiled?in fact, its impossible to execute 9@ or Aisual 5asic code without it being compiled first.

3+ AS".NET Is Multilan#ua#e
I< is a stepping stone for every managed application. $A managed application is any application thats written for .7'6 and executes inside the managed environment of the 9<,.% In a sense, I< is the language of .7'6, and its the only language that the 9<, recogni!es.

2+ AS".NET Is 2oste& 7' the Common Lan#ua#e (untime


6he most important aspect of the A&).7'6 engine is that it runs inside the runtime environment of the 9<,.
8+

AS".NET Is O7*ect-Oriente&+
A&) provides a relatively feeble object model. It provides a small set of objectsB these objects are really just a thin layer over the raw details of #66) and #6-<. (n the other hand, A&).7'6 is truly object-oriented. 7ot only does your code have full access to all objects in the .7'6 0ramework, but you can also exploit all

the conventions of an (() $object-oriented programming% environment. 0or example, you can create reusable classes, standardi!e code with interfaces, extend existing classes with inheritance, and bundle useful functionality in a distributable, compiled component.

4> AS".NET Is Multi &e-ice an& Multi 7ro%ser+


(ne of the greatest challenges web developers face is the wide variety of browsers they need to support. /ifferent browsers, versions, and configurations differ in their support of #6-<. eb developers need to choose whether they should render their content according to #6-< 3.*, #6-< 2.1, or something else entirely? such as =#6-< ".1 or even -< $ ireless -ark-up <anguage% for mobile devices. 6his problem, fuelled by the various browser companies, has plagued developers since the orld ide eb 9onsortium $ 39% proposed the first version of #6-<. <ife gets even more complicated if you want to use an #6-< extension such as Cava&cript to create a more dynamic page or provide validation.

W2, ACK END S9L SE(1E( :44;


ac$ en& a &escri5tion
6he back-end comprises the components that process the output from the front-end. 5ack-end is hidden from the user. A back-end database is a database that is accessed by users indirectly through an external application rather than by application programming stored within the database itself or by low level manipulation of the data $e.g. through &D< commands%. A back-end database stores data but does not include end-user application elements such as stored 8ueries, forms, macros or reports.

S9L SE(1E( :44; -icrosoft &D<-&erver *11+ is scalable, high-performance database management with built-in replication capabilities, Internet integration. (pen system architecture, and powerful graphic-based management tools that are designed specifically for distributed client:server computing. &D<-&erver *11+ extends to performance and reliability by providing server-based job scheduling to give visual control multiple servers and remote operations. &D<-&erver *11+ was designed with Internet and intranets in minds. hen it is used with eb Assistant, it can populate web server with &D< data through a variety of methods and provide high-performance access to information on companys web site. &D<-&erver *11+ includes new features and components for both the server and the client. 6he new features can be grouped into several categories> &D< 'nterprise -anager, 6ransact-&D<, and &D<-/-( and &D< server wi!ards.

DATA ASE DESIGN CONSIDE(ATIONS


/esigning a database re8uires an understanding of both the business functions you want to model and the database concepts and features used to represent those business functions.

CLIENT<SE(1E( A(C2ITECT)(E O! S9L SE(1E(


Microsoft= S9L Ser-er> is &esi#ne& to %or$ effecti-el' in a num7er of en-ironments+ As a two-tier or multi-tier client:server database system As a desktop database system

CLIENT<SE(1E( DATA ASE S,STEMS


9lient:server systems are constructed so that the database can reside on a central computer, known as a + r/ r, and be shared among several users. Esers access the server through a client or server application. In a two-tier client:server system, users run an application on their local computer, known as a &l* )t that connects over a network to the server running &D< &erver. 6he client application runs both business logic and the code to display output to the user, and is also known as a thick client. In a multi-tier client:server system, the client application logic is run in two locations. 6he thin client runs on the users local computer and is focused on displaying results to the user. 6he business logic is located in server applications running on a server. 6hin client re8uests

functions from the server application that is a multithreaded application capable of working with many concurrent users. 6he server application opens connections to the database server and can run on the same server as the database, or it can connect across the network to a separate server operating as a database server. 6his is a typical scenario for an Internet application. 0or example, a server application can run on -icrosoft Internet Information &ervices $II&% and service thousands of thin clients running on the Internet or an intranet. 6he server application uses a pool of connections to communicate with a copy of &D< &erver. &D< &erver can be installed on the same computer as II&, or it can be installed on a separate server in the network.

!eature an& )tilities


Trans5arent Data Encr'5tion 'nable encryption of an entire database, data files, or log files, without the need for application changes. 5enefits of this include> &earch encrypted data using both range and fu!!y searches, search secure data from unauthori!ed users, and data encryption without any re8uired changes in existing applications

E?tensi7le Ke' Mana#ement &D< &erver *11+ provides a comprehensive solution for encryption and key management. &D< &erver *11+ delivers an excellent solution to this growing need by supporting third-party key management and #&products.

Au&itin# 9reate and manage auditing via //<, while simplifying compliance by providing more comprehensive data auditing. 6his enables organi!ations to answer common 8uestions, such as, F hat data was retrievedGF

Enhance& Data7ase Mirrorin# &D< &erver *11+ builds on &D< &erver *11H by providing a more reliable platform that has enhanced database mirroring, including automatic page repair, improved performance, and enhanced supportability.

Automatic (eco-er' of Data "a#es &D< &erver *11+ enables the principal and mirror machines to transparently recover from +*3:+*2 types of data page errors by re8uesting a fresh copy of the suspect page from the mirroring partner transparently to end users and applications.

"re&icta7le 9uer' "erformance 'nable greater 8uery performance stability and predictability by providing functionality to lock down 8uery plans, enabling organi!ations to promote stable 8uery plans across hardware server replacements, server upgrades, and production deployments.

Data Com5ression 'nable data to be stored more effectively, and reduce the storage re8uirements for your data. /ata compression also provides significant performance improvements for large I:( bound workloads, like data warehousing.

SO!TWA(E @ 2A(DWA(E (E9)I(EMENTS

SO!TWA(E AND 2A(DWA(E (E9)I(EMENT S"ECI!ICATIONS


6his document shall provide the re8uirement specification for the AWE CONTENT MANAGEMENT S,STEMB as per the scope defined.

C. )sers+
6his site can be used by * types of users>
C.C. 6he users who is likely to find the information of their classmates

through the website. C.:. 6he administrator of the system who will be responsible for maintaining the database of various schools and colleges so that each and every user should be benefitted and also maintaining guestbook entries.

:. Assum5tions+
:.C. 6he alerts will not be provided by the site, the user has to visit it to

get the information.

D.

(eEuirements+
D.C.!unctional (eEuirements+ D.C.C. 6he portal will search for the details of the schools and colleges as per details entered by user. D.C.:. If the user is an admin, he has to login. D.C.D. Admin can add, modify or delete records related to various institutions and also updates guestbook entries. D.C.3. 6he concept of -aster )ages and 9ontent )ages is used.

SO!TWA(E (E9)I(EMENTS
Aisual studio *1"1 can be installed on the following operating systems>

indows =p $x+4% with service pack 3 - all editions except starter edition

indows Aista $x+4 ; x42% with service pack * - all editions except starter edition

windows I $x+4 ; x42%

windows server *113 $x+4 ; x42% with service pack *

windows server *113 r* $x+4 ; x42%

windows server *11+ $x+4 ; x42% with service pack *

windows server *11+ r* $x42%

S)""O(TED A(C2ITECT)(ES+
J 3*-5I6 $=+4%

J 42-5I6 $=42%

2A(DWA(E (E9)I(EMENTS
computer that has a ".4gh! or faster processor

" K5 $3* bit% or * K5 $42 bit% ram $add H"* -5 if running in a virtual machine%

3K5 of available hard disk space

H211 rpm hard disk drive

/irect = . capable video card running at "1*2 x I4+ or higherresolution display

/A/-,(- drive

Ta7les Eser 6emp -enu

6he various roles through which the data flows used in the project are> C/ A&ministrator :/ )ser

ENTIT, F (ELATIONS2I" MODEL


As a database designer, one should use an 'ntity ,elationship $',% diagram as a tool to build the logical database design of a system. An ', diagram represents the following three elements>

Entities> An entity is an object with a distinct set of properties that is easily identified. Attri7utes> An attribute is a property of an entity that differentiates it from other entities and provides information about the entity. (elationshi5s+ A relationship is a crucial part of the design of database.

Sr. No.

Ta7le Name

Descri5tion

C.

T7usr

Contain the username an& 5ass%or& information for re#istere& users

:.

T75a#

Contains a list of 5a#es create& 7' the A&min. Alon# %ith title6 met $e'%or& an& &escri5tion

D.

T7mnu

Contains a list of menus create& 7' the A&min.

TA LES )SED IN T2E "(O0ECT

(ELATIONS IN T2E DATA ASE !O( WE CONTENT MANAGEMENT S,STEM


6he following are the relations we have designed to manage the database. #ere we have followed a convention of having the table names with LtbM as a prefix, and the remaining name of the table represent the description of the data inside that table.

(ELATIONS IN T2E DATA ASE !O( WE CONTENT MANAGEMENT S,STEM

6he following are the relations we have designed to manage the database. #ere we have followed a convention of having the table names with tb as a prefix, and the remaining name of the table represent the description of the data inside that table.

Ta7les T7usr
Column Name Datat'5e Ke' Descri5tion

Esrcod Esrnam Esrpwd Esrfstnam Esrlstnam usrtyp Esrcrtdat

int Aarchar$H1% Aarchar$H1% Aarchar$H1% Aarchar$H1% char$"% datetime

)rimary key Eni8ue

Eser code ,egistration Eser name 'mail id )assword &tatus E,A

T7tm5

Column Name

Datat'5e

Ke'

Descri5tion

-nucod mnunam -nuusrcod -nuparmnucod -nudspord -nuusrtyp

Int Aarchar$"11% Int Int Int char$"%

)k

T75a#
Column Name Datat'5e Ke' Descri5tion

)agcod pagnam )agcon )agbrwtit )agmettit )agmetkey )agmetdsc )agmnucod )agusrcod )agcrtdat

Int Aarchar$H1% ntext$max% varchar$*11% varchar$*11% varchar$*11% varchar$*11% int Int /atetime

)k

CODING

CODING Application class code file

using using using using using using using

System; System.Collections.Generic; System.Linq; System.Web; System.Data; System.Data.SqlClient; System.Configuration;

namespace nswcmns { public interface intusr { Int3 p!usrco" { get; set; # String p!usrnam { get; set; # String p!usrpw" { get; set; # C$ar p!usrsts { get; set; # Date%ime p!usrcrt"ate { get; set; # String p!usrfrstname { get; set; # String p!usrlstname { get; set; # String p!usrtyp {

# # public class clsusrprp & intusr { pri'ate Int3 uc; pri'ate String un( up( ufn( uln( ut; pri'ate Date%ime uc"; pri'ate C$ar us; public int p!usrco" { get { return uc; # set { uc ) 'alue; # # public String p!usrnam { get { return un; # set { un ) 'alue; # # public String p!usrpw" { get { return up; # set { up ) 'alue; # # public C$ar p!usrsts { get { return us; # set { us ) 'alue; # # public Date%ime p!usrcrt"ate {

get; set;

get { # set { #

return uc";

uc" ) 'alue;

# public abstract class clscon { protecte" SqlConnection con ) new SqlConnection*+; public clscon*+ { con.ConnectionString ) Configuration,anager.ConnectionStrings-.cn./.ConnectionString; # # public class clsusr & clscon { public C$ar loginc$ec0*String usrnam( String usrpw"+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+;

# public String p!usrfrstname { get { return ufn; # set { ufn ) 'alue; # # public String p!usrlstname { get { return uln; # set { uln ) 'alue; # # public String p!usrtyp { get { return ut; # set { ut ) 'alue; # #

# SqlComman" cm" ) new SqlComman"*.loginc$ec0.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; cm".2arameters.3""*.4usrnam.( SqlDb%ype.5arC$ar( 67+.5alue ) usrnam; cm".2arameters.3""*.4usrpw".( SqlDb%ype.5arC$ar( 67+.5alue ) usrpw"; cm".2arameters.3""*.4usrtyp.( SqlDb%ype.C$ar( 8+.Direction ) 2arameterDirection.1utput; cm".9:ecute;on<uery*+; C$ar c ) Con'ert.%oC$ar*cm".2arameters-.4usrtyp./.5alue+; cm".Dispose*+; con.Close*+; return c; # public 'oi" sa'e!rec*clsusrprp p+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*.insusr.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; ==cm".2arameters.3""*.4uc.( SqlDb%ype.Int+.5alue ) p.p!usrco"; cm".2arameters.3""*.4un.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!usrnam; cm".2arameters.3""*.4up.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!usrpw"; cm".2arameters.3""*.4us.( SqlDb%ype.C$ar( 87+.5alue ) p.p!usrsts; cm".2arameters.3""*.4uc".( SqlDb%ype.Date%ime+.5alue ) p.p!usrcrt"ate; cm".2arameters.3""*.4ufn.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!usrfrstname; cm".2arameters.3""*.4uln.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!usrlstname; cm".2arameters.3""*.4ut.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!usrtyp; cm".9:ecute;on<uery*+; cm".Dispose*+; con.Close*+; # public 'oi" up"ate!rec*clsusrprp p+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*.up"usr.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; cm".2arameters.3""*.4uc.( SqlDb%ype.Int+.5alue ) p.p!usrco"; cm".2arameters.3""*.4un.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!usrnam; cm".2arameters.3""*.4up.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!usrpw"; cm".2arameters.3""*.4us.( SqlDb%ype.C$ar+.5alue ) p.p!usrsts; cm".2arameters.3""*.4uc".( SqlDb%ype.Date%ime+.5alue ) p.p!usrcrt"ate; cm".2arameters.3""*.4ufn.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!usrfrstname; cm".2arameters.3""*.4uln.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!usrlstname; cm".2arameters.3""*.4ut.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!usrtyp; cm".9:ecute;on<uery*+; cm".Dispose*+; con.Close*+; #

public 'oi" "elete!rec*clsusrprp p+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*."elusr.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; cm".2arameters.3""*.4uc.( SqlDb%ype.Int+.5alue ) p.p!usrco"; cm".9:ecute;on<uery*+; cm".Dispose*+; con.Close*+; # public List>clsusrprp? "sp!rec*+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*."spusr.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; SqlData@ea"er "r ) cm".9:ecute@ea"er*+; List>clsusrprp? 1bA ) new List>clsusrprp?*+; w$ile *"r.@ea"*++ { clsusrprp 0 ) new clsusrprp*+; 0.p!usrco" ) Con'ert.%oInt3 *"r-7/+; ==0.p!usrnam ) Con'ert.%oInt3 *"r-7/+; 0.p!usrnam ) "r-8/.%oString*+; 0.p!usrpw" ) "r- /.%oString*+; 0.p!usrsts ) Con'ert.%oC$ar*"r-3/+; 0.p!usrcrt"ate ) Con'ert.%oDate%ime*"r-B/+; 0.p!usrfrstname ) "r-6/.%oString*+; 0.p!usrlstname ) "r-C/.%oString*+; 0.p!usrtyp ) "r-D/.%oString*+; 1bA.3""*0+; # "r.Close*+; cm".Dispose*+; con.Close*+; return 1bA; # public List>clsusrprp? fin"!rec*Int3 uc+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*.fn"usr.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; cm".2arameters.3""*.4uc.( SqlDb%ype.Int+.5alue ) uc; SqlData@ea"er "r ) cm".9:ecute@ea"er*+; List>clsusrprp? obA ) new List>clsusrprp?*+;

if *"r.Eas@ows+ { "r.@ea"*+; clsusrprp 0 ) new clsusrprp*+; 0.p!usrco" ) Con'ert.%oInt3 *"r-7/+; 0.p!usrnam ) "r-8/.%oString*+; 0.p!usrpw" ) "r- /.%oString*+; 0.p!usrsts ) Con'ert.%oC$ar*"r-3/+; 0.p!usrcrt"ate ) Con'ert.%oDate%ime*"r-B/+; 0.p!usrfrstname ) "r-6/.%oString*+; 0.p!usrlstname ) "r-C/.%oString*+; 0.p!usrtyp ) "r-D/.%oString*+; obA.3""*0+; # "r.Close*+; cm".Dispose*+; con.Close*+; return obA;

# public interface intpag { Int3 p!pagco" { get; set; # Int3 p!pagmnuco" { get; set; # String p!pagtitle { get; set; # String p!pagcon { get; set; # String p!pagmett0ey { get; set; # string p!pagmet"sc { get; set; # Date%ime p!pagcrt"at { get; set; # #

public class clspagprp & intpag { pri'ate Int3 p"( pmc; pri'ate String pt( pc( pm0( pm"; pri'ate Date%ime pc"; public int p!pagco" { get { return p"; # set { p" ) 'alue; # # public int p!pagmnuco" { get { return pmc; # set { pmc ) 'alue; # # public string p!pagtitle { get { return pt; # set { pt ) 'alue; # # public string p!pagcon { get { return pc; # set { pc ) 'alue; # # public string p!pagmett0ey { get {

return pm0; # set { # #

pm0 ) 'alue;

public string p!pagmet"sc { get { return pm"; # set { pm" ) 'alue; # # public Date%ime p!pagcrt"at { get { return pc"; # set { pc" ) 'alue; # # # public class clspag & clscon { public Int3 "sppagbymnu*Int3 mnuco"+ { SqlData3"apter a"p ) new SqlData3"apter*."sppagbymnu.( con+; a"p.SelectComman".Comman"%ype ) Comman"%ype.Store"2roce"ure; a"p.SelectComman".2arameters.3""*.4mnuco".( SqlDb%ype.Int+.5alue ) mnuco"; DataSet "s ) new DataSet*+; a"p.Fill*"s+; if *"s.%ables-7/.@ows.Count )) 7+ { return G8; # else return Con'ert.%oInt3 *"s.%ables-7/.@ows-7/-7/+; # public 'oi" sa'e!rec*clspagprp p+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*.inspag.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure;

==cm".2arameters.3""*.4p".( SqlDb%ype.Int+.5alue ) p.p!pagco"; cm".2arameters.3""*.4pmc.( SqlDb%ype.Int+.5alue ) p.p!pagmnuco"; cm".2arameters.3""*.4pt.( SqlDb%ype.5arC$ar( 877+.5alue ) p.p!pagtitle; cm".2arameters.3""*.4pc.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!pagcon; cm".2arameters.3""*.4pm0.( SqlDb%ype.5arC$ar( 77+.5alue ) p.p!pagmett0ey; cm".2arameters.3""*.4pm".( SqlDb%ype.5arC$ar( 677+.5alue ) p.p!pagmet"sc; cm".2arameters.3""*.4pc".( SqlDb%ype.Date%ime+.5alue ) p.p!pagcrt"at; cm".9:ecute;on<uery*+; cm".Dispose*+; con.Close*+; # public 'oi" up"ate!rec*clspagprp p+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*.up"pag.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; cm".2arameters.3""*.4p".( SqlDb%ype.Int+.5alue ) p.p!pagco"; cm".2arameters.3""*.4pmc.( SqlDb%ype.Int+.5alue ) p.p!pagmnuco"; cm".2arameters.3""*.4pt.( SqlDb%ype.5arC$ar( 877+.5alue ) p.p!pagtitle; cm".2arameters.3""*.4pc.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!pagcon; cm".2arameters.3""*.4pm0.( SqlDb%ype.5arC$ar( 77+.5alue ) p.p!pagmett0ey; cm".2arameters.3""*.4pm".( SqlDb%ype.5arC$ar( 677+.5alue ) p.p!pagmet"sc; cm".2arameters.3""*.4pc".( SqlDb%ype.Date%ime+.5alue ) p.p!pagcrt"at; cm".9:ecute;on<uery*+; cm".Dispose*+; con.Close*+; # public 'oi" "elete!rec*clspagprp p+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*."elpag.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; cm".2arameters.3""*.4p".( SqlDb%ype.Int+.5alue ) p.p!pagco"; cm".9:ecute;on<uery*+; cm".Dispose*+; con.Close*+; # public List>clspagprp? Disp!rec*+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*."isppag.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; SqlData@ea"er "r ) cm".9:ecute@ea"er*+; List>clspagprp? 1bA ) new List>clspagprp?*+;

w$ile *"r.@ea"*++ { clspagprp 0 ) new clspagprp*+; 0.p!pagco" ) Con'ert.%oInt3 *"r-7/+; ==0.pGusrco" ) Con'ert.%oInt3 *"r-7/+; 0.p!pagmnuco" ) Con'ert.%oInt3 *"r-8/+; 0.p!pagtitle ) "r- /.%oString*+; 0.p!pagcon ) "r-3/.%oString*+; 0.p!pagmett0ey ) "r-B/.%oString*+; 0.p!pagmet"sc ) "r-6/.%oString*+; 0.p!pagcrt"at ) Date%ime.;ow; 1bA.3""*0+; # "r.Close*+; cm".Dispose*+; con.Close*+; return 1bA; # public List>clspagprp? fn"!rec*Int3 p"+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*.fin"pag.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; cm".2arameters.3""*.4p".( SqlDb%ype.Int+.5alue ) p"; SqlData@ea"er "r ) cm".9:ecute@ea"er*+; List>clspagprp? obA ) new List>clspagprp?*+; if *"r.Eas@ows+ { "r.@ea"*+; clspagprp 0 ) new clspagprp*+; 0.p!pagco" ) Con'ert.%oInt3 *"r-7/+; 0.p!pagmnuco" ) Con'ert.%oInt3 *"r-8/+; 0.p!pagtitle ) "r- /.%oString*+; 0.p!pagcon ) "r-3/.%oString*+; 0.p!pagmett0ey ) "r-B/.%oString*+; 0.p!pagmet"sc ) "r-6/.%oString*+; 0.p!pagcrt"at ) Date%ime.;ow; obA.3""*0+; # "r.Close*+; cm".Dispose*+; con.Close*+; return obA; # # public interface intmnu { Int3 p!mnuco" { get; set; # String p!mnunam { get; set;

# Int3 { # Int3 {

p!mnuparmnuco"e get; set; p!mnu"spor" get; set;

# public class clsmnuprp & intmnu { pri'ate Int3 mc( mpmc( m"p; pri'ate String mn( mut; public int p!mnuco" { get { return mc; # set { mc ) 'alue; # # public string p!mnunam { get { return mn; # set { mn ) 'alue; # # public int p!mnuparmnuco"e { get { return mpmc; # set { mpmc ) 'alue; # # public int p!mnu"spor" {

# String p!mnuusrtyp { get; set; #

get { # set { # #

return m"p;

m"p ) 'alue;

public string p!mnuusrtyp { get { return mut; # set { mut ) 'alue; # # # public class clsmnu & clscon { public DataSet "spmanmnu*c$ar usrtyp( Int3 parmnuco"+ { SqlData3"apter a"p ) new SqlData3"apter*."spmanmnu.( con+; a"p.SelectComman".Comman"%ype ) Comman"%ype.Store"2roce"ure; a"p.SelectComman".2arameters.3""*.4usrtyp.( SqlDb%ype.C$ar( 8+.5alue ) usrtyp; a"p.SelectComman".2arameters.3""*.4parmnuco".( SqlDb%ype.Int+.5alue ) parmnuco"; DataSet "s ) new DataSet*+; a"p.Fill*"s+; return "s; # public 'oi" sa'e!rec*clsmnuprp p+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*.insmnu.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; == cm".2arameters.3""*.4mc.( SqlDb%ype.Int+.5alue ) p.p!mnuco"; cm".2arameters.3""*.4mn.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!mnunam; == cm".2arameters.3""*.4mpc.( SqlDb%ype.Int+.5alue ) p.p!mnuparmnuco"e; cm".2arameters.3""*.4m"p.( SqlDb%ype.Int+.5alue ) p.p!mnu"spor"; cm".2arameters.3""*.4mut.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!mnuusrtyp; cm".2arameters.3""*.4mpmc.( SqlDb%ype.Int+.5alue ) p.p!mnuparmnuco"e; cm".9:ecute;on<uery*+; cm".Dispose*+; con.Close*+; # public DataSet "spmnu8*Int3 parmnuco"e( C$ar usrtyp+ { SqlData3"apter a"p ) new SqlData3"apter*."spmnu8.( con+;

parmnuco"e; usrtyp;

a"p.SelectComman".Comman"%ype ) Comman"%ype.Store"2roce"ure; a"p.SelectComman".2arameters.3""*.4parmnuco"e.( SqlDb%ype.Int+.5alue ) a"p.SelectComman".2arameters.3""*.4usrtyp.( SqlDb%ype.C$ar( 8+.5alue ) DataSet "s ) new DataSet*+; a"p.Fill*"s+; return "s;

public 'oi" up"ate!rec*clsmnuprp p+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*.up"mnu.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; cm".2arameters.3""*.4mc.( SqlDb%ype.Int+.5alue ) p.p!mnuco"; cm".2arameters.3""*.4mn.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!mnunam; cm".2arameters.3""*.4mpmc.( SqlDb%ype.Int+.5alue ) p.p!mnuparmnuco"e; cm".2arameters.3""*.4m"p.( SqlDb%ype.Int+.5alue ) p.p!mnu"spor"; cm".2arameters.3""*.4mut.( SqlDb%ype.5arC$ar( 67+.5alue ) p.p!mnuusrtyp; cm".9:ecute;on<uery*+; cm".Dispose*+; con.Close*+; # public 'oi" "elete!rec*clsmnuprp p+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*."elmnu.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; cm".2arameters.3""*.4mc.( SqlDb%ype.Int+.5alue ) p.p!mnuco"; cm".9:ecute;on<uery*+; cm".Dispose*+; con.Close*+; # public List>clsmnuprp? Disp!rec*+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*."ispmnu.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; SqlData@ea"er "r ) cm".9:ecute@ea"er*+; List>clsmnuprp? 1bA ) new List>clsmnuprp?*+; w$ile *"r.@ea"*++ { clsmnuprp 0 ) new clsmnuprp*+; 0.p!mnuco" ) Con'ert.%oInt3 *"r-7/+; ==0.p!mnuco" ) Con'ert.%oInt3 *"r-7/+; 0.p!mnunam ) "r-8/.%oString*+; 0.p!mnuparmnuco"e ) Con'ert.%oInt3 *"r- /+; 0.p!mnu"spor" ) Con'ert.%oInt3 *"r-3/+;

# "r.Close*+; cm".Dispose*+; con.Close*+; return 1bA;

0.p!mnuusrtyp ) "r-B/.%oString*+; 1bA.3""*0+;

# #

# public List>clsmnuprp? fin"!rec*Int3 mc+ { if *con.State )) ConnectionState.Close"+ { con.1pen*+; # SqlComman" cm" ) new SqlComman"*.fin"mnu.( con+; cm".Comman"%ype ) Comman"%ype.Store"2roce"ure; cm".2arameters.3""*.4mnu.( SqlDb%ype.Int+.5alue ) mc; SqlData@ea"er "r ) cm".9:ecute@ea"er*+; List>clsmnuprp? obA ) new List>clsmnuprp?*+; if *"r.Eas@ows+ { "r.@ea"*+; clsmnuprp 0 ) new clsmnuprp*+; 0.p!mnuco" ) Con'ert.%oInt3 *"r-7/+; ==0.p!mnuco" ) Con'ert.%oInt3 *"r-7/+; 0.p!mnunam ) "r-8/.%oString*+; 0.p!mnuparmnuco"e ) Con'ert.%oInt3 *"r- /+; 0.p!mnu"spor" ) Con'ert.%oInt3 *"r-3/+; 0.p!mnuusrtyp ) "r-B/.%oString*+; obA.3""*0+; # "r.Close*+; cm".Dispose*+; con.Close*+; return obA; #

You might also like