Professional Documents
Culture Documents
Web Content Management System: Information Technology
Web Content Management System: Information Technology
ON
IN
INFORMATION TECHNOLOGY
SUBMITTED
ANIMESH GULATI Roll No. 2209604
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.
INT(OD)CTION
"ro*ect Title
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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%
/A/-,(- drive
6he various roles through which the data flows used in the project are> C/ A&ministrator :/ )ser
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
:.
T75a#
Contains a list of 5a#es create& 7' the A&min. Alon# %ith title6 met $e'%or& an& &escri5tion
D.
T7mnu
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
T7tm5
Column Name
Datat'5e
Ke'
Descri5tion
)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
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 {
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 {
# 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" {
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/+;
# #
# 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; #