Home >Documents >Ecommerce Report Repaired)

Ecommerce Report Repaired)

Date post:26-Nov-2014
Category:
View:115 times
Download:5 times
Share this document with a friend
Transcript:

Project ReportOn

SOCIAL NETWORKINGSubmitted in fulfillment of the requirement for the award of the degree of

(Batch 2008-2011)

By AMRINDER SINGH

Under the Supervision of(SHILPA DANG)

DAV COLLEGE, SECTOR 10, CHANDIGARH May, 2011

CANDIDATES DECLARATION

I hereby declare that the work which is being presented in this project report entitled SOCIAL NETWORKING, in partial fulfillment of the requirement for the award of the degree of MASTERS OF SCIENCE(INFORMATION TECHNOLOGY), submitted at DAV COLLEGE, SECTOR 10, CHANDIGARH is an authentic work done by me during a period from (1-2-2011) to (15-6-2011), under the Guidance of Mr. AMRIT SAGAR.

The work presented in this project report has not been submitted by me for the award of any other degree of this or any other Institute/University.

Signature of the Candidate Name & Roll no.

This is to certify that the above statement made by the candidate is correct to best of my knowledge and belief.

Date : Place : Designation:

Signature of the Supervisor

The Project Viva-Voce examination of Name of Student, has been held on _______________. Signature of Supervisor Signature of Principal Signature of Examiner

2

COMPANY CERTIFICATE ON COMPANYS LETTER HEAD

3

ACKNOWLEDGEMENTBefore I get into the think of things, we would like to offer my first and foremost thanks for the people who during the voyage of our project led way through their guidance , encouragement and valuable suggestions. We would like to offer our heartful thanks to our respected Principal ( B C JOSAN ) for providing us with ample facilities and opportunities to make it possible for us to do this project work. From the inner core of our heart We would like to express our eternal gratitude to project manager MR. SOURABH SUMAN who graciously provided, us with a wealth of invaluable guidance and instructions during the course of this project, he was a great pioneer for us, in removing the hurdles coming in the project. WE would also like to convey our regards to MRS. AMRIT SAGAR for their co-operations and motivations without whom this project would have been an impossible task. Last but not the least, WE would like to thanks our respected PARENTS for providing us a yardstick towards the way of completance of this project.

SUBMITTED TO :MR. AMRIT SAGAR

SUBMITTED BY :AMRINDER SINGH Roll NO

4

CONTENT:1. Company Profile 2. Introduction to Project 3. Role of Candidate in Project 4. Requirement Analysis 4.1 Problem Analysis 4.2 Requirement Specification Document consisting of: 4.3 Introduction to SRS 4.4 Certain specific requirements 5. Software Design 5.1 Table Structure 5.2 E-R Diagram 5.3 Data Flow Diagram 6. Coding 6.1 Approach used Top Down/Bottom up 6.2 In absence of Codes 7. Testing 7.1 Test Cases & Test Criteria 8. Implementation & Evaluation of Project 8.1Advantages 8.2 Disadvantages 9. Scope of the project 10. Conclusion

5

11. Bibliography

COMPANY PROFILENextGen is a UK headquartered technology company with offices throughout Europe, America, Japan and India. NextGen with diversified range of business operations are providing Bluetooth testing services and IT/Software & Database. It support to leading luxury automotive industry worldwide and also manufacturing of innovative Bluetooth devices under brand Venturi.

UK Office

Indian Office

The company philosophy is centered on innovation, performance and style, enhancing the experience of mobile devices. NextGen won the best innovation of 2008 award at Consumer Electronics Show in Las Vegas USA in In-Car Accessories categories. With partners such as SONY, CSR and Verizon Wireless, NextGen Venturi provides product leadership and vanguard innovation to customers all over the world. NextGen focuses on providing Bluetooth IOT test services, offshore web development and software development, re-engineering solutions and ready-to-deploy business applications for a number of industries including social networking, banking and finance.

6

Our fundamental company values enable us to perform our mission in the best way possible.

Professional Approach. Win-win co-operation with clients and partners. Creatively and smartly applying thoughts to make best solutions possible. Fast and effective off-Shore client communication. Reliability, trust and long term relation with the client

IT Park Chandigarh Office

SOFTWARE DEVELOPMENT/WORKING ON LIVE PROJECTS

7

INTRODUCTION TO PROJECTA social networking service is an online service, platform, or site that focuses on building and reflecting of social networks or social relations among people, e.g., who share interests and/or activities. A social network service essentially consists of a representation of each user (often a profile), his/her social links, and a variety of additional services. Most social network services are web based and provide means for users to interact over the internet, such as e-mail and instant messaging. Online community services are sometimes considered as a social network service, though in a broader sense, social network service usually means an individual-centered service whereas online community services are group-centered. Social networking sites allow users to share ideas, activities, events, and interests within their individual networks. The main types of social networking services are those which contain category places (such as former school year or classmates), means to connect with friends (usually with self-description pages) and a recommendation system linked to trust. Popular methods now combine many of these, with Facebook and Twitter widely used worldwide, Nexopia (mostly in Canada);[1] Bebo,[2] VKontakte, Hi5, Hyves (mostly in The Netherlands), Draugiem.lv (mostly in Latvia), StudiVZ (mostly in Germany), iWiW (mostly in Hungary), Tuenti (mostly in Spain), Nasza-Klasa (mostly in Poland), Decayenne, Tagged, XING,[3] Badoo[4] and Skyrock in parts of Europe;[5] Orkut and Hi5 in South America and Central America;[6] and Friendster, Mixi, Multiply, Orkut, Wretch, renren and Cyworld in Asia and the Pacific Islands and Twitter, Facebook, LinkedIn and Orkut are very popular in India. There have been attempts to standardize these services to avoid the need to duplicate entries of friends and interests (see the FOAF standard and the Open Source Initiative).

CONTENTS[hide]

1 History 2 Social impacts 3 Typical structure

8

3.1 Basics 3.2 Additional features 4 Emerging trends in social networking o 4.1 Social network hosting service o 4.2 Business model 5 Issues o 5.1 Privacy o 5.2 Notifications on websites o 5.3 Access to information o 5.4 Potential for misuse o 5.5 Risk for child safety o 5.6 Trolling o 5.7 Online bullying o 5.8 Interpersonal communication o 5.9 Patents 6 Investigations 7 Application domains o 7.1 Government applications o 7.2 Business applications o 7.3 Dating applications o 7.4 Educational applications o 7.5 Finance applications o 7.6 Medical applications 8 Open source software 9 See also 10 In the media 11 References o 11.1 Noteso o

12 Further reading

HISTORYThe potential for computer networking to facilitate new forms of computermediated social interaction was suggested early on.[7] Efforts to support social networks via computer-mediated communication were made in many early online services, including Usenet, ARPANET, LISTSERV, and bulletin board services (BBS). Many prototypical features of social networking sites were also present in online services such as America Online, Prodigy, and CompuServe. Early social networking on the World Wide Web began in the form of generalized online communities such as Theglobe.com (1995),[8] Geocities (1994) and Tripod.com (1995). Many of these early communities focused on bringing people together to interact with each other through chat rooms, and encouraged users to share personal information and ideas via personal webpages by providing easy-to-use publishing tools and free or inexpensive webspace. Some communities - such as Classmates.com - took a different 9

approach by simply having people link to each other via email addresses. In the late 1990s, user profiles became a central feature of social networking sites, allowing users to compile lists of "friends" and search for other users with similar interests. New social networking methods were developed by the end of the 1990s, and many sites began to develop more advanced features for users to find and manage friends.[9] This newer generation of social networking sites began to flourish with the emergence of SixDegrees.com in 1997,[10] followed by Makeoutclub in 2000,[11][12], Friendster in 2002,[13] and soon became part of the Internet mainstream. Friendster was followed by MySpace and LinkedIn a year later, and finally, Bebo. Attesting to the rapid increase in social networking sites' popularity, by 2005, MySpace was reportedly getting more page views than Google. Facebook,[14] launched in 2004, has since become the largest social networking site in the world.[15] Today, it is estimated that there are now over 200 active sites using a wide variety of social networking models.[citation needed]

SOCIAL IMPACTSWeb based social networking services make it possible to connect people who share interests and activities across political, economic, and geographic borders.[16] Through e-mail and instant messaging, online communities are created where a gift economy and reciprocal altruism are encouraged through cooperation. Information is particularly suited to gift economy, as information is a nonrival good and can be gifted at practically no cost.[17][18] Facebook and other social networking tools are increasingly the object of scholarly research. Scholars in many fields have begun to investigate the impact of social networking sites, investigating how such sites may play into issues of identity, privacy,[19] social capital, youth culture, and education danah boyd, (2007), Why Youth (Heart) Social Network Sites, MacArthur Foundation Series on Digital Learning - Youth, Identity, and Digital Media Volume (ed. David Buckingham). MIT Press Several websites are beginning to tap into the power of the social networking model for philanthropy. Such models provide a means for connecting otherwise fragmented industries and small organizations without the resources to reach a broader audience with interested users.[20] Social networks are providing a different way for individuals to communicate digitally. These communities of hypertexts allow for the sharing of information and ideas, an old concept placed in a digital environment.

10

In 2011, HCL Technologies conducted research which showed that 50% of British employers had banned the use of social networking sites/ services during office hours. [21] [22]

TYPICAL STRUCTURE BASICSSocial networking sites to share some conventional features. Most often, individual users are encouraged to create profiles containing various information about themselves. Users can often upload pictures of themselves to their profiles, post blog entries for others to read, search for other users with similar interests, and compile and share lists of contacts. In addition, user profiles often have a section dedicated to comments from friends and other users. To protect user privacy, social networks usually have controls that allow users to choose who can view their profile, contact them, add them to their list of contacts, and so on. In recent years, it has also become common for a wide variety of organizations to create profiles to advertise products and services.

ADDITIONAL FEATURESSome social networks have additional features, such as the ability to create groups that share common interests or affiliations, upload or stream live videos, and hold discussions in forums. Geosocial networking co-opts internet mapping services to organize user participation around geographic features and their attributes. There is also a trend for more interoperability between social networks led by technologies such as OpenID and OpenSocial. Lately, mobile social networking has become popular.[citation needed] In most mobile communities, mobile phone users can now create their own profiles, make friends, participate in chat rooms, create chat rooms, hold private conversations, share photos and videos, and share blogs by using their mobile phone. Some companies provide wireless services which allow their customers to build their own mobile community and brand it, but one of the most popular wireless services for social networking in North America is Facebook Mobile.

EMERGING TRENDS IN SOCIAL NETWORKINGAs the increase in popularity of social networking is on a constant rise,[23] new uses for the technology are constantly being observed.

11

At the forefront of emerging trends in social networking sites is the concept of "real-time web" and "location based." Real time allows users to contribute content, which is then broadcasted as it is being uploaded - the concept is analogous to live radio and television broadcasts. Twitter set the trend for "real time" services, where users can broadcast to the world what they are doing, or what is on their minds within a 140 character limit. Facebook followed suit with their "Live Feed" where users' activities are streamed as soon as it happens.While Twitter focuses on words, Clixtr, another real time service, focuses on group photo sharing where users can update their photo streams with photos while at an event. Friends and nearby users can contribute their own photos and comments to that event stream, thus contributing to the "real time" aspect of broadcasting photos and comments as it is being uploaded. In the location based social networking space, Foursquare gained popularity as it allowed for users to "check-in" to places that they are frequenting at that moment. Gowalla is another such service which functions in much the same way that Foursquare does, leveraging the GPS in phones to create a location-based user experience. Clixtr, though in the real time space, is also a location based social networking site since events created by users are automatically geotagged, and users can view events occurring nearby through the Clixtr iPhone app. Recently, Yelp announced its entrance into the location based social networking space through check-ins with their mobile app; whether or not this becomes detrimental to Foursquare or Gowalla is yet to be seen as it is still considered a new space in the internet technology industry.[24] One popular use for this new technology is social networking between businesses. Companies have found that social networking sites such as Facebook and Twitter are great ways to build their brand image. According to Jody Nimetz, author of Marketing Jive,[25] there are five major uses for businesses and social media: to create brand awareness, as an online reputation management tool, for recruiting, to learn about new technologies and competitors, and as a lead gen tool to intercept potential prospects.[25] These companies are able to drive traffic to their own online sites while encouraging their consumers and clients to have discussions on how to improve or change products or services. One other use that is being discussed is the use of Social Networks in the Science communities. Julia Porter Liebeskind et al. have published a study on how New Biotechnology Firms are using social networking sites to share exchanges in scientific knowledge.[26] They state in their study that by sharing information and knowledge with one another, they are able to "increase both their learning and their flexibility in ways that would not be possible within a self-contained hierarchical organization." Social networking is allowing scientific groups to expand their knowledge base and share ideas, and without these new means of communicating their theories might become "isolated and irrelevant".

12

Social networks are also being used by teachers and students as a communication tool. Because many students are already using a wide-range of social networking sites, teachers have begun to familiarize themselves with this trend and are now using it to their advantage. Teachers and professors are doing everything from creating chat-room forums and groups to extend classroom discussion to posting assignments, tests and quizzes, to assisting with homework outside of the classroom setting. Social networks are also being used to foster teacher-parent communication. These sites make it possible and more convenient for parents to ask questions and voice concerns without having to meet face-to-face. Social networks are being used by activists as a means of low-cost grassroots organizing. Extensive use of an array of social networking sites enabled organizers of the 2009 National Equality March to mobilize an estimated 200,000 participants to march on Washington with a cost savings of up to 85% per participant over previous methods.[27] The use of online social networks by libraries is also an increasingly prevalent and growing tool that is being used to communicate with more potential library users, as well as extending the services provided by individual libraries. A final rise in social network use is being driven by college students using the services to network with professionals for internship and job opportunities. Many studies have been done on the effectiveness of networking online in a college setting, and one notable one is by Phipps Arabie and Yoram Wind published in Advances in Social Network Analysis.[28]

SOCIAL NETWORK HOSTING SERVICEA social network hosting service is a web hosting service that specifically hosts the user creation of web-based social networking services, alongside related applications. Such services are also known as vertical social networks due to the creation of SNSes which cater to specific user interests and niches; like larger, interest-agnostic SNSes, such niche networking services may also possess the ability to create increasingly niche groups of users.

BUSINESS MODELFew social networks currently charge money for membership. In part, this may be because social networking is a relatively new service, and the value of using them has not been firmly established in customers' minds.[citation needed] Companies such as MySpace and Facebook sell online advertising on their site. Their business model is based upon large membership count, and charging for membership would be counterproductive.[29] Some believe that the deeper information that the sites have on each user will allow much better targeted advertising than any other site can currently provide.[30] 13

Social networks operate under an autonomous business model, in which a social network's members serve dual roles as both the suppliers and the consumers of content. This is in contrast to a traditional business model, where the suppliers and consumers are distinct agents. Revenue is typically gained in the autonomous business model via advertisements, but subscription-based revenue is possible when membership and content levels are sufficiently high.[31]

ISSUES PRIVACYPrivacy Concerns with social networking services have been raised growing concerns amongst users on the dangers of giving out too much personal information and the threat of sexual predators. Users of these services also need to be aware of data theft or viruses. However, large services, such as MySpace and Netlog, often work with law enforcement to try to prevent such incidents.[citation needed] In addition, there is a perceived privacy threat in relation to placing too much personal information in the hands of large corporations or governmental bodies, allowing a profile to be produced on an individual's behavior on which decisions, detrimental to an individual, may be taken. Furthermore, there is an issue over the control of datainformation that was altered or removed by the user may in fact be retained and/or passed to 3rd parties. This danger was highlighted when the controversial social networking site Quechup harvested e-mail addresses from users' e-mail accounts for use in a spamming operation.[32] In medical and scientific research, asking subjects for information about their behaviors is normally strictly scrutinized by institutional review boards, for example, to ensure that adolescents and their parents have informed consent. It is not clear whether the same rules apply to researchers who collect data from social networking sites. These sites often contain a great deal of data that is hard to obtain via traditional means. Even though the data are public, republishing it in a research paper might be considered invasion of privacy.[33] Privacy on social networking sites can be undermined by many factors. For example, users may disclose personal information, sites may not take adequate steps to protect user privacy, and third parties frequently use information posted on social networks for a variety of purposes. "For the Net generation, social networking sites have become the preferred forum for social interactions, from posturing and role playing to simply sounding off. However, because such forums are relatively easy to access, posted content

14

can be reviewed by anyone with an interest in the users' personal information".[34][35][36] Following plans by the UK government to monitor traffic on social networks[37] schemes similar to E-mail jamming have been proposed for networks such as Twitter and Facebook. These would involve "friending" and "following" large numbers of random people to thwart attempts at network analysis.

NOTIFICATIONS ON WEBSITESThere has been a trend for social networking sites to send out only 'positive' notifications to users. For example sites such as Bebo, Facebook, and Myspace will not send notifications to users when they are removed from a person's friends list. Similarly Bebo will send out a notification if a user is moved to the top of another user's friends list but no notification is sent if they are moved down the list. This allows users to purge undesirables from their list extremely easily and often without confrontation since a user will rarely notice if one person disappears from their friends list. It also enforces the general positive atmosphere of the website without drawing attention to unpleasant happenings such as friends falling out, rejection and failed relationships.

ACCESS TO INFORMATIONMany social networking services, such as Facebook, provide the user with a choice of who can view their profile. This prevents unauthorized user(s) from accessing their information.[38] Parents who want to access their child's MySpace or Facebook account have become a big problem for teenagers who do not want their profile seen by their parents. By making their profile private, teens can select who may see their page, allowing only people added as "friends" to view their profile and preventing unwanted viewing of the profile by parents. Most teens are constantly trying to create a structural barrier between their private life and their parents.[39] To edit information on a certain social networking service account, the social networking sites require you to login or provide a password. This prevents unauthorized user(s) from adding, changing, or removing personal information, pictures, and/or other data.

POTENTIAL FOR MISUSEThe relative freedom afforded by social networking services has caused concern regarding the potential of its misuse by individual patrons. In October 2006, a fake Myspace profile created in the name of Josh Evans by

15

Lori Janine Drew led to the suicide of Megan Meier.[40] The event incited global concern regarding the use of social networking services for bullying purposes In July 2008, a Briton, Grant Raphael, was ordered to pay a total of GBP 22,000 (about USD $44,000) for libel and breach of privacy. Raphael had posted a fake page on Facebook purporting to be that of a former schoolfriend Matthew Firsht, with whom Raphael had fallen out in 2000. The page falsely claimed that Firsht was homosexual and that he was dishonest. At the same time, genuine use of social networking services has been treated with suspicion on the ground of the services' misuse. In September 2008, the profile of Australian Facebook user Elmo Keep was banned by the site's administrators on the grounds that it violated the site's terms of use. Keep is one of several users of Facebook who were banned from the site on the presumption that their names aren't real, as they bear resemblance the names of characters like Sesame Street's Elmo.[41]

RISK FOR CHILD SAFETYCitizens and governments have been concerned by a misuse by child and teenagers of social networking services, particularly in relation to online sexual predators. A certain number of actions have been engaged by governments to better understand the problem and find some solutions.[specify] A 2008 panel concluded that technological fixes such as age verification and scans are relatively ineffective means of apprehending online predators.[42] In May 2010, a child pornography social networking site with hundreds of members was dismantled by law enforcement. It was deemed "the largest crimes against children case brought anywhere by anyone."[43]

TROLLINGMain article: Troll (Internet) A common misuse of social networking sites such as Facebook is that it is occasionally used to emotionally abuse individuals. Such actions are often referred to as trolling. It is not rare for confrontations in the real world to be translated online.[citation needed] Trolling can occur in many different forms, such as (but not limited to) defacement of deceased person(s) tribute pages, name calling, playing online pranks on volatile individuals and controversial comments with the intention to cause anger and cause arguments. Trolling is not to be confused with cyber-bullying.

ONLINE BULLYINGOnline bullying (aka "Cyber-bullying") is a relatively common occurrence and it can often result in emotional trauma for the victim. Depending on the networking outlet, up to 39% of users admit to being cyber-bullied.[44] 16

Danah Boyd, a researcher of social networks quotes a teenager in her article, Why Youth (Heart) Social Network Sites. The teenager expresses frustration towards networking sites like MySpace because it causes drama and too much emotional stress.[45] There are not many limitations as to what individuals can post when online. Inherently individuals are given the power to post offensive remarks or pictures that could potentially cause a great amount of emotional pain for another individual.

INTERPERSONAL COMMUNICATIONInterpersonal communication has been a growing issue as more and more people have turned to social networking as a means of communication."Benniger (1987) describes how mass media has gradually replaced interpersonal communication as a socializing force. Further, social networking sites have become popular sites for youth culture to explore themselves, relationships, and share cultural artifacts". A Privacy Paradox Many teens and social networking users may be harming their interpersonal communication by using sites such as Facebook and MySpace. Stated by Baroness Greenfield, an Oxford University Neuroscientist, "My fear is that these technologies are infantilizing the brain into the state of small children who are attracted by buzzing noises and bright lights, who have a small attention span and who live for the moment."[46]

PATENTS

Number of US social network patent applications published per year and patents issued per year There has been rapid growth in the number of US patent applications that cover new technologies related to social networking. The number of published applications has been growing rapidly since 2003. There are now over 3500 published applications. As many as 7000 applications may be currently on file including those that haven't been published yet.[47] Only about 400 [48] of these applications have issued as patents, however, largely due to the multi-year backlog in examination of business method patents and the difficulty in getting these patent applications allowed.[49] 17

It has been reported that social networking patents are important for the establishment of new start up companies.[50] It has also been reported, however, that social networking patents inhibit innovation.[51] On June 15, 2010, the United States Patent and Trademark Office awarded Amazon.com a patent for "Social Networking System" based on its ownership of PlanetAll.[52] The patent describes a Social Networking System as A networked computer system provides various services for assisting users in locating, and establishing contact relationships with, other users. For example, in one embodiment, users can identify other users based on their affiliations with particular schools or other organizations. The system also provides a mechanism for a user to selectively establish contact relationships or connections with other users, and to grant permissions for such other users to view personal information of the user. The system may also include features for enabling users to identify contacts of their respective contacts. In addition, the system may automatically notify users of personal information updates made by their respective contacts.[53] The patent has garnered attention due to its similarity to the popular social networking site Facebook.[54]

INVESTIGATIONSMain article: Use of social network websites in investigations Social networking services are increasingly being used in legal and criminal investigations. Information posted on sites such as MySpace and Facebook has been used by police (forensic profiling), probation, and university officials to prosecute users of said sites. In some situations, content posted on MySpace has been used in court.[55] Facebook is increasingly being used by school administrations and law enforcement agencies as a source of evidence against student users. The site, the number one online destination for college students, allows users to create profile pages with personal details. These pages can be viewed by other registered users from the same school which often include resident assistants and campus police who have signed-up for the service.[56] One UK police force has sifted pictures from Facebook and arrested some people who had been photographed in a public place holding a weapon such as a knife (having a weapon in a public place is illegal).[57]

APPLICATION DOMAINS GOVERNMENT APPLICATIONS

18

Social networking is more recently being used by various government agencies. Social networking tools serve as a quick and easy way for the government to get the opinion of the public and to keep the public updated on their activity. The Centers for Disease Control demonstrated the importance of vaccinations on the popular children's site Whyville and the National Oceanic and Atmospheric Administration has a virtual island on Second Life where people can explore underground caves or explore the effects of global warming.[58] Similarly, NASA has taken advantage of a few social networking tools, including Twitter and Flickr. They are using these tools to aid the Review of U.S. Human Space Flight Plans Committee, whose goal it is to ensure that the nation is on a vigorous and sustainable path to achieving its boldest aspirations in space.[59]

BUSINESS APPLICATIONSThe use of social networking services in an enterprise context presents the potential of having a major impact on the world of business and work (Fraser & Dutta 2008). Social networks connect people at low cost; this can be beneficial for entrepreneurs and small businesses looking to expand their contact bases. These networks often act as a customer relationship management tool for companies selling products and services. Companies can also use social networks for advertising in the form of banners and text ads. Since businesses operate globally, social networks can make it easier to keep in touch with contacts around the world. One example of social networking being used for business purposes is LinkedIn.com, which aims to interconnect professionals. LinkedIn has over 100 million users in over 200 countries.[60] Another is the use of physical spaces available to members of a social network such as Hub Culture, an invitation only social network for entrepreneurs, and other business influentials, with Pavilions in major cities such as London, UK. Having a physical presence allows members to network in the real world, as well as the virtual, adding extra business value. Applications for social networking sites have extended toward businesses and brands are creating their own, high functioning sites, a sector known as brand networking. It is the idea a brand can build its consumer relationship by connecting their consumers to the brand image on a platform that provides them relative content, elements of participation, and a ranking or score system. Brand networking is a new way to capitalize on social trends as a marketing tool.

DATING APPLICATIONS

19

See also: Online dating service Many social networks provide an online environment for people to communicate and exchange personal information for dating purposes. Intentions can vary from looking for a one time date, short-term relationships, and long-term relationships.[61] Most of these social networks, just like online dating services, require users to give out certain pieces of information. This usually includes a user's age, gender, location, interests, and perhaps a picture. Releasing very personal information is usually discouraged for safety reasons.[62] This allows other users to search or be searched by some sort of criteria, but at the same time people can maintain a degree of anonymity similar to most online dating services. Online dating sites are similar to social networks in the sense that users create profiles to meet and communicate with others, but their activities on such sites are for the sole purpose of finding a person of interest to date. Social networks do not necessarily have to be for dating; many users simply use it for keeping in touch with friends, and colleagues.[63] However, an important difference between social networks and online dating services is the fact that online dating sites usually require a fee, where social networks are free.[64] This difference is one of the reasons the online dating industry is seeing a massive decrease in revenue due to many users opting to use social networking services instead. Many popular online dating services such as Match.com, Yahoo Personals, and eHarmony.com are seeing a decrease in users, where social networks like MySpace and Facebook are experiencing an increase in users.[65] The number of internet users in the U.S. that visit online dating sites has fallen from a peak of 21% in 2003 to 10% in 2006.[66] Whether its the cost of the services, the variety of users with different intentions, or any other reason, it is undeniable that social networking sites are quickly becoming the new way to find dates online.

EDUCATIONAL APPLICATIONSThe National School Boards Association reports that almost 60 percent of students who use social networking talk about education topics online and, surprisingly, more than 50 percent talk specifically about schoolwork. Yet the vast majority of school districts have stringent rules against nearly all forms of social networking during the school day even though students and parents report few problem behaviors online. Social networks focused on supporting relationships between teachers and their students are now used for learning, educator professional development, and content sharing. Ning for teachers, Learn Central,[67] TeachStreet and other sites are being built to foster relationships that include educational

20

blogs, eportfolios, formal and ad hoc communities, as well as communication such as chats, discussion threads, and synchronous forums. These sites also have content sharing and rating features. Social networks are also emerging as online yearbooks, both public and private. One such service is MyYearbook which allows anyone from the general public to register and connect. A new trend emerging are private label yearbooks only accessible by students, parents and teachers of a particular school similar to Facebook beginning within Harvard.[citation needed]

FINANCE APPLICATIONSThe use of virtual currency systems inside social networks create new opportunities for global finance. Hub Culture operates a virtual currency Ven used for global transactions among members, product sales[68] and financial trades in commodities and carbon credits. [69] [70] In May 2010, Carbon pricing contracts were introduced to the weighted basket of currencies and commodities that determine the floating exchange value of Ven. The introduction of carbon to the calculation price of the currency made Ven the first and only currency that is linked to the environment.[71]

MEDICAL APPLICATIONSSocial networks are beginning to be adopted by healthcare professionals as a means to manage institutional knowledge, disseminate peer to peer knowledge and to highlight individual physicians and institutions. The advantage of using a dedicated medical social networking site is that all the members are screened against the state licensing board list of practitioners.[72]

The role of social networks is especially of interest to pharmaceutical companies who spend approximately "32 percent of their marketing dollars" attempting to influence the opinion leaders of social networks.[73] A new trend is emerging with social networks created to help its members with various physical and mental ailments.[74] For people suffering from life altering diseases, PatientsLikeMe offers its members the chance to connect with others dealing with similar issues and research patient data related to their condition. For alcoholics and addicts, SoberCircle gives people in recovery the ability to communicate with one another and strengthen their recovery through the encouragement of others who can relate to their situation. DailyStrength is also a website that offers support groups for a wide array of topics and conditions, including the support topics offered by PatientsLikeMe and SoberCircle. SparkPeople offers community and social networking tools for peer support during weight loss.

21

OPEN SOURCE SOFTWAREThere are a number of projects that aim to develop free and open source software to use for social networking services. The projects include Anahita Social Engine[75], Diaspora, Appleseed Project[76] and OneSocialWeb.[77]

This project is divided into four parts which correspond to the four layers of the logical architecture of the project. The users of the project interact with Presentation Layer. The Business Logic Layer (BLL) provides the internal computation of the requirements. The Data Access Layer (DAL) is the intermediate layer which communicates with the DATABASE

In this project there are two Modules: Admin Module: Edit, manage, change country,state and category details Add notifications/news Resources & Updates Analysis feedback and reply to user

User Module: User can create its account Purchase products through paypal account Search Product.

The main functions of the Social networking are as stated under:

Registration of Customers. Enable the Customer to shop online by simply clicking mouse. Provide Auction of old products for bidding.

22

Maintaining the database using SQL Server 2008. Suitable help/error messages for better user interface.

2.3OBJECTIVES OF THE SOCIAL NETWORKINGMost social networking websites are supported by paid advertisements that appear on member pages. Because of this, most social networking websites do not carry membership charges and offer free services to all users. What does that mean? The features and benefits of social networking websites are available to companies with any budget!

SHARE Feature: Personal profiles. Create and customize a profile with certain content such as name, location, interests, website links, and more. Benefit: Share your story, success, services and products with the community on your social networking website.

SHOW Feature: Personal user image. Upload a user image to represent you on the social networking website. Benefit: The social community can put a face with your name, and come to recognize you based on your familiar avatar.

23

SOCIALIZEFeature: Communicate with text-based comments. Many social networks allow you to communicate with friends either by private e-mail-like correspondence, public message board-like posts, or both. Benefit: Stay in touch with contacts, reach out to new people, and show the community you care about company-to-client communication!

THE GOAL OF SOCIAL NETWORKING WEBSITESSocial networking websites are designed to allow members to connect and communicate with one another - so features of these sites foster interaction, activity, and of course, community.

24

Key Tasks of the Project: To prepare database. To prepare stored procedures. To prepare Business Logic Layer. To prepare web pages. To handle the control navigation from other pages Writing the Code Behind pages for the web pages. Database Design Writing Stored Procedures. Apply all the check constraints according to the requirements. Designing all the classes for Business Logic Layer (BLL).

25

REQUIREMENT ANALYSIS

26

4.REQUIREMENT ANALYSIS:

It involves obtaining a clear and thorough understanding of the product to be developed i.e. what is the problem? Why is it important to solve the problem? What are the solutions? Etc. It includes two things:1. Requirement Gathering: In the Requirement Gathering we take the interviews of end-users and customers to collect all possible information regarding the Social networking .Wine followed the method of Questionnaire to get the requirements of the online examination system that we got from them are following. The new system provides information about the latest products and offers that are given . The new system help you to buy products of different categories and also able to do auction of old items. Customers are able to search products of their own choice from one place in one go.

Users are able to chat with customer care who is available 24X7 hrs in case of lack of understanding.

The system should generic not complex. The new system provide the easy way to contact to the team members.. The system should be efficient and fast.

27

Only authorized user may access the system and make easy retrieval of data.

2. Analysis of Gathered Requirements: The main purpose of analysis of the collected information is to clearly understand the exact requirements of the clients and resolve anomalies, conflicts, and inconsistencies in the gathered requirements. The system should give the appropriate error message if there is some wrong thing done by user. The system gives the informations about latest products time to time. The system provides role base security. The unique login_id should be assigned to each user. The system is easy to use and user friendly.

Once the initial investigation is done and the need for new or improved system is established, all possible alternate solutions are chalked out. All these systems are known as "User systems". All the User systems are then weighed and the best alternative of all these is selected as the solution system, which is termed as the "proposed system". According to need of Social networking user can do shopping online at their home place by just clicking mouse. The Social networking is evaluated for its feasibility. Feasibility for a system means whether Preliminar Analysis y it is practical and beneficial to build that system. Investigati on Implementation and Maintenance to be introduced If new additions are Start in the Design system Stop Testing Development/ 28 Coding

Fig.1 Stages of system development

4.2 REQUIREMENT SPECIFICATION DOCUMENT CONSISTING OF:

4.2.1 INTRODUCTION TO SRSThe requirement Analysis and Specification phase is undertaken because Social networking feasibility study phase is complete and this project is technically and financially feasible for the NEW technologies .After completion of analysis, the analyst has a firm understanding of what is to be done.

REQUIREMENT SPECIFICATION:

It includes SRS document i.e. Software Requirement Specification. An SRS document should clearly include the following: Functional requirements of the system

29

Non functional requirements of the system

Proposed System

The proposed System is basically a web based application means so it is secure and only authorized user access it. Users: has been provided with the following functionality:

Perform online registration to the user. Enable the Customer to shop online by simply clicking mouse. Provide Auction of old products for bidding The system gives the informations about latest products time to time. The system provides role base security Provide result instantly.

(a) Functional description:

Authorized Login: The user has to enter Valid or existing username and password for the security purpose. After the successful login user can give the exam and can do many other authorized works.

New Client Registration: If new student want to use services completely then he/she has to first do registration and fill the registration form to get their unique identification to move to the next step and then he/she will be allowed to use all the facilities.

Feedback: The user can give the feedback by entering username, email_id and comments and rating about the usage of site.

(b) Non-functional requirements:

30

This includes the characteristics that can not be expressed such as maintainability, usability, security etc. Portability: The system is portable as it can be easily made to work with different operating systems and in different machines because .Net technology is being used. Usability: The different category of users can easily invoke the functions of the project because links are provided for the guidance, terms and conditions, provided on the home page. Maintainability: At any time when information is to be updated, previous information is also shown so that updating can be done easily and new functions can also be easily added. Security: The system is safe to use and provides reliable information regarding product at various level and only authorized user can view the detail. If an unauthorized user tries to access the account no,, an error message with wrong name and user id would appear. Interfaces: GUI based interface with user

4.2.2 CERTAIN SPECIFIC REQUIREMENTS

HARDWARE AND SOFTWARE REQUIREMENTS

The system must have the following hardware requirements:

31

Pentium IV Processors 320 MB of RAM 3GB of Hard Disk One SQL based server Client Machine One domain name space to implement Web based services

The system must have the following software requirements:

Client OS with .NET framework 3.5 Server OS with .NET framework 3.5 MS SQL DBMS (2008)

32

DESIGNING

5. SOFTWARE DESIGNIntroduction Software Design aims to identify the modules that should be in the system, the specification of these modules and how they interact with each other to produce the desired result.

33

Software design goes through two phases of development 1. 2. Logical Design Physical Design

LOGICAL DESIGN : The logical design of an information system is analogous to an engineering blue print of an Project. It shows the major features and how they are related to one another.

Input Design:The input design is the link that ties the information system into the users world. Input specifications describe the manner in which data enters the system for processing.

WEB DESIGN METHODOLOGY FOLLOWED: Bottom-up Approach:If application(web enabled) developer dont have a good idea of what the final application will look like, but they know how specific pages will look and work, working from these specific pages to the top might be the way to proceed. This approach has been followed in the development of the project for Social networking. The structure of the home page couldnt be decided till all pages were designed like in project Social networking all the pages(leaves) like About us, Contact us, Practice Papers, Special Offer is connected to the home page. so the bottom-up approach has to be followed. The designing of this project begins by designing of leaves or pages that accomplish the specific objectives and then links were provided through intermediate pages to the top page. The benefit of this design is that the designing of the leaf pages is not constrained by the style of the top page. Instead the leaf pages are designed in exactly the right style

34

based on their function. Later these pages are adjusted to create a common look and feel for the whole web.

Design Techniques:Design techniques relate to information-shaping skills to meet departments needs. Package Information in the Appropriately Sized Chunks. The Social networking project is mainly divided in to three modules. The first module deals with the Registration contents of the user, the second module deals with login methodology and services provided to the user and third module deals with the purchasing and auction of products.

REGISTRATION CONTENTS: New Registration LOGIN METHODOLOGY AND SERVICES PROVIDED

Role base security Friends search Messages Mails Photos

FEEDBACK TAKEN FROM USERS

Take the feedback from the Users

35

5.1 TABLE STRUCTUREWhat is a Database? It is a coherent collection of data with some inherent meaning, designed, built and populated with data for a specific purpose. A database stores data that is useful to us. USERS TABLE

36

ADDRESS TABLE

APPLICATIONS TABLE

37

CITIES TABLE

38

CONTINENT TABLE

COUNTRY TABLE

39

STATE TABLE

CITY TABLE

40

EVENTS TABLE

41

FIELDTYPE TABLE

FRIENDS TABLE

42

FRIENDS REQ. TABLE

43

GIFTS TABLE

GROUPS TABLE

44

MASTERS TABLE

45

MESSAGES TABLE

ONLINE FRIENDS TABLE:

46

PHOTO ALBUM TABLE

47

PHOTOS TABLE

PHOTO TAG TABLE

48

ROLES TABLE

49

USER PIC TABLE

USER COMMENTS TABLE

50

USERS TO EVENTS TABLE

USERS TO GROUPS TABLE

51

USERS TO VIDEO TABLE

52

USERS VISITED

VIDEOS TABLE

53

5.3DATAFLOW DIAGRAMS Data movement shown by tagged arrows. Transformation or process of data shown by named bubbles. Sources and destination of data represented by named rectangles. Static storage or data at rest denoted by an open rectangle that is named.

DFD Symbols

A square defines a source of destination or system data.

54

An arrow line identifies the data flow or data in motion. It is a pipeline through which information flows.

A circle or bubble represents a process transform incoming data flow in to outgoing data flow.

A horizontal line represents data stored or data at rest or a temporary rest repository of data.

An open rectangle refers to the database storage

55

User

User

Registrati on

Registratio n Table

Login FRIEND REQUEST

Searc h ACCEPT OR REJECT Produ ct

MESS AGES Reques t

PHOT OES

Dataflow Diagram of SOCIAL NETWORKING d

.

56

Flowchart

57

Start

Login to user Or Administrator

Is User new or existi ng?

If new user

Registration SEARCH FRIEND

oor Request REQUEST Approval

oor

oor Stop

58

59

LAYOUTS

HOME PAGE:

60

LOGIN PAGE:

61

REGISTRATION PAGE:

62

USERDETAIL:

63

64

AUCTION PER- PRODUCT PAGE:

ADMIN/COUNTRY PAGE:

65

ADMIN/UPDATE PAGE:

66

ADMIN/STATE PAGE:

ADMIN/STATE UPDATE PAGE:

67

68

CODING

6.CODING:

69

HomePage SourceCode:

Computer Store function abc() { document.getElementById("popup").style.display = ''; document.getElementById("backdiv").style.display = ''; }

70

Quick search search for:

Advanced search

Best selection of premium Joomla 1.6 templates Categories

71


SignInOr

  • Register

    72

  • Categories

Supplier PhotoCenter Latest News Help

SignIn


Available Products

73

74

New products Apple TV$199 Mac Pro$2,000 iMac$1,099 Apple TV$199 Mac Pro$2,000 iMac$1,099

Donec ipsum turpis Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi placerat accumsan dolor, quis ullamcorper ante tincidunt nec. Nullam ac sapien metus, eu pellentesque lectus. Cras nisi ligula, posuere non pretium eu, varius at orci. Integer lacus eros, convallis eu imperdiet eu, pretium et est. Copyright Statement Design by Dreamtemplatestudio

75

More Free Website Templates at WTO

HomePage.aspx.csusing System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Ecommerce; using System.Data;

public partial class HomePage : System.Web.UI.Page {

clsHomePage objHomePage; Int32 status; Exception objExp; DataTable datbl;

protected void Page_Load(object sender, EventArgs e)

76

{ GetCategory(); GetDynamicImage(); }

private void GetCategory() { try { objHomePage = new clsHomePage(); datbl = objHomePage.GetAllCategory(out objExp, out status); if (status > 0) { lstCategory.DataSource = datbl; lstCategory.DataBind(); } else if (status == 0) lblMsg.Text = "No Record Found"; else lblMsg.Text = objExp.Message.ToString(); } catch (Exception exp) { lblMsg.Text = exp.Message.ToString(); } } private void GetUsers() { try {

77

objHomePage = new clsHomePage(); datbl = objHomePage.GetAllUsers(out objExp, out status); } catch (Exception exp) { lblMsg.Text = exp.Message.ToString(); } }

private void GetDynamicImage() { try { objHomePage = new clsHomePage(); objHomePage.prpinitId = 2; objHomePage.prpbtwId = 17; datbl = objHomePage.GetRandomImage(out objExp, out status); if (status > 0) { lstDynamicImage.DataSource = datbl; lstDynamicImage.DataBind(); } else if (status == 0) lblMsg.Text = "No Record Found"; else lblMsg.Text = objExp.Message.ToString();

} catch (Exception exp) {

78

lblMsg.Text = exp.Message.ToString(); } } protected void lstCategory_ItemCommand(object sender, ListViewCommandEventArgs e) { if (e.CommandName == "CategoryClick") { Response.Redirect("ProductsPerCategory.aspx?catId="+e.CommandArgument.ToString()); } } protected void Button1_Click(object sender, EventArgs e) { Int32 i; GetUsers(); i = datbl.Rows.Count - 1; if (status > 0) { while (i > -1) { if (datbl.Rows[i][0].ToString() == txtUserName.Text && datbl.Rows[i][1].ToString() == txtPassword.Text) { Session["loginUser"] = txtUserName.Text; Response.Redirect("Default.aspx");

} i--; }

} }

79

}

App_Code/Business layer/clsHomepageMaster.cs:

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data;

namespace Ecommerce { interface iHomePage { Int32 prpCategoryId { get; set; }

String prpCategory { get; set; }

Int32 prpParentCategoryId {

80

get; set; }

Int32 prpinitId { get; set; }

Int32 prpbtwId { get; set; } } }

App_Code/BusinessLayer/clsHomePage.cs

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data.SqlClient; using System.Data; using Ecommerce;

public class clsHomePage:iHomePage {

81

#region Variable Declaration DataAccessLayer objDAL; SqlDataAdapter adp; SqlCommand cmd; DataTable dt;

Int32 intCategoryId; String strCategory; Int32 intParentCategoryId; Int32 intInitId; Int32 intBtwId;

#endregion

public int prpCategoryId { get { return intCategoryId; } set { intCategoryId = value; } }

public string prpCategory {

82

get { return strCategory; } set { strCategory = value; } }

public int prpParentCategoryId { get { return intParentCategoryId; } set { intParentCategoryId = value; } }

public int prpinitId { get { return intInitId; } set {

83

intInitId = value; } }

public int prpbtwId { get { return intBtwId; } set { intBtwId = value; } }

public DataTable GetAllCategory(out Exception objExp, out int status) { try { adp = new SqlDataAdapter(new SqlCommand("select * from Category where ParentCategoryId is Null")); adp.SelectCommand.Parameters.Add("ReturnValue", SqlDbType.Int).Value = 1; objDAL = new DataAccessLayer(); status = objDAL.ExecuteDataAdapter(out objExp, adp, out dt); return dt; } catch (Exception exp) { objExp = exp; status = -1;

84

throw exp; } }

public DataTable GetAllUsers(out Exception objExp, out int status) { try { adp = new SqlDataAdapter(new SqlCommand("select UserName,Password from Users")); objDAL = new DataAccessLayer(); status = objDAL.ExecuteDataAdapter(out objExp, adp, out dt); return dt; } catch (Exception exp) { objExp = exp; status = -1; throw exp; } }

public DataTable GetRandomImage(out Exception objExp, out int status) { try { adp = new SqlDataAdapter(new SqlCommand("select * from Picture where id between @initId and @btwId")); adp.SelectCommand.Parameters.Add("@initId", SqlDbType.Int).Value = prpinitId; adp.SelectCommand.Parameters.Add("@btwId", SqlDbType.Int).Value = prpbtwId; objDAL = new DataAccessLayer(); status = objDAL.ExecuteDataAdapter(out objExp, adp, out dt);

85

return dt; } catch (Exception exp) { objExp = exp; status = -1; throw exp; } } }

DataAccessLayer.cs

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

namespace Ecommerce { public class DataAccessLayer { public int ExecuteDataAdapter(out Exception objExp, SqlDataAdapter adp, out DataTable datbl) { objExp = null; datbl = new DataTable(); //ds = new DataSet();

86

SqlConnection con = new SqlConnection(); try { con.ConnectionString = ConfigurationManager.ConnectionStrings["cn"].ConnectionString; con.Open(); adp.SelectCommand.Connection = con; adp.Fill(datbl); adp.Dispose(); if(datbl.Rows.Count>0) return 1; else return 0; } catch (Exception exp) { objExp = exp; return -1; } }

public int ExecuteNonQuery(out Exception objExp, SqlCommand cmd) { objExp = null; SqlConnection con = new SqlConnection(); try { con.ConnectionString = ConfigurationManager.ConnectionStrings["cn"].ConnectionString; if (con.State == ConnectionState.Closed) con.Open();

87

cmd.Connection = con; int intRowAffected = cmd.ExecuteNonQuery(); con.Close(); cmd.Dispose(); if (intRowAffected > 0) return 1; else return 0; } catch(Exception exp) { objExp=exp; return -1; }

}

}

}

Register Page Source code:

88


Register Here

&nbsp ;& nbsp;

&nbsp ;& nbsp;

& nbsp;

89



&nbsp ;& nbsp; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

90

25 26 27 28 29 30 31 Jan Feb March April May June July August September Oct Nov Dec 1965 1966 1967 1968 1969 1970 1971

91

1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990

&nbsp ;& nbsp;&nb sp; Who is ur favourite sports person? Name ur favourite teacher? Ur favourite cusine? Ur nick name?

92

&nbsp ;& nbsp;

&nbs p; &n bsp;
&n bsp;&nbs p;

RegisterPage.aspx.cs

using System; using System.Collections.Generic;

93

using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;

public partial class SignUp : System.Web.UI.Page { clsSignUp objSignUp; Exception objExp; Int32 intStatus; String strUserName;

protected void Page_Load(object sender, EventArgs e) {

}

private void SaveUser() { try { objSignUp = new clsSignUp(); objSignUp.prpUserId = -1; objSignUp.prpUsername = txtUserName.Text; ; objSignUp.prpPassword = txtPassword.Text; ; objSignUp.prpRoleId = 1; objSignUp.prpDate = DateTime.Now.ToLocalTime(); objSignUp.prpIsActive = 1;

94

objSignUp.prpIsDeleted = 0; objSignUp.prpQuestion = droQuestion.SelectedItem.Text; objSignUp.prpAnswer = txtAnswer.Text; objSignUp.prpDateOfBirth = drpDate.SelectedItem.Text + drpMonth.SelectedItem.Text + drpYear.SelectedItem.Text; objSignUp.SaveUser(out objExp, out intStatus); if (intStatus < 0) { Response.Write(objExp.Message.ToString()); } else if (intStatus == 0) { Response.Write("Record already exists"); } else { strUserName = txtUserName.Text; Session["uname"] = strUserName; Response.Redirect("UserDetail.aspx"); } } catch (Exception exp) { Response.Write(exp.Message.ToString()); } } protected void btnSaveAndContinue_Click(object sender, EventArgs e) { SaveUser();

95

} }

App_Code/Business Layer/clsRegisterMaster.csusing System; using System.Collections.Generic; using System.Linq; using System.Web;

namespace Ecommerce { interface iSignUp { Int32 prpUserId { get; set; }

String prpUsername { get; set; }

String prpPassword { get;

96

set; }

Int32 prpRoleId { get; set; }

DateTime prpDate { get; set; }

Int32 prpIsActive { get; set; }

Int32 prpIsDeleted { get; set; }

String prpDateOfBirth { get;

97

set; }

String prpQuestion { get; set; }

String prpAnswer { get; set; }

String prpEmail { get; set; }

String prpFirstName { get; set; }

String prpLastName { get;

98

set; }

String prpAddress { get; set; }

Int32 prpCityId { get; set; }

String prpCity { get; set; }

String prpZip { get; set; }

String prpPhone { get;

99

set; }

Int32 prpSaveOrUpdate { get; set; }

Int32 prpCountryId { get; set; }

String prpCountry { get; set; }

Int32 prpContinentId { get; set; }

String prpContinent { get;

100

set; }

Int32 prpStateId { get; set; }

String prpState { get; set; }

void SaveUser(out Exception objExp, out Int32 Status);

} }

App_Code/BL/clsRegister.csusing System; using System.Collections.Generic; using System.Linq; using System.Web; using Ecommerce; using System.Data; using System.Data.SqlClient;

101

public class clsSignUp : iSignUp { #region Variable Declaration DataAccessLayer objDAL; SqlDataAdapter adp; SqlCommand cmd; DataTable dt;

Int32 intUserId; String strUserName; String strPassword; Int32 intRoleId; DateTime dtDate; Int32 intIsActive; Int32 intIsDeleted; String strDateOfBirth; String strQuestion; String strAnswer; String strEmail; String strFirstName; String strLastName; String strAddress; Int32 intCountryId; String strCountry; Int32 intContinentId; String strContinent; Int32 intStateId;

102

String strState; String strCity; Int32 intCityId; String strZip; String strPhone; Int32 intSaveOrUpdate;

#endregion

public int prpUserId { get { return intUserId; } set { intUserId = value; } }

public string prpUsername { get { return strUserName; }

103

set { strUserName = value; } }

public string prpPassword { get { return strPassword; } set { strPassword = value; } }

public int prpRoleId { get { return intRoleId; } set { intRoleId = value; } }

104

public DateTime prpDate { get { return dtDate; } set { dtDate = value; } }

public int prpIsActive { get { return intIsActive; } set { intIsActive = value; } }

public int prpIsDeleted { get { return intIsDeleted; }

105

set { intIsDeleted = value; } }

public string prpDateOfBirth { get { return strDateOfBirth; } set { strDateOfBirth = value; } }

public string prpQuestion { get { return strQuestion; } set { strQuestion = value; } }

106

public string prpAnswer { get { return strAnswer; } set { strAnswer = value; } }

public string prpEmail { get { return strEmail; } set { strEmail = value; } }

public string prpFirstName { get { return strFirstName; }

107

set { strFirstName = value; } }

public string prpLastName { get { return strLastName; } set { strLastName = value; } }

public string prpAddress { get { return strAddress; } set { strAddress = value; } }

108

public int prpCityId { get { return intCityId; } set { intCityId = value; } }

public string prpCity { get { return strCity; } set { strCity = value; } }

public string prpZip { get { return strZip; }

109

set { strZip = value; } }

public string prpPhone { get { return strPhone; } set { strPhone = value; } }

public int prpSaveOrUpdate { get { return intSaveOrUpdate; } set { intSaveOrUpdate = value; } }

110

public int prpCountryId { get { return intCountryId; } set { intCountryId = value; } }

public string prpCountry { get { return strCountry; } set { strCountry = value; } }

public int prpContinentId { get { return intContinentId; }

111

set { intContinentId = value; } }

public string prpContinent { get { return strContinent; } set { strContinent = value; } }

public int prpStateId { get { return intStateId; } set { intStateId = value; } }

112

public string prpState { get { return strState; } set { strState = value; } }

public void SaveUser(out Exception objExp, out int Status) { objExp = null; try { objDAL = new DataAccessLayer(); cmd = new SqlCommand("SpInsertUpdateUsers"); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@PkId", SqlDbType.Int).Value = -1; cmd.Parameters.Add("@UserName", SqlDbType.VarChar, 30).Value = prpUsername; cmd.Parameters.Add("@Password", SqlDbType.VarChar, 30).Value = prpPassword; cmd.Parameters.Add("@RoleId", SqlDbType.Int).Value = prpRoleId; cmd.Parameters.Add("@Date", SqlDbType.VarChar, 30).Value = prpDate; cmd.Parameters.Add("@IsActive", SqlDbType.Int).Value = prpIsActive; cmd.Parameters.Add("@IsDeleted", SqlDbType.Int).Value = prpIsDeleted; cmd.Parameters.Add("@DateOfBirth", SqlDbType.VarChar, 80).Value = prpDateOfBirth; cmd.Parameters.Add("@Question", SqlDbType.VarChar, 300).Value = prpQuestion; cmd.Parameters.Add("@Answer", SqlDbType.VarChar, 300).Value = prpAnswer;

113

cmd.Parameters.Add("@ReturnValue", SqlDbType.Int).Direction = ParameterDirection.Output;

Status = objDAL.ExecuteNonQuery(out objExp, cmd); //Status = Convert.ToInt32(cmd.Parameters["@ReturnValue"].Value);

}

catch (Exception exp) { objExp = exp; Status = -1; throw exp; }

}

public void SaveCity(out Exception objExp, out int Status) { objExp = null; try { objDAL = new DataAccessLayer(); cmd = new SqlCommand("SpInsertUpdateCity"); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@PkId", SqlDbType.Int).Value =-1; cmd.Parameters.Add("@City", SqlDbType.VarChar, 30).Value = prpCity; cmd.Parameters.Add("@StateId", SqlDbType.Int).Value = prpStateId; cmd.Parameters.Add("@ReturnValue", SqlDbType.Int).Direction = ParameterDirection.Output;

Status = objDAL.ExecuteNonQuery(out objExp, cmd);

114

//Status = Convert.ToInt32(cmd.Parameters["@ReturnValue"].Value);

}

catch (Exception exp) { objExp = exp; Status = -1; throw exp; }

}

public void SaveUserDetail(out Exception objExp, out int Status) { objExp = null; try { objDAL = new DataAccessLayer(); cmd = new SqlCommand("SpInsertUpdateUserDetail"); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@UserId", SqlDbType.Int).Value = prpUserId; cmd.Parameters.Add("@Email", SqlDbType.VarChar, 50).Value = prpEmail; cmd.Parameters.Add("@FirstName", SqlDbType.VarChar, 30).Value = prpFirstName; cmd.Parameters.Add("@LastName", SqlDbType.VarChar,30).Value = prpLastName; cmd.Parameters.Add("@Address", SqlDbType.VarChar, 30).Value = prpAddress; cmd.Parameters.Add("@CityId", SqlDbType.Int).Value = prpCityId; cmd.Parameters.Add("@Zip", SqlDbType.VarChar, 20).Value = prpZip; cmd.Parameters.Add("@PhoneNo", SqlDbType.VarChar, 30).Value = prpPhone; cmd.Parameters.Add("@SaveOrUpdate", SqlDbType.Int).Value = prpSaveOrUpdate;

115

cmd.Parameters.Add("@ReturnValue", SqlDbType.Int).Direction = ParameterDirection.Output;

Status= objDAL.ExecuteNonQuery(out objExp,cmd); //Status = Convert.ToInt32(cmd.Parameters["@ReturnValue"].Value);

}

catch (Exception exp) { objExp = exp; Status = -1; throw exp; }

}

public DataTable GetAllContinent(out Exception objExp, out int status) { try { adp = new SqlDataAdapter(new SqlCommand("SpSelectAllContinent")); adp.SelectCommand.CommandType = CommandType.StoredProcedure; adp.SelectCommand.Parameters.Add("ReturnValue", SqlDbType.Int).Value = 1; objDAL = new DataAccessLayer(); status = objDAL.ExecuteDataAdapter(out objExp, adp, out dt); return dt; } catch (Exception exp) { objExp = exp;

116

status = -1; throw exp; } }

public DataTable GetAllCountry(out Exception objExp, out int status) { try { adp = new SqlDataAdapter(new SqlCommand("SpSelectAllCountry")); adp.SelectCommand.CommandType = CommandType.StoredProcedure; adp.SelectCommand.Parameters.Add("ReturnValue", SqlDbType.Int).Value = 1; objDAL = new DataAccessLayer(); status = objDAL.ExecuteDataAdapter(out objExp, adp, out dt); return dt; } catch (Exception exp) { objExp = exp; status = -1; throw exp; } }

public DataTable GetAllState(out Exception objExp, out int status) { try { adp = new SqlDataAdapter(new SqlCommand("SpSelectAllState")); adp.SelectCommand.CommandType = CommandType.StoredProcedure;

117

adp.SelectCommand.Parameters.Add("ReturnValue", SqlDbType.Int).Value = 1; objDAL = new DataAccessLayer(); status = objDAL.ExecuteDataAdapter(out objExp, adp, out dt); return dt; } catch (Exception exp) { objExp = exp; status = -1; throw exp; } }

public DataTable GetAllCity(out Exception objExp, out int status) { try { adp = new SqlDataAdapter(new SqlCommand("SpSelectAllCity")); adp.SelectCommand.CommandType = CommandType.StoredProcedure; adp.SelectCommand.Parameters.Add("ReturnValue", SqlDbType.Int).Value = 1; objDAL = new DataAccessLayer(); status = objDAL.ExecuteDataAdapter(out objExp, adp, out dt); return dt; } catch (Exception exp) { objExp = exp; status = -1; throw exp; }

118

}

public DataTable GetSelectedCountry(out Exception objExp, out int status) { try { adp = new SqlDataAdapter(new SqlCommand("select Id,Country from Country where [email protected]")); adp.SelectCommand.Parameters.Add("@ContinentId", SqlDbType.Int).Value = prpContinentId; objDAL = new DataAccessLayer(); status = objDAL.ExecuteDataAdapter(out objExp, adp, out dt); return dt; } catch (Exception exp) { objExp = exp; status = -1; throw exp; } }

public DataTable GetParticularUser(out Exception objExp, out int status) { try { adp = new SqlDataAdapter(new SqlCommand("select Id from Users where [email protected]")); adp.SelectCommand.Parameters.Add("@UserName", SqlDbType.VarChar, 30).Value = prpUsername; objDAL = new DataAccessLayer(); status = objDAL.ExecuteDataAdapter(out objExp, adp, out dt); return dt; }

119

catch (Exception exp) { objExp = exp; status = -1; throw exp; } }

public DataTable GetSelectedState(out Exception objExp, out int status) { try { adp = new SqlDataAdapter(new SqlCommand("select Id,State from State where [email protected]")); adp.SelectCommand.Parameters.Add("@CountryId", SqlDbType.Int).Value = prpCountryId; objDAL = new DataAccessLayer(); status = objDAL.ExecuteDataAdapter(out objExp, adp, out dt); return dt; } catch (Exception exp) { objExp = exp; status = -1; throw exp; } }

public DataTable GetSelectedCityId(out Exception objExp, out int status) { try {

120

adp = new SqlDataAdapter(new SqlCommand("select Id from City where [email protected]")); adp.SelectCommand.Parameters.Add("@City", SqlDbType.VarChar,40).Value = prpCity ; objDAL = new DataAccessLayer(); status = objDAL.ExecuteDataAdapter(out objExp, adp, out dt); return dt; } catch (Exception exp) { objExp = exp; status = -1; throw exp; } }

}

DataAccessLayer:

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

namespace Ecommerce {

121

public class DataAccessLayer { public int ExecuteDataAdapter(out Exception objExp, SqlDataAdapter adp, out DataTable datbl) { objExp = null; datbl = new DataTable(); //ds = new DataSet(); SqlConnection con = new SqlConnection(); try { con.ConnectionString = ConfigurationManager.ConnectionStrings["cn"].ConnectionString; con.Open(); adp.SelectCommand.Connection = con; adp.Fill(datbl); adp.Dispose(); if(datbl.Rows.Count>0) return 1; else return 0; } catch (Exception exp) { objExp = exp; return -1; } }

public int ExecuteNonQuery(out Exception objExp, SqlCommand cmd) { objExp = null;

122

SqlConnection con = new SqlConnection(); try { con.ConnectionString = ConfigurationManager.ConnectionStrings["cn"].ConnectionString; if (con.State == ConnectionState.Closed) con.Open();

cmd.Connection = con; int intRowAffected = cmd.ExecuteNonQuery(); con.Close(); cmd.Dispose(); if (intRowAffected > 0) return 1; else return 0; } catch(Exception exp) { objExp=exp; return -1; }

}

}

}

USERDETAIL.aspx

123

Registration Continue...







&n bsp;&nbs p;

&nbsp ;& nbsp;

&nbsp ;& nbsp;

&nbsp ;& nbsp;

125



& nbsp;&nb sp;

& nbsp;&nb sp;

& nbsp;&nb sp;

& nbsp;&nb

126

sp;

&nbsp ;& nbsp;

&nbsp ;& nbsp;

&n bsp;&nbs p;

127

UserDetail.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;

public partial class _Default : System.Web.UI.Page {

clsSignUp objSignUp; Int32 status; Exception objExp; DataTable datbl; Int32 UserId; Int32 CityId;

protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { GetContinent(); GetCountry(); GetState(); //GetCity(); GetUserId();

128

lblUser.Text = Session["uname"].ToString(); Session["usrId"] = UserId; }

}

private void GetContinent() { try { objSignUp = new clsSignUp(); datbl = objSignUp.GetAllContinent(out objExp, out status); if (status > 0) { drpContinent.DataSource = datbl; drpContinent.DataTextField = "Continent"; drpContinent.DataValueField = "Id"; drpContinent.DataBind();

} else if (status == 0) lblMsg.Text = "No Record Found"; else lblMsg.Text = objExp.Message.ToString();

} catch (Exception exp) { lblMsg.Text = exp.Message.ToString();

129

} }

private void GetCountry() { try { objSignUp = new clsSignUp(); objSignUp.prpContinentId = Convert.ToInt32(drpContinent.SelectedValue); datbl = objSignUp.GetSelectedCountry(out objExp, out status);

if (status > 0) { drpCountry.DataSource = datbl; drpCountry.DataTextField = "Country"; drpCountry.DataValueField = "Id"; drpCountry.DataBind(); } else if (status == 0) lblMsg.Text = "No Record Found"; else lblMsg.Text = objExp.Message.ToString();

} catch (Exception exp) { lblMsg.Text = exp.Message.ToString(); } }

130

private void GetState() { try { objSignUp = new clsSignUp(); objSignUp.prpCountryId = Convert.ToInt32(drpCountry.SelectedValue); datbl = objSignUp.GetSelectedState(out objExp, out status); if (status > 0) { drpState.DataSource = datbl; drpState.DataTextField = "State"; drpState.DataValueField = "Id"; drpState.DataBind(); } else if (status == 0) { drpState.DataSource = datbl; drpState.DataTextField = "State"; drpState.DataValueField = "Id"; drpState.DataBind(); } else lblMsg.Text = objExp.Message.ToString();

} catch (Exception exp) { lblMsg.Text = exp.Message.ToString(); } }

131

private void GetCity() { try { //objSignUp = new clsSignUp(); //objSignUp.prpCity = txtCity.Text; datbl = objSignUp.GetSelectedCityId(out objExp, out status); if (status > 0) { CityId =Convert.ToInt32(datbl.Rows[0][0]); } else if (status == 0) { lblMsg.Text = "No Record Found"; }

else lblMsg.Text = objExp.Message.ToString();

} catch (Exception exp) { lblMsg.Text = exp.Message.ToString(); } }

private void SaveUserDetail() { try

132

{ objSignUp = new clsSignUp(); SaveCityData(); objSignUp.prpUserId =Convert.ToInt32(Session["usrId"]); objSignUp.prpEmail=txtEmail.Text; objSignUp.prpFirstName = txtFirstName.Text; objSignUp.prpLastName = txtLastName.Text; objSignUp.prpAddress = txtAddress.Text; GetCity(); objSignUp.prpCityId = CityId; objSignUp.prpZip = txtZip.Text; objSignUp.prpPhone = txtPhone.Text; objSignUp.prpSaveOrUpdate = -1;

objSignUp.SaveUserDetail(out objExp, out status); if (status < 0) { Response.Write(objExp.Message.ToString()); } else if (status == 0) { Response.Write("Record already exists"); } else { Response.Redirect("UserDetail.aspx"); } } catch (Exception exp) {

133

Response.Write(exp.Message.ToString()); } }

private void SaveCityData() { try {

objSignUp.prpCity = txtCity.Text; objSignUp.prpStateId =Convert.ToInt32(drpState.SelectedValue); objSignUp.SaveCity(out objExp, out status); if (status < 0) { Response.Write(objExp.Message.ToString()); } else if (status == 0) { lblMsg.Text = ""; } else { lblMsg.Text = ""; } } catch (Exception exp) { Response.Write(exp.Message.ToString()); } }

134

private void GetUserId() { try { objSignUp = new clsSignUp(); objSignUp.prpSaveOrUpdate = -1; objSignUp.prpUsername = Session["uname"].ToString(); datbl = objSignUp.GetParticularUser(out objExp, out status); if (status > 0) { UserId =Convert.ToInt32(datbl.Rows[0][0]); } else if (status == 0) lblMsg.Text = "No Record Found"; else lblMsg.Text = objExp.Message.ToString();

} catch (Exception exp) { lblMsg.Text = exp.Message.ToString(); } }

protected void drpContinent_SelectedIndexChanged1(object sender, EventArgs e) { GetCountry(); GetState();

135

//GetCity();

} protected void btnSubmit_Click(object sender, EventArgs e) { SaveUserDetail(); } protected void drpCountry_SelectedIndexChanged(object sender, EventArgs e) { GetState(); //GetCity(); } protected void drpState_SelectedIndexChanged(object sender, EventArgs e) { //GetCity(); } }

AUCTION PER PRODUCT DETAIL.aspx

136

Computer Store

Quick search search for:

Advanced search

137

Best selection of premium Joomla 1.6 templates Categories

  • Hard Drives

Drive Controllers Motherboards CD/DVD-ROM Backup Drives

Video Cards Power Supplies PDA/Handheld PC Projectors Scanners Communication Accessories PC & Notebooks Input Devices Multimedia

138

Network Power Protection Printers Software

www.c0mpany.c0m / welcome

  • News & Reviews

System configurator

Tech support Company

Product_Detail

139














140



New products Apple TV$199 Mac Pro$2,000 iMac$1,099 Apple TV$199 Mac Pro$2,000 iMac$1,099

Donec ipsum turpis Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi placerat accumsan dolor, quis ullamcorper ante tincidunt nec. Nullam ac sapien metus, eu pellentesque lectus. Cras nisi ligula, posuere non pretium eu, varius at orci. Integer lacus eros, convallis eu imperdiet eu, pretium et est.

141

Copyright Statement Design by Dreamtemplatestudio

More Free Website Templates at WTO

AUCTION PER PRODUCT DETAIL.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;

public partial class AuctionPerProductDetail : System.Web.UI.Page { clsAuctionPerProductDetail obj;

142

Int32 status; Exception objExp; DataTable datbl; SqlDataAdapter adp;

protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { ListBind1(); } }

private void ListBind1() { objExp = null; try { obj = new clsAuctionPerProductDetail() ; datbl = obj.GetAuctionProdutDetail(out objExp, out status); if (status > 0) { lstProduct.DataSource = datbl; lstProduct.DataBind();

} else if (status == 0) lblProduct.Text = "No Record Found"; else lblProduct.Text = objExp.Message.ToString();

143

} catch (Exception exp) { lblProduct.Text = exp.Message.ToString(); } }

private void FillAuctionUsers() { objExp = null; try { obj = new clsAuctionPerProductDetail(); datbl = obj.GetAuctionAllUsers(out objExp, out status); if (status > 0) { lstProduct.DataSource = datbl; lstProduct.DataBind();

} else if (status == 0) lblProduct.Text = "No Record Found"; else lblProduct.Text = objExp.Message.ToString();

} catch (Exception exp) { lblProduct.Text = exp.Message.ToString();

144

} }

protected void lstProduct_ItemCommand1(object sender, ListViewCommandEventArgs e) { int i ; int idx = 0; if (e.CommandName == "btnPlaceBid") { obj = new clsAuctionPerProductDetail(); datbl = obj.GetAuctionAllUsers(out objExp, out status); i = datbl.Rows.Count -1; if (status > 0) { while (i > -1) { idx=datbl.Rows.IndexOf(datbl.Rows[i]); if(1==Convert.ToInt32(datbl.Rows[i][1])) {

} i--; } } } } protected void lstProduct_SelectedIndexChanged(object sender, EventArgs e) {

}

145

}

APP_CODE/BL/AUCTIONPERPRODUCTDETAILMASTER.CS

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data;

namespace Ecommerce { interface iAucPerProdDetail {

Int32 prpProductId { get; set; }

String prpProduct { get; set; }

String prpCompany { get;

146

set; }

String prpDescription { get; set; }

Int32 prpPictureId { get; set; }

Int32 prpConditionId { get; set; }

Int32 prpSupplierId { get; set; }

decimal prpPricePerUnit { get;

147

set; }

Int32 prpShippingServiceId { get; set; }

String prpPicture { get; set; }

String prpFieldName { get; set; }

decimal prpPlaceBid { get; set; }

DateTime prpPlaceTime { get;

148

set; }

DataTable GetAuctionProdutDetail(out Exception objExp, out int status); DataTable GetAuctionAllUsers(out Exception objExp, out int status);

} }

APP_CODE/BL/AUCTIONPERPRODUCTDETAIL.CS

using System; using System.Collections.Generic; using System.Linq; using System.Web; using Ecommerce; using System.Data; using System.Data.SqlClient;

public class clsAuctionPerProductDetail:iAucPerProdDetail {

#region Variable Declaration

DataAccessLayer objDAL; SqlDataAdapter adp; SqlCommand cmd;

149

DataTable dt;

Int32 intProductId; String strProduct; String strCompany; String strDescription; Int32 intPictureId; Int32 intConditionId; Int32 intSupplierId; decimal decPricePerUnit; Int32 intShippingServiceId; String strPicture; String strFieldName; decimal decPlaceBid; DateTime dtPlaceTime;

#endregion

public int prpProductId { get { return intProductId; } set { value = intProductId; } }

150

public string prpProduct { get { return strProduct; } set { value = strProduct; } }

public string prpCompany { get { return strCompany; } set { value = strCompany; } }

public string prpDescription { get { return strDescription;

151

} set { value = strDescription; } }

public int prpPictureId { get { return intPictureId; } set { value = intPictureId; } }

public int prpConditionId { get { return intConditionId; } set { value = intConditionId; } }

152

public int prpSupplierId { get { return intSupplierId; } set { value = intSupplierId; } }

public decimal prpPricePerUnit { get { return decPricePerUnit; } set { value = decPricePerUnit; } }

public int prpShippingServiceId { get { return intShippingServiceId;

153

} set { value = intShippingServiceId; } }

public string prpPicture { get { return strPicture; } set { value = strPicture; } }

public string prpFieldName { get { return strFieldName; } set { value = strFieldName; } }

154

public decimal prpPlaceBid { get { return decPlaceBid; } set { value = decPlaceBid; } }

public DateTime prpPlaceTime { get { return dtPlaceTime; } set { value = dtPlaceTime; } }

public DataTable GetAuctionProdutDetail(out Exception objExp, out int status) { try { adp = new SqlDataAdapter(new SqlCommand("select pr.product,pic.picture,ma.fieldname'Product Condition',ma1.fieldname'Shipping',count(auc.userid)'PlaceBid',max(auc.placebid)'Max Bid' from auction auc

155

inner join product pr on auc.productid=pr.id inner join picture pic on pr.pictureid=pic.id inner join master ma on pr.conditionid=ma.id inner join master ma1 on pr.shippingserviceid=ma1.id inner join product pr1 on pr1.id=auc.productid group by auc.productid,pr.id,pr.product,pic.picture,ma.fieldname,ma1.fieldname having pr.id=23")); objDAL = new DataAccessLayer(); status = objDAL.ExecuteDataAdapter(out objExp, adp, out dt); return dt; } catch (Exception exp) { objExp = exp; status = -1; throw exp; } }

public void SavePlaceBid(out Exception objExp, out int Status) { objExp = null; try { objDAL = new DataAccessLayer(); cmd = new SqlCommand("SpInsertUpdateUserDetail"); cmd.CommandType = CommandType.StoredProcedure;

cmd.Parameters.Add("@ReturnValue", SqlDbType.Int).Direction = ParameterDirection.Output;

// Status= objDAL.ExecuteNonQuery(out objExp,cmd); Status = Convert.ToInt32(cmd.Parameters["@ReturnValue"].Value);

}

156

catch (Exception exp) { objExp = exp; Status = -1; throw exp; }

}

public DataTable GetAuctionAllUsers(out Exception objExp, out int status) { try { adp = new SqlDataAdapter(new SqlCommand("select Id, ProductId,UserID from Auction ")); objDAL = new DataAccessLayer(); status = objDAL.ExecuteDataAdapter(out objExp, adp, out dt); return dt; } catch (Exception exp) { objExp = exp; status = -1; throw exp; } }

}

157

ADMIN/COUNTRY.aspx


158


Edit Update Cancel

159

ADMIN/COUNTRY.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;

public partial class _Default : System.Web.UI.Page {

clsCountry objCountry; Int32 status; Exception objExp; DataTable datbl; DropDownList drp; TextBox txtCountry;

160

protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { GetCountry(); GetContinent(); } }

private void GetCountry() { try { objCountry = new clsCountry() ; datbl = objCountry.GetAllCountry(out objExp, out status); if (status > 0) { grdCountry.DataSource = datbl; grdCountry.DataBind(); } else if (status == 0) lblMsg.Text = "No Record Found"; else lblMsg.Text = objExp.Message.ToString();

} catch (Exception exp) { lblMsg.Text = exp.Message.ToString();

161

} }

private void GetContinent() { try { objCountry = new clsCountry(); datbl = objCountry.GetAllContinent(out objExp, out status); if (status > 0) { drp = (DropDownList)(grdCountry.FooterRow.FindControl("drpAddContinent")); drp.DataSource = datbl; drp.DataTextField = "Continent"; drp.DataValueField = "Id"; drp.DataBind();

} else if (status == 0) lblMsg.Text = "No Record Found"; else lblMsg.Text = objExp.Message.ToString();

} catch (Exception exp) { lblMsg.Text = exp.Message.ToString(); } }

162

protected void grdCountry_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Add") { { SaveCountry(); GetCountry(); GetContinent();

} }

if (e.CommandName == "Edit") { Response.Redirect("UpdateCountry.aspx?cntryId=" + e.CommandArgument.ToString()); }

}

private void SaveCountry() { try { drp

Popular Tags: