378
Boğaziçi University Department of Management Information Systems MIS 463 Decision Support Systems for Business PROJECT FINAL REPORT BOOK WIZARD Group No: 06 Şevki Mert ATLI Serhat ÖNAL Serkan TOSO Cem YEŞİL 1 | Book Wizard

I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Embed Size (px)

Citation preview

Page 1: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Boğaziçi University

Department of Management Information Systems

MIS 463 Decision Support Systems for Business

PROJECT FINAL REPORT

BOOK WIZARD

Group No: 06

Şevki Mert ATLI

Serhat ÖNAL

Serkan TOSO

Cem YEŞİL

Instructor : Aslı Sencer İstanbul - 2013

1 | B o o k W i z a r d

Page 2: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Table of Contents

I. INTRODUCTION.........................................................................................................................4

I.1 THE DECISION ENVIRONMENT............................................................................................4

I.2 MISSION..............................................................................................................................5

I.3 SCOPE OF THE PROJECT.......................................................................................................5

I.4 METHODOLOGY..................................................................................................................6

II. LITERATURE SURVEY.................................................................................................................7

II.1 Survey Results..................................................................................................................12

III. DEVELOPMENT OF THE DSS..................................................................................................17

III.1. DSS Architecture.............................................................................................................17

III.2 Technical Issues...............................................................................................................17

III.3. Data Source and Flow Mechanisms................................................................................17

III.3. Model and Algorithms....................................................................................................18

III.3.1 Model...........................................................................................................................19

III.3.2 Hierarchical Tree..........................................................................................................21

III.3.4 Modeling of Selection...................................................................................................22

III.3.5 Main Criteria Comparisons...........................................................................................23

Filtering..............................................................................................................................23

Main Criteria Comparison..................................................................................................23

Sub of Knowledge about the Book.....................................................................................24

Sub of Author.....................................................................................................................26

Sub of Genre.......................................................................................................................27

Sub of Theme.....................................................................................................................28

Final....................................................................................................................................29

III.4. User Interface and Reports................................................................................................30

IV. ASSESSMENT.........................................................................................................................45

V. CONCLUSION:.........................................................................................................................46

REFERENCES...............................................................................................................................47

VII.APPENDIX.........................................................................................................................48

VII.1.Survey............................................................................................................................48

VII.2. Project Codes................................................................................................................49

2 | B o o k W i z a r d

Page 3: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

3 | B o o k W i z a r d

Page 4: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

I. INTRODUCTION

I.1 THE DECISION ENVIRONMENT

Today's publishing industry is being bombarded with huge number of new books

being published each month. Only in Turkey, 13691 literature books (novel, story, etc.)

are published in one year (ISBN Statistics of TUIK, 2011). In such environment, it has

become considerably hard to distinguish the wanted book from the other books. People

find themselves surrounded by many new books and it results in a huge confusion in

their minds. Moreover, since publishers design extremely appealing and attractive cover

pages for their books to lure readers into buying them, it has become much harder to

select the right book.

Book buying behavior is an aspect of the consumer behavior in general. Loudan

and Della Bitta (1988:8) define consumer behavior as the decision process and physical

activity individuals engage in when evaluating, acquiring, using or disposing of goods

and services. According to consumer behavior definition, it could be said that decision

making process is the one of major research object. This process, in general terms,

evaluates basis of the attributes they have or are believed to have. This should be related

attributes of the books.

Interests of the users and book genres create the decision environment. The user

is the main decision maker in our system to select. Indecisive character of the user is the

main factor that determines the decision period. The complexity of the decision

environment stems from variety of the books. According our research on the internet

about whether there is a decision support system for book selection or not, we found out

that there is no an automated system which using any methodology. Generally, existing

systems are using filtering method. Some of them offer detailed filtering options to

users about contents of the books. For example, they use books’ types, language, length,

etc. to filter.

A DSS for the book selection process is necessary for users to detect the right

books which satisfy their expectations. The decision of selecting the most suitable book

4 | B o o k W i z a r d

Page 5: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

depends on, - The user's interests should be matched with the features of the book. -The

decision making environment should be objective and easy to use.

Most of the people have trouble while they decide reading a book. They search

for books in the libraries; internet or they ask people for suggestions. This process takes

so much time. In addition to preventing time saving, we provide money saving. People

buy a book with high expectations but they don’t read it when their expectations aren’t

satisfied. Thus, they lose their money. This computerized decision environment also

prevents this situation. Instead of these methods, we provide a computerized

environment to people. By this way, people may find their books easily and faster.

Moreover, we also provide the location of the book, if it is available.

I.2 MISSION

The mission of this project is to find best suitable book/s according to user's

preferences. The main purpose is firstly to understand user's preferences and their

priorities and then to suggest book/s related to decision criteria weights and use decision

support system on a web based platform.

Goals:

Our goals are to increase customer satisfaction by finding the right book for

them, preventing book dissatisfaction of the users.

Objectives:

Our objectives are to evaluate book according to user’s priorities and offer the

most suitable book to him/her.

I.3 SCOPE OF THE PROJECT

The project considers preferences of consumer. It focuses on book genres and

themes. These genres may include, adventure, art and design, fantasy, fiction, romance.

In addition to genres, themes might be beauty of simplicity, circle of life, death,

empowerment, desire to escape etc.

5 | B o o k W i z a r d

Page 6: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

I.4 METHODOLOGY

The main problem of the book choosing is that reader cannot know if the book is

suitable for his/her wants. When a reader selects a book, it is hard to compare with the

other books. Also book selection is a multi-criteria decision making problem that

includes both qualitative and quantitative metrics. You cannot classify a book in a rating

scale. However, it is more simple to compare them according to reader’s preferences. In

order to select a book, AHP methodology will be used. For example, one of the most

used attributes in elimination phase of a book is “Genre” . (Leemans & Stokmans,

1991) According to this result, user may choose it and then sub category of the Genre as

“I prefer biography to Sci-Fi”. Or user may select shortness of the book as important for

him/her. Collection of the system data can be obtained from university library or a

limited open source book database. Input would be comparison over the some attributes,

sub-categories and between their priorities for the user and some of the decisions are

subjective and weights of their comparisons are needed.

6 | B o o k W i z a r d

Page 7: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

II. LITERATURE SURVEY

In today’s publishing industry, there are lots of written materials which people

encounter and the books are significant parts of that industry. According to The United

Nations Educational, Scientific and Cultural Organization (UNESCO) which monitors

both the number and type of books published per country per year as an important index

of standard of living and education, and of a country's self-awareness, 2.200.000 books

are published worldwide each year. Thus, finding the right books among all of the

chooses is the hardest part of reading process for people.

Based on our research we found out that there are certain criteria that affect the

book selection process itself, namely, previous knowledge about the book, whether the

book has a movie adopted from it or not, author of the book, genre, theme and release

year.

II.1 Recommendation

Based on Sherry Kragler & Christine Nolley’s research about “Student Choices:

Book Selection Strategies of Fourth Graders (1996)”, recommendation is a very

important factor for selecting the right book to read. Their result shows that as seen in

Figure 1, recommendations by peers as well as the classroom teacher were mentioned

most frequently as the guiding factor in choosing a book. Many comments were: 1)

others in the class had read the book; 2) a friend said that it was a good book; and 3) the

book was good.

Figure 1: Reasons given for selecting books

7 | B o o k W i z a r d

Page 8: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

In addition to Sherry Kragler & Christine Nolley, H. Leemans & M. Stokmans

(1991) also conducted similar survey on university students. They tried to identify the

perceived attributes used in the elimination and comparison phase of the decision

making process regarding the purchase of literary and non-literary fiction written for

adults. According to their findings, if the book was recommended by friends or

relatives, they use this book in elimination phase by 82% and in comparison phase by

24%.

II.2 Book Cover

In a study of the importance of the book cover design in book selection process

by Terri Giuliano Long (2013) noted that a book’s cover is the first thing a potential

reader sees and it can make a lasting impression. Moreover, according to Mark Coker,

Smashwords’ founder, there’s a clear connection between great covers and great sales.

“In addition to promising what a book will deliver, the [cover] image also promises (or

fails to promise) that the author is a professional, and that the book will honor the

reader’s time.”

Patrick Janson Smith, literary agent and a former publishing director at

Transworld, was quoted saying, “I can't think of a jacket that has transformed the

fortunes of a book, but I have seen books absolutely die on the back of a jacket.” This

seems to mirror the results of a Random House Zogby International poll completed in

2008 because over 52% surveyed admitted that they are influenced in their buying by

the cover art.

II.3 Saw the film/TV Series?

According to Daniel Green, there are two different arguments on the adaption of

book to TV or cinema. The defenders of the adaption say that people who would have

never read a book may come across the book with the help of movies or series and they

may decide to read the book in the future. The opponents of the adaption claim that the

adaption of books is vulgar and simplistic. They hurt the reputation of the book.

However, the supporters argue that books are the part of pop culture and they should be

viewed in this way, not like something sacred.

8 | B o o k W i z a r d

Page 9: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

There are two good example surveys on the adaption of book in Turkey. One of

them is “Effect of TV Series Adapted From Literary Works Upon Reading” by Alpaslan

Okur in 2013. His results shows that majority of people are influenced by TV series in

book selection process.

Figure 2: Book’s film survey result

The other survey was conducted by Gülizar Altın in 2011 in Eskisehir, Turkey.

Out of 300 people, 240 of them said that if the book is adapted to TV series or movies,

their reading ratio is affected positively.

II.4 Theme

Theme of the book is very important asset when people select their book to read.

People give great importance to theme of the book because the main aim is the theme in

the book. Survey results also support this idea. People use the theme by 96% in the

elimination phase and 74% in the comparison phase (Leemans & Stockmans, 1991).

Each book has a different theme. However, most of the books have the same themes.

Common themes are listed differently in different sources. However, according to our

research, the most common themes in the book are the ones that we list below.

Bookbrowse.com helps us to find appropriate theme for books. The website lists top

genres as;

Families & Ages

Ages& Stages

Ethnicity

Women

Religion & Philosophy

War & Controversy

Humor & Satire

9 | B o o k W i z a r d

Page 10: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

10 | B o o k W i z a r d

Page 11: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

II.5 Simplicity of style of writing

Simplicity of the book is very crucial because if the book is very deep and hard

to understand, people’s attention might be distracted. Most of the famous authors’ style

of writing is very beautiful and simple. For example, Hemingway’s language is always

simple and natural. It has the effect of directness, clarity and freshness (Xie, 2008).

Because of his style of writing, he became one of the most famous authors in the World.

There are many suggestions to the fresh authors by the experiences one. For

instance, Kurt Vonnegut advises that two great masters of language, William

Shakespeare and James Joyce, wrote sentences which were almost childlike when their

subjects were most profound. "To be or not to be?" asks Shakespeare's Hamlet. The

longest word is three letters long. Joyce, when he was frisky, could put together a

sentence as intricate and as glittering as a necklace for Cleopatra, but my favorite

sentence in his short story "Eveline" is this one: "She was tired." At that point in the

story, no other words could break the heart of a reader as those three words do.

II.6 Rating of the Book

People in general do not like spending time on searching. They follow the easy

ways such as rating websites for choosing the book for reading. Apart from spending

time, people care about the opinions of the majority. “Attributes used in choosing

books” research found out that people look popularity of genre that book belongs at

11th order among 50 criteria.

II.7 Book Familiarity

Whether the user has heard the book’s name before or not is seen as important

part of book selection process. “Attributes used in choosing books” research was done

among 50 respondents by H.Leemans(1991) and M.Stokmans(1991) found out that

40% of respondents answered that if I know that what the story in the book is about, I

used this attribute in the elimination or comparison phase of book selection process.

Thus, it can be subcategory of knowledge of book on the decision support system.

11 | B o o k W i z a r d

Page 12: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

II.8 Author

Author has effectiveness on book selecting process. “Undergraduate students’

book selection: a study of factors in the decision-making process” research done by

Stieve and Schoen (2006) has focused on what factors undergraduate students consider

when selecting books at academic libraries. They chose 11 sets of two books with the

same LC subject headings but with other differences and asked students to select one

book over another. Three librarians studied each set of books for potential factors

involved in decision making. They investigated that students consider author factor in

book selection decision by 2.14 over 5 meaning that 1 for never 5 for all the time.

II.9 Award of author

“Attributes used in choosing books” research also stated that 50% of respondents

gives importance about his/her familiarity with book’s author and 23% of them looks

for whether the author is received any award or not. Thus, whether the author has an

award or not and user’s familiarity about the author are important sub-criteria about the

author for users.

II.10 Number of pages

Readers are also affected by number of pages of a book in decision-making

process. “Undergraduate students’ book selection: a study of factors in the decision-

making process” research implemented that students look at number of pages of book

and give 2.46 points over 5 meaning that 1 for never 5 for all the time.

II.11 Genre

Book genres are the categorization of the different types of music, literature, or

any other subject. A genre basically refers to a certain classification of works when they

share a certain similarity, either in terms or character or maybe even technique.  There

are many types of book genres. However, it is found in our research that the most

common book genres are comedy, fiction, mystery, horror, history, politics, romance,

adventure, thriller, and philosophic. People concern about book genres when they look

for a book to reading. According to Leemans and Stokmans(1991), university students

gives 100% importance when they eliminate books and 72% importance when they

compare books.

12 | B o o k W i z a r d

Page 13: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

II.1 Survey Results

To decide criteria which we found out on literature, we conducted a survey by

asking related questions about criteria. The criteria on literature review are

recommendation, book cover page, whether a book has TV series or film, simplicity of

writing, theme, rating of the book, familiarity, author, award of author, number of pages

and genre. Most important factors of selection a book according to our survey are

knowledge about book, author, genre, theme, whether a book has TV series or film,

recommendation, familiarity, rating of the book and number of page.

Figure 3: Gender result

13 | B o o k W i z a r d

Page 14: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Figure 4: Age result

Figure 5: Age distribution graphic

14 | B o o k W i z a r d

Page 15: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Figure 6: Criteria that affect book selection

Figure 7: Criteria that affect book selection graphically

15 | B o o k W i z a r d

Page 16: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Figure 8: Book genres

Figure 9: Book genres graphic

Figure 10: Author criteria

16 | B o o k W i z a r d

Page 17: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Figure 11: Author criteria graphic

17 | B o o k W i z a r d

Page 18: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

III. DEVELOPMENT OF THE DSS

III.1. DSS Architecture

Figure 3: Architecture of the system

III.2 Technical Issues

We will prepare a web based application and use Microsoft Visual Studio

ASP.NET platform. We will hold all data on SQL Server. We will collect books from

several websites. We get quantitative information about genre from

http://www.goodreads.com/, rating of the book from http://www.librarything.com/ . We

receive related info about award of author from http://www.bookbrowse.com/category/

III.3. Data Source and Flow Mechanisms

We obtained genre and theme points and book and author ratings from different websites including http://www.goodreads.com and http://www.bookbrowse.com. Book’s and author’s familiarity are obtained from the user through pair-wise comparison. We entered all the information we got from the websites into database manually.

After getting the necessary information from different websites, firstly, we partionated the database into several relational tables. Then, we entered book’s basic information into Book table such as bookname and description. We assigned ids to authors, genres and themes

18 | B o o k W i z a r d

Page 19: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

to improve quality of our data. We just entered those ids into book table so we ensured data integrity. We also assigned ids to books’ cover images to reach them efficiently from database.

Figure 16: Database Relationship

III.3. Model and Algorithms

Figure 12: Book select algorithm

19 | B o o k W i z a r d

Page 20: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Figure 13: Pair wise algorithm

Figure 14: Context diagram

III.3.1 Model

Objective: Selecting most suitable book for customer.

Criteria:

• Knowledge About Book

o Familarity

o Recommendation

o Existency of its movie

• Author

o Familarity

o Award

o Rating

• Genre

o Fiction / Fantasy / Science Fiction

20 | B o o k W i z a r d

Page 21: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

o Comedy

o Horror / Myster

o Romance

o Adventure

• Themes

o Families Ethnicity o Ages & Stages o Women

o Philosophy & Religion o War & Controversyo Humor & Satire

Alternatives: User is able to filter book alternatives according to his/her preferences in

terms of some criteria and choose at most 7 alternatives from the list. It is restricted with

7, because user will give some information about the books. (Familiarity,

recommendation)

21 | B o o k W i z a r d

Page 22: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

III.3.2 Hierarchical Tree

Figure 15: Hierarhical tree

22 | B o o k W i z a r d

Sele

ct Be

st B

ook

Knowledge About Book(3 Sub-cr)

Familarity

Recommendation

Existency of its Movie

Author(3 Sub-cr)

Familarity

Award

Rating

Genre (2 to 7 Sub-cr)

Fantasy/Fiction

Humor

Romance

Adventure

History

Theme(7 Sub-cr)

Families

Ages & Stages

Ethnicity

Women

Philosophy & Religion

War & Controversy

Humor & Satire

Page 23: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

III.3.4 Modeling of Selection

The criteria are determined and given relative importance for each criterion by user.

Intensity of importance grades of pair wise matrix is ranging from 1-9. A basic assumption is

that if attribute A is absolutely more important that attribute B and is rated at 9, then B must

be absolutely less important than A and is valued at 1/9.

Figure 17: The Saaty Rating Scale

The next step is the calculation of a list of the relative weights, importance, or value,

of the criteria, such as genre and theme (technically, this list is called an eigenvector).

Value of Consistency Ratio (CR) is important to judgment. If the CR is much in

excess of 0.1 the judgments are untrustworthy because they are too close for comfort to

randomness and the exercise is valueless or must be repeated.

Figure 18: Values of Consistency Ratio

First row shows size of matrix, second shows random consistency index.

According to our survey, whether it has a movie or tv series gets the highest point with

31.58% and author gets the second highest point with 29.82%. Book’s theme has 21.05%,

familiarity and recommendation has same rate with 15.79%, simplicity of writing style has

12.28%, rating of book has 10.53%, whether book’s author has any award or not has 8.77%,

cover page and number of page has 3.51%.

23 | B o o k W i z a r d

Page 24: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

III.3.5 Main Criteria Comparisons

Filtering

This filtering screen is created for simulation of book selection process of the user.

Figure 19: Filters

Main Criteria Comparison

In this part, all main criteria are compared by the user.

Figure 20: Main Criteria Comparison

Results shows the priorities of the user about the criteria.

Figure 21: Result of Main Criteria Comparison

CR= 0,049. Since it is above 0,1, it is consistent.

24 | B o o k W i z a r d

Page 25: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Sub of Knowledge about the BookSub criteria of Knowledge about the book are rated by the user and the system normalizes it and

makes calculations for result.

Figure 22: Result of Sub of Knowledge about the Book’s Criteria Comparison

Result shows the priority vector of each sub-criterion.

Figure 23: Result of Sub of Knowledge about the Book’s Criteria Comparison

CR= 0,046. Since it is above 0,1, it is consistent.

User should compare the books in terms of his/her familiarity with each book.

Figure 24: Familiarity of Books Comparison

25 | B o o k W i z a r d

Page 26: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Results shows that the user’s familiarity level with each book.

Figure 25: Result of Familiarity of Books Comparison

CR= 0,049. Since it is above 0,1, it is consistent.

26 | B o o k W i z a r d

Page 27: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Sub of Author

Sub criteria of the author are rated by the user.

Figure 28: Sub Author Criteria Comparison

Result shows the priority levels.

Figure 29: Result Sub Author Criteria Comparison

CR= 0,046. Since it is above 0,1, it is consistent.

Author familarity should be rated by the user for each book/author.

27 | B o o k W i z a r d

Page 28: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Figure 30: Author Familarity Comparison

Result shows the familarity rate of the user for each author/book.

Figure 30: Author Familarity Comparison

CR= 0. Since it is above 0,1, it is consistent.

28 | B o o k W i z a r d

Page 29: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Sub of Genre

Genre’s sub criteria are rated by the user.

Figure 31: Genre’s sub-criteria Comparison

Result shows the priorities.

Figure 32: Result of Genre’s sub-criteria Comparison

CR= 0,031. Since it is above 0,1, it is consistent.

29 | B o o k W i z a r d

Page 30: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Books genre leves are retrieved from the database according to rating numbers.

Figure 33: Books’ Genre Data

Sub of Theme

Sub criteria of the themes are rated by the user.

Figure 34: Theme’s Sub Criteria Comparison

Result shows the priorities.

Figure 35: Result of Theme’s Sub Criteria Comparison

CR= 0,093. Since it is above 0,1, it is consistent.

30 | B o o k W i z a r d

Page 31: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

31 | B o o k W i z a r d

Page 32: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Final

Finally all rates and data are calculated for each category in order to recommend the most suitable book for user.

Figure 36: All Results of Comparisons

Figure 37: Results of Calculated sub-criteria to Main Criteria

At the end, system shows the final points of the books. According to this result, the most suitable book is Harry Potter and the Philosopher’s Stone.

Figure 38: Final Book Recommendation

32 | B o o k W i z a r d

Page 33: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

III.4. User Interface and Reports

User should register the system to make pairwise comparision for matching his/her characteristics with books.

33 | B o o k W i z a r d

Page 34: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

User should login to add books in his/her basket on the system. Books tab displays all books.

34 | B o o k W i z a r d

Page 35: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Filter option displays books according to user selection on the items that are language,genre, page number.

35 | B o o k W i z a r d

Page 36: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

After login, the user can add books in his/her basket and the system shows them on the right panel on the page.

36 | B o o k W i z a r d

Page 37: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

After adding books that should be minimum 3 and maximum 7 for alternative selection, the user should click on Wizard link and Start now button to move pairwise comparision.

37 | B o o k W i z a r d

Page 38: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

The user starts with main criteria comparision. He/she should click on next button to move criterias’ comparision.

38 | B o o k W i z a r d

Page 39: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

The user does book criteria comparision for the knowledge about book criteria.

39 | B o o k W i z a r d

Page 40: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

The user does familiarity sub criteria comparision for the books.

40 | B o o k W i z a r d

Page 41: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

The user does author’s sub criteria comparision.

41 | B o o k W i z a r d

Page 42: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

The user does author familiarity sub criteria comparision for the books’ authors.

42 | B o o k W i z a r d

Page 43: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Finally, the user does genre criteria comparision for the books’ genres.

43 | B o o k W i z a r d

Page 44: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

The system gets all user’s priorities and book’s related points, calculates eigen vector, normalizes and multiply matrices. It lists all user’s books with percentages that are sorting from highest to lowest. The user can select the best book for him/her according to the his/her priorities.

44 | B o o k W i z a r d

Page 45: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Team link introduces project group members.

45 | B o o k W i z a r d

Page 46: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

The user can contact with project group members via contact us page.

46 | B o o k W i z a r d

Page 47: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

IV. ASSESSMENT

MASTER PLAN

Project Code Team 6

Project TitleBOOK

WİZARD

Team Members

 Cem YEŞİL,

Serkan TOSO,

SerhatÖnal,

ŞevkiMert ATLI

PhasePlanned Actual

Complete% ProblemsStart Finish Start Finish

Team Formation 4 Oct 5 Oct   4 Oct 5 Oct %100

Project Proposal   18 Oct 23 Oct   18 Oct 23 Oct %100

Presentation 22 Oct 23 Oct 23 Oct 23 Oct %100

Literature Review (Library, Web, former

studies) 18 Nov   22 Nov   18 Oct 23 Nov %100

Interviews with experts, decision makers

in the related area   21 Nov   24 Nov   21 Nov 25 Nov %100

Development of the model   21 Nov   25 Nov   21 Nov   24 Nov %100

Midreport   18 Nov 25 Nov   18 Nov  25 Nov %100

Presentation 25 Nov 27 Nov 27 Nov 27 Nov %100

Data Collection and Organization   29 Nov   6 Dec   29 Nov  6 Dec %100

Coding interfaces   7 Dec   14 Dec   7 Dec   14 Dec %100

Validation (Optional)   15 Dec   19 Dec   15 Dec   19 Dec %100

47 | B o o k W i z a r d

Page 48: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Final Report   19 Dec 19 Dec   19 Dec 19 Dec   %100

Presentation   23 Dec 25 Dec   23 Dec 25 Dec %100

Gaining information from different websites and entering them into database manually took so much time for us. Thus, some tasks of certain team members were delayed according to our schedule. Since we have good relationships as friends, we had high synergy and it created strenght for project management. Even thought we left behind our master plan because of data entry, we managed to catch up the next step by working more. If we will work for a DSS project again, we could allocate more time for data gathering and entering.

Task Allocation Cem YEŞİL Ş.Mert ATLI Serhat ÖNAL Serkan TOSO

Project Proposal X X X X

1st Presentation X

Lit. Review X X X X

Survey X X X

Determining Criteria&Alternatives

X X X X

Development of Model X X X

Mid-Report X X X X

Mid-Report Presentation X X X X

Date Collection and Organization

X X X X

Coding interfaces X X X

Validation X X X

Final Report X X X X

Final Report Presentation X X X

48 | B o o k W i z a r d

Page 49: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

V. CONCLUSION:

Until now, literature review has been done. With the information we gathered from

literature review, we created a survey to support our findings. All criteria are selected

according to findings.

Most important part was to collect accurate information about books. Data gathering

was done with online book rating sites that are http://www.goodreads.com and

http://www.bookbrowse.com.

Coding phase was performed in parallel with data collection phase. We faced lots of

mistakes in coding phase but we solved those bugs in effective way.

49 | B o o k W i z a r d

Page 50: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

REFERENCES

Altın, G. (2011). “Okumamanın Sosyolojisi ve Modernleşmeyle Birlikte Bu Olguya

Karşı Alınabilecek Önlemler Üzerine Bir İnceleme: Eskişehir Örneklemi”, Eskişehir:

Fatih Üniversitesi Liselerarası Ulusal Sosyal Bilimler Olimpiyatı: Proje Kategorisi.

http://www.esbl.k12.tr/belge/g%C3%BClizar_proje_son.pdf, accessed on 24.12.2013

Bakhru, K. (2011), “Types of Book Genres”,

http://www.buzzle.com/articles/types-of-book-genres.html, accessed on 24.12.2013

Coker, M. (2008), “Smashwords Interview”,

https://www.smashwords.com/profile/view/mc, accessed on 24.12.2013

Green, D. (2007), “Getting to know you”

http://noggs.typepad.com/the_reading_experience/filmfilm_and_literature/ , accessed on

24.12.2013

Giuliano, Long T. (2013),” Yes, We Really Do Judge Books by Their Covers”,

http://indiereader.com/2013/05/yes-we-really-do-judge-books-by-their-covers/ , accessed

on 24.12.2013

Janson, Smith P. (2011), “The Importance of Book Covers”,

http://thewritingsickness.blogspot.com/2011/03/importance-of-book-covers.html , accessed

on 24.12.2013

Kragler, S. & Christine, Nolley (1996), “Book Selection Strategies of Fourth Graders”

http://scholarworks.wmich.edu/cgi/viewcontent.cgi?

article=1323&context=reading_horizons, accessed on 24.12.2013

Kurt, V. (2011),“How to Write with style”

http://peterstekel.com/PDFHTML/Kurt%20Vonnegut%20advice%20to%20writers.htm,

accessed on 24.12.2013

Leemans, H. & Stokmans, M. (1991), “Attributes used in choosing books”

http://arno.uvt.nl/show.cgi?fid=30337, accessed on 24.12.2013

Leemans, H., & Stokmans, M.J.W. (1991). Attributes used in the decision-making

process regarding books. Poetics, 20(6), 537-55, http://arno.uvt.nl/show.cgi?fid=30337,

accessed on 24.12.2013.

Ministry of Culture and Tourism (2011), “Books published per year”

http://en.wikipedia.org/wiki/Books_published_per_country_per_year, accessed on

24.12.2013

50 | B o o k W i z a r d

Page 51: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Okur, A. (2013), “Effect of TV Series Adapted From Literary Works Upon Reading”

http://www.sosyalarastirmalar.com/cilt6/cilt6sayi28_pdf/okur_alpaslan.pdf, accessed on

24.12.2013

Stieve, T. and Schoen D. (2006),“Undergraduate students’ book selection: a study of

factors in the decision-making process” , https://getinfo.de/app/Undergraduate-

Students-Book-Selection-A-Study-of/id/BLSE%3ARN199309041, Accessed on 24.12.2013

Turkish Statisctic Institute - International Standart Book Number (ISBN) Statistics,

2011, http://www.turkstat.gov.tr/PreHaberBultenleri.do?id=13486, Accessed on

24.12.2013

Xie (2008), “Hemingway’s Language Style and Writing Techniques In The Old Man

and the Sea”,http://www.ccsenet.org/journal/index.php/elt/article/viewFile/470/479,

accessed on 24.12.2013

VII.APPENDIX

VII.1.Survey

Survey Link: http://www.surveygizmo.com/s3/1461140/Book-Wizard

51 | B o o k W i z a r d

Page 52: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

VII.2. Project Codes

Author Class

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

/// <summary>

/// Summary description for Book

/// </summary>

public class Author

{

public string pType;

public int userSortId;

public string ID;

public string name;

public double rating;

public double award;

public Author(string pType, int userSortId, string ID, string name, double rat,double

awrd)

{

this.pType = pType;

this.userSortId = userSortId;

this.ID = ID;

this.name = name;

this.rating=rat;

this.award = awrd;

52 | B o o k W i z a r d

Page 53: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

}

Book Class

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

/// <summary>

/// Summary description for Book

/// </summary>

public class Book

{

public string pType;

public int userSortId;

public string ID;

public string name;

public int fantasypoint;

public int humorpoint;

public int romancepoint;

public int adventurepoint;

public int histroypoint;

public int mystreypoint;

public int politicpoint;

public int rating;

public int hasmovie;

public int authorrating;

53 | B o o k W i z a r d

Page 54: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

public int authoraward;

public int ages;

public int ethnicity;

public int families;

public int humortheme;

public int philosophy;

public int war;

public int women;

public Book(string pType, int userSortId, string ID, string name, int adv, int fant, int

hist, int humor, int rom, int myst, int polt, int rat, int hmov, int aut, int authrate, int

ages, int ethnicity, int families, int humortheme, int philosophy, int war, int women)

{

this.pType = pType;

this.userSortId = userSortId;

this.ID = ID;

this.name = name;

this.fantasypoint = fant;

this.humorpoint = humor;

this.romancepoint = rom;

this.adventurepoint = adv;

this.histroypoint = hist;

this.mystreypoint = myst;

this.politicpoint = polt;

this.rating = rat;

this.hasmovie = hmov;

this.authorrating = aut;

this.authoraward = authrate;

this.ages=ages;

54 | B o o k W i z a r d

Page 55: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

this.ethnicity=ethnicity;

this.families=families;

this.humortheme=humortheme;

this.philosophy=philosophy;

this.war=war;

this.women=women;

}

}

Criterion Class

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

/// <summary>

/// Summary description for Book

/// </summary>

public class Criterion

{

public string pType;

public int userSortId;

public string ID;

public string name;

public Criterion(string pType, int userSortId, string ID, string name)

55 | B o o k W i z a r d

Page 56: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

this.pType = pType;

this.userSortId = userSortId;

this.ID = ID;

this.name = name;

}

}

Genre Class

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

/// <summary>

/// Summary description for Book

/// </summary>

public class Genre

{

public string pType;

public int userSortId;

public string ID;

public string name;

public Genre(string pType, int userSortId, string ID, string name)

{

this.pType = pType;

this.userSortId = userSortId;

56 | B o o k W i z a r d

Page 57: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

this.ID = ID;

this.name = name;

}

}

DeleteBookClass Class

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

/// <summary>

/// Summary description for DeleteBookClass

/// </summary>

public class DeleteBookClass

{

public DeleteBookClass()

{}

public string DeleteBookFromBasket(int BookId)

{

string approveText = "Your book has been deleted.";

string TempBasket;

if (System.Web.HttpContext.Current.Session["BasketsBooks"] == null)

TempBasket = "";

else

57 | B o o k W i z a r d

Page 58: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

TempBasket =

System.Web.HttpContext.Current.Session["BasketsBooks"].ToString();// BasketBooks;

List<string> TempBasketListt = new List<string>(TempBasket.Split(','));

TempBasketListt.Remove(BookId.ToString());

TempBasket = String.Join(",", TempBasketListt.ToArray());

System.Web.HttpContext.Current.Session["BasketsBooks"] =

TempBasket.ToString();

return approveText;

}

}

CalculateGeneral Class

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

/// <summary>

/// Summary description for Book

/// </summary>

public class CalculateGeneral

{

58 | B o o k W i z a r d

Page 59: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

public CalculateGeneral()

{

}

public double[] CalculateEigen(int ElementCount,double[,] arrayDeger)

{

double[,] normalizedArrayDeger = new double[ElementCount, ElementCount];

double[] sumArrayDeger = new double[ElementCount];

double[] eigenArrayDeger = new double[ElementCount];

for (int i = 0; i < ElementCount; i++)

{

for (int j = 0; j < ElementCount; j++)

{

sumArrayDeger[i]+= arrayDeger[j, i];

}

}

for (int i = 0; i < ElementCount; i++)

{

for (int j = 0; j < ElementCount; j++)

{

normalizedArrayDeger[j, i] = arrayDeger[j, i] / sumArrayDeger[i];

}

59 | B o o k W i z a r d

Page 60: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

for (int i = 0; i < ElementCount; i++)

{

double sumOfArrayRow=0;

for (int j = 0; j < ElementCount; j++)

{

sumOfArrayRow+= normalizedArrayDeger[i, j];

}

eigenArrayDeger[i] =sumOfArrayRow / ElementCount;

}

return eigenArrayDeger;

}

public double CalculateConsistencyRatio(int ElementCount, double[,] arrayDeger)

{

double[,] normalizedArrayDeger = new double[ElementCount, ElementCount];

double[] sumArrayDeger = new double[ElementCount];

double[] eigenArrayDeger = new double[ElementCount];

for (int i = 0; i < ElementCount; i++)

{

for (int j = 0; j < ElementCount; j++)

60 | B o o k W i z a r d

Page 61: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

sumArrayDeger[i] += arrayDeger[j, i];

}

}

for (int i = 0; i < ElementCount; i++)

{

for (int j = 0; j < ElementCount; j++)

{

normalizedArrayDeger[j, i] = arrayDeger[j, i] / sumArrayDeger[i];

}

}

for (int i = 0; i < ElementCount; i++)

{

double sumOfArrayRow = 0;

for (int j = 0; j < ElementCount; j++)

{

sumOfArrayRow += normalizedArrayDeger[i, j];

}

eigenArrayDeger[i] = sumOfArrayRow / ElementCount;

}

61 | B o o k W i z a r d

Page 62: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

double[,] axArrayDeger = new double[arrayDeger.GetLength(0), 1];

axArrayDeger = matrixMult(arrayDeger, eigenArrayDeger);

double[] axEigenArrayDeger = new double[ElementCount]; ;

for (int i = 0; i < ElementCount; i++)

{

axEigenArrayDeger[i] = axArrayDeger[i, 0] / eigenArrayDeger[i];

}

double sumOfaxEigen = 0;

double avgOfaxEigen = 0;

for (int i = 0; i < ElementCount; i++)

{

sumOfaxEigen += axEigenArrayDeger[i];

}

avgOfaxEigen = sumOfaxEigen / ElementCount;

double RI = 0;

switch (ElementCount)

62 | B o o k W i z a r d

Page 63: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

case 1:

RI = 0;

break;

case 2:

RI = 0;

break;

case 3:

RI = 0.58;

break;

case 4:

RI = 0.9;

break;

case 5:

RI = 1.12;

break;

case 6:

RI = 1.24;

break;

case 7:

RI = 1.32;

break;

}

double ConsIndex = 0;

ConsIndex = (avgOfaxEigen - ElementCount) / (ElementCount - 1);

63 | B o o k W i z a r d

Page 64: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

double ConsRatio = 0;

ConsRatio = ConsIndex / RI;

return ConsRatio;

}

public double[,] matrixMult(double[,] matrix1, double[] matrix2)

{

int m1_1 = matrix1.GetLength(0);

int m1_2 = matrix1.GetLength(1);

int m2_1 = matrix2.GetLength(0);

int m2_2 = 1;

double[,] multResult = new double[m1_1, m2_2];

for (int i = 0; i < multResult.GetLength(0); i++)

{

for (int j = 0; j < multResult.GetLength(1); j++)

{

multResult[i, j] = 0;

for (int k = 0; k < m1_2; k++) // OR k<b.GetLength(0)

multResult[i, j] = multResult[i, j] + matrix1[i, k] * matrix2[k];

}

64 | B o o k W i z a r d

Page 65: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

return multResult;

}

}

AfterLogin.master

<%@ Master Language="C#" AutoEventWireup="true"

CodeFile="AfterLogin.master.cs" Inherits="MasterPage_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>

<link rel="stylesheet" type="text/css" href="main.css" />

<script type='text/javascript' src='http://code.jquery.com/jquery-1.6.3.js'></script>

<html xmlns="http://www.w3.org/1999/xhtml">

<style type="text/css">

#TextSrch

{

text-align: left;

}

</style>

65 | B o o k W i z a r d

Page 66: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</head>

<script type='text/javascript'>//<![CDATA[

$(window).load(function () {

$('#TextSrch')

.focus(function () {

if ($(this).val() == 'Book Name, Author..') {

document.getElementById('TextSrch').style.color = 'green';

document.getElementById('TextSrch').style.fontWeight = 'bold';

$(this).val('');

}

})

.blur(function () {

if ($(this).val() == '') {

$(this).val('Book Name, Author..');

document.getElementById('TextSrch').style.fontWeight = 'normal';

document.getElementById('TextSrch').style.color = 'gray';

}

});

}); //]]>

function getSearchText() {

document.getElementById("<%= SearchValue.ClientID %>").value =

document.getElementById("TextSrch").value;

66 | B o o k W i z a r d

Page 67: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

function UpdatePanelforList() {

__doPostBack('<%= UpdatePanel2.UniqueID %>', '');

// setInterval("__doPostBack('<%= UpdatePanel2.UniqueID %>','');", 1000);

}

//window.onload = UpdatePanelforList();

function foo() {

setTimeout(getSearchText, 1000);

// setTimeout(UpdatePanelforList, 1000);

setTimeout(foo, 1000);

}

foo();

</script>

<body>

<form id="form1" runat="server">

67 | B o o k W i z a r d

Page 68: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<div style="height: 100%; margin-left:15%;margin-right:15%; width: 900px;">

<div style="height: 180px;position: absolute;

background-image:url('images/header.jpg'); width: 900px; top: 5px; left: 210px;">

<asp:HyperLink ID="HyperLink2" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 25px; top: 156px; position: absolute"

NavigateUrl="~/HomeAL.aspx">Home</asp:HyperLink>

<asp:HyperLink ID="HyperLink1" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 100px; top: 156px; position: absolute;

right: 754px;" NavigateUrl="~/FilterAL.aspx">Filter</asp:HyperLink>

<asp:HyperLink ID="HyperLink6" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 325px; top: 156px; position: absolute"

NavigateUrl="~/TeamAL.aspx">Team</asp:HyperLink>

<asp:HyperLink ID="HyperLink3" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 250px; top: 156px; position: absolute"

NavigateUrl="~/DSSALHome.aspx">Wizard</asp:HyperLink>

<asp:HyperLink ID="HyperLink4" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 175px; top: 156px; position: absolute;

right: 754px;" NavigateUrl="~/BooksAL.aspx">Books</asp:HyperLink>

<asp:ScriptManager ID="ScriptManagerMain" runat="server"

AsyncPostBackTimeout="1" EnablePageMethods="True">

</asp:ScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

68 | B o o k W i z a r d

Page 69: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:HiddenField ID="SearchValue" runat="server" />

<asp:ImageButton ID="ImageButton2" runat="server"

ImageUrl="~/images/Arama.png" style="z-index: 1; left: 860px; top: 154px; position:

absolute; height: 25px; width: 25px;" OnClick="ImageButton2_Click" />

<input type="text" id="TextSrch" value="Book Name, Author.."

style="z-index: 1; left: 700px; top: 154px; position: absolute" />

</ContentTemplate>

</asp:UpdatePanel>

</div>

<div style="width: 520px; position: absolute; left: 210px; height:915px;

background-image:url('images/center_bg.gif'); top: 185px;">

<div style="z-index: 1; left: 520px; top: 0px; position: absolute; height: 915px;

width: 380px; background-image:url('images/terrs.gif')">

<div style=" width:300px; float:right;position: absolute; max-

height:100%;background-color:Gray; top: 10px; left: 40px;">

<asp:UpdatePanel ID="UpdatePanel2" runat="server"

onload="UpdatePanel2_Load">

<ContentTemplate>

<asp:Label ID="Label6" runat="server" Text=""></asp:Label>

<br />

69 | B o o k W i z a r d

Page 70: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="Label5" runat="server" Text="<u>Your Book

List</u>"></asp:Label>

<asp:ListView ID="BasketListView" runat="server" style="z-index: 1; top:

38px; position: absolute; height: 1020px; width: 292px" >

<EmptyDataTemplate>

<table id="Table1" runat="server">

<tr>

<td>Your basket is empty.</td>

</tr>

</table>

</EmptyDataTemplate>

<EmptyItemTemplate>

<td id="Td1" runat="server" />

</EmptyItemTemplate>

<GroupTemplate>

<tr ID="itemPlaceholderContainer" runat="server">

<td ID="itemPlaceholder" runat="server"></td>

</tr>

</GroupTemplate>

<ItemTemplate>

<td id="Td2" runat="server" style='background-

color:White' >

<table border="0" width='230'>

<tr>

70 | B o o k W i z a r d

Page 71: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<td>

<a href='BookDetails.aspx?BookId=<%# Eval("BookId")

%>'><span

class="BookListHead"><%#

Eval("Title")%></span><br>

</a>

</td>

<td align="right">

<a href='' onclick=DeleteBook(<%# Eval("BookId")

%>); '>

<image src='images/lc_iptal.gif'

width="10" height="10" border="0">

</a>

</td>

</tr>

</table>

</td>

</ItemTemplate>

<LayoutTemplate>

<table id="Table2" runat="server">

<tr id="Tr1" runat="server">

<td id="Td3" runat="server">

<table ID="groupPlaceholderContainer" runat="server">

<tr ID="groupPlaceholder" runat="server"></tr>

</table>

</td>

71 | B o o k W i z a r d

Page 72: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</tr>

<tr id="Tr2" runat="server"><td id="Td4"

runat="server"></td></tr>

</table>

</LayoutTemplate>

</asp:ListView>

</ContentTemplate>

</asp:UpdatePanel>

</div>

<asp:Image ID="Image5" runat="server" ImageUrl="~/images/bullet3.gif"

style="z-index: 1; left: 25px; top: 354px; position: absolute; bottom: 536px;" />

<asp:Label ID="Label1" runat="server" Font-Bold="True"

ForeColor="#993300" style="z-index: 1; left: 55px; top: 355px; position: absolute;

width: 132px" Text="About Book Wizard"></asp:Label>

<asp:Label ID="Label2" runat="server" Font-Strikeout="False" style="z-

index: 1; left: 25px; top: 388px; position: absolute; height: 78px; width: 229px; text-

align: left;" Text="Book wizard helps people who want to read a book but has no idea

about what to read to find

the best suitable book/s according to their preferences."></asp:Label>

<asp:Image ID="Image3" runat="server" ImageUrl="~/images/about.gif"

style="z-index: 1; left: 262px; top: 382px; position: absolute; width: 107px; height:

75px;" />

<asp:Image ID="Image4" runat="server" ImageUrl="~/images/border.gif"

style="z-index: 1; left: 25px; top: 492px; position: absolute" />

72 | B o o k W i z a r d

Page 73: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Image ID="Image8" runat="server" ImageUrl="~/images/border.gif"

style="z-index: 1; left: 25px; top: 310px; position: absolute" />

<asp:Label ID="Label3" runat="server" Font-Bold="True"

ForeColor="#993300" style="z-index: 1; left: 230px; top: 560px; position: absolute;

width: 51px" Text="Genres"></asp:Label>

</p>

<p>

<asp:Image ID="Image1" runat="server"

ImageUrl="~/images/bullet5.gif" style="z-index: 1; left: 25px; top: 558px; position:

absolute; right: 329px;" />

</p>

<p>

<asp:Label ID="Label4" runat="server" Font-Bold="True"

ForeColor="#993300" style="z-index: 1; left: 55px; top: 560px; position: absolute;

width: 51px" Text="Themes"></asp:Label>

<asp:HyperLink ID="HyperLink10" runat="server" style="z-index: 1;

left: 55px; top: 600px; position: absolute" NavigateUrl="~/BooksAL.aspx?

pm=thm&thid=2">Ethnicity</asp:HyperLink>

<asp:HyperLink ID="HyperLink11" runat="server" style="z-index: 1;

left: 55px; top: 630px; position: absolute; width: 134px"

NavigateUrl="~/BooksAL.aspx?pm=thm&thid=5">Philosophy &amp;

Religion</asp:HyperLink>

<asp:HyperLink ID="HyperLink12" runat="server" style="z-index: 1;

left: 55px; top: 660px; position: absolute; width: 124px"

NavigateUrl="~/BooksAL.aspx?pm=thm&thid=6">War &amp;

Controversy</asp:HyperLink>

<asp:HyperLink ID="HyperLink13" runat="server" style="z-index: 1;

left: 54px; top: 690px; position: absolute; width: 49px;"

NavigateUrl="~/BooksAL.aspx?pm=thm&thid=7">Women</asp:HyperLink>

73 | B o o k W i z a r d

Page 74: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:HyperLink ID="HyperLink14" runat="server" style="z-index: 1;

left: 55px; top: 720px; position: absolute; height: 19px" NavigateUrl="~/BooksAL.aspx?

pm=thm&thid=4">Humor &amp; Satire</asp:HyperLink>

<asp:HyperLink ID="HyperLink15" runat="server" style="z-index: 1;

left: 55px; top: 750px; position: absolute" NavigateUrl="~/BooksAL.aspx?

pm=thm&thid=1">Ages &amp; Stages</asp:HyperLink>

<asp:HyperLink ID="HyperLink16" runat="server" style="z-index: 1;

left: 55px; top: 780px; position: absolute" NavigateUrl="~/BooksAL.aspx?

pm=thm&thid=3">Families</asp:HyperLink>

<asp:Image ID="Image9" runat="server"

ImageUrl="~/images/bullet5.gif" style="z-index: 1;left: 200px; top: 558px; position:

absolute" />

</p>

<p>

<asp:HyperLink ID="HyperLink17" runat="server" style="z-index: 1;

left: 230px; top: 600px; position: absolute; width: 43px"

NavigateUrl="~/BooksAL.aspx?pm=gnr&grid=2">Humor</asp:HyperLink>

<asp:HyperLink ID="HyperLink18" runat="server" style="z-index: 1;

left: 230px; top: 630px; position: absolute; width: 56px"

NavigateUrl="~/BooksAL.aspx?pm=gnr&grid=3">Romance</asp:HyperLink>

<asp:HyperLink ID="HyperLink19" runat="server" style="z-index: 1;

left: 230px; top: 660px; position: absolute; width: 50px"

NavigateUrl="~/BooksAL.aspx?pm=gnr&grid=6">History</asp:HyperLink>

<asp:HyperLink ID="HyperLink20" runat="server" style="z-index: 1;

left: 230px; top: 690px; position: absolute; width: 104px"

NavigateUrl="~/BooksAL.aspx?pm=gnr&grid=1">Fantasy / Fiction</asp:HyperLink>

<asp:HyperLink ID="HyperLink21" runat="server" style="z-index: 1;

left: 230px; top: 720px; position: absolute; width: 49px"

NavigateUrl="~/BooksAL.aspx?pm=gnr&grid=7">Politics</asp:HyperLink>

<asp:HyperLink ID="HyperLink22" runat="server" style="z-index: 1;

left: 230px; top: 750px; position: absolute; width: 104px"

NavigateUrl="~/BooksAL.aspx?pm=gnr&grid=4">Mystery / Horror</asp:HyperLink>

74 | B o o k W i z a r d

Page 75: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:HyperLink ID="HyperLink23" runat="server" style="z-index: 1;

left: 230px; top: 780px; position: absolute; width: 49px"

NavigateUrl="~/BooksAL.aspx?pm=gnr&grid=5">Adventure</asp:HyperLink>

</p>

</div>

<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

</asp:ContentPlaceHolder>

</div>

<div style="z-index: 1; left: 210px; top: 1100px; position: absolute; height: 40px;

width: 900px; background-color: #FFFFFF;">

<asp:HyperLink ID="HyperLink7" runat="server" ForeColor="Gray" style="z-

index: 1; left: 737px; top: 10px; position: absolute; height: 19px; width: 63px"

NavigateUrl="~/TeamAL.aspx">About Us</asp:HyperLink>

<asp:HyperLink ID="HyperLink8" runat="server" ForeColor="Gray" style="z-

index: 1; left: 669px; top: 11px; position: absolute; height: 19px; width: 37px"

NavigateUrl="~/HomeAL.aspx">Home</asp:HyperLink>

<asp:HyperLink ID="HyperLink9" runat="server" ForeColor="Gray" style="z-

index: 1; left: 820px; top: 10px; position: absolute; height: 19px; width: 71px"

NavigateUrl="~/ContactAL.aspx">Contact Us</asp:HyperLink>

75 | B o o k W i z a r d

Page 76: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Image ID="Image7" runat="server" ImageUrl="~/images/down.gif" style="z-

index: 1; left: 4px; top: 5px; position: absolute; height: 31px; width: 97px; right:

796px;" />

</div>

</div>

<div style="height: 22px; left: 210px; top: 1140px; position: absolute; width: 900px;

background-image:url('images/footer_bg.gif')">

</div>

<asp:ImageButton ID="ImageButton1" runat="server"

ImageUrl="~/images/loggo.gif" style="z-index: 1; left: 301px; top: 71px; position:

absolute; height: 26px; width: 149px" PostBackUrl="~/HomeAL.aspx" />

76 | B o o k W i z a r d

Page 77: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</form>

</body>

</html>

AfterLogin.master.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.OleDb;

using System.Data;

public partial class MasterPage_Default : System.Web.UI.MasterPage

{

protected void Page_Load(object sender, EventArgs e)

{

if (Session["UserName"] == null)

77 | B o o k W i z a r d

Page 78: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

Response.Redirect("HomeBL.aspx");

}

else

{

Label6.Text = "Welcome " + "<b>" + Session["UserName"].ToString() +

"</b>";

}

}

protected void btnLogin_Click(object sender, EventArgs e)

{

}

protected void Button1_Click(object sender, EventArgs e)

{

Session["searchtxt"] = SearchValue.Value.ToString();

Response.Redirect("BooksBL.aspx?pm=src");

}

public void UpdateBasketViewData()

{

string userBooks;

if (Session["BasketsBooks"] != null && Session["BasketsBooks"].ToString() != "")

userBooks = Session["BasketsBooks"].ToString();

78 | B o o k W i z a r d

Page 79: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

else

userBooks = "0";

string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +

Server.MapPath(".") +

"\\BookWizard.mdb;User Id=;Password=;";

OleDbConnection conn = new OleDbConnection();

conn.ConnectionString = connString;

conn.Open();

OleDbCommand cmdreg = new OleDbCommand();

cmdreg.Connection = conn;

cmdreg.CommandType = CommandType.Text;

OleDbDataAdapter daRead = new OleDbDataAdapter();

daRead.SelectCommand = cmdreg;

cmdreg.CommandText = "SELECT b.BookId,b.Title,b.Description,a.AuthorName

as AuthorName FROM Books b INNER JOIN Authors a ON a.AuthorId=b.AuthorId

WHERE BookId in (" +

userBooks + ")";

DataTable objDt = new DataTable();

daRead.Fill(objDt);

conn.Close();

BasketListView.DataSource = objDt;

79 | B o o k W i z a r d

Page 80: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

BasketListView.DataBind();

//Response.Write(objDt.Rows.Count.ToString() + "qwrqwr");

}

protected void BasketListView_PagePropertiesChanging(object sender,

PagePropertiesChangingEventArgs e)

{

}

protected void UpdatePanel2_Load(object sender, EventArgs e)

{

BasketListView.DataBind();

UpdateBasketViewData();

}

protected void ImageButton2_Click(object sender, ImageClickEventArgs e)

{

Session["searchtxt"] = SearchValue.Value.ToString();

Response.Redirect("BooksAL.aspx?pm=src");

80 | B o o k W i z a r d

Page 81: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

}

AuthorFamiliarity.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/DSSAL.master"

AutoEventWireup="true" CodeFile="AuthorFamiliarity.aspx.cs"

Inherits="AuthorFamiliarity" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<ajaxToolkit:ToolkitScriptManager runat="Server" />

<asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Verdana"

Font-Size="0.8em" PathSeparator=" : " style="z-index: 1; left: 3px; top: 1px; position:

absolute">

<CurrentNodeStyle ForeColor="#333333" />

<NodeStyle Font-Bold="True" ForeColor="#990000" />

<PathSeparatorStyle Font-Bold="True" ForeColor="#990000" />

<RootNodeStyle Font-Bold="True" ForeColor="#FF8000" />

</asp:SiteMapPath>

<asp:Panel ID="Panel1" runat="server" Height="316px" style="text-align: left">

<br />

<asp:Label ID="Label3" runat="server" Text="is &lt;u&gt;more&lt;/u&gt;

&lt;br /&gt;familiar for me &lt;br /&gt;than" style="z-index: 1; left: 252px; top: 47px;

position: absolute; width: 70px;" Font-Bold="True" Font-Size="Small"></asp:Label>

<asp:Label ID="Label4" runat="server" style="z-index: 1; left: 375px; top:

55px; position: absolute; width: 87px;" Text="is equally&lt;br /&gt; important as"

Font-Bold="True" Font-Size="Small"></asp:Label>

81 | B o o k W i z a r d

Page 82: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="Label2" runat="server" style="z-index: 1; left: 490px; top:

46px; position: absolute; width: 64px; text-align: right;" Text="is

&lt;u&gt;less&lt;/u&gt; &lt;br /&gt;familiar for me &lt;br /&gt;than" Font-

Bold="True" Font-Size="Small"></asp:Label>

<br />

<br />

<br />

<br />

<br />

</asp:Panel>

<br />

<asp:Button ID="Button2" runat="server" OnClick="Button1_Click" Text="Next

(6/7)" style="z-index: 1; left: 619px; top: 63px; position: absolute; width: 97px" />

</asp:Content>

AuthorFamiliarity.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Reflection;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class AuthorFamiliarity : System.Web.UI.Page

{

List<Author> authors = new List<Author>();

82 | B o o k W i z a r d

Page 83: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

string PageType = "A3";

protected void Page_Load(object sender, EventArgs e)

{

Author author1 = new Author("A1", 0, "12", "Selin Güneş", 3.2, 1.5);

Author author2 = new Author("A1", 1, "13", "Serkan ToSo", 4.9, 0);

Author author3 = new Author("A1", 2, "14", "Mert Atlı", 2.54, 0.5);

Author author4 = new Author("A1", 3, "15", "Cem Yeşil", 2.5, 1);

authors.Add(author1);

authors.Add(author2);

authors.Add(author3);

authors.Add(author4);

#region Adds sliders of elements to panel

int bookCount = authors.Count;

for (int i = 0; i < bookCount; i++)

{

for (int j = i + 1; j < bookCount; j++)

{

Control toAdd = LoadControl("UserControl.ascx", PageType,

authors[i].name, authors[j].name, authors[i].userSortId, authors[j].userSortId);

Panel1.Controls.Add(toAdd);

Panel1.Controls.Add(new LiteralControl("<br />"));

}

}

83 | B o o k W i z a r d

Page 84: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

#endregion

}

private UserControl LoadControl(string userControlPath, params object[]

constructorParameters)

{

List<Type> constParamTypes = new List<Type>();

foreach (object constParam in constructorParameters)

{

constParamTypes.Add(constParam.GetType());

}

UserControl ctl = Page.LoadControl(userControlPath) as UserControl;

// Find the relevant constructor

ConstructorInfo constructor =

ctl.GetType().BaseType.GetConstructor(constParamTypes.ToArray());

//And then call the relevant constructor

if (constructor == null)

{

throw new MemberAccessException("The requested constructor was not found

on : " + ctl.GetType().BaseType.ToString());

}

else

{

constructor.Invoke(ctl, constructorParameters);

}

// Finally return the user control

return ctl;

84 | B o o k W i z a r d

Page 85: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

protected void Button1_Click(object sender, EventArgs e)

{

#region Genre Create MATrIX for User Rating

int bookCount = authors.Count;

double[,] arrayDeger = new double[bookCount, bookCount];

for (int i = 0; i < bookCount; i++)

{

for (int j = i + 1; j < bookCount; j++)

{

int comparisonValueSw = Convert.ToInt32(Session[PageType + "-" +

authors[i].userSortId.ToString() + "," + authors[j].userSortId.ToString()].ToString());

double comparisonValue = Convert.ToInt32(Session[PageType + "-" +

authors[i].userSortId.ToString() + "," + authors[j].userSortId.ToString()].ToString());

if (comparisonValue < 5)

{

switch (comparisonValueSw)

{

case 1:

comparisonValue = 5;

break;

case 2:

comparisonValue = 4;

break;

85 | B o o k W i z a r d

Page 86: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

case 3:

comparisonValue = 3;

break;

case 4:

comparisonValue = 2;

break;

}

arrayDeger[authors[i].userSortId, authors[j].userSortId] =

comparisonValue;

arrayDeger[authors[j].userSortId, authors[i].userSortId] = 1.0 /

comparisonValue * 1.0;

}

else if (comparisonValue > 5)

{

comparisonValue = comparisonValue - 4;

arrayDeger[authors[j].userSortId, authors[i].userSortId] =

comparisonValue;

arrayDeger[authors[i].userSortId, authors[j].userSortId] = 1.0 /

comparisonValue * 1.0;

}

else

{

arrayDeger[authors[j].userSortId, authors[i].userSortId] = 1;

arrayDeger[authors[i].userSortId, authors[j].userSortId] = 1;

}

86 | B o o k W i z a r d

Page 87: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

//Label1.Text += genres[i].userSortId + "," + genres[j].userSortId + " point is:

" + Session[genres[i].userSortId.ToString() + "," +

genres[j].userSortId.ToString()].ToString() + "---" + comparisonValue + "----" +

arrayDeger[i, j].ToString("F6") + "----" + arrayDeger[j, i].ToString("F6") + " <br> ";

}

arrayDeger[authors[i].userSortId, authors[i].userSortId] = 1;

}

#endregion

CalculateGeneral calc = new CalculateGeneral();

double[] eigenArrayDeger = new double[bookCount];

double ConsistencyRatio;

eigenArrayDeger = calc.CalculateEigen(bookCount, arrayDeger);

ConsistencyRatio = calc.CalculateConsistencyRatio(bookCount, arrayDeger);

if (ConsistencyRatio < 0.1)

{

Session["AuthorFamiliarityEigen"] = eigenArrayDeger;

Response.Redirect("SubThemes.aspx");

}

else

87 | B o o k W i z a r d

Page 88: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

Response.Write("<script language=javascript>alert('The values are inconsistent!

Please select them again.');</script>");

}

}

}

BeforeLogin.master

<%@ Master Language="C#" AutoEventWireup="true"

CodeFile="BeforeLogin.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>

<link rel="stylesheet" type="text/css" href="main.css" />

<script type='text/javascript' src='http://code.jquery.com/jquery-1.6.3.js'></script>

<html xmlns="http://www.w3.org/1999/xhtml">

<style type="text/css">

#TextSrch

{

text-align: left;

}

</style>

88 | B o o k W i z a r d

Page 89: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</head>

<script type='text/javascript'>//<![CDATA[

$(window).load(function () {

$('#TextSrch')

.focus(function () {

if ($(this).val() == 'Book Name, Author..') {

document.getElementById('TextSrch').style.color = 'green';

document.getElementById('TextSrch').style.fontWeight = 'bold';

$(this).val('');

}

})

.blur(function () {

if ($(this).val() == '') {

$(this).val('Book Name, Author..');

document.getElementById('TextSrch').style.fontWeight = 'normal';

document.getElementById('TextSrch').style.color = 'gray';

}

});

}); //]]>

function getSearchText() {

document.getElementById("<%= SearchValue.ClientID %>").value =

document.getElementById("TextSrch").value;

}

89 | B o o k W i z a r d

Page 90: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

function foo() {

// your function code here

setTimeout(getSearchText, 1000);

setTimeout(foo, 1000);

}

foo();

</script>

<body>

<form id="form1" runat="server" defaultbutton="Login1$LoginButton">

<div style="height: 100%; margin-left:15%;margin-right:15%; width: 900px;">

<div style="height: 180px;position: absolute;

background-image:url('images/header.jpg'); width: 900px; top: 5px; left: 210px;">

<asp:HyperLink ID="HyperLink2" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 25px; top: 156px; position: absolute"

NavigateUrl="~/HomeBL.aspx">Home</asp:HyperLink>

<asp:HyperLink ID="HyperLink1" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 100px; top: 156px; position: absolute"

NavigateUrl="~/FilterBL.aspx">Filter</asp:HyperLink>

90 | B o o k W i z a r d

Page 91: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:HyperLink ID="HyperLink5" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 325px; top: 156px; position: absolute"

NavigateUrl="~/Register.aspx">Register</asp:HyperLink>

<asp:HyperLink ID="HyperLink6" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 405px; top: 156px; position: absolute"

NavigateUrl="~/TeamBL.aspx">Team</asp:HyperLink>

<asp:HyperLink ID="HyperLink3" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 250px; top: 156px; position: absolute"

NavigateUrl="~/DSSBLHome.aspx">Wizard</asp:HyperLink>

<asp:HyperLink ID="HyperLink4" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 175px; top: 156px; position: absolute;

right: 754px;" NavigateUrl="~/BooksBL.aspx">Books</asp:HyperLink>

<asp:ScriptManager ID="ScriptManagerMain" runat="server"

AsyncPostBackTimeout="1" EnablePageMethods="True">

</asp:ScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<asp:HiddenField ID="SearchValue" runat="server" />

<asp:ImageButton ID="ImageButton2" runat="server"

ImageUrl="~/images/Arama.png" style="z-index: 1; left: 860px; top: 154px; position:

absolute; height: 25px; width: 25px;" OnClick="ImageButton2_Click" />

<input type="text" id="TextSrch" value="Book Name, Author.."

style="z-index: 1; left: 700px; top: 154px; position: absolute" />

</ContentTemplate>

91 | B o o k W i z a r d

Page 92: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</asp:UpdatePanel>

</div>

<div style="width: 520px; position: absolute; left: 210px; height:915px;

background-image:url('images/center_bg.gif'); top: 185px;">

<div style="z-index: 1; left: 520px; top: 0px; position: absolute; height: 915px;

width: 380px; background-image:url('images/terrs.gif')">

<asp:Login ID="Login1" runat="server" style="z-index: 1; left: 80px; top:

18px; position: absolute; height: 98px; width: 217px" BackColor="Silver" Font-

Size="Small" OnAuthenticate="Login1_Authenticate">

</asp:Login>

<asp:Image ID="Image5" runat="server" ImageUrl="~/images/bullet3.gif"

style="z-index: 1; left: 25px; top: 255px; position: absolute" />

<asp:Label ID="Label1" runat="server" Font-Bold="True"

ForeColor="#993300" style="z-index: 1; left: 55px; top: 255px; position: absolute;

width: 132px" Text="About Book Wizard"></asp:Label>

<asp:Label ID="Label2" runat="server" Font-Strikeout="False" style="z-

index: 1; left: 25px; top: 288px; position: absolute; height: 78px; width: 229px; text-

align: left;" Text="Book wizard helps people who want to read a book but has no idea

about what to read to find

92 | B o o k W i z a r d

Page 93: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

the best suitable book/s according to their preferences."></asp:Label>

<asp:Image ID="Image3" runat="server" ImageUrl="~/images/about.gif"

style="z-index: 1; left: 262px; top: 282px; position: absolute; width: 107px; height:

75px;" />

<asp:Image ID="Image4" runat="server" ImageUrl="~/images/border.gif"

style="z-index: 1; left: 25px; top: 392px; position: absolute" />

<asp:Image ID="Image8" runat="server" ImageUrl="~/images/border.gif"

style="z-index: 1; left: 25px; top: 210px; position: absolute" />

<asp:Label ID="Label3" runat="server" Font-Bold="True"

ForeColor="#993300" style="z-index: 1; left: 230px; top: 460px; position: absolute;

width: 51px" Text="Genres"></asp:Label>

</p>

<p>

<asp:Image ID="Image1" runat="server"

ImageUrl="~/images/bullet5.gif" style="z-index: 1; left: 25px; top: 458px; position:

absolute; right: 329px;" />

</p>

<p>

<asp:Label ID="Label4" runat="server" Font-Bold="True"

ForeColor="#993300" style="z-index: 1; left: 55px; top: 460px; position: absolute;

width: 51px" Text="Themes"></asp:Label>

<asp:HyperLink ID="HyperLink10" runat="server" style="z-index: 1;

left: 55px; top: 500px; position: absolute" NavigateUrl="~/BooksBL.aspx?

pm=thm&thid=2">Ethnicity</asp:HyperLink>

<asp:HyperLink ID="HyperLink11" runat="server" style="z-index: 1;

left: 55px; top: 530px; position: absolute; width: 134px"

NavigateUrl="~/BooksBL.aspx?pm=thm&thid=5">Philosophy &amp;

Religion</asp:HyperLink>

93 | B o o k W i z a r d

Page 94: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:HyperLink ID="HyperLink12" runat="server" style="z-index: 1;

left: 55px; top: 560px; position: absolute; width: 124px"

NavigateUrl="~/BooksBL.aspx?pm=thm&thid=6">War &amp;

Controversy</asp:HyperLink>

<asp:HyperLink ID="HyperLink13" runat="server" style="z-index: 1;

left: 54px; top: 590px; position: absolute; width: 49px;"

NavigateUrl="~/BooksBL.aspx?pm=thm&thid=7">Women</asp:HyperLink>

<asp:HyperLink ID="HyperLink14" runat="server" style="z-index: 1;

left: 55px; top: 620px; position: absolute; height: 19px" NavigateUrl="~/BooksBL.aspx?

pm=thm&thid=4">Humor &amp; Satire</asp:HyperLink>

<asp:HyperLink ID="HyperLink15" runat="server" style="z-index: 1;

left: 55px; top: 650px; position: absolute" NavigateUrl="~/BooksBL.aspx?

pm=thm&thid=1">Ages &amp; Stages</asp:HyperLink>

<asp:HyperLink ID="HyperLink16" runat="server" style="z-index: 1;

left: 55px; top: 680px; position: absolute" NavigateUrl="~/BooksBL.aspx?

pm=thm&thid=3">Families</asp:HyperLink>

<asp:Image ID="Image9" runat="server"

ImageUrl="~/images/bullet5.gif" style="z-index: 1;left: 200px; top: 458px; position:

absolute" />

</p>

<p>

<asp:HyperLink ID="HyperLink17" runat="server" style="z-index: 1;

left: 230px; top: 500px; position: absolute; width: 43px"

NavigateUrl="~/BooksBL.aspx?pm=gnr&grid=2">Humor</asp:HyperLink>

<asp:HyperLink ID="HyperLink18" runat="server" style="z-index: 1;

left: 230px; top: 530px; position: absolute; width: 56px"

NavigateUrl="~/BooksBL.aspx?pm=gnr&grid=3">Romance</asp:HyperLink>

<asp:HyperLink ID="HyperLink19" runat="server" style="z-index: 1;

left: 230px; top: 560px; position: absolute; width: 50px"

NavigateUrl="~/BooksBL.aspx?pm=gnr&grid=6">History</asp:HyperLink>

<asp:HyperLink ID="HyperLink20" runat="server" style="z-index: 1;

left: 230px; top: 590px; position: absolute; width: 104px"

NavigateUrl="~/BooksBL.aspx?pm=gnr&grid=1">Fantasy / Fiction</asp:HyperLink>

94 | B o o k W i z a r d

Page 95: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:HyperLink ID="HyperLink21" runat="server" style="z-index: 1;

left: 230px; top: 620px; position: absolute; width: 49px"

NavigateUrl="~/BooksBL.aspx?pm=gnr&grid=7">Politics</asp:HyperLink>

<asp:HyperLink ID="HyperLink22" runat="server" style="z-index: 1;

left: 230px; top: 650px; position: absolute; width: 104px"

NavigateUrl="~/BooksBL.aspx?pm=gnr&grid=4">Mystery / Horror</asp:HyperLink>

<asp:HyperLink ID="HyperLink23" runat="server" style="z-index: 1;

left: 230px; top: 680px; position: absolute; width: 49px"

NavigateUrl="~/BooksBL.aspx?pm=gnr&grid=5">Adventure</asp:HyperLink>

</p>

</div>

<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

</asp:ContentPlaceHolder>

</div>

<div style="z-index: 1; left: 210px; top: 1100px; position: absolute; height: 40px;

width: 900px; background-color: #FFFFFF;">

<asp:HyperLink ID="HyperLink7" runat="server" ForeColor="Gray" style="z-

index: 1; left: 737px; top: 10px; position: absolute; height: 19px; width: 63px"

NavigateUrl="~/TeamBL.aspx">About Us</asp:HyperLink>

95 | B o o k W i z a r d

Page 96: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:HyperLink ID="HyperLink8" runat="server" ForeColor="Gray" style="z-

index: 1; left: 669px; top: 11px; position: absolute; height: 19px; width: 37px"

NavigateUrl="~/HomeBL.aspx">Home</asp:HyperLink>

<asp:HyperLink ID="HyperLink9" runat="server" ForeColor="Gray" style="z-

index: 1; left: 820px; top: 10px; position: absolute; height: 19px; width: 71px"

NavigateUrl="~/ContactBL.aspx">Contact Us</asp:HyperLink>

<asp:Image ID="Image7" runat="server" ImageUrl="~/images/down.gif" style="z-

index: 1; left: 4px; top: 5px; position: absolute; height: 31px; width: 97px; right:

796px;" />

</div>

</div>

<div style="height: 22px; left: 210px; top: 1140px; position: absolute; width: 900px;

background-image:url('images/footer_bg.gif')">

</div>

96 | B o o k W i z a r d

Page 97: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:ImageButton ID="ImageButton1" runat="server"

ImageUrl="~/images/loggo.gif" style="z-index: 1; left: 301px; top: 71px; position:

absolute; height: 26px; width: 149px" PostBackUrl="~/HomeBL.aspx" />

</form>

</body>

</html>

BeforeLogin.master.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.OleDb;

using System.Data;

97 | B o o k W i z a r d

Page 98: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

public partial class MasterPage : System.Web.UI.MasterPage

{

protected void Page_Load(object sender, EventArgs e)

{

}

protected void btnLogin_Click(object sender, EventArgs e)

{

}

protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)

{

string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +

Server.MapPath(".") + "\\BookWizard.mdb;User Id=;Password=;";

OleDbConnection conn = new OleDbConnection();

conn.ConnectionString = connString;

conn.Open();

OleDbCommand cmd = new OleDbCommand();

cmd.CommandText = "SELECT UserName FROM Users WHERE UserName='"

+ Login1.UserName + "' AND UserPassword='" + Login1.Password + "'";

cmd.Connection = conn;

cmd.CommandType = CommandType.Text;

String result = Convert.ToString(cmd.ExecuteScalar());

if (String.IsNullOrEmpty(result))

{

e.Authenticated = false;

}

98 | B o o k W i z a r d

Page 99: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

else

{

e.Authenticated = true;

Session["UserId"] = true;

Session["UserName"] = result;

Response.Redirect("HomeAL.aspx");

}

}

protected void txtLinkFindBook_Click(object sender, EventArgs e)

{

Response.Redirect("");

}

protected void TextBox1_TextChanged(object sender, EventArgs e)

{

}

protected void Button1_Click(object sender, EventArgs e)

{

Session["searchtxt"] = SearchValue.Value.ToString();

Response.Redirect("BooksBL.aspx?pm=src");

}

protected void ImageButton2_Click(object sender, ImageClickEventArgs e)

{

Session["searchtxt"] = SearchValue.Value.ToString();

Response.Redirect("BooksBL.aspx?pm=src");

}

99 | B o o k W i z a r d

Page 100: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

BookDetailAL.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/AfterLogin.master"

AutoEventWireup="true" CodeFile="BookDetailAL.aspx.cs"

Inherits="BookDetailAL" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<p>

<asp:Label ID="lblBookName" runat="server" Font-Bold="True" Font-

Size="X-Large" ForeColor="#663300" style="z-index: 1; left: 160px; top: 16px;

position: absolute; height: 26px; width: 339px; bottom: 873px; text-align: left;"

Text="Ghosts of Manhattan"></asp:Label>

<br />

<asp:Label ID="lblAuthor" runat="server" Font-Bold="False" Font-

Size="Medium" ForeColor="#663300" style="z-index: 1; left: 179px; top: 47px;

position: absolute; height: 18px; width: 309px; bottom: 850px; text-align: left;"

Text="Ahmet Hamdi Tanpınarcığım (Rating: 3.15)"></asp:Label>

<asp:Label ID="Label8" runat="server" Font-Bold="False" Font-Size="Small"

ForeColor="#666666" style="z-index: 1; left: 160px; top: 50px; position: absolute;

height: 18px; width: 16px" Text="by"></asp:Label>

<asp:Label ID="lblRating" runat="server" Font-Bold="False" Font-

Size="Medium" ForeColor="#666666" style="z-index: 1; left: 160px; top: 71px;

position: absolute; height: 18px; bottom: 826px; right: 256px; text-align: left;"

Text="Rating: 4,4"></asp:Label>

100 | B o o k W i z a r d

Page 101: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="lblYear" runat="server" Font-Bold="False" Font-

Size="Medium" ForeColor="#666666" style="z-index: 1; left: 160px; top: 95px;

position: absolute; height: 18px; text-align: left; bottom: 802px; width: 286px;"

Text="First Published Year: 2012"></asp:Label>

<asp:Label ID="lblPage" runat="server" Font-Bold="False" Font-

Size="Medium" ForeColor="#666666" style="z-index: 1; left: 160px; top: 120px;

position: absolute; height: 18px; text-align: left; bottom: 777px; width: 191px;"

Text="Page Number: 246"></asp:Label>

<asp:Label ID="lblLang" runat="server" Font-Bold="False" Font-

Size="Medium" ForeColor="#666666" style="z-index: 1; left: 160px; top: 145px;

position: absolute; height: 18px; text-align: left; bottom: 752px; width: 211px;"

Text="&lt;b&gt;Language:&lt;/b&gt; Turkish"></asp:Label>

<asp:Label ID="lblTheme" runat="server" Font-Bold="False" Font-

Size="Medium" ForeColor="#666666" style="z-index: 1; left: 160px; top: 170px;

position: absolute; height: 18px; text-align: left; bottom: 727px; width: 296px;"

Text="Theme: Women"></asp:Label>

<asp:Label ID="lblGenre" runat="server" Font-Bold="False" Font-

Size="Medium" ForeColor="#666666" style="z-index: 1; left: 160px; top: 195px;

position: absolute; height: 18px; text-align: left; bottom: 702px; width: 352px;"

Text="Genre: Adventure, Fantasy/Fiction"></asp:Label>

<br />

<br />

<asp:Image ID="Image8" runat="server" ImageUrl="~/images/serhatonal.jpg"

style="z-index: 1; left: 10px; top: 20px; position: absolute; height: 185px; width:

130px;" />

101 | B o o k W i z a r d

Page 102: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:TextBox ID="TextBox1" runat="server" BorderColor="White" style="z-

index: 1; left: 10px; top: 223px; position: absolute; height: 657px; width: 397px"

TextMode="MultiLine" BackColor="White" Enabled="False">It was a dark and

stormy night; Meg Murry, her small brother Charles Wallace, and her mother had

come down to the kitchen for a midnight snack when they were upset by the arrival of a

most disturbing stranger.

&quot;Wild nights are my glory,&quot; the unearthly stranger told them. &quot;I just

got caught in a downdraft and blown off course. Let me be on my way. Speaking of way,

by the way, there is such a thing as a tesseract&quot;.

Meg&#39;s father had been experimenting with this fifth dimension of time travel when

he mysteriously disappeared. Now the time has come for Meg, her friend Calvin, and

Charles Wallace to rescue him. But can they outwit the forces of evil they will encounter

on their heart-stopping journey through space?</asp:TextBox>

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

102 | B o o k W i z a r d

Page 103: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<br />

</asp:Content>

BookDetailAL.aspx.cs

using System;

using System.Collections.Generic;

using System.Data;

using System.Data.OleDb;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class BookDetailAL : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

OleDbCommand cmdreg = new OleDbCommand();

OleDbCommand cmdregforGenre = new OleDbCommand();

//Sets user previous filter options.

String BookId = Request.QueryString["BookId"].ToString();

103 | B o o k W i z a r d

Page 104: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

cmdreg.CommandText = "SELECT b.BookId,b.Title,b.Description,a.AuthorName

as AuthorName ,b.Rating as BookRating, b.PageNumber,b.ReleaseYear,t.Description as

ThemeDesc, l.Title as LangDesc,a.Rating as AuthorRating FROM Books b, Authors

a,Themes t,Languages l Where a.AuthorId=b.AuthorId AND t.ThemeID=b.ThemeId

AND l.LanguageId=b.LanguageId AND b.BookId=" + BookId + "";

cmdregforGenre.CommandText = "SELECT g.Description FROM GenreBooks gb,

Genres g Where g.GenreId=gb.GenreId AND gb.Rating>0 AND gb.BookId=" + BookId

+ "";

string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +

Server.MapPath(".") + "\\BookWizard.mdb;User Id=;Password=;";

OleDbConnection conn = new OleDbConnection();

conn.ConnectionString = connString;

conn.Open();

cmdreg.Connection = conn;

cmdreg.CommandType = CommandType.Text;

OleDbDataAdapter daRead = new OleDbDataAdapter();

cmdregforGenre.Connection = conn;

cmdregforGenre.CommandType = CommandType.Text;

OleDbDataAdapter daReadforGenre = new OleDbDataAdapter();

daRead.SelectCommand = cmdreg;

DataTable objDt = new DataTable();

daRead.Fill(objDt);

104 | B o o k W i z a r d

Page 105: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

daReadforGenre.SelectCommand = cmdregforGenre;

DataTable objDtforGenre = new DataTable();

daReadforGenre.Fill(objDtforGenre);

conn.Close();

if (objDt.Rows.Count > 0) // Check if the DataTable returns any data from database

{

lblAuthor.Text = objDt.Rows[0]["AuthorName"].ToString() + " (Rating: " +

objDt.Rows[0]["AuthorRating"].ToString() + ")"; // Where Fieldname is the name of

fields from your database that you want to get

lblBookName.Text = objDt.Rows[0]["Title"].ToString();

lblLang.Text = "<b>Language: </b>" + objDt.Rows[0]["LangDesc"].ToString();

lblPage.Text = "<b>Page Number: </b>" + objDt.Rows[0]

["PageNumber"].ToString();

lblRating.Text = "<b>Rating: </b>" + objDt.Rows[0]["BookRating"].ToString();

lblTheme.Text = "<b>Theme: </b>" + objDt.Rows[0]["ThemeDesc"].ToString();

lblYear.Text = "<b>First Published Year: </b>" + objDt.Rows[0]

["ReleaseYear"].ToString();

Image8.ImageUrl = "images/BookImages/"+BookId+".jpg";

}

if (objDtforGenre.Rows.Count > 0) // Check if the DataTable returns any data from

database

{

105 | B o o k W i z a r d

Page 106: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

string Genres = "";

for (int i = 0; i < objDtforGenre.Rows.Count; i++)

{

Genres += objDtforGenre.Rows[i]["Description"].ToString() + ", ";

}

Genres = Genres.TrimEnd(' ');

Genres = Genres.TrimEnd(',');

lblGenre.Text = "<b>Genres: </b>" + Genres;

}

}

}

BookDetailBL.aspx

using System;

using System.Collections.Generic;

using System.Data;

using System.Data.OleDb;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class BookDetailAL : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

106 | B o o k W i z a r d

Page 107: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

OleDbCommand cmdreg = new OleDbCommand();

OleDbCommand cmdregforGenre = new OleDbCommand();

//Sets user previous filter options.

String BookId = Request.QueryString["BookId"].ToString();

cmdreg.CommandText = "SELECT b.BookId,b.Title,b.Description,a.AuthorName

as AuthorName ,b.Rating as BookRating, b.PageNumber,b.ReleaseYear,t.Description as

ThemeDesc, l.Title as LangDesc,a.Rating as AuthorRating FROM Books b, Authors

a,Themes t,Languages l Where a.AuthorId=b.AuthorId AND t.ThemeID=b.ThemeId

AND l.LanguageId=b.LanguageId AND b.BookId=" + BookId + "";

cmdregforGenre.CommandText = "SELECT g.Description FROM GenreBooks gb,

Genres g Where g.GenreId=gb.GenreId AND gb.Rating>0 AND gb.BookId=" + BookId

+ "";

string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +

Server.MapPath(".") + "\\BookWizard.mdb;User Id=;Password=;";

OleDbConnection conn = new OleDbConnection();

conn.ConnectionString = connString;

conn.Open();

cmdreg.Connection = conn;

cmdreg.CommandType = CommandType.Text;

OleDbDataAdapter daRead = new OleDbDataAdapter();

107 | B o o k W i z a r d

Page 108: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

cmdregforGenre.Connection = conn;

cmdregforGenre.CommandType = CommandType.Text;

OleDbDataAdapter daReadforGenre = new OleDbDataAdapter();

daRead.SelectCommand = cmdreg;

DataTable objDt = new DataTable();

daRead.Fill(objDt);

daReadforGenre.SelectCommand = cmdregforGenre;

DataTable objDtforGenre = new DataTable();

daReadforGenre.Fill(objDtforGenre);

conn.Close();

if (objDt.Rows.Count > 0) // Check if the DataTable returns any data from database

{

lblAuthor.Text = objDt.Rows[0]["AuthorName"].ToString() + " (Rating: " +

objDt.Rows[0]["AuthorRating"].ToString() + ")"; // Where Fieldname is the name of

fields from your database that you want to get

lblBookName.Text = objDt.Rows[0]["Title"].ToString();

lblLang.Text = "<b>Language: </b>" + objDt.Rows[0]["LangDesc"].ToString();

lblPage.Text = "<b>Page Number: </b>" + objDt.Rows[0]

["PageNumber"].ToString();

lblRating.Text = "<b>Rating: </b>" + objDt.Rows[0]["BookRating"].ToString();

lblTheme.Text = "<b>Theme: </b>" + objDt.Rows[0]["ThemeDesc"].ToString();

lblYear.Text = "<b>First Published Year: </b>" + objDt.Rows[0]

["ReleaseYear"].ToString();

108 | B o o k W i z a r d

Page 109: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Image8.ImageUrl = "images/BookImages/"+BookId+".jpg";

}

if (objDtforGenre.Rows.Count > 0) // Check if the DataTable returns any data from

database

{

string Genres = "";

for (int i = 0; i < objDtforGenre.Rows.Count; i++)

{

Genres += objDtforGenre.Rows[i]["Description"].ToString() + ", ";

}

Genres = Genres.TrimEnd(' ');

Genres = Genres.TrimEnd(',');

lblGenre.Text = "<b>Genres: </b>" + Genres;

}

}

}

BookDetailBL.aspx.cs

using System;

using System.Collections.Generic;

using System.Data;

using System.Data.OleDb;

using System.Linq;

using System.Web;

109 | B o o k W i z a r d

Page 110: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class BookDetailBL : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

OleDbCommand cmdreg = new OleDbCommand();

OleDbCommand cmdregforGenre = new OleDbCommand();

//Sets user previous filter options.

String BookId = Request.QueryString["BookId"].ToString();

cmdreg.CommandText = "SELECT

b.BookId,b.Title,b.Description,a.AuthorName as AuthorName ,b.Rating as BookRating,

b.PageNumber,b.ReleaseYear,t.Description as ThemeDesc, l.Title as LangDesc,a.Rating

as AuthorRating FROM Books b, Authors a,Themes t,Languages l Where

a.AuthorId=b.AuthorId AND t.ThemeID=b.ThemeId AND l.LanguageId=b.LanguageId

AND b.BookId=" + BookId + "";

cmdregforGenre.CommandText = "SELECT g.Description FROM GenreBooks

gb, Genres g Where g.GenreId=gb.GenreId AND gb.Rating>0 AND gb.BookId=" +

BookId + "";

string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +

Server.MapPath(".") + "\\BookWizard.mdb;User Id=;Password=;";

OleDbConnection conn = new OleDbConnection();

conn.ConnectionString = connString;

conn.Open();

110 | B o o k W i z a r d

Page 111: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

cmdreg.Connection = conn;

cmdreg.CommandType = CommandType.Text;

OleDbDataAdapter daRead = new OleDbDataAdapter();

cmdregforGenre.Connection = conn;

cmdregforGenre.CommandType = CommandType.Text;

OleDbDataAdapter daReadforGenre = new OleDbDataAdapter();

daRead.SelectCommand = cmdreg;

DataTable objDt = new DataTable();

daRead.Fill(objDt);

daReadforGenre.SelectCommand = cmdregforGenre;

DataTable objDtforGenre = new DataTable();

daReadforGenre.Fill(objDtforGenre);

conn.Close();

if (objDt.Rows.Count > 0) // Check if the DataTable returns any data from database

{

lblAuthor.Text = objDt.Rows[0]["AuthorName"].ToString() + " (Rating: " +

objDt.Rows[0]["AuthorRating"].ToString() +")"; // Where Fieldname is the name of

fields from your database that you want to get

lblBookName.Text = objDt.Rows[0]["Title"].ToString();

111 | B o o k W i z a r d

Page 112: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

lblLang.Text = "<b>Language: </b>" + objDt.Rows[0]["LangDesc"].ToString();

lblPage.Text = "<b>Page Number: </b>" + objDt.Rows[0]

["PageNumber"].ToString();

lblRating.Text = "<b>Rating: </b>" + objDt.Rows[0]["BookRating"].ToString();

lblTheme.Text = "<b>Theme: </b>" + objDt.Rows[0]["ThemeDesc"].ToString();

lblYear.Text = "<b>First Published Year: </b>" + objDt.Rows[0]

["ReleaseYear"].ToString();

Image8.ImageUrl ="images/BookImages/"+BookId+".jpg";

}

if (objDtforGenre.Rows.Count > 0) // Check if the DataTable returns any data from

database

{

string Genres="";

for (int i = 0; i < objDtforGenre.Rows.Count; i++)

{

Genres += objDtforGenre.Rows[i]["Description"].ToString()+", ";

}

Genres=Genres.TrimEnd(' ');

Genres = Genres.TrimEnd(',');

lblGenre.Text = "<b>Genres: </b>" + Genres;

}

}

}

112 | B o o k W i z a r d

Page 113: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

BookFamiliarity.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/DSSAL.master"

AutoEventWireup="true" CodeFile="BookFamiliarity.aspx.cs"

Inherits="BookFamiliarity" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<ajaxToolkit:ToolkitScriptManager runat="Server" />

<asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Verdana"

Font-Size="0.8em" PathSeparator=" : " style="z-index: 1; left: 3px; top: 1px; position:

absolute">

<CurrentNodeStyle ForeColor="#333333" />

<NodeStyle Font-Bold="True" ForeColor="#990000" />

<PathSeparatorStyle Font-Bold="True" ForeColor="#990000" />

<RootNodeStyle Font-Bold="True" ForeColor="#FF8000" />

</asp:SiteMapPath>

<asp:Panel ID="Panel1" runat="server" Height="316px" style="text-align: left">

<br />

<asp:Label ID="Label3" runat="server" Text="is &lt;u&gt;more&lt;/u&gt;

&lt;br /&gt;familiar for me &lt;br /&gt;than" style="z-index: 1; left: 252px; top: 48px;

position: absolute; width: 73px;" Font-Bold="True" Font-Size="Small"></asp:Label>

<asp:Label ID="Label4" runat="server" style="z-index: 1; left: 375px; top:

55px; position: absolute; width: 87px;" Text="is equally&lt;br /&gt; important as"

Font-Bold="True" Font-Size="Small"></asp:Label>

<asp:Label ID="Label2" runat="server" style="z-index: 1; left: 490px; top:

47px; position: absolute; width: 67px; text-align: right;" Text="is

&lt;u&gt;less&lt;/u&gt; &lt;br /&gt;familiar for me &lt;br /&gt;than" Font-

Bold="True" Font-Size="Small"></asp:Label>

<br />

113 | B o o k W i z a r d

Page 114: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<br />

<br />

<br />

<br />

</asp:Panel>

<br />

<asp:Button ID="Button2" runat="server" OnClick="Button1_Click" Text="Next

(4/7)" style="z-index: 1; left: 619px; top: 63px; position: absolute; width: 97px" />

</asp:Content>

BookFamiliarity.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Reflection;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class BookFamiliarity : System.Web.UI.Page

{

List<Book> books = new List<Book>();

string PageType = "B2";

protected void Page_Load(object sender, EventArgs e)

{

114 | B o o k W i z a r d

Page 115: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Book book1 = new Book("B2", 0, "10", "Harry Potter and the Philosopher's

Stone", 1242, 26832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);

Book book2 = new Book("B2", 1, "12", "The Essential Calvin and Hobbes", 112, 0,

0, 389, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0);

Book book3 = new Book("B2", 2, "23", "Pride and Prejudice", 704, 0, 700, 0, 4710,

0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0);

Book book4 = new Book("B2", 3, "22", "John Adams", 0, 0, 1884, 0, 0, 0, 0, 0, 0, 0,

0, 0, 0, 1, 0, 0, 0, 0);

books.Add(book1);

books.Add(book2);

books.Add(book3);

books.Add(book4);

#region Adds sliders of elements to panel

int bookCount = books.Count;

for (int i = 0; i < bookCount; i++)

{

for (int j = i + 1; j < bookCount; j++)

{

Control toAdd = LoadControl("UserControl.ascx", PageType, books[i].name,

books[j].name, books[i].userSortId, books[j].userSortId);

Panel1.Controls.Add(toAdd);

Panel1.Controls.Add(new LiteralControl("<br />"));

}

}

#endregion

115 | B o o k W i z a r d

Page 116: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

private UserControl LoadControl(string userControlPath, params object[]

constructorParameters)

{

List<Type> constParamTypes = new List<Type>();

foreach (object constParam in constructorParameters)

{

constParamTypes.Add(constParam.GetType());

}

UserControl ctl = Page.LoadControl(userControlPath) as UserControl;

// Find the relevant constructor

ConstructorInfo constructor =

ctl.GetType().BaseType.GetConstructor(constParamTypes.ToArray());

//And then call the relevant constructor

if (constructor == null)

{

throw new MemberAccessException("The requested constructor was not found

on : " + ctl.GetType().BaseType.ToString());

}

else

{

constructor.Invoke(ctl, constructorParameters);

}

// Finally return the user control

return ctl;

}

protected void Button1_Click(object sender, EventArgs e)

116 | B o o k W i z a r d

Page 117: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

#region Genre Create MATrIX for User Rating

int bookCount = books.Count;

double[,] arrayDeger = new double[bookCount, bookCount];

for (int i = 0; i < bookCount; i++)

{

for (int j = i + 1; j < bookCount; j++)

{

int comparisonValueSw = Convert.ToInt32(Session[PageType + "-" +

books[i].userSortId.ToString() + "," + books[j].userSortId.ToString()].ToString());

double comparisonValue = Convert.ToInt32(Session[PageType + "-" +

books[i].userSortId.ToString() + "," + books[j].userSortId.ToString()].ToString());

if (comparisonValue < 5)

{

switch (comparisonValueSw)

{

case 1:

comparisonValue = 5;

break;

case 2:

comparisonValue = 4;

break;

case 3:

comparisonValue = 3;

117 | B o o k W i z a r d

Page 118: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

break;

case 4:

comparisonValue = 2;

break;

}

arrayDeger[books[i].userSortId, books[j].userSortId] = comparisonValue;

arrayDeger[books[j].userSortId, books[i].userSortId] = 1.0 /

comparisonValue * 1.0;

}

else if (comparisonValue > 5)

{

comparisonValue = comparisonValue - 4;

arrayDeger[books[j].userSortId, books[i].userSortId] = comparisonValue;

arrayDeger[books[i].userSortId, books[j].userSortId] = 1.0 /

comparisonValue * 1.0;

}

else

{

arrayDeger[books[j].userSortId, books[i].userSortId] = 1;

arrayDeger[books[i].userSortId, books[j].userSortId] = 1;

}

}

arrayDeger[books[i].userSortId, books[i].userSortId] = 1;

118 | B o o k W i z a r d

Page 119: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

#endregion

CalculateGeneral calc = new CalculateGeneral();

double[] eigenArrayDeger = new double[bookCount];

double ConsistencyRatio;

eigenArrayDeger = calc.CalculateEigen(bookCount, arrayDeger);

ConsistencyRatio = calc.CalculateConsistencyRatio(bookCount, arrayDeger);

if (ConsistencyRatio < 0.1)

{

Session["BooksFamiliarityEigen"] = eigenArrayDeger;

Response.Redirect("SubAuthor.aspx");

}

else

{

Response.Write("<script language=javascript>alert('The values are inconsistent!

Please select them again.');</script>");

}

119 | B o o k W i z a r d

Page 120: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

}

BookAL.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/AfterLogin.master"

AutoEventWireup="true" CodeFile="BooksAL.aspx.cs" Inherits="BooksAL" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<script type='text/javascript' src='http://code.jquery.com/jquery-1.6.3.js'></script>

<script language="javascript" type="text/javascript">

function SubmitData(BookId) {

PageMethods.AddToBasket(BookId, onSuccess, onFailure);

UpdatePanelforList();

this.event.returnValue = false;

//PageMethods.GetData(f, s, OnRequestComplete, OnRequestError);

120 | B o o k W i z a r d

Page 121: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

function onSuccess(result) {

alert(result);

}

function onFailure(error) {

alert("Something is wrong.");

}

function DeleteBook(BookId) {

PageMethods.DeleteBookFromBasket_st(BookId, onSuccess, onFailure);

UpdatePanelforList();

this.event.returnValue = false;

//PageMethods.GetData(f, s, OnRequestComplete, OnRequestError);

}

</script>

<asp:ListView ID="ListView1" runat="server" GroupItemCount="2"

onpagepropertieschanging="lvproducts_PagePropertiesChanging">

<EmptyDataTemplate>

<table id="Table1" runat="server">

<tr>

<td>0 Book is Listed.</td>

</tr>

121 | B o o k W i z a r d

Page 122: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</table>

</EmptyDataTemplate>

<EmptyItemTemplate>

<td id="Td1" runat="server" />

</EmptyItemTemplate>

<GroupTemplate>

<tr ID="itemPlaceholderContainer" runat="server">

<td ID="itemPlaceholder" runat="server"></td>

</tr>

</GroupTemplate>

<ItemTemplate>

<td id="Td2" runat="server">

<table border="0" width="240">

<tr>

<td>

<a href='BookDetailAL.aspx?BookId=<%# Eval("BookId") %>'>

<image src='images/BookImages/<%# Eval("BookId") %>.jpg'

width="100" height="120" border="0">

</a>

</td>

<td>

<a href='BookDetailAL.aspx?BookId=<%# Eval("BookId") %>'><span

class="BookListHead"><%# Eval("Title")%></span><br>

</a>

<span class="BookListItem">

<b>Author: </b><%# Eval("AuthorName")%>

</span><br />

122 | B o o k W i z a r d

Page 123: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<a href='' onclick=SubmitData(<%# Eval("BookId") %>);>

<span class="BookListItem"><b>Add To Cart<b></font></span>

</a>

</td>

</tr>

</table>

</td>

</ItemTemplate>

<LayoutTemplate>

<table id="Table2" runat="server">

<tr id="Tr1" runat="server">

<td id="Td3" runat="server">

<table ID="groupPlaceholderContainer" runat="server">

<tr ID="groupPlaceholder" runat="server"></tr>

</table>

</td>

</tr>

<tr id="Tr2" runat="server"><td id="Td4" runat="server"></td></tr>

</table>

</LayoutTemplate>

</asp:ListView>

<asp:DataPager ID="DataPager1" PagedControlID="ListView1"

QueryStringField="ID" runat="server"

PageSize="6">

<Fields>

<asp:NextPreviousPagerField ButtonType="Button"

ShowFirstPageButton="True"

ShowNextPageButton="False" ShowPreviousPageButton="False" />

123 | B o o k W i z a r d

Page 124: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:NumericPagerField />

<asp:NextPreviousPagerField ButtonType="Button"

ShowLastPageButton="True"

ShowNextPageButton="False" ShowPreviousPageButton="False" />

</Fields>

</asp:DataPager>

<asp:Button ID="Button2" runat="server" onclick="Button2_Click"

Text="Button" />

</asp:Content>

BooksAL.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.Web.Services;

using System.Data.OleDb;

using System.Data;

public partial class BooksAL : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

if (Page.IsPostBack == false)

{

124 | B o o k W i z a r d

Page 125: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

OleDbCommand cmdreg = new OleDbCommand();

//Sets user previous filter options.

if (Request.QueryString["pm"] == "flt")

{

String Genres;

String Languages;

String MaxPage;

String MinPage;

if (Session["Genres"] == null || Session["Genres"].ToString() == "")

Genres = "Select GenreId FROM Genres";

else

Genres = Session["Genres"].ToString();

if (Session["Languages"] == null || Session["Languages"].ToString() == "")

Languages = "Select LanguageId FROM Languages";

else

Languages = Session["Languages"].ToString();

if (Session["MaxPage"] == null || Session["MaxPage"].ToString() == "")

MaxPage = "10000";

else

MaxPage = Session["MaxPage"].ToString();

if (Session["MinPage"] == null || Session["MinPage"].ToString() == "")

MinPage = "0";

else

MinPage = Session["MinPage"].ToString();

125 | B o o k W i z a r d

Page 126: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

cmdreg.CommandText = "SELECT

b.BookId,b.Title,b.Description,a.AuthorName as AuthorName FROM Books b INNER

JOIN Authors a ON a.AuthorId=b.AuthorId WHERE EXISTS (SELECT * FROM

GenreBooks gb WHERE gb.BookId=b.BookId AND gb.GenreId in (" + Genres + "))

AND b.LanguageID in(" + Languages + ") AND b.PageNumber<=" + MaxPage + "

AND b.PageNumber>=" + MinPage + "";

}

else if (Request.QueryString["pm"] == "src")

{

String searchtxt;

if (Session["searchtxt"] == null)

searchtxt = Session["searchtxt"].ToString();

else

searchtxt = "";

cmdreg.CommandText = "SELECT

b.BookId,b.Title,b.Description,a.AuthorName as AuthorName FROM Books b INNER

JOIN Authors a ON a.AuthorId=b.AuthorId WHERE b.Title like '%" + searchtxt +

"%' OR a.AuthorName like '%" + searchtxt + "%'";

}

else if (Request.QueryString["pm"] == "thm")

{

String themeid = Request.QueryString["thid"];

cmdreg.CommandText = "SELECT

b.BookId,b.Title,b.Description,a.AuthorName as AuthorName FROM Books b,

Authors a where a.AuthorId=b.AuthorId AND b.ThemeID in (" + themeid + ") ";

126 | B o o k W i z a r d

Page 127: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

else if (Request.QueryString["pm"] == "gnr")

{

String genreid = Request.QueryString["grid"];

cmdreg.CommandText = "SELECT

b.BookId,b.Title,b.Description,a.AuthorName as AuthorName FROM Books b,

Authors a,GenreBooks g where a.AuthorId=b.AuthorId AND g.BookId=b.BookId AND

g.Rating>0 AND g.GenreId in (" + genreid + ") ";

}

else

{

cmdreg.CommandText = "SELECT TOP 5

b.BookId,b.Title,b.Description,a.AuthorName as AuthorName FROM Books b INNER

JOIN Authors a ON a.AuthorId=b.AuthorId ";

}

string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +

Server.MapPath(".") + "\\BookWizard.mdb;User Id=;Password=;";

OleDbConnection conn = new OleDbConnection();

conn.ConnectionString = connString;

conn.Open();

127 | B o o k W i z a r d

Page 128: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

cmdreg.Connection = conn;

cmdreg.CommandType = CommandType.Text;

OleDbDataAdapter daRead = new OleDbDataAdapter();

daRead.SelectCommand = cmdreg;

DataTable objDt = new DataTable();

daRead.Fill(objDt);

conn.Close();

ListView1.DataSource = objDt;

ListView1.DataBind();

DataPager1.DataBind();

Response.Write(objDt.Rows.Count.ToString());

}

}

protected void lvproducts_PagePropertiesChanging(object sender,

PagePropertiesChangingEventArgs e)

{

DataPager1.SetPageProperties(e.StartRowIndex, e.MaximumRows, false);

ListView1.DataBind();

DataPager1.DataBind();

128 | B o o k W i z a r d

Page 129: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

public string AddToBasketSession(int BookId)

{

string approveText = "Your book has been added to your basket.";

string bookRestrict = "Max 7 books can be added to basket. Please delete some of

your books.";

string bookExist = "This book is already added.";

string TempBasket;

if (Session["BasketsBooks"] == null)

TempBasket = "";

else

TempBasket = Session["BasketsBooks"].ToString();// BasketBooks;

string[] TempBasketList = TempBasket.Split(',');

if (TempBasket == "")

{

TempBasket = BookId.ToString();

Session["BasketsBooks"] = TempBasket;

MasterPage_Default MasterPAge = (MasterPage_Default)Page.Master;

MasterPAge.UpdateBasketViewData();

return approveText;

129 | B o o k W i z a r d

Page 130: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

else if (TempBasketList.Count() >= 1 && TempBasketList.Count() < 7)

{

if (!TempBasketList.Contains(BookId.ToString()))

{

TempBasket = TempBasket + "," + BookId.ToString();

Session["BasketsBooks"] = TempBasket;

return approveText;

}

else

{

return bookExist;

}

}

else

{

return bookRestrict;

}

}

[WebMethod]

130 | B o o k W i z a r d

Page 131: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

public static string AddToBasket(int BookId)

{

BooksAL a = new BooksAL();

string returnMessage = a.AddToBasketSession(BookId);

return returnMessage;

//a.System.Web.HttpContext.Current.Response.Redirect(BookId.ToString());

//Session["BasketBooks"] = Session["BasketBooks"] + "," + BookId;

//Response.Write(Session["BasketBooks"].ToString());

}

protected void Button2_Click(object sender, EventArgs e)

{

}

//public string DeleteBookFromBasket(int BookId)

//{

131 | B o o k W i z a r d

Page 132: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

// string approveText = "Your book has been deleted.";

// string TempBasket;

// if (Session["BasketsBooks"] == null)

// TempBasket = "";

// else

// TempBasket = Session["BasketsBooks"].ToString();// BasketBooks;

// List<string> TempBasketListt = new List<string>(TempBasket.Split(','));

// TempBasketListt.Remove(BookId.ToString());

// TempBasket = String.Join(",", TempBasketListt.ToArray());

// Session["BasketsBooks"] = TempBasket.ToString();

// return approveText;

//}

[WebMethod]

public static string DeleteBookFromBasket_st(int BookId)

{

DeleteBookClass del = new DeleteBookClass();

string returnMessage = del.DeleteBookFromBasket(BookId);

return returnMessage;

132 | B o o k W i z a r d

Page 133: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

}

BookBL.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/BeforeLogin.master"

AutoEventWireup="true" CodeFile="BooksBL.aspx.cs" Inherits="BooksBL" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<script type='text/javascript' src='http://code.jquery.com/jquery-1.6.3.js'></script>

<script language="javascript" type="text/javascript">

function SubmitData(BookId) {

PageMethods.AddToBasket(BookId, onSuccess, onFailure);

this.event.returnValue = false;

//PageMethods.GetData(f, s, OnRequestComplete, OnRequestError);

}

133 | B o o k W i z a r d

Page 134: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

function onSuccess(result) {

alert(result);

}

function onFailure(error) {

alert("Something is wrong.");

}

function DeleteBook(BookId) {

PageMethods.DeleteBookFromBasket_st(BookId, onSuccess, onFailure);

UpdatePanelforList();

this.event.returnValue = false;

//PageMethods.GetData(f, s, OnRequestComplete, OnRequestError);

}

</script>

<asp:ListView ID="ListView1" runat="server" GroupItemCount="2"

onpagepropertieschanging="lvproducts_PagePropertiesChanging">

<EmptyDataTemplate>

<table id="Table1" runat="server">

<tr>

<td>No data was returned.</td>

</tr>

134 | B o o k W i z a r d

Page 135: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</table>

</EmptyDataTemplate>

<EmptyItemTemplate>

<td id="Td1" runat="server" />

</EmptyItemTemplate>

<GroupTemplate>

<tr ID="itemPlaceholderContainer" runat="server">

<td ID="itemPlaceholder" runat="server"></td>

</tr>

</GroupTemplate>

<ItemTemplate>

<td id="Td2" runat="server">

<table border="0" width="240">

<tr>

<td>

<a href='BookDetailBL.aspx?BookId=<%# Eval("BookId") %>'>

<image src='images/BookImages/<%# Eval("BookId") %>.jpg'

width="100" height="120" border="0">

</a>

</td>

<td>

<a href='BookDetailBL.aspx?BookId=<%# Eval("BookId") %>'><span

class="BookListHead"><%# Eval("Title")%></span><br>

</a>

<span class="BookListItem">

<b>Author: </b><%# Eval("AuthorName")%>

</span><br />

135 | B o o k W i z a r d

Page 136: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<a href='DSSBLHome.aspx'>

<span class="BookListItem"><b>Add To Cart<b></font></span>

</a>

</td>

</tr>

</table>

</td>

</ItemTemplate>

<LayoutTemplate>

<table id="Table2" runat="server">

<tr id="Tr1" runat="server">

<td id="Td3" runat="server">

<table ID="groupPlaceholderContainer" runat="server">

<tr ID="groupPlaceholder" runat="server"></tr>

</table>

</td>

</tr>

<tr id="Tr2" runat="server"><td id="Td4" runat="server"></td></tr>

</table>

</LayoutTemplate>

</asp:ListView>

<asp:DataPager ID="DataPager1" PagedControlID="ListView1"

QueryStringField="ID" runat="server"

PageSize="6">

<Fields>

<asp:NextPreviousPagerField ButtonType="Button"

ShowFirstPageButton="True"

ShowNextPageButton="False" ShowPreviousPageButton="False" />

136 | B o o k W i z a r d

Page 137: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:NumericPagerField />

<asp:NextPreviousPagerField ButtonType="Button"

ShowLastPageButton="True"

ShowNextPageButton="False" ShowPreviousPageButton="False" />

</Fields>

</asp:DataPager>

<asp:Button ID="Button2" runat="server" onclick="Button2_Click"

Text="Button" />

</asp:Content>

BooksBL.aspx.cs

using System;

using System.Collections.Generic;

using System.Data;

using System.Data.OleDb;

using System.Linq;

using System.Web;

using System.Web.Services;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class BooksBL : System.Web.UI.Page

{

public static string BasketBooks = "";

protected void Page_Load(object sender, EventArgs e)

{

if (Page.IsPostBack == false)

{

137 | B o o k W i z a r d

Page 138: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

OleDbCommand cmdreg = new OleDbCommand();

//Sets user previous filter options.

if (Request.QueryString["pm"] == "flt")

{

String Genres;

String Languages;

String MaxPage;

String MinPage;

if (Session["Genres"] == null || Session["Genres"].ToString() == "")

Genres = "Select GenreId FROM Genres";

else

Genres = Session["Genres"].ToString();

if (Session["Languages"] == null || Session["Languages"].ToString() == "")

Languages = "Select LanguageId FROM Languages";

else

Languages = Session["Languages"].ToString();

if (Session["MaxPage"] == null || Session["MaxPage"].ToString() == "")

MaxPage = "10000";

else

MaxPage = Session["MaxPage"].ToString();

if (Session["MinPage"] == null || Session["MinPage"].ToString() == "")

MinPage = "0";

else

MinPage = Session["MinPage"].ToString();

138 | B o o k W i z a r d

Page 139: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

cmdreg.CommandText = "SELECT

b.BookId,b.Title,b.Description,a.AuthorName as AuthorName FROM Books b INNER

JOIN Authors a ON a.AuthorId=b.AuthorId WHERE EXISTS (SELECT * FROM

GenreBooks gb WHERE gb.BookId=b.BookId AND gb.GenreId in (" + Genres + "))

AND b.LanguageID in(" + Languages + ") AND b.PageNumber<=" + MaxPage + "

AND b.PageNumber>=" + MinPage + "";

}

else if (Request.QueryString["pm"] == "src")

{

String searchtxt = Session["searchtxt"].ToString();

cmdreg.CommandText = "SELECT

b.BookId,b.Title,b.Description,a.AuthorName as AuthorName FROM Books b INNER

JOIN Authors a ON a.AuthorId=b.AuthorId WHERE b.Title like '%" + searchtxt +

"%' OR a.AuthorName like '%" + searchtxt + "%'";

}

else if (Request.QueryString["pm"] == "thm")

{

String themeid = Request.QueryString["thid"];

cmdreg.CommandText = "SELECT

b.BookId,b.Title,b.Description,a.AuthorName as AuthorName FROM Books b,

Authors a where a.AuthorId=b.AuthorId AND b.ThemeID in (" + themeid + ") ";

}

else if (Request.QueryString["pm"] == "gnr")

{

String genreid = Request.QueryString["grid"];

139 | B o o k W i z a r d

Page 140: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

cmdreg.CommandText = "SELECT

b.BookId,b.Title,b.Description,a.AuthorName as AuthorName FROM Books b,

Authors a,GenreBooks g where a.AuthorId=b.AuthorId AND g.BookId=b.BookId AND

g.Rating>0 AND g.GenreId in (" + genreid + ") ";

}

else

{

cmdreg.CommandText = "SELECT TOP 5

b.BookId,b.Title,b.Description,a.AuthorName as AuthorName FROM Books b INNER

JOIN Authors a ON a.AuthorId=b.AuthorId ";

}

string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +

Server.MapPath(".") + "\\BookWizard.mdb;User Id=;Password=;";

OleDbConnection conn = new OleDbConnection();

conn.ConnectionString = connString;

conn.Open();

cmdreg.Connection = conn;

cmdreg.CommandType = CommandType.Text;

OleDbDataAdapter daRead = new OleDbDataAdapter();

140 | B o o k W i z a r d

Page 141: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

daRead.SelectCommand = cmdreg;

DataTable objDt = new DataTable();

daRead.Fill(objDt);

conn.Close();

ListView1.DataSource = objDt;

ListView1.DataBind();

DataPager1.DataBind();

Response.Write(objDt.Rows.Count.ToString());

}

}

protected void lvproducts_PagePropertiesChanging(object sender,

PagePropertiesChangingEventArgs e)

{

DataPager1.SetPageProperties(e.StartRowIndex, e.MaximumRows, false);

ListView1.DataBind();

DataPager1.DataBind();

}

public string AddToBasketSession(int BookId)

{

string approveText = "Your book has been added to your basket.";

string bookRestrict = "Max 7 books can be added to basket. Please delete some of

your books.";

141 | B o o k W i z a r d

Page 142: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

string bookExist = "This book is already added.";

string TempBasket;

if (Session["BasketsBooks"] == null)

TempBasket = "";

else

TempBasket = Session["BasketsBooks"].ToString();// BasketBooks;

string[] TempBasketList = TempBasket.Split(',');

if (TempBasket == "")

{

TempBasket = BookId.ToString();

Session["BasketsBooks"] = TempBasket;

return approveText;

}

else if (TempBasketList.Count() >= 1 && TempBasketList.Count() < 7)

{

if (!TempBasketList.Contains(BookId.ToString()))

{

TempBasket = TempBasket + "," + BookId.ToString();

Session["BasketsBooks"] = TempBasket;

return approveText;

}

142 | B o o k W i z a r d

Page 143: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

else

{

return bookExist;

}

}

else

{

return bookRestrict;

}

}

[WebMethod]

public static string AddToBasket(int BookId)

{

BooksBL a = new BooksBL();

string returnMessage = a.AddToBasketSession(BookId);

return returnMessage;

143 | B o o k W i z a r d

Page 144: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

//a.System.Web.HttpContext.Current.Response.Redirect(BookId.ToString());

//Session["BasketBooks"] = Session["BasketBooks"] + "," + BookId;

//Response.Write(Session["BasketBooks"].ToString());

}

protected void Button2_Click(object sender, EventArgs e)

{

//Response.Redirect(BasketBooks);

Response.Redirect(Session["BasketsBooks"].ToString());

}

[WebMethod]

public static string DeleteBookFromBasket_st(int BookId)

{

DeleteBookClass del = new DeleteBookClass();

string returnMessage = del.DeleteBookFromBasket(BookId);

return returnMessage;

}

144 | B o o k W i z a r d

Page 145: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

ContactAL.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/AfterLogin.master"

AutoEventWireup="true" CodeFile="ContactAL.aspx.cs" Inherits="ContactAL" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<script language="javascript" type="text/javascript">

function onSuccess(result) {

alert(result);

}

function onFailure(error) {

alert("Something is wrong.");

}

function DeleteBook(BookId) {

PageMethods.DeleteBookFromBasket_st(BookId, onSuccess, onFailure);

UpdatePanelforList();

this.event.returnValue = false;

145 | B o o k W i z a r d

Page 146: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

//PageMethods.GetData(f, s, OnRequestComplete, OnRequestError);

}

</script>

<p>

<br />

<br />

<br />

<asp:Image ID="Image10" runat="server" ImageUrl="~/images/iletisim.png"

style="z-index: 1; left: 52px; top: 15px; position: absolute; height: 76px; width:

71px" />

<br />

<asp:Label ID="Label5" runat="server" Font-Bold="True" Font-Size="XX-

Large" style="z-index: 1; left: 137px; top: 40px; position: absolute; height: 33px"

Text="Contact"></asp:Label>

<br />

<br />

<br />

<br />

<br />

<asp:Label ID="Label7" runat="server" style="z-index: 1; left: 40px; top: 110px;

position: absolute; height: 20px" Text="First Name:"></asp:Label>

<asp:Label ID="Label9" runat="server" style="z-index: 1; left: 40px; top:

150px; position: absolute; height: 20px" Text="Last Name:"></asp:Label>

<asp:Label ID="Label6" runat="server" style="z-index: 1; left: 40px; top:

190px; position: absolute; height: 20px" Text="E-Mail:"></asp:Label>

<asp:Label ID="Label8" runat="server" style="z-index: 1; left: 40px; top: 230px;

position: absolute; height: 20px" Text="Message:"></asp:Label>

<br />

<br />

146 | B o o k W i z a r d

Page 147: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:TextBox ID="TextBox2" runat="server" style="z-index: 1; left: 150px; top:

110px; position: absolute; height: 25px; width: 213px"></asp:TextBox>

<asp:TextBox ID="TextBox1" runat="server" style="z-index: 1; left: 150px; top:

150px; position: absolute; height: 25px; width: 213px"></asp:TextBox>

<asp:TextBox ID="TextBox3" runat="server" style="z-index: 1; left: 150px; top:

190px; position: absolute; height: 25px; width: 213px"></asp:TextBox>

<asp:TextBox ID="TextBox4" runat="server" style="z-index: 1; left: 150px; top:

230px; position: absolute; height: 153px; width: 248px"></asp:TextBox>

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br /> <br />

<br />

<br />

<asp:ImageButton ID="ImageButton3" runat="server"

ImageUrl="~/images/send.jpg" style="z-index: 1; left: 150px; top: 400px; position:

absolute; height: 28px; width: 81px" />

<br />

<br />

<br />

<br />

<br />

<br />

147 | B o o k W i z a r d

Page 148: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<br />

<br />

<br />

<br />

<br />

<br />

<br />

</asp:Content>

ContactAL.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Services;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class ContactAL : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

[WebMethod]

148 | B o o k W i z a r d

Page 149: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

public static string DeleteBookFromBasket_st(int BookId)

{

DeleteBookClass del = new DeleteBookClass();

string returnMessage = del.DeleteBookFromBasket(BookId);

return returnMessage;

}

}

ContactBL.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/BeforeLogin.master"

AutoEventWireup="true" CodeFile="ContactBL.aspx.cs" Inherits="ContactBL" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<script language="javascript" type="text/javascript">

function onSuccess(result) {

alert(result);

}

function onFailure(error) {

alert("Something is wrong.");

}

149 | B o o k W i z a r d

Page 150: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

function DeleteBook(BookId) {

PageMethods.DeleteBookFromBasket_st(BookId, onSuccess, onFailure);

UpdatePanelforList();

this.event.returnValue = false;

//PageMethods.GetData(f, s, OnRequestComplete, OnRequestError);

}

</script>

<p>

<br />

<br />

<br />

<asp:Image ID="Image10" runat="server" ImageUrl="~/images/iletisim.png"

style="z-index: 1; left: 52px; top: 15px; position: absolute; height: 76px; width:

71px" />

<br />

<asp:Label ID="Label5" runat="server" Font-Bold="True" Font-Size="XX-

Large" style="z-index: 1; left: 137px; top: 40px; position: absolute; height: 33px"

Text="Contact"></asp:Label>

<br />

<br />

<br />

<br />

<br />

<asp:Label ID="Label7" runat="server" style="z-index: 1; left: 40px; top: 110px;

position: absolute; height: 20px" Text="First Name:"></asp:Label>

150 | B o o k W i z a r d

Page 151: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="Label9" runat="server" style="z-index: 1; left: 40px; top:

150px; position: absolute; height: 20px" Text="Last Name:"></asp:Label>

<asp:Label ID="Label6" runat="server" style="z-index: 1; left: 40px; top:

190px; position: absolute; height: 20px" Text="E-Mail:"></asp:Label>

<asp:Label ID="Label8" runat="server" style="z-index: 1; left: 40px; top: 230px;

position: absolute; height: 20px" Text="Message:"></asp:Label>

<br />

<br />

<asp:TextBox ID="TextBox2" runat="server" style="z-index: 1; left: 150px; top:

110px; position: absolute; height: 25px; width: 213px"></asp:TextBox>

<asp:TextBox ID="TextBox1" runat="server" style="z-index: 1; left: 150px; top:

150px; position: absolute; height: 25px; width: 213px"></asp:TextBox>

<asp:TextBox ID="TextBox3" runat="server" style="z-index: 1; left: 150px; top:

190px; position: absolute; height: 25px; width: 213px"></asp:TextBox>

<asp:TextBox ID="TextBox4" runat="server" style="z-index: 1; left: 150px; top:

230px; position: absolute; height: 153px; width: 248px"></asp:TextBox>

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br /> <br />

<br />

<br />

151 | B o o k W i z a r d

Page 152: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:ImageButton ID="ImageButton3" runat="server"

ImageUrl="~/images/send.jpg" style="z-index: 1; left: 150px; top: 400px; position:

absolute; height: 28px; width: 81px" />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

</asp:Content>

ContactBL.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Services;

using System.Web.UI;

using System.Web.UI.WebControls;

152 | B o o k W i z a r d

Page 153: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

public partial class ContactBL : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

[WebMethod]

public static string DeleteBookFromBasket_st(int BookId)

{

DeleteBookClass del = new DeleteBookClass();

string returnMessage = del.DeleteBookFromBasket(BookId);

return returnMessage;

}

}

DSSAL.master

<%@ Master Language="C#" AutoEventWireup="true"

CodeFile="DSSAL.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

153 | B o o k W i z a r d

Page 154: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<head runat="server">

<link rel="stylesheet" type="text/css" href="main.css" />

<script type='text/javascript' src='http://code.jquery.com/jquery-1.6.3.js'></script>

<html xmlns="http://www.w3.org/1999/xhtml">

<style type="text/css">

#TextSrch

{

text-align: left;

}

</style>

</head>

<%--<script type='text/javascript'>//<![CDATA[

$(window).load(function () {

$('#TextSrch')

.focus(function () {

if ($(this).val() == 'Book Name, Author..') {

document.getElementById('TextSrch').style.color = 'green';

document.getElementById('TextSrch').style.fontWeight = 'bold';

$(this).val('');

}

})

.blur(function () {

if ($(this).val() == '') {

$(this).val('Book Name, Author..');

document.getElementById('TextSrch').style.fontWeight = 'normal';

document.getElementById('TextSrch').style.color = 'gray';

154 | B o o k W i z a r d

Page 155: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

});

}); //]]>

function getSearchText() {

document.getElementById("<%= SearchValue.ClientID %>").value =

document.getElementById("TextSrch").value;

}

</script>--%>

<body>

<form id="form1" runat="server">

<div style="height: 100%; margin-left:15%;margin-right:15%; width: 900px;">

155 | B o o k W i z a r d

Page 156: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<div style="height: 180px;position: absolute;

background-image:url('images/header.jpg'); width: 900px; top: 5px; left: 210px;">

<asp:HyperLink ID="HyperLink2" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 25px; top: 156px; position: absolute"

NavigateUrl="~/HomeAL.aspx">Home</asp:HyperLink>

<asp:HyperLink ID="HyperLink1" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 101px; top: 156px; position: absolute;

right: 756px;" NavigateUrl="~/FilterAL.aspx">Filter</asp:HyperLink>

<asp:HyperLink ID="HyperLink6" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 340px; top: 156px; position: absolute"

NavigateUrl="~/TeamAL.aspx">Team</asp:HyperLink>

<asp:HyperLink ID="HyperLink3" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 253px; top: 156px; position: absolute;

right: 664px;" NavigateUrl="~/DSSALHome.aspx">Wizard</asp:HyperLink>

<asp:HyperLink ID="HyperLink4" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 178px; top: 156px; position: absolute;

right: 754px;" NavigateUrl="~/BooksAL.aspx">Books</asp:HyperLink>

<%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

&nbsp;

</ContentTemplate>

</asp:UpdatePanel>--%>

156 | B o o k W i z a r d

Page 157: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</div>

<div style="width: 900px; position: absolute; left: 210px; height:915px;

background-image:url('images/backgroundd.jpg'); top: 185px;">

<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

</asp:ContentPlaceHolder>

</div>

<div style="z-index: 1; left: 210px; top: 1100px; position: absolute; height: 40px;

width: 900px; background-color: #FFFFFF;">

<asp:HyperLink ID="HyperLink7" runat="server" ForeColor="Gray" style="z-

index: 1; left: 737px; top: 10px; position: absolute; height: 19px; width: 63px"

NavigateUrl="~/TeamAL.aspx">About Us</asp:HyperLink>

<asp:HyperLink ID="HyperLink8" runat="server" ForeColor="Gray" style="z-

index: 1; left: 669px; top: 11px; position: absolute; height: 19px; width: 37px; right:

194px;" NavigateUrl="~/HomeAL.aspx">Home</asp:HyperLink>

<asp:HyperLink ID="HyperLink9" runat="server" ForeColor="Gray" style="z-

index: 1; left: 820px; top: 10px; position: absolute; height: 19px; width: 71px"

NavigateUrl="~/ContactAL.aspx">Contact Us</asp:HyperLink>

157 | B o o k W i z a r d

Page 158: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Image ID="Image7" runat="server" ImageUrl="~/images/down.gif" style="z-

index: 1; left: 4px; top: 5px; position: absolute; height: 31px; width: 97px; right:

796px;" />

</div>

</div>

<div style="height: 22px; left: 210px; top: 1140px; position: absolute; width: 900px;

background-image:url('images/footer_bg.gif')">

</div>

<asp:ImageButton ID="ImageButton1" runat="server"

ImageUrl="~/images/loggo.gif" style="z-index: 1; left: 298px; top: 69px; position:

absolute; height: 26px; width: 149px" PostBackUrl="~/HomeAL.aspx" />

158 | B o o k W i z a r d

Page 159: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</form>

</body>

</html>

DSSAL.master.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.OleDb;

using System.Data;

public partial class MasterPage : System.Web.UI.MasterPage

{

159 | B o o k W i z a r d

Page 160: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

DSSALHome.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/DSSAL.master"

AutoEventWireup="true" CodeFile="DSSALHome.aspx.cs" Inherits="DSSALHome"

%>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<asp:ImageButton ID="ImageButton2" runat="server"

ImageUrl="~/images/start.jpg" style="z-index: 1; left: 93px; top: 312px; position:

absolute; width: 193px; height: 120px" OnClick="ImageButton2_Click" />

<asp:Image ID="Image5" runat="server" ImageUrl="~/images/bullet3.gif"

style="z-index: 1; left: 52px; top: 76px; position: absolute; bottom: 814px;" />

<asp:Label ID="Label1" runat="server" Font-Bold="True"

ForeColor="#993300" style="z-index: 1; left: 84px; top: 79px; position: absolute;

width: 132px" Text="About Book Wizard"></asp:Label>

160 | B o o k W i z a r d

Page 161: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="Label2" runat="server" Font-Strikeout="False" style="z-

index: 1; left: 89px; top: 105px; position: absolute; height: 189px; width: 328px; text-

align: left;" Text="Book wizard helps you to choose the best alternative among your

selected books. 'Wizard' uses books' information and your priorities about some

criteria.&lt;/br&gt;&lt;/br&gt;&lt;b&gt;&lt;u&gt;Main

Criteria:&lt;/u&gt;&lt;/b&gt;&lt;/br&gt;-Book Information&lt;/br&gt;-Author

Information&lt;/br&gt;-Genres and&lt;/br&gt;-Themes&lt;/br&gt;"></asp:Label>

<asp:Image ID="Image1" runat="server" ImageUrl="~/images/bullet3.gif"

style="z-index: 1; left: 493px; top: 76px; position: absolute; bottom: 814px;" />

<asp:Label ID="Label3" runat="server" Font-Bold="True"

ForeColor="#993300" style="z-index: 1; left: 525px; top: 79px; position: absolute;

width: 147px" Text="How 'Wizard' Works"></asp:Label>

<asp:Label ID="Label4" runat="server" Font-Strikeout="False" style="z-

index: 1; left: 522px; top: 107px; position: absolute; height: 373px; width: 315px; text-

align: left;" Text="First of all, there should be at least 3, max 7 books in your basket.

</br></br>► When you start 'Wizard', priorities about the main criteria,

should be evaluated.

</br></br><b>!!! </b>In order to continue between pages, your evaluations

must be consistent. If you get 'Inconsistency Error', you may try to make your

evaluations consistent.

</br></br>► Next pages, you will be requested to evaluate all criterias and

books and author familiarity.

</br></br>► Book familiarity means that you are familiar about the

book(Movie, friend advice, advertisement etc.)

</br></br>► Author familiarity means that you are familiar with the

author(Previous works, personality etc.)

</br></br>► When you complete 7 steps of evaluation, 'Wizard' will

present you the best book according to your evaluations.

" Font-Size="Small"></asp:Label>

161 | B o o k W i z a r d

Page 162: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</asp:Content>

DSSALHOME.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Reflection;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class DSSALHome : System.Web.UI.Page

{

protected void ImageButton2_Click(object sender, ImageClickEventArgs e)

{

if (Session["BasketsBooks"] == null || Session["BasketsBooks"] == "")

{Response.Write("<script language=javascript>alert('There is no book in your

basket. Please add books in order to use wizard.');</script>");

}

else

162 | B o o k W i z a r d

Page 163: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

int count = Session["BasketsBooks"].ToString().Count(f => f == ',');

if(count<3)

Response.Write("<script language=javascript>alert('There should be at least 3

books. Please add books in order to use wizard.');</script>");

else

Response.Redirect("MainComparison.aspx");

}

}

protected void Page_Load(object sender, EventArgs e)

{

}

}

DSSBL.master

<%@ Master Language="C#" AutoEventWireup="true"

CodeFile="DSSBL.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>

<link rel="stylesheet" type="text/css" href="main.css" />

163 | B o o k W i z a r d

Page 164: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<script type='text/javascript' src='http://code.jquery.com/jquery-1.6.3.js'></script>

<html xmlns="http://www.w3.org/1999/xhtml">

<style type="text/css">

#TextSrch

{

text-align: left;

}

</style>

</head>

<script type='text/javascript'>//<![CDATA[

$(window).load(function () {

$('#TextSrch')

.focus(function () {

if ($(this).val() == 'Book Name, Author..') {

document.getElementById('TextSrch').style.color = 'green';

document.getElementById('TextSrch').style.fontWeight = 'bold';

$(this).val('');

}

})

.blur(function () {

if ($(this).val() == '') {

$(this).val('Book Name, Author..');

document.getElementById('TextSrch').style.fontWeight = 'normal';

document.getElementById('TextSrch').style.color = 'gray';

}

});

164 | B o o k W i z a r d

Page 165: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}); //]]>

function getSearchText() {

document.getElementById("<%= SearchValue.ClientID %>").value =

document.getElementById("TextSrch").value;

}

</script>

<body>

<form id="form1" runat="server">

<div style="height: 100%; margin-left:15%;margin-right:15%; width: 900px;">

<div style="height: 180px;position: absolute;

background-image:url('images/header.jpg'); width: 900px; top: 5px; left: 210px;">

165 | B o o k W i z a r d

Page 166: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:HyperLink ID="HyperLink2" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 25px; top: 156px; position: absolute"

NavigateUrl="~/HomeBL.aspx">Home</asp:HyperLink>

<asp:HyperLink ID="HyperLink1" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 101px; top: 156px; position: absolute;

right: 756px;" NavigateUrl="~/FilterBL.aspx">Filter</asp:HyperLink>

<asp:HyperLink ID="HyperLink6" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 340px; top: 156px; position: absolute"

NavigateUrl="~/TeamBL.aspx">Team</asp:HyperLink>

<asp:HyperLink ID="HyperLink3" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 253px; top: 156px; position: absolute;

right: 664px;" NavigateUrl="~/DSSBLHome.aspx">Wizard</asp:HyperLink>

<asp:HyperLink ID="HyperLink4" runat="server" Font-Bold="True"

ForeColor="#FFFFCC" style="z-index: 1; left: 178px; top: 156px; position: absolute;

right: 754px;" NavigateUrl="~/BooksBL.aspx">Books</asp:HyperLink>

<asp:ScriptManager ID="ScriptManagerMain" runat="server"

AsyncPostBackTimeout="1" EnablePageMethods="True">

</asp:ScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<asp:HiddenField ID="SearchValue" runat="server" />

<asp:ImageButton ID="ImageButton2" runat="server"

ImageUrl="~/images/Arama.png" style="z-index: 1; left: 860px; top: 154px; position:

absolute; height: 25px; width: 25px;" />

<input type="text" id="TextSrch" value="Book Name, Author.."

style="z-index: 1; left: 700px; top: 154px; position: absolute" />

</ContentTemplate>

166 | B o o k W i z a r d

Page 167: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</asp:UpdatePanel>

</div>

<div style="width: 900px; position: absolute; left: 210px; height:915px;

background-image:url('images/backgroundd.jpg'); top: 185px;">

<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">

</asp:ContentPlaceHolder>

</div>

<div style="z-index: 1; left: 210px; top: 1100px; position: absolute; height: 40px;

width: 900px; background-color: #FFFFFF;">

<asp:HyperLink ID="HyperLink7" runat="server" ForeColor="Gray" style="z-

index: 1; left: 737px; top: 10px; position: absolute; height: 19px; width: 63px"

NavigateUrl="~/TeamAL.aspx">About Us</asp:HyperLink>

<asp:HyperLink ID="HyperLink8" runat="server" ForeColor="Gray" style="z-

index: 1; left: 669px; top: 11px; position: absolute; height: 19px; width: 37px; right:

194px;" NavigateUrl="~/HomeAL.aspx">Home</asp:HyperLink>

167 | B o o k W i z a r d

Page 168: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:HyperLink ID="HyperLink9" runat="server" ForeColor="Gray" style="z-

index: 1; left: 820px; top: 10px; position: absolute; height: 19px; width: 71px"

NavigateUrl="~/ContactAL.aspx">Contact Us</asp:HyperLink>

<asp:Image ID="Image7" runat="server" ImageUrl="~/images/down.gif" style="z-

index: 1; left: 4px; top: 5px; position: absolute; height: 31px; width: 97px; right:

796px;" />

</div>

</div>

<div style="height: 22px; left: 210px; top: 1140px; position: absolute; width: 900px;

background-image:url('images/footer_bg.gif')">

</div>

<asp:ImageButton ID="ImageButton1" runat="server"

ImageUrl="~/images/loggo.gif" style="z-index: 1; left: 298px; top: 69px; position:

absolute; height: 26px; width: 149px" PostBackUrl="~/HomeBL.aspx" />

168 | B o o k W i z a r d

Page 169: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</form>

</body>

</html>

DSSBL.master.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.OleDb;

using System.Data;

public partial class MasterPage : System.Web.UI.MasterPage

169 | B o o k W i z a r d

Page 170: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

}

DSSBLHome.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/DSSBL.master"

AutoEventWireup="true" CodeFile="DSSBLHome.aspx.cs" Inherits="DSSBLHome"

%>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<p>

<br />

<br />

<br />

<asp:Image ID="Image8" runat="server" ImageUrl="~/images/warn.png"

style="z-index: 1; left: 395px; top: 26px; position: absolute; height: 130px; width:

151px" />

<br />

<br />

<br />

<br />

<br /><br />

<br />

170 | B o o k W i z a r d

Page 171: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="Label1" runat="server" Font-Bold="True" style="z-index: 1;

left: 177px; top: 182px; position: absolute" Text="You need to login into the book

wizard system in order to use decision support system."></asp:Label>

<br />

<br /><br />

<asp:ImageButton ID="ImageButton3" runat="server"

ImageUrl="~/images/LoginNow_button.png" PostBackUrl="~/Login.aspx" style="z-

index: 1; left: 395px; top: 227px; position: absolute; height: 39px; width: 159px" />

<br />

<br />

<br /><br />

<br />

<br />

<br /><br />

<br />

<br />

<br /><br />

<br />

<br />

<br /><br />

<br />

<br />

<br /><br />

<br />

<br />

<br /><br />

<br />

<br />

<br /><br />

171 | B o o k W i z a r d

Page 172: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<br />

<br />

<br />

</asp:Content>

DSSBLHome.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class DSSBLHome : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

}

DSSResult.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/DSSAL.master"

AutoEventWireup="true" CodeFile="DSSResult.aspx.cs" Inherits="DSSResult" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

172 | B o o k W i z a r d

Page 173: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

</asp:Content>

DSSResult.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class DSSResult : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

double[] MainComparisonEigen =

(double[])Session["MainComparisonEigen"];

double[] SubKnowBookComparisonEigen =

(double[])Session["SubKnowBookComparisonEigen"];

double[] BooksFamiliarityEigen = (double[])Session["BooksFamiliarityEigen"];

double[] SubAuthorEigen = (double[])Session["SubAuthorEigen"];

double[] AuthorFamiliarityEigen = (double[])Session["AuthorFamiliarityEigen"];

double[] SubGenresEigen = (double[])Session["SubGenresEigen"];

double[,] NormalizedGenreBook = (double[,])Session["NormalizedGenreBook"];

double[] BookThemeEigen = (double[])Session["BookThemeEigen"];

double[,] NormalizedThemeBook = (double[,])Session["NormalizedThemeBook"] ;

173 | B o o k W i z a r d

Page 174: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

double[,] GenreFinal = new double[NormalizedGenreBook.GetLength(0), 1];

double[,] ThemeFinal = new double[BookThemeEigen.GetLength(0), 1];

Label1.Text += " <br> MainComparisonEigen: <br>";

printNormalizedData(MainComparisonEigen);

Label1.Text += " <br> SubKnowBookComparisonEigen: <br>";

printNormalizedData(SubKnowBookComparisonEigen);

Label1.Text += " <br> BooksFamiliarityEigen: <br>";

printNormalizedData(BooksFamiliarityEigen);

Label1.Text += " <br> SubAuthorEigen: <br>";

printNormalizedData(SubAuthorEigen);

Label1.Text += " <br> AuthorFamiliarityEigen: <br>";

printNormalizedData(AuthorFamiliarityEigen);

Label1.Text += " <br> SubGenresEigen: <br>";

printNormalizedData(SubGenresEigen);

Label1.Text += " <br> NormalizedGenreBook: <br>";

printNormalizedData(NormalizedGenreBook);

Label1.Text += " <br> BookThemeEigen: <br>";

printNormalizedData(BookThemeEigen);

Label1.Text += " <br> NormalizedThemeBook: <br>";

printNormalizedData(NormalizedThemeBook);

GenreFinal = matrixMult(NormalizedGenreBook, SubGenresEigen);

ThemeFinal = matrixMult(NormalizedThemeBook, BookThemeEigen);

Label1.Text += " <br> GenreFinal: <br>";

174 | B o o k W i z a r d

Page 175: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

printNormalizedData(GenreFinal);

Label1.Text += " <br> ThemeFinal: <br>";

printNormalizedData(ThemeFinal);

}

public double[,] matrixMult(double[,] matrix1, double[] matrix2)

{

int m1_1 = matrix1.GetLength(0);

int m1_2 = matrix1.GetLength(1);

int m2_1 = matrix2.GetLength(0);

int m2_2 = 1;

double[,] multResult = new double[m1_1, m2_2];

for (int i = 0; i < multResult.GetLength(0); i++)

{

for (int j = 0; j < multResult.GetLength(1); j++)

{

multResult[i, j] = 0;

for (int k = 0; k < m2_1; k++) // OR k<b.GetLength(0)

multResult[i, j] = multResult[i, j] + matrix1[i, k] * matrix2[k];

}

}

return multResult;

175 | B o o k W i z a r d

Page 176: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

public void printNormalizedData(double[] anArray)

{

for (int j = 0; j < anArray.GetLength(0); j++)

{

Label1.Text += anArray[j].ToString("F3") + " ";

Label1.Text += " <br> ";

}

}

public void printNormalizedData(double[,] anArray)

{

for (int i = 0; i < 4; i++)

{

for (int j = 0; j < anArray.GetLength(1); j++)

{

Label1.Text += anArray[i, j].ToString("F3") + " ";

}

Label1.Text += " <br> ";

}

}

}

FilterAL.aspx

176 | B o o k W i z a r d

Page 177: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<%@ Page Title="" Language="C#" MasterPageFile="~/AfterLogin.master"

AutoEventWireup="true" CodeFile="FilterAL.aspx.cs" Inherits="FilterAL" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<script language="javascript" type="text/javascript">

function onSuccess(result) {

alert(result);

}

function onFailure(error) {

alert("Something is wrong.");

}

function DeleteBook(BookId) {

PageMethods.DeleteBookFromBasket_st(BookId, onSuccess, onFailure);

UpdatePanelforList();

this.event.returnValue = false;

//PageMethods.GetData(f, s, OnRequestComplete, OnRequestError);

}

</script>

<table style="width: 100%" border="1">

<tr>

177 | B o o k W i z a r d

Page 178: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<td>

<asp:Label ID="Label2" runat="server"

style="z-index: 2; position: relative; font-weight: 700"

Text="Language"></asp:Label>

</td>

<td>

<asp:CheckBoxList ID="chckBoxLang" runat="server"

style="z-index: 2; position:relative; height: 28px; width: 150px; text-align:

left;">

</asp:CheckBoxList>

</td>

</tr>

<tr>

<td>

<asp:Label ID="Label1" runat="server"

style="z-index: 1; position: relative; font-weight: 700;"

Text="Genre"></asp:Label>

178 | B o o k W i z a r d

Page 179: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</td>

<td>

<asp:CheckBoxList ID="chckBoxGenres" runat="server"

style="z-index: 1; position: relative; height: 28px; width: 150px; text-align: left;">

</asp:CheckBoxList>

</td>

</tr>

<tr>

<td style="height: 25px">

<asp:Label ID="Label3" runat="server"

style="z-index: 1; position: relative; font-weight: 700"

Text="Page Number"></asp:Label>

</td>

<td style="height: 25px">

<link rel="stylesheet"

href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">

<script src="http://code.jquery.com/jquery-1.9.1.js"></script>

<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

<link rel="stylesheet" href="/resources/demos/style.css">

<script>

function getSliderVal() {

document.getElementById("<%= MinPageValue.ClientID %>").value

= $("#slider-range").slider("values", 0);

179 | B o o k W i z a r d

Page 180: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

document.getElementById("<%= MaxPageValue.ClientID %>").value

= $("#slider-range").slider("values", 1);

}

$(function () {

$("#slider-range").slider({

range: true,

min: 0,

max: 1200,

values: [150, 500],

slide: function (event, ui) {

$("#amount").val(ui.values[0] + " - " + ui.values[1]);

}

});

$("#amount").val($("#slider-range").slider("values", 0) +

" - " + $("#slider-range").slider("values", 1));

});

function foo() {

// your function code here

setTimeout(getSliderVal, 1000);

setTimeout(foo, 1000);

180 | B o o k W i z a r d

Page 181: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

foo();

</script>

<label id="amountlabel" for="amount">

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<asp:HiddenField ID="MaxPageValue" runat="server" />

<asp:HiddenField ID="MinPageValue" runat="server" />

</ContentTemplate>

</asp:UpdatePanel>

<p>

Page Number:</label>

<input type="text" id="amount" readonly style="border:0; color:#f6931f; font-

weight:bold;">

</p>

<div id="slider-range"></div>

</td>

</tr>

<tr>

181 | B o o k W i z a r d

Page 182: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<td>

&nbsp;</td>

<td>

&nbsp;</td>

</tr>

<tr>

<td>

</td>

<td>

<asp:Button ID="Button1" runat="server" onclick="Button1_Click1"

Text="Filter" Width="68px" />

</td>

</tr>

</table>

</asp:Content>

FilterAL.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.OleDb;

182 | B o o k W i z a r d

Page 183: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

using System.Data;

using System.Web.Services;

public partial class FilterAL : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

this.Form.DefaultButton = this.Button1.UniqueID;

if (Page.IsPostBack == false)

{

string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +

Server.MapPath(".") + "\\BookWizard.mdb;User Id=;Password=;";

OleDbConnection conn = new OleDbConnection();

conn.ConnectionString = connString;

conn.Open();

GetAllGenres(conn);

GetAllLanguages(conn);

conn.Close();

}

}

public void GetAllGenres(OleDbConnection conn)

{

OleDbCommand cmdGenre = new OleDbCommand();

cmdGenre.CommandText = "SELECT Distinct GenreId,Description FROM

Genres";

cmdGenre.Connection = conn;

183 | B o o k W i z a r d

Page 184: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

cmdGenre.CommandType = CommandType.Text;

DataTable dtGenres = new DataTable();

OleDbDataAdapter daReadGenre = new OleDbDataAdapter();

daReadGenre.SelectCommand = cmdGenre;

daReadGenre.Fill(dtGenres);

dtGenres.Rows[1].ItemArray[0].ToString();

for (int i = 0; i < dtGenres.Rows.Count; i++)

{

ListItem itemDetail = new ListItem();

itemDetail.Value = dtGenres.Rows[i].ItemArray[0].ToString();

itemDetail.Text = dtGenres.Rows[i].ItemArray[1].ToString();

chckBoxGenres.Items.Add(itemDetail);

}

}

public void GetAllLanguages(OleDbConnection conn)

{

OleDbCommand cmdLang = new OleDbCommand();

cmdLang.CommandText = "SELECT Distinct LanguageId,Title FROM

Languages";

cmdLang.Connection = conn;

cmdLang.CommandType = CommandType.Text;

184 | B o o k W i z a r d

Page 185: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

DataTable dtLang = new DataTable();

OleDbDataAdapter daReadLang = new OleDbDataAdapter();

daReadLang.SelectCommand = cmdLang;

daReadLang.Fill(dtLang);

dtLang.Rows[1].ItemArray[0].ToString();

for (int i = 0; i < dtLang.Rows.Count; i++)

{

ListItem itemDetail = new ListItem();

itemDetail.Value = dtLang.Rows[i].ItemArray[0].ToString();

itemDetail.Text = dtLang.Rows[i].ItemArray[1].ToString();

chckBoxLang.Items.Add(itemDetail);

}

}

protected void Button1_Click(object sender, EventArgs e)

{

string getTextValues = Request["MaxValue"].Trim();

Response.Redirect(getTextValues);

}

protected void Button1_Click1(object sender, EventArgs e)

185 | B o o k W i z a r d

Page 186: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

String genres = "";

String languages = "";

foreach (ListItem objItem in chckBoxGenres.Items)

{

if (objItem.Selected)

{

genres += objItem.Value + ",";

}

}

foreach (ListItem objItem in chckBoxLang.Items)

{

if (objItem.Selected)

{

languages += objItem.Value + ",";

}

}

Session["Genres"] = genres;

Session["Languages"] = languages;

Session["MaxPage"] = MaxPageValue.Value.ToString();

Session["MinPage"] = MinPageValue.Value.ToString();

Response.Redirect("BooksAL.aspx?pm=" + "flt");

}

[WebMethod]

public static string DeleteBookFromBasket_st(int BookId)

{

186 | B o o k W i z a r d

Page 187: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

FilterAL a = new FilterAL();

DeleteBookClass del = new DeleteBookClass();

string returnMessage = del.DeleteBookFromBasket(BookId);

return returnMessage;

}

}

FilterBL.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/BeforeLogin.master"

AutoEventWireup="true" CodeFile="FilterBL.aspx.cs" Inherits="FilterBL" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<script language="javascript" type="text/javascript">

function onSuccess(result) {

alert(result);

}

function onFailure(error) {

alert("Something is wrong.");

}

187 | B o o k W i z a r d

Page 188: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

function DeleteBook(BookId) {

PageMethods.DeleteBookFromBasket_st(BookId, onSuccess, onFailure);

UpdatePanelforList();

this.event.returnValue = false;

//PageMethods.GetData(f, s, OnRequestComplete, OnRequestError);

}

</script>

<table style="width: 100%" border="1">

<tr>

<td>

<asp:Label ID="Label2" runat="server"

style="z-index: 2; position: relative; font-weight: 700"

Text="Language"></asp:Label>

</td>

<td>

<asp:CheckBoxList ID="chckBoxLang" runat="server"

188 | B o o k W i z a r d

Page 189: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

style="z-index: 2; position:relative; height: 28px; width: 150px; text-align:

left;">

</asp:CheckBoxList>

</td>

</tr>

<tr>

<td>

<asp:Label ID="Label1" runat="server"

style="z-index: 1; position: relative; font-weight: 700;"

Text="Genre"></asp:Label>

</td>

<td>

<asp:CheckBoxList ID="chckBoxGenres" runat="server"

style="z-index: 1; position: relative; height: 28px; width: 150px; text-align: left;">

</asp:CheckBoxList>

</td>

</tr>

<tr>

<td style="height: 25px">

<asp:Label ID="Label3" runat="server"

style="z-index: 1; position: relative; font-weight: 700"

189 | B o o k W i z a r d

Page 190: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Text="Page Number"></asp:Label>

</td>

<td style="height: 25px">

<link rel="stylesheet"

href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">

<script src="http://code.jquery.com/jquery-1.9.1.js"></script>

<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

<link rel="stylesheet" href="/resources/demos/style.css">

<script>

function getSliderVal() {

document.getElementById("<%= MinPageValue.ClientID %>").value

= $("#slider-range").slider("values", 0);

document.getElementById("<%= MaxPageValue.ClientID %>").value

= $("#slider-range").slider("values", 1);

}

$(function () {

$("#slider-range").slider({

range: true,

min: 0,

max: 1200,

values: [150, 500],

slide: function (event, ui) {

$("#amount").val(ui.values[0] + " - " + ui.values[1]);

}

190 | B o o k W i z a r d

Page 191: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

});

$("#amount").val($("#slider-range").slider("values", 0) +

" - " + $("#slider-range").slider("values", 1));

});

function foo() {

// your function code here

setTimeout(getSliderVal, 1000);

setTimeout(foo, 1000);

}

foo();

</script>

<label id="amountlabel" for="amount">

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<asp:HiddenField ID="MaxPageValue" runat="server" />

<asp:HiddenField ID="MinPageValue" runat="server" />

</ContentTemplate>

191 | B o o k W i z a r d

Page 192: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</asp:UpdatePanel>

<p>

Page Number:</label>

<input type="text" id="amount" readonly style="border:0; color:#f6931f; font-

weight:bold;">

</p>

<div id="slider-range"></div>

</td>

</tr>

<tr>

<td>

&nbsp;</td>

<td>

&nbsp;</td>

</tr>

<tr>

<td>

</td>

<td>

<asp:Button ID="Button1" runat="server" onclick="Button1_Click1"

Text="Filter" Width="69px" />

</td>

</tr>

</table>

192 | B o o k W i z a r d

Page 193: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</asp:Content>

FilterBL.aspx.cs

using System;

using System.Collections.Generic;

using System.Data;

using System.Data.OleDb;

using System.Linq;

using System.Web;

using System.Web.Services;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class FilterBL : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

this.Form.DefaultButton = this.Button1.UniqueID;

if (Page.IsPostBack == false)

{

string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +

Server.MapPath(".") + "\\BookWizard.mdb;User Id=;Password=;";

OleDbConnection conn = new OleDbConnection();

conn.ConnectionString = connString;

193 | B o o k W i z a r d

Page 194: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

conn.Open();

GetAllGenres(conn);

GetAllLanguages(conn);

conn.Close();

}

}

public void GetAllGenres(OleDbConnection conn)

{

OleDbCommand cmdGenre = new OleDbCommand();

cmdGenre.CommandText = "SELECT Distinct GenreId,Description FROM

Genres";

cmdGenre.Connection = conn;

cmdGenre.CommandType = CommandType.Text;

DataTable dtGenres = new DataTable();

OleDbDataAdapter daReadGenre = new OleDbDataAdapter();

daReadGenre.SelectCommand = cmdGenre;

daReadGenre.Fill(dtGenres);

dtGenres.Rows[1].ItemArray[0].ToString();

for (int i = 0; i < dtGenres.Rows.Count; i++)

{

ListItem itemDetail = new ListItem();

itemDetail.Value = dtGenres.Rows[i].ItemArray[0].ToString();

itemDetail.Text = dtGenres.Rows[i].ItemArray[1].ToString();

194 | B o o k W i z a r d

Page 195: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

chckBoxGenres.Items.Add(itemDetail);

}

}

public void GetAllLanguages(OleDbConnection conn)

{

OleDbCommand cmdLang = new OleDbCommand();

cmdLang.CommandText = "SELECT Distinct LanguageId,Title FROM

Languages";

cmdLang.Connection = conn;

cmdLang.CommandType = CommandType.Text;

DataTable dtLang = new DataTable();

OleDbDataAdapter daReadLang = new OleDbDataAdapter();

daReadLang.SelectCommand = cmdLang;

daReadLang.Fill(dtLang);

dtLang.Rows[1].ItemArray[0].ToString();

for (int i = 0; i < dtLang.Rows.Count; i++)

{

ListItem itemDetail = new ListItem();

itemDetail.Value = dtLang.Rows[i].ItemArray[0].ToString();

itemDetail.Text = dtLang.Rows[i].ItemArray[1].ToString();

chckBoxLang.Items.Add(itemDetail);

195 | B o o k W i z a r d

Page 196: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

}

protected void Button1_Click(object sender, EventArgs e)

{

string getTextValues = Request["MaxValue"].Trim();

Response.Redirect(getTextValues);

}

protected void Button1_Click1(object sender, EventArgs e)

{

String genres = "";

String languages = "";

foreach (ListItem objItem in chckBoxGenres.Items)

{

if (objItem.Selected)

{

genres += objItem.Value + ",";

}

}

foreach (ListItem objItem in chckBoxLang.Items)

{

if (objItem.Selected)

{

languages += objItem.Value + ",";

196 | B o o k W i z a r d

Page 197: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

}

Session["Genres"] = genres;

Session["Languages"] = languages;

Session["MaxPage"] = MaxPageValue.Value.ToString();

Session["MinPage"] = MinPageValue.Value.ToString();

Response.Redirect("BooksBL.aspx?pm=" + "flt");

}

[WebMethod]

public static string DeleteBookFromBasket_st(int BookId)

{

FilterBL a = new FilterBL();

DeleteBookClass del = new DeleteBookClass();

string returnMessage = del.DeleteBookFromBasket(BookId);

return returnMessage;

}

}

HomeAL.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/AfterLogin.master"

AutoEventWireup="true" CodeFile="HomeAL.aspx.cs" Inherits="HomeAL" %>

197 | B o o k W i z a r d

Page 198: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<script language="javascript" type="text/javascript">

function onSuccess(result) {

alert(result);

}

function onFailure(error) {

alert("Something is wrong.");

}

function DeleteBook(BookId) {

PageMethods.DeleteBookFromBasket_st(BookId, onSuccess, onFailure);

UpdatePanelforList();

this.event.returnValue = false;

//PageMethods.GetData(f, s, OnRequestComplete, OnRequestError);

}

</script>

<p>

<asp:Image ID="Image9" runat="server" ImageUrl="~/images/bullet1.gif"

style="z-index: 1; left: 25px; top: 40px; position: absolute" />

198 | B o o k W i z a r d

Page 199: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Image ID="Image15" runat="server" ImageUrl="~/images/bullet1.gif"

style="z-index: 1; left: 25px; top: 455px; position: absolute" />

<asp:Label ID="Label7" runat="server" Font-Bold="True"

ForeColor="#993300" style="z-index: 1; left: 55px; top: 40px; position: absolute;

width: 107px; bottom: 856px;" Text="Featured Books"></asp:Label>

<asp:Label ID="Label1" runat="server" Font-Bold="True"

ForeColor="#993300" style="z-index: 1; left: 55px; top: 455px; position: absolute;

width: 77px" Text="New Books"></asp:Label>

<asp:Image ID="Image10" runat="server"

ImageUrl="~/images/box_top.gif" style="z-index: 1; left: 175px; top: 82px; width:

283px; position: absolute; height: 8px;" />

<asp:Image ID="Image11" runat="server" ImageUrl="~/images/box_center.gif"

style="z-index: 1; left: 175px; top: 90px; position: absolute; height: 133px; width:

283px" />

</p>

<p>

<asp:Image ID="Image8" runat="server"

ImageUrl="~/images/BookImages/61.jpg" style="z-index: 1; left: 25px; top: 85px;

position: absolute; height: 148px; width: 111px;" />

<asp:Label ID="Label5" runat="server" Font-Strikeout="False"

ForeColor="#FF6600" style="z-index: 1; left: 190px; top: 97px; position: absolute;

height: 19px;" Text="Madame Doubtfire"></asp:Label>

</p>

199 | B o o k W i z a r d

Page 200: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<p>

<asp:Image ID="Image12" runat="server" ImageUrl="~/images/box_bottom.gif"

style="z-index: 1; left: 175px; top: 223px; width: 283px; position: absolute" />

</p>

<p style="color: #000000">

<asp:HyperLink ID="HyperLink10" runat="server" ForeColor="#FF6600"

style="z-index: 1; left: 343px; top: 193px; position: absolute; width: 93px;"

NavigateUrl="BookDetailBL.aspx?BookId=61">-more details-</asp:HyperLink>

</p>

<p>

<asp:Label ID="Label3" runat="server" Font-Strikeout="False" style="z-index:

1; left: 190px; top: 127px; position: absolute; height: 84px; width: 238px; text-align:

left;" Text="The unemployed divorced father of three disguises himself to obtain a job

as the children's housekeeper."></asp:Label>&nbsp;</p>

<p>

<asp:Image ID="Image1" runat="server"

ImageUrl="~/images/BookImages/32.jpg" style="z-index: 1; left: 25px; top: 265px;

position: absolute; height: 148px; width: 111px;" />

<asp:Image ID="Image2" runat="server" ImageUrl="~/images/box_top.gif"

style="z-index: 1; left: 175px; top: 262px; width: 283px; position: absolute" />

<asp:Image ID="Image3" runat="server" ImageUrl="~/images/box_center.gif"

style="z-index: 1; left: 175px; top: 270px; position: absolute; height: 133px; width:

283px" />

<asp:Image ID="Image4" runat="server" ImageUrl="~/images/box_bottom.gif"

style="z-index: 1; left: 175px; top: 403px; width: 283px; position: absolute" />

&nbsp;

<asp:Label ID="Label6" runat="server" Font-Strikeout="False"

ForeColor="#FF6600" style="z-index: 1; left: 183px; top: 284px; position: absolute;

height: 19px; width: 171px;" Text="To Kill a Mockingbird"></asp:Label>

200 | B o o k W i z a r d

Page 201: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="Label4" runat="server" Font-Strikeout="False" style="z-index: 1;

left: 189px; top: 306px; position: absolute; height: 84px; width: 238px; text-align: left;"

Text="&quot;You never really understand a person until you consider things from his

point of view .. until you climb into his skin and walk around in

it.&quot;"></asp:Label>

<asp:HyperLink ID="HyperLink1" runat="server" ForeColor="#FF6600" style="z-

index: 1; left: 322px; top: 381px; position: absolute; width: 98px;"

NavigateUrl="BookDetailBL.aspx?BookId=32">-more details-</asp:HyperLink>

</p>

<p>

<asp:Image ID="Image14" runat="server" ForeColor="Black"

ImageUrl="~/images/middle.gif" style="z-index: 1; left: 25px; top: 420px; position:

absolute; width: 475px; height: 20px" />

</p>

<p>

&nbsp;</p>

<p>

<asp:HyperLink ID="HyperLink11" runat="server" ForeColor="#666666"

style="z-index: 1; left: 25px; top: 500px; position: absolute"

NavigateUrl="~/BookDetailAL.aspx?BookId=25">TransAtlantic</asp:HyperLink>

<asp:HyperLink ID="HyperLink12" runat="server" ForeColor="#666666"

style="z-index: 1; left: 365px; top: 715px; position: absolute; width: 104px;"

NavigateUrl="~/BookDetailAL.aspx?BookId=106">Şatoda Macera</asp:HyperLink>

<asp:HyperLink ID="HyperLink13" runat="server" ForeColor="#666666"

style="z-index: 1; left: 195px; top: 500px; position: absolute"

NavigateUrl="~/BookDetailAL.aspx?BookId=21">Night Film</asp:HyperLink>

<asp:ImageButton ID="ImageButton10" runat="server"

ImageUrl="~/images/BookImages/21.jpg" style="z-index: 1; left: 195px; top: 536px;

position: absolute; height: 148px; width: 111px;" OnClick="ImageButton10_Click" />

</p>

<p>

201 | B o o k W i z a r d

Page 202: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:HyperLink ID="HyperLink14" runat="server" ForeColor="#666666"

style="z-index: 1; left: 365px; top: 500px; position: absolute"

NavigateUrl="~/BookDetailAL.aspx?BookId=38">Room</asp:HyperLink>

</p>

<p>

<asp:ImageButton ID="ImageButton9" runat="server"

ImageUrl="~/images/BookImages/38.jpg" style="z-index: 1; left: 365px; top: 540px;

position: absolute; height: 148px; width: 111px;" OnClick="ImageButton9_Click" />

</p>

<p>

<asp:ImageButton ID="ImageButton5" runat="server"

ImageUrl="~/images/BookImages/25.jpg" style="z-index: 1; left: 25px; top: 539px;

position: absolute; height: 148px; width: 111px;" DescriptionUrl="asda"

OnClick="ImageButton5_Click" />

</p>

<p>

<asp:ImageButton ID="ImageButton7" runat="server"

ImageUrl="~/images/BookImages/109.jpg" style="z-index: 1; left: 25px; top: 744px;

position: absolute; height: 148px; width: 111px;" OnClick="ImageButton7_Click" />

</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

202 | B o o k W i z a r d

Page 203: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

<asp:ImageButton ID="ImageButton6" runat="server"

ImageUrl="~/images/BookImages/28.jpg" style="z-index: 1; left: 195px; top: 750px;

position: absolute; height: 148px; width: 111px;" OnClick="ImageButton6_Click" />

<asp:ImageButton ID="ImageButton8" runat="server"

ImageUrl="~/images/BookImages/106.jpg" style="z-index: 1; left: 365px; top: 752px;

position: absolute; height: 148px; width: 111px;" OnClick="ImageButton8_Click" />

<asp:HyperLink ID="HyperLink15" runat="server" ForeColor="#666666"

style="z-index: 1; left: 25px; top: 715px; position: absolute"

NavigateUrl="~/BookDetailAL.aspx?BookId=109">Zaman Hırsızı</asp:HyperLink>

<asp:HyperLink ID="HyperLink16" runat="server" ForeColor="#666666"

style="z-index: 1; left: 190px; top: 713px; position: absolute; width: 121px;"

NavigateUrl="~/BookDetailAL.aspx?BookId=28">The House at the End of Hope

Street</asp:HyperLink>

</p>

<p>

</p>

</asp:Content>

203 | B o o k W i z a r d

Page 204: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

HomeAL.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Services;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class HomeAL : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

[WebMethod]

public static string DeleteBookFromBasket_st(int BookId)

{

DeleteBookClass del = new DeleteBookClass();

string returnMessage = del.DeleteBookFromBasket(BookId);

return returnMessage;

204 | B o o k W i z a r d

Page 205: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

protected void ImageButton7_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("BookDetailAL.aspx?BookId=109") ;

}

protected void ImageButton5_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("BookDetailAL.aspx?BookId=25");

}

protected void ImageButton10_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("BookDetailAL.aspx?BookId=21");

}

protected void ImageButton9_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("BookDetailAL.aspx?BookId=38");

}

protected void ImageButton6_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("BookDetailAL.aspx?BookId=28");

}

protected void ImageButton8_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("BookDetailAL.aspx?BookId=106");

}

}

205 | B o o k W i z a r d

Page 206: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

HomeBL.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/BeforeLogin.master"

AutoEventWireup="true" CodeFile="HomeBL.aspx.cs" Inherits="HomeBL" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<script language="javascript" type="text/javascript">

function onSuccess(result) {

alert(result);

}

function onFailure(error) {

alert("Something is wrong.");

}

function DeleteBook(BookId) {

PageMethods.DeleteBookFromBasket_st(BookId, onSuccess, onFailure);

UpdatePanelforList();

this.event.returnValue = false;

//PageMethods.GetData(f, s, OnRequestComplete, OnRequestError);

}

</script>

<p>

206 | B o o k W i z a r d

Page 207: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Image ID="Image9" runat="server" ImageUrl="~/images/bullet1.gif"

style="z-index: 1; left: 25px; top: 40px; position: absolute" />

<asp:Image ID="Image15" runat="server" ImageUrl="~/images/bullet1.gif"

style="z-index: 1; left: 25px; top: 455px; position: absolute" />

<asp:Label ID="Label7" runat="server" Font-Bold="True"

ForeColor="#993300" style="z-index: 1; left: 55px; top: 40px; position: absolute;

width: 107px; bottom: 856px;" Text="Featured Books"></asp:Label>

<asp:Label ID="Label1" runat="server" Font-Bold="True"

ForeColor="#993300" style="z-index: 1; left: 55px; top: 455px; position: absolute;

width: 77px" Text="New Books"></asp:Label>

<asp:Image ID="Image10" runat="server"

ImageUrl="~/images/box_top.gif" style="z-index: 1; left: 175px; top: 82px; width:

283px; position: absolute; height: 8px;" />

<asp:Image ID="Image11" runat="server" ImageUrl="~/images/box_center.gif"

style="z-index: 1; left: 175px; top: 90px; position: absolute; height: 133px; width:

283px" />

</p>

<p>

207 | B o o k W i z a r d

Page 208: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Image ID="Image8" runat="server"

ImageUrl="~/images/BookImages/61.jpg" style="z-index: 1; left: 25px; top: 85px;

position: absolute; height: 148px; width: 111px;" />

<asp:Label ID="Label5" runat="server" Font-Strikeout="False"

ForeColor="#FF6600" style="z-index: 1; left: 190px; top: 97px; position: absolute;

height: 19px;" Text="Madame Doubtfire"></asp:Label>

</p>

<p>

<asp:Image ID="Image12" runat="server" ImageUrl="~/images/box_bottom.gif"

style="z-index: 1; left: 175px; top: 223px; width: 283px; position: absolute" />

</p>

<p style="color: #000000">

<asp:HyperLink ID="HyperLink10" runat="server" ForeColor="#FF6600"

style="z-index: 1; left: 344px; top: 205px; position: absolute; width: 93px;"

NavigateUrl="BookDetailBL.aspx?BookId=61">-more details-</asp:HyperLink>

</p>

<p>

<asp:Label ID="Label3" runat="server" Font-Strikeout="False" style="z-index:

1; left: 190px; top: 127px; position: absolute; height: 84px; width: 238px; text-align:

left;" Text="The unemployed divorced father of three disguises himself to obtain a job

as the children's housekeeper."></asp:Label>&nbsp;</p>

<p>

<asp:Image ID="Image1" runat="server"

ImageUrl="~/images/BookImages/32.jpg" style="z-index: 1; left: 25px; top: 265px;

position: absolute; height: 148px; width: 111px;" />

<asp:Image ID="Image2" runat="server" ImageUrl="~/images/box_top.gif"

style="z-index: 1; left: 175px; top: 262px; width: 283px; position: absolute" />

208 | B o o k W i z a r d

Page 209: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Image ID="Image3" runat="server" ImageUrl="~/images/box_center.gif"

style="z-index: 1; left: 175px; top: 270px; position: absolute; height: 133px; width:

283px" />

<asp:Image ID="Image4" runat="server" ImageUrl="~/images/box_bottom.gif"

style="z-index: 1; left: 175px; top: 403px; width: 283px; position: absolute" />

&nbsp;

<asp:Label ID="Label6" runat="server" Font-Strikeout="False"

ForeColor="#FF6600" style="z-index: 1; left: 183px; top: 284px; position: absolute;

height: 19px; width: 171px;" Text="To Kill a Mockingbird"></asp:Label>

<asp:Label ID="Label4" runat="server" Font-Strikeout="False" style="z-index: 1;

left: 189px; top: 306px; position: absolute; height: 84px; width: 238px; text-align: left;"

Text="&quot;You never really understand a person until you consider things from his

point of view .. until you climb into his skin and walk around in

it.&quot;"></asp:Label>

<asp:HyperLink ID="HyperLink1" runat="server" ForeColor="#FF6600" style="z-

index: 1; left: 322px; top: 381px; position: absolute; width: 98px;"

NavigateUrl="BookDetailBL.aspx?BookId=32">-more details-</asp:HyperLink>

</p>

<p>

<asp:Image ID="Image14" runat="server" ForeColor="Black"

ImageUrl="~/images/middle.gif" style="z-index: 1; left: 25px; top: 420px; position:

absolute; width: 475px; height: 20px" />

</p>

<p>

&nbsp;</p>

<p>

<asp:HyperLink ID="HyperLink11" runat="server" ForeColor="#666666"

style="z-index: 1; left: 25px; top: 500px; position: absolute"

NavigateUrl="~/BookDetailBL.aspx?BookId=25">TransAtlantic</asp:HyperLink>

<asp:HyperLink ID="HyperLink12" runat="server" ForeColor="#666666"

style="z-index: 1; left: 365px; top: 715px; position: absolute; width: 104px;"

NavigateUrl="~/BookDetailBL.aspx?BookId=106">Şatoda Macera</asp:HyperLink>

209 | B o o k W i z a r d

Page 210: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:HyperLink ID="HyperLink13" runat="server" ForeColor="#666666"

style="z-index: 1; left: 195px; top: 500px; position: absolute"

NavigateUrl="~/BookDetailBL.aspx?BookId=21">Night Film</asp:HyperLink>

<asp:ImageButton ID="ImageButton10" runat="server"

ImageUrl="~/images/BookImages/21.jpg" style="z-index: 1; left: 195px; top: 536px;

position: absolute; height: 148px; width: 111px;" OnClick="ImageButton10_Click" />

</p>

<p>

<asp:HyperLink ID="HyperLink14" runat="server" ForeColor="#666666"

style="z-index: 1; left: 365px; top: 500px; position: absolute"

NavigateUrl="~/BookDetailBL.aspx?BookId=38">Room</asp:HyperLink>

</p>

<p>

<asp:ImageButton ID="ImageButton9" runat="server"

ImageUrl="~/images/BookImages/38.jpg" style="z-index: 1; left: 365px; top: 540px;

position: absolute; height: 148px; width: 111px;" OnClick="ImageButton9_Click" />

</p>

<p>

<asp:ImageButton ID="ImageButton5" runat="server"

ImageUrl="~/images/BookImages/25.jpg" style="z-index: 1; left: 25px; top: 539px;

position: absolute; height: 148px; width: 111px;" OnClick="ImageButton5_Click" />

</p>

<p>

<asp:ImageButton ID="ImageButton7" runat="server"

ImageUrl="~/images/BookImages/109.jpg" style="z-index: 1; left: 25px; top: 744px;

position: absolute; height: 148px; width: 111px;" OnClick="ImageButton7_Click" />

</p>

<p>

&nbsp;</p>

210 | B o o k W i z a r d

Page 211: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

&nbsp;</p>

<p>

<asp:ImageButton ID="ImageButton6" runat="server"

ImageUrl="~/images/BookImages/28.jpg" style="z-index: 1; left: 195px; top: 750px;

position: absolute; height: 148px; width: 111px;" OnClick="ImageButton6_Click" />

<asp:ImageButton ID="ImageButton8" runat="server"

ImageUrl="~/images/BookImages/106.jpg" style="z-index: 1; left: 365px; top: 752px;

position: absolute; height: 148px; width: 111px;" OnClick="ImageButton8_Click" />

<asp:HyperLink ID="HyperLink15" runat="server" ForeColor="#666666"

style="z-index: 1; left: 25px; top: 715px; position: absolute"

NavigateUrl="~/BookDetailBL.aspx?BookId=109">Zaman Hırsızı</asp:HyperLink>

<asp:HyperLink ID="HyperLink16" runat="server" ForeColor="#666666"

style="z-index: 1; left: 190px; top: 713px; position: absolute; width: 121px;"

NavigateUrl="~/BookDetailBL.aspx?BookId=28">The House at the End of Hope

Street</asp:HyperLink>

211 | B o o k W i z a r d

Page 212: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</p>

<p>

</p>

</asp:Content>

HomeBL.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Services;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class HomeBL : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

[WebMethod]

public static string DeleteBookFromBasket_st(int BookId)

{

212 | B o o k W i z a r d

Page 213: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

DeleteBookClass del = new DeleteBookClass();

string returnMessage = del.DeleteBookFromBasket(BookId);

return returnMessage;

}

protected void ImageButton7_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("BookDetailBL.aspx?BookId=109");

}

protected void ImageButton5_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("BookDetailBL.aspx?BookId=25");

}

protected void ImageButton10_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("BookDetailBL.aspx?BookId=21");

}

protected void ImageButton9_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("BookDetailBL.aspx?BookId=38");

}

protected void ImageButton6_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("BookDetailBL.aspx?BookId=28");

213 | B o o k W i z a r d

Page 214: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

protected void ImageButton8_Click(object sender, ImageClickEventArgs e)

{

Response.Redirect("BookDetailBL.aspx?BookId=106");

}

}

Login.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/DSSBL.master"

AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<script language="javascript" type="text/javascript">

function onSuccess(result) {

alert(result);

}

function onFailure(error) {

alert("Something is wrong.");

}

function DeleteBook(BookId) {

PageMethods.DeleteBookFromBasket_st(BookId, onSuccess, onFailure);

214 | B o o k W i z a r d

Page 215: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

UpdatePanelforList();

this.event.returnValue = false;

//PageMethods.GetData(f, s, OnRequestComplete, OnRequestError);

}

</script>

<p>

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<asp:Login ID="Login1" runat="server" BackColor="#CCCCCC" style="z-

index: 1; left: 319px; top: 29px; position: absolute; height: 202px; width: 270px">

</asp:Login>

<br />

<br />

<br />

<br />

<br />

<br />

215 | B o o k W i z a r d

Page 216: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="Label1" runat="server" Font-Bold="True" style="z-index: 1;

left: 327px; top: 270px; position: absolute" Text="If you are registered

yet,"></asp:Label>

<br />

<asp:ImageButton ID="ImageButton3" runat="server"

ImageUrl="~/images/regnow.png" PostBackUrl="~/Register.aspx" style="z-index: 1;

left: 499px; top: 242px; position: absolute; height: 54px; width: 95px" />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

</asp:Content>

Login.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Services;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class Login : System.Web.UI.Page

216 | B o o k W i z a r d

Page 217: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

protected void Page_Load(object sender, EventArgs e)

{

}

[WebMethod]

public static string DeleteBookFromBasket_st(int BookId)

{

DeleteBookClass del = new DeleteBookClass();

string returnMessage = del.DeleteBookFromBasket(BookId);

return returnMessage;

}

}

MainComparison.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/DSSAL.master"

AutoEventWireup="true" CodeFile="MainComparison.aspx.cs"

Inherits="MainComparison" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

217 | B o o k W i z a r d

Page 218: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<ajaxToolKit:ToolkitScriptManager runat="Server" />

<asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Verdana"

Font-Size="0.8em" PathSeparator=" : " style="z-index: 1; left: 3px; top: 1px; position:

absolute">

<CurrentNodeStyle ForeColor="#333333" />

<NodeStyle Font-Bold="True" ForeColor="#990000" />

<PathSeparatorStyle Font-Bold="True" ForeColor="#990000" />

<RootNodeStyle Font-Bold="True" ForeColor="#FF8000" />

</asp:SiteMapPath>

<asp:Panel ID="Panel1" runat="server" Height="316px" style="text-align: left">

<br />

<asp:Label ID="Label3" runat="server" Text="is <u>more</u> &lt;br

/&gt;important &lt;br /&gt;than" style="z-index: 1; left: 252px; top: 55px; position:

absolute; width: 87px;" Font-Bold="True" Font-Size="Small"></asp:Label>

<asp:Label ID="Label4" runat="server" style="z-index: 1; left: 375px; top:

55px; position: absolute; width: 87px;" Text="is equally&lt;br /&gt; important as"

Font-Bold="True" Font-Size="Small"></asp:Label>

<asp:Label ID="Label2" runat="server" style="z-index: 1; left: 490px; top:

55px; position: absolute; width: 67px; text-align: right;" Text="is <u>less</u>

&lt;br /&gt;important &lt;br /&gt;than" Font-Bold="True"

Font-Size="Small"></asp:Label>

<br />

<br />

<br />

<br />

<br />

</asp:Panel>

<br />

218 | B o o k W i z a r d

Page 219: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Button ID="Button2" runat="server" OnClick="Button1_Click" Text="Next

(2/7)" style="z-index: 1; left: 619px; top: 63px; position: absolute; width: 97px" />

</asp:Content>

MainComparison.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Reflection;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class MainComparison : System.Web.UI.Page

{

List<Criterion> criteria = new List<Criterion>();

string PageType = "Cr1";

protected void Page_Load(object sender, EventArgs e)

{

//Cr1 PAGETYPE

Criterion criterion1 = new Criterion("Cr1", 0, "10", "Knowledge About the

Book");

Criterion criterion2 = new Criterion("Cr1", 1, "12", "Author");

219 | B o o k W i z a r d

Page 220: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Criterion criterion3 = new Criterion("Cr1", 2, "23", "Genreasssssssssssssssssssss as

asfasfasfas dfaf asf asasf");

Criterion criterion4 = new Criterion("Cr1", 3, "22", "Theme");

criteria.Add(criterion1);

criteria.Add(criterion2);

criteria.Add(criterion3);

criteria.Add(criterion4);

#region Adds sliders of elements to panel

int criteriaCount = criteria.Count;

for (int i = 0; i < criteriaCount; i++)

{

for (int j = i + 1; j < criteriaCount; j++)

{

Control toAdd = LoadControl("UserControl.ascx", PageType,

criteria[i].name, criteria[j].name, criteria[i].userSortId, criteria[j].userSortId);

Panel1.Controls.Add(toAdd);

//string value= Session["value"].ToString();

//Label1.Text = value;

//Console.WriteLine(value);

Panel1.Controls.Add(new LiteralControl("<br />"));

}

}

#endregion

220 | B o o k W i z a r d

Page 221: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

private UserControl LoadControl(string userControlPath, params object[]

constructorParameters)

{

List<Type> constParamTypes = new List<Type>();

foreach (object constParam in constructorParameters)

{

constParamTypes.Add(constParam.GetType());

}

UserControl ctl = Page.LoadControl(userControlPath) as UserControl;

// Find the relevant constructor

ConstructorInfo constructor =

ctl.GetType().BaseType.GetConstructor(constParamTypes.ToArray());

//And then call the relevant constructor

if (constructor == null)

{

throw new MemberAccessException("The requested constructor was not found

on : " + ctl.GetType().BaseType.ToString());

}

else

{

constructor.Invoke(ctl, constructorParameters);

}

// Finally return the user control

return ctl;

}

221 | B o o k W i z a r d

Page 222: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

protected void Button1_Click(object sender, EventArgs e)

{

#region Criteria Create MATrIX for User Rating

int criteriaCount = criteria.Count;

double[,] arrayDeger = new double[criteriaCount, criteriaCount];

for (int i = 0; i < criteriaCount; i++)

{

for (int j = i + 1; j < criteriaCount; j++)

{

int comparisonValueSw = Convert.ToInt32(Session[PageType + "-" +

criteria[i].userSortId.ToString() + "," + criteria[j].userSortId.ToString()].ToString());

double comparisonValue = Convert.ToInt32(Session[PageType + "-" +

criteria[i].userSortId.ToString() + "," + criteria[j].userSortId.ToString()].ToString());

if (comparisonValue < 5)

{

switch (comparisonValueSw)

{

case 1:

comparisonValue = 5;

break;

case 2:

222 | B o o k W i z a r d

Page 223: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

comparisonValue = 4;

break;

case 3:

comparisonValue = 3;

break;

case 4:

comparisonValue = 2;

break;

}

arrayDeger[criteria[i].userSortId, criteria[j].userSortId] =

comparisonValue;

arrayDeger[criteria[j].userSortId, criteria[i].userSortId] = 1.0 /

comparisonValue * 1.0;

}

else if (comparisonValue > 5)

{

comparisonValue = comparisonValue - 4;

arrayDeger[criteria[j].userSortId, criteria[i].userSortId] =

comparisonValue;

arrayDeger[criteria[i].userSortId, criteria[j].userSortId] = 1.0 /

comparisonValue * 1.0;

}

else

{

arrayDeger[criteria[j].userSortId, criteria[i].userSortId] = 1;

arrayDeger[criteria[i].userSortId, criteria[j].userSortId] = 1;

}

223 | B o o k W i z a r d

Page 224: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

arrayDeger[criteria[i].userSortId, criteria[i].userSortId] = 1;

}

#endregion

CalculateGeneral calc = new CalculateGeneral();

double[] eigenArrayDeger = new double[criteriaCount];

double ConsistencyRatio;

eigenArrayDeger = calc.CalculateEigen(criteriaCount, arrayDeger);

ConsistencyRatio = calc.CalculateConsistencyRatio(criteriaCount, arrayDeger);

if (ConsistencyRatio < 0.1)

{

Session["MainComparisonEigen"] = eigenArrayDeger;

Response.Redirect("SubKnowAboutBook.aspx");

}

else

{

Response.Write("<script language=javascript>alert('The values are inconsistent!

Please select them again.');</script>");

224 | B o o k W i z a r d

Page 225: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

}

}

Register.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/BeforeLogin.master"

AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Register" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<script language="javascript" type="text/javascript">

function onSuccess(result) {

alert(result);

}

function onFailure(error) {

alert("Something is wrong.");

}

function DeleteBook(BookId) {

PageMethods.DeleteBookFromBasket_st(BookId, onSuccess, onFailure);

UpdatePanelforList();

this.event.returnValue = false;

//PageMethods.GetData(f, s, OnRequestComplete, OnRequestError);

225 | B o o k W i z a r d

Page 226: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

</script>

<br />

<br />

<asp:Image ID="Image10" runat="server" ImageUrl="~/images/blue-gradient-

header.jpg" style="z-index: 1; left: 0px; top: 0px; position: absolute; height: 64px;

width: 511px" />

<asp:Label ID="Label5" runat="server" ForeColor="White" style="z-index: 1; left:

29px; top: 13px; position: absolute" Text="USER REGISTRATION FORM" Font-

Bold="True" Font-Size="X-Large"></asp:Label>

<br />

<br />

<br />

<asp:Label ID="Label14" runat="server" style="z-index: 1; left: 405px; top:

107px; position: absolute" Text="Label"></asp:Label>

<br />

<asp:Label ID="Label15" runat="server" style="z-index: 1; left: 406px; top:

154px; position: absolute" Text="Label"></asp:Label>

<br />

226 | B o o k W i z a r d

Page 227: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<br />

<asp:Label ID="Label16" runat="server" style="z-index: 1; left: 408px; top:

204px; position: absolute; height: 16px" Text="Label"></asp:Label>

<br />

<br />

<br />

<asp:Label ID="Label17" runat="server" style="z-index: 1; left: 405px; top:

257px; position: absolute" Text="Label"></asp:Label>

<br />

<br />

<br />

<br />

<br />

<br />

<asp:TextBox ID="TextBox8" runat="server" style="z-index: 1; left: 203px; top:

416px; position: absolute; width: 179px; height: 26px" ></asp:TextBox>

<br />

<br />

<br />

<asp:Label ID="Label9" runat="server" style="z-index: 1; left: 41px; top: 100px;

position: absolute" Text="First Name:"></asp:Label>

<asp:Label ID="Label8" runat="server" style="z-index: 1; left: 40px; top: 150px;

position: absolute" Text="Last Name:"></asp:Label>

<asp:Label ID="Label12" runat="server" style="z-index: 1; left: 40px; top:

200px; position: absolute" Text="Username"></asp:Label>

227 | B o o k W i z a r d

Page 228: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="Label10" runat="server" style="z-index: 1; left: 40px; top: 250px;

position: absolute" Text="Password:"></asp:Label>

<asp:Label ID="Label11" runat="server" style="z-index: 1; left: 40px; top: 308px;

position: absolute" Text="Email:"></asp:Label>

<asp:Label ID="Label1" runat="server" style="z-index: 1; left: 40px; top: 362px;

position: absolute" Text="City:"></asp:Label>

<asp:Label ID="Label2" runat="server" style="z-index: 1; left: 40px; top: 417px;

position: absolute" Text="Country:"></asp:Label>

<br />

<asp:TextBox ID="TextBox1" runat="server" style="z-index: 1; left: 202px; top:

100px; position: absolute; width: 179px; height: 26px"></asp:TextBox>

<asp:TextBox ID="TextBox2" runat="server" style="z-index: 1; left: 202px; top:

150px; position: absolute; width: 179px; height: 26px"></asp:TextBox>

<asp:TextBox ID="TextBox3" runat="server" style="z-index: 1; left: 199px; top:

200px; position: absolute; width: 179px; height: 26px"></asp:TextBox>

<asp:Label ID="Label18" runat="server" style="z-index: 1; left: 405px; top: 312px;

position: absolute" Text="Label"></asp:Label>

<asp:TextBox ID="TextBox4" runat="server" style="z-index: 1; left: 202px; top:

250px; position: absolute; width: 179px; height: 26px"

TextMode="Password"></asp:TextBox>

<asp:TextBox ID="TextBox6" runat="server" style="z-index: 1; left: 202px; top:

303px; position: absolute; width: 179px; height: 26px"></asp:TextBox>

<asp:TextBox ID="TextBox7" runat="server" style="z-index: 1; left: 202px; top:

356px; position: absolute; width: 179px; height: 26px"></asp:TextBox>

<br />

<asp:Label ID="Label13" runat="server" Font-Bold="True"

ForeColor="#66FF66" style="z-index: 1; left: 220px; top: 530px; position: absolute;

right: 255px; height: 23px;" Text="Label"></asp:Label>

<br />

228 | B o o k W i z a r d

Page 229: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<br />

<p>

<br />

<br />

<p>

<br />

<p>

<br />

<asp:ImageButton ID="ImageButton3" runat="server"

ImageUrl="~/images/Create-New-Account_Button.png" style="z-index: 1; left: 201px;

top: 484px; position: absolute; height: 35px; width: 171px; bottom: 396px;"

OnClick="ImageButton3_Click1" />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br/>

<br />

<br />

<br />

<br />

<br/>

<br />

229 | B o o k W i z a r d

Page 230: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

</asp:Content>

Register.aspx.cs

using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

230 | B o o k W i z a r d

Page 231: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using System.Data.OleDb;

using System.Net.Mail;

using System.Net.Mime;

using System.Threading;

using System.ComponentModel;

using System.Text;

public partial class Register : System.Web.UI.Page

{

string connString;

protected bool checkUserAvailability()

{

connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +

Server.MapPath(".") + "\\BookWizard.mdb;User Id=;Password=;";

OleDbConnection conn = new OleDbConnection();

conn.ConnectionString = connString;

conn.Open();

OleDbCommand cmd = new OleDbCommand();

cmd.CommandText = "SELECT UserName FROM Users WHERE UserName='"

+ TextBox3.Text + "'";

cmd.Connection = conn;

cmd.CommandType = CommandType.Text;

231 | B o o k W i z a r d

Page 232: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

string valuereturn = (cmd.ExecuteScalar()== null) ? "" :

cmd.ExecuteScalar().ToString();

if (valuereturn =="")

{

conn.Close();

return true;

}

else

{

Label16.Text += "<br> The username already exists!";

conn.Close();

return false;

}

}

protected bool checkEmailAvailability()

{

connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +

Server.MapPath(".") + "\\BookWizard.mdb;User Id=;Password=;";

OleDbConnection conn = new OleDbConnection();

conn.ConnectionString = connString;

conn.Open();

OleDbCommand cmd = new OleDbCommand();

232 | B o o k W i z a r d

Page 233: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

cmd.CommandText = "SELECT Email FROM Users WHERE Email='" +

TextBox6.Text.ToString() + "'";

cmd.Connection = conn;

cmd.CommandType = CommandType.Text;

string valuereturn = (cmd.ExecuteScalar() == null) ? "" :

cmd.ExecuteScalar().ToString();

if (valuereturn == "")

{

conn.Close();

return true;

}

else

{

Label18.Text += "<br> The email already exists!";

conn.Close();

return false;

}

}

protected void ImageButton3_Click1(object sender, ImageClickEventArgs e)

{

Label14.Text = "";

Label15.Text = "";

233 | B o o k W i z a r d

Page 234: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Label16.Text = "";

Label17.Text = "";

Label18.Text = "";

bool bname = checkName();

bool bsurname = checkSurname();

bool bpass = checkPassword();

bool bmail = checkEmailAvailability();

bool bavailable = checkUserAvailability();

if (bname==true && bsurname == true && bpass == true && bmail==true &&

bavailable==true)

{

OleDbConnection conn = new OleDbConnection();

conn.ConnectionString = connString;

conn.Open();

OleDbCommand instcmd = new OleDbCommand();

//instcmd.CommandText = "INSERT INTO Customer

(CustomerID,CustomerName,CustomerSurname,CustomerPhone,CustomerEmail,Cust

omerStatus,CustomerInsertedDate,CustomerBirthDate,UserName,Password,Customer

GeneralAddress) Values(" + custid + ",'" + name.Text + "','" + surname.Text +

"','"+phone.Text+"','" + email.Text + "',1,'" + name.Text + "'," + DateTime.Now + ","

+ DateTime.Now + ",'" + username.Text + "','" + password.Text + "','" + Address.Text

+ "'";

instcmd.CommandText = "INSERT INTO Users (UserName, UserPassword,

FirstName, LastName, Email, City, Country) Values('" + TextBox3.Text + "','" +

TextBox4.Text + "','" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox6.Text

+ "','" + TextBox7.Text + "','" + TextBox8.Text + "')";

234 | B o o k W i z a r d

Page 235: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

instcmd.Connection = conn;

instcmd.CommandType = CommandType.Text;

instcmd.ExecuteNonQuery();

conn.Close();

Label13.Text = "Record successfully added!";

}

}

protected void Page_Load(object sender, EventArgs e)

{

Label13.Text = "";

Label14.Text = "";

Label15.Text = "";

Label16.Text = "";

Label17.Text = "";

Label18.Text = "";

}

protected bool checkName()

{

if (TextBox1.Text != "")

return true;

else

{

235 | B o o k W i z a r d

Page 236: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Label14.Text = "Invalid name!";

return false;

}

}

protected bool checkSurname()

{

if (TextBox2.Text != "")

return true;

else {

Label15.Text = "Invalid surname";

return false;

}

}

protected bool checkPassword()

{

if (TextBox4.Text != "")

return true;

else

{

Label17.Text = "Invalid password";

return false;

}

}

236 | B o o k W i z a r d

Page 237: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

SubAuthor.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/DSSAL.master"

AutoEventWireup="true" CodeFile="SubAuthor.aspx.cs" Inherits="SubAuthor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<ajaxToolkit:ToolkitScriptManager runat="Server" />

<asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Verdana"

Font-Size="0.8em" PathSeparator=" : " style="z-index: 1; left: 3px; top: 1px; position:

absolute">

<CurrentNodeStyle ForeColor="#333333" />

<NodeStyle Font-Bold="True" ForeColor="#990000" />

<PathSeparatorStyle Font-Bold="True" ForeColor="#990000" />

<RootNodeStyle Font-Bold="True" ForeColor="#FF8000" />

</asp:SiteMapPath>

<asp:Panel ID="Panel1" runat="server" Height="316px" style="text-align: left">

<br />

<asp:Label ID="Label3" runat="server" Text="is <u>more</u> &lt;br

/&gt;important &lt;br /&gt;than" style="z-index: 1; left: 252px; top: 55px; position:

absolute; width: 87px;" Font-Bold="True" Font-Size="Small"></asp:Label>

<asp:Label ID="Label4" runat="server" style="z-index: 1; left: 375px; top:

55px; position: absolute; width: 87px;" Text="is equally&lt;br /&gt; important as"

Font-Bold="True" Font-Size="Small"></asp:Label>

<asp:Label ID="Label2" runat="server" style="z-index: 1; left: 490px; top:

55px; position: absolute; width: 67px; text-align: right;" Text="is <u>less</u>

&lt;br /&gt;important &lt;br /&gt;than" Font-Bold="True"

Font-Size="Small"></asp:Label>

<br />

237 | B o o k W i z a r d

Page 238: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<br />

<br />

<br />

<br />

</asp:Panel>

<br />

<asp:Button ID="Button2" runat="server" OnClick="Button1_Click" Text="Next

(5/7)" style="z-index: 1; left: 619px; top: 63px; position: absolute; width: 97px" />

</asp:Content>

SubAuthor.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Reflection;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class SubAuthor : System.Web.UI.Page

{

List<Criterion> criteria = new List<Criterion>();

List<Author> authors = new List<Author>();

string PageType = "Cr3";

protected void Page_Load(object sender, EventArgs e)

238 | B o o k W i z a r d

Page 239: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

//Cr2

Criterion criterion1 = new Criterion("Cr3", 0, "10", "Familiarity");

Criterion criterion2 = new Criterion("Cr3", 1, "12", "Award");

Criterion criterion3 = new Criterion("Cr3", 2, "23", "Rating");

Author author1 = new Author("Au1", 0, "12", "Selin Güneş", 3.2, 1.5);

Author author2 = new Author("Au1", 1, "13", "Serkan ToSo", 4.9, 0);

Author author3 = new Author("Au1", 2, "14", "Mert Atlı", 2.54, 0.5);

Author author4 = new Author("Au1", 3, "15", "Cem Yeşil", 2.5, 1);

criteria.Add(criterion1);

criteria.Add(criterion2);

criteria.Add(criterion3);

authors.Add(author1);

authors.Add(author2);

authors.Add(author3);

authors.Add(author4);

#region Adds sliders of elements to panel

int criteriaCount = criteria.Count;

for (int i = 0; i < criteriaCount; i++)

{

for (int j = i + 1; j < criteriaCount; j++)

{

Control toAdd = LoadControl("UserControl.ascx", PageType,

criteria[i].name, criteria[j].name, criteria[i].userSortId, criteria[j].userSortId);

239 | B o o k W i z a r d

Page 240: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Panel1.Controls.Add(toAdd);

//string value= Session["value"].ToString();

//Label1.Text = value;

//Console.WriteLine(value);

Panel1.Controls.Add(new LiteralControl("<br />"));

}

}

#endregion

}

private UserControl LoadControl(string userControlPath, params object[]

constructorParameters)

{

List<Type> constParamTypes = new List<Type>();

foreach (object constParam in constructorParameters)

{

constParamTypes.Add(constParam.GetType());

}

UserControl ctl = Page.LoadControl(userControlPath) as UserControl;

// Find the relevant constructor

ConstructorInfo constructor =

ctl.GetType().BaseType.GetConstructor(constParamTypes.ToArray());

//And then call the relevant constructor

if (constructor == null)

{

throw new MemberAccessException("The requested constructor was not found

on : " + ctl.GetType().BaseType.ToString());

}

240 | B o o k W i z a r d

Page 241: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

else

{

constructor.Invoke(ctl, constructorParameters);

}

// Finally return the user control

return ctl;

}

protected void Button1_Click(object sender, EventArgs e)

{

int criteriaCount = criteria.Count;

#region Calculation for Normalized array and Eigen

double[,] arrayDeger = new double[criteriaCount, criteriaCount];

for (int i = 0; i < criteriaCount; i++)

{

for (int j = i + 1; j < criteriaCount; j++)

{

int comparisonValueSw = Convert.ToInt32(Session[PageType + "-" +

criteria[i].userSortId.ToString() + "," + criteria[j].userSortId.ToString()].ToString());

double comparisonValue = Convert.ToInt32(Session[PageType + "-" +

criteria[i].userSortId.ToString() + "," + criteria[j].userSortId.ToString()].ToString());

if (comparisonValue < 5)

241 | B o o k W i z a r d

Page 242: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

switch (comparisonValueSw)

{

case 1:

comparisonValue = 5;

break;

case 2:

comparisonValue = 4;

break;

case 3:

comparisonValue = 3;

break;

case 4:

comparisonValue = 2;

break;

}

arrayDeger[criteria[i].userSortId, criteria[j].userSortId] =

comparisonValue;

arrayDeger[criteria[j].userSortId, criteria[i].userSortId] = 1.0 /

comparisonValue * 1.0;

}

else if (comparisonValue > 5)

{

comparisonValue = comparisonValue - 4;

arrayDeger[criteria[j].userSortId, criteria[i].userSortId] =

comparisonValue;

arrayDeger[criteria[i].userSortId, criteria[j].userSortId] = 1.0 /

comparisonValue * 1.0;

242 | B o o k W i z a r d

Page 243: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

else

{

arrayDeger[criteria[j].userSortId, criteria[i].userSortId] = 1;

arrayDeger[criteria[i].userSortId, criteria[j].userSortId] = 1;

}

//Label1.Text += criteria[i].userSortId + "," + criteria[j].userSortId + " point

is: " + Session[criteria[i].userSortId.ToString() + "," +

criteria[j].userSortId.ToString()].ToString() + "---" + comparisonValue + "----" +

arrayDeger[i, j].ToString("F6") + "----" + arrayDeger[j, i].ToString("F6") + " <br> ";

}

arrayDeger[criteria[i].userSortId, criteria[i].userSortId] = 1;

}

#endregion

int authorCount = authors.Count;

#region Authors' Rating Data Normalization

double sumrating = 0;

for (int i = 0; i < authorCount; i++)

243 | B o o k W i z a r d

Page 244: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

sumrating += authors[i].rating;

}

double[] NormalizedAuthorRating = new double[authorCount];

for (int i = 0; i < authorCount; i++)

{

NormalizedAuthorRating[i] = (sumrating != 0) ? (authors[i].rating / sumrating) :

0;

}

#endregion

#region Authors' Award Data Normalization

double sumAward = 0;

for (int i = 0; i < authorCount; i++)

{

sumAward += authors[i].award;

244 | B o o k W i z a r d

Page 245: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

double[] NormalizedAuthorAward = new double[authorCount];

for (int i = 0; i < authorCount; i++)

{

NormalizedAuthorAward[i] = (sumAward != 0) ? (authors[i].award / sumAward)

: 0;

}

#endregion

CalculateGeneral calc = new CalculateGeneral();

double[] eigenArrayDeger = new double[criteriaCount];

double ConsistencyRatio;

eigenArrayDeger = calc.CalculateEigen(criteriaCount, arrayDeger);

ConsistencyRatio = calc.CalculateConsistencyRatio(criteriaCount, arrayDeger);

if (ConsistencyRatio < 0.1)

245 | B o o k W i z a r d

Page 246: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

Session["SubAuthorEigen"] = eigenArrayDeger;

Session["NormalizedAuthorRating"] = NormalizedAuthorRating;

Session["NormalizedAuthorAward"] = NormalizedAuthorAward;

Response.Redirect("AuthorFamiliarity.aspx");

}

else

{

Response.Write("<script language=javascript>alert('The values are inconsistent!

Please select them again.');</script>");

}

}

}

SubGenres.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/DSSAL.master"

AutoEventWireup="true" CodeFile="SubGenres.aspx.cs" Inherits="SubGenres" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<ajaxToolkit:ToolkitScriptManager runat="Server" />

246 | B o o k W i z a r d

Page 247: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Verdana"

Font-Size="0.7em" PathSeparator=" : " style="z-index: 1; left: 3px; top: 1px; position:

absolute">

<CurrentNodeStyle ForeColor="#333333" />

<NodeStyle Font-Bold="True" ForeColor="#990000" />

<PathSeparatorStyle Font-Bold="True" ForeColor="#990000" />

<RootNodeStyle Font-Bold="True" ForeColor="#FF8000" />

</asp:SiteMapPath>

<asp:Panel ID="Panel1" runat="server" Height="316px" style="text-align: left">

<br />

<asp:Label ID="Label3" runat="server" Text="is <u>more</u> &lt;br

/&gt;important &lt;br /&gt;than" style="z-index: 1; left: 252px; top: 55px; position:

absolute; width: 87px;" Font-Bold="True" Font-Size="Small"></asp:Label>

<asp:Label ID="Label4" runat="server" style="z-index: 1; left: 375px; top:

55px; position: absolute; width: 87px;" Text="is equally&lt;br /&gt; important as"

Font-Bold="True" Font-Size="Small"></asp:Label>

<asp:Label ID="Label2" runat="server" style="z-index: 1; left: 490px; top:

55px; position: absolute; width: 67px; text-align: right;" Text="is <u>less</u>

&lt;br /&gt;important &lt;br /&gt;than" Font-Bold="True"

Font-Size="Small"></asp:Label>

<br />

<br />

<br />

<br />

<br />

</asp:Panel>

<br />

247 | B o o k W i z a r d

Page 248: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Button ID="Button2" runat="server" OnClick="Button1_Click" Text="See

Your Result" style="z-index: 1; left: 619px; top: 63px; position: absolute; width:

97px" />

</asp:Content>

SubGenres.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Reflection;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class SubGenres : System.Web.UI.Page

{

List<Book> books = new List<Book>();

List<Genre> genres = new List<Genre>();

string PageType = "G1";

protected void Page_Load(object sender, EventArgs e)

{

Genre genre1 = new Genre("G1", 0, "1", "Adventure");

Genre genre2 = new Genre("G1", 1, "2", "Fantasy");

248 | B o o k W i z a r d

Page 249: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

Genre genre3 = new Genre("G1", 2, "3", "History");

Genre genre4 = new Genre("G1", 3, "4", "Humor");

Genre genre5 = new Genre("G1", 4, "5", "Romance");

Book book1 = new Book("B3", 0, "10", "Harry Potter and the Philosopher's

Stone", 1242, 26832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);

Book book2 = new Book("B3", 1, "12", "The Essential Calvin and Hobbes", 112, 0,

0, 389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);

Book book3 = new Book("B3", 2, "23", "Pride and Prejudice", 704, 0, 700, 0, 4710,

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0);

Book book4 = new Book("B3", 3, "22", "John Adams", 0, 0, 1884, 0, 0, 0, 0, 0, 0, 0,

0, 0, 0, 0, 1, 0, 0, 0);

books.Add(book1);

books.Add(book2);

books.Add(book3);

books.Add(book4);

genres.Add(genre1);

genres.Add(genre2);

genres.Add(genre3);

genres.Add(genre4);

genres.Add(genre5);

#region Adds sliders of elements to panel

int genreCount = genres.Count;

249 | B o o k W i z a r d

Page 250: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

for (int i = 0; i < genreCount; i++)

{

for (int j = i + 1; j < genreCount; j++)

{

Control toAdd = LoadControl("UserControl.ascx", PageType, genres[i].name,

genres[j].name, genres[i].userSortId, genres[j].userSortId);

Panel1.Controls.Add(toAdd);

Panel1.Controls.Add(new LiteralControl("<br />"));

}

}

#endregion

}

private UserControl LoadControl(string userControlPath, params object[]

constructorParameters)

{

List<Type> constParamTypes = new List<Type>();

foreach (object constParam in constructorParameters)

{

constParamTypes.Add(constParam.GetType());

}

UserControl ctl = Page.LoadControl(userControlPath) as UserControl;

// Find the relevant constructor

ConstructorInfo constructor =

ctl.GetType().BaseType.GetConstructor(constParamTypes.ToArray());

//And then call the relevant constructor

250 | B o o k W i z a r d

Page 251: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

if (constructor == null)

{

throw new MemberAccessException("The requested constructor was not found

on : " + ctl.GetType().BaseType.ToString());

}

else

{

constructor.Invoke(ctl, constructorParameters);

}

// Finally return the user control

return ctl;

}

protected void Button1_Click(object sender, EventArgs e)

{

#region Genre Create MATrIX for User Rating

int genreCount = genres.Count;

int bookCount = books.Count;

double[,] arrayDeger = new double[genreCount, genreCount];

for (int i = 0; i < genreCount; i++)

{

for (int j = i + 1; j < genreCount; j++)

{

int comparisonValueSw = Convert.ToInt32(Session[PageType + "-" +

genres[i].userSortId.ToString() + "," + genres[j].userSortId.ToString()].ToString());

251 | B o o k W i z a r d

Page 252: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

double comparisonValue = Convert.ToInt32(Session[PageType + "-" +

genres[i].userSortId.ToString() + "," + genres[j].userSortId.ToString()].ToString());

if (comparisonValue < 5)

{

switch (comparisonValueSw)

{

case 1:

comparisonValue = 5;

break;

case 2:

comparisonValue = 4;

break;

case 3:

comparisonValue = 3;

break;

case 4:

comparisonValue = 2;

break;

}

arrayDeger[genres[i].userSortId, genres[j].userSortId] = comparisonValue;

arrayDeger[genres[j].userSortId, genres[i].userSortId] = 1.0 /

comparisonValue * 1.0;

}

else if (comparisonValue > 5)

{

comparisonValue = comparisonValue - 4;

252 | B o o k W i z a r d

Page 253: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

arrayDeger[genres[j].userSortId, genres[i].userSortId] = comparisonValue;

arrayDeger[genres[i].userSortId, genres[j].userSortId] = 1.0 /

comparisonValue * 1.0;

}

else

{

arrayDeger[genres[j].userSortId, genres[i].userSortId] = 1;

arrayDeger[genres[i].userSortId, genres[j].userSortId] = 1;

}

//Label1.Text += genres[i].userSortId + "," + genres[j].userSortId + " point is:

" + Session[genres[i].userSortId.ToString() + "," +

genres[j].userSortId.ToString()].ToString() + "---" + comparisonValue + "----" +

arrayDeger[i, j].ToString("F6") + "----" + arrayDeger[j, i].ToString("F6") + " <br> ";

}

arrayDeger[genres[i].userSortId, genres[i].userSortId] = 1;

}

#endregion

#region Books' Genre Data Normalization

int sumGenreAdv = 0;

int sumGenreFan = 0;

int sumGenreHist = 0;

253 | B o o k W i z a r d

Page 254: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

int sumGenreHum = 0;

int sumGenreRom = 0;

int sumGenreMys = 0;

int sumGenrePols = 0;

for (int i = 0; i < bookCount; i++)

{

sumGenreAdv += books[i].adventurepoint;

sumGenreFan += books[i].fantasypoint;

sumGenreHist += books[i].histroypoint;

sumGenreHum += books[i].humorpoint;

sumGenreRom += books[i].romancepoint;

sumGenreMys += books[i].mystreypoint;

sumGenrePols += books[i].politicpoint;

}

double[,] NormalizedGenreBook = new double[bookCount, 7];

for (int i = 0; i < bookCount; i++)

{

NormalizedGenreBook[i, 0] = (sumGenreAdv != 0) ? (books[i].adventurepoint *

1.0 / sumGenreAdv) : 0;

NormalizedGenreBook[i, 1] = (sumGenreFan != 0) ? (books[i].fantasypoint * 1.0 /

sumGenreFan) : 0;

NormalizedGenreBook[i, 2] = (sumGenreHist != 0) ? (books[i].histroypoint * 1.0 /

sumGenreHist) : 0;

NormalizedGenreBook[i, 3] = (sumGenreHum != 0) ? (books[i].humorpoint *

1.0 / sumGenreHum) : 0;

254 | B o o k W i z a r d

Page 255: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

NormalizedGenreBook[i, 4] = (sumGenreMys != 0) ? (books[i].mystreypoint * 1.0

/ sumGenreMys) : 0;

NormalizedGenreBook[i, 5] = (sumGenrePols != 0) ? (books[i].politicpoint * 1.0 /

sumGenrePols) : 0;

NormalizedGenreBook[i, 6] = (sumGenreRom != 0) ? (books[i].romancepoint *

1.0 / sumGenreRom) : 0;

}

int lim = NormalizedGenreBook.GetLength(1);

for (int i = 0; i < lim; i++)

{

int rows = NormalizedGenreBook.GetLength(0);

int cols = NormalizedGenreBook.GetLength(1);

double[,] newArray = new double[NormalizedGenreBook.GetLength(0),

NormalizedGenreBook.GetLength(1) - 1];

if (NormalizedGenreBook[0, i] == 0 && NormalizedGenreBook[1, i] == 0 &&

NormalizedGenreBook[2, i] == 0 && NormalizedGenreBook[3, i] == 0)

{

for (int j = 0; j < NormalizedGenreBook.GetLength(0); j++)

{

for (int t = 0; t < NormalizedGenreBook.GetLength(1); t++)

{

if (t < i)

newArray[j, t] = NormalizedGenreBook[j, t];

else if (t > i)

255 | B o o k W i z a r d

Page 256: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

newArray[j, t - 1] = NormalizedGenreBook[j, t];

}

}

NormalizedGenreBook = new double[newArray.GetLength(0),

newArray.GetLength(1)];

NormalizedGenreBook = newArray;

lim = NormalizedGenreBook.GetLength(1);

i = -1;

}

}

#endregion

CalculateGeneral calc = new CalculateGeneral();

double[] eigenArrayDeger = new double[genreCount];

double ConsistencyRatio;

eigenArrayDeger = calc.CalculateEigen(genreCount, arrayDeger);

ConsistencyRatio = calc.CalculateConsistencyRatio(genreCount, arrayDeger);

if (ConsistencyRatio < 0.1)

{

Session["NormalizedGenreBook"] = NormalizedGenreBook;

Session["SubGenresEigen"] = eigenArrayDeger;

Response.Redirect("DSSResult.aspx");

256 | B o o k W i z a r d

Page 257: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

else

{

Response.Write("<script language=javascript>alert('The values are inconsistent!

Please select them again.');</script>");

}

}

}

SubKnowAboutBook.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/DSSAL.master"

AutoEventWireup="true" CodeFile="SubKnowAboutBook.aspx.cs"

Inherits="SubKnowAboutBook" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<ajaxToolkit:ToolkitScriptManager runat="Server" />

<asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Verdana"

Font-Size="0.8em" PathSeparator=" : " style="z-index: 1; left: 3px; top: 1px; position:

absolute">

<CurrentNodeStyle ForeColor="#333333" />

<NodeStyle Font-Bold="True" ForeColor="#990000" />

<PathSeparatorStyle Font-Bold="True" ForeColor="#990000" />

<RootNodeStyle Font-Bold="True" ForeColor="#FF8000" />

</asp:SiteMapPath>

<asp:Panel ID="Panel1" runat="server" Height="316px" style="text-align: left">

257 | B o o k W i z a r d

Page 258: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<br />

<asp:Label ID="Label3" runat="server" Text="is <u>more</u> &lt;br

/&gt;important &lt;br /&gt;than" style="z-index: 1; left: 252px; top: 55px; position:

absolute; width: 87px;" Font-Bold="True" Font-Size="Small"></asp:Label>

<asp:Label ID="Label4" runat="server" style="z-index: 1; left: 375px; top:

55px; position: absolute; width: 87px;" Text="is equally&lt;br /&gt; important as"

Font-Bold="True" Font-Size="Small"></asp:Label>

<asp:Label ID="Label2" runat="server" style="z-index: 1; left: 490px; top:

55px; position: absolute; width: 67px; text-align: right;" Text="is <u>less</u>

&lt;br /&gt;important &lt;br /&gt;than" Font-Bold="True"

Font-Size="Small"></asp:Label>

<br />

<br />

<br />

<br />

<br />

</asp:Panel>

<br />

<asp:Button ID="Button2" runat="server" OnClick="Button1_Click" Text="Next

(3/7)" style="z-index: 1; left: 619px; top: 63px; position: absolute; width: 97px" />

</asp:Content>

SubKnowAoutBook.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Reflection;

258 | B o o k W i z a r d

Page 259: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class SubKnowAboutBook : System.Web.UI.Page

{

List<Criterion> criteria = new List<Criterion>();

List<Book> books = new List<Book>();

string PageType = "Cr2";

protected void Page_Load(object sender, EventArgs e)

{

Criterion criterion1 = new Criterion("Cr2",0, "10", "Familiarity");

Criterion criterion2 = new Criterion("Cr2",1, "12", "Recommendation");

Criterion criterion3 = new Criterion("Cr2",2, "23", "Existency of Its Movie");

Book book1 = new Book("B1", 0, "10", "Harry Potter and the Philosopher's

Stone", 1242, 26832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);

Book book2 = new Book("B1", 1, "12", "The Essential Calvin and Hobbes", 112, 0,

0, 389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);

Book book3 = new Book("B1", 2, "23", "Pride and Prejudice", 704, 0, 700, 0, 4710,

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);

Book book4 = new Book("B1", 3, "22", "John Adams", 0, 0, 1884, 0, 0, 0, 0, 0, 0, 0,

0, 0, 0, 0, 0, 0, 0, 0);

books.Add(book1);

books.Add(book2);

259 | B o o k W i z a r d

Page 260: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

books.Add(book3);

books.Add(book4);

criteria.Add(criterion1);

criteria.Add(criterion2);

criteria.Add(criterion3);

#region Adds sliders of elements to panel

int criteriaCount = criteria.Count;

for (int i = 0; i < criteriaCount; i++)

{

for (int j = i + 1; j < criteriaCount; j++)

{

Control toAdd = LoadControl("UserControl.ascx", PageType,

criteria[i].name, criteria[j].name, criteria[i].userSortId, criteria[j].userSortId);

Panel1.Controls.Add(toAdd);

//string value= Session["value"].ToString();

//Label1.Text = value;

//Console.WriteLine(value);

Panel1.Controls.Add(new LiteralControl("<br />"));

}

}

#endregion

}

private UserControl LoadControl(string userControlPath, params object[]

constructorParameters)

260 | B o o k W i z a r d

Page 261: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

List<Type> constParamTypes = new List<Type>();

foreach (object constParam in constructorParameters)

{

constParamTypes.Add(constParam.GetType());

}

UserControl ctl = Page.LoadControl(userControlPath) as UserControl;

// Find the relevant constructor

ConstructorInfo constructor =

ctl.GetType().BaseType.GetConstructor(constParamTypes.ToArray());

//And then call the relevant constructor

if (constructor == null)

{

throw new MemberAccessException("The requested constructor was not found

on : " + ctl.GetType().BaseType.ToString());

}

else

{

constructor.Invoke(ctl, constructorParameters);

}

// Finally return the user control

return ctl;

}

protected void Button1_Click(object sender, EventArgs e)

{

int criteriaCount = criteria.Count;

int bookCount = books.Count;

261 | B o o k W i z a r d

Page 262: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

#region Calculation for Normalized array and Eigen

double[,] arrayDeger = new double[criteriaCount, criteriaCount];

for (int i = 0; i < criteriaCount; i++)

{

for (int j = i + 1; j < criteriaCount; j++)

{

int comparisonValueSw = Convert.ToInt32(Session[PageType + "-" +

criteria[i].userSortId.ToString() + "," + criteria[j].userSortId.ToString()].ToString());

double comparisonValue = Convert.ToInt32(Session[PageType + "-" +

criteria[i].userSortId.ToString() + "," + criteria[j].userSortId.ToString()].ToString());

if (comparisonValue < 5)

{

switch (comparisonValueSw)

{case 1 :

comparisonValue=5;

break;

case 2:

comparisonValue = 4;

break;

case 3:

comparisonValue = 3;

break;

262 | B o o k W i z a r d

Page 263: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

case 4:

comparisonValue = 2;

break;

}

arrayDeger[criteria[i].userSortId, criteria[j].userSortId] =

comparisonValue;

arrayDeger[criteria[j].userSortId, criteria[i].userSortId] = 1.0 /

comparisonValue * 1.0;

}

else if (comparisonValue > 5)

{

comparisonValue = comparisonValue - 4;

arrayDeger[criteria[j].userSortId, criteria[i].userSortId] =

comparisonValue;

arrayDeger[criteria[i].userSortId, criteria[j].userSortId] = 1.0 /

comparisonValue * 1.0;

}

else

{

arrayDeger[criteria[j].userSortId, criteria[i].userSortId] = 1;

arrayDeger[criteria[i].userSortId, criteria[j].userSortId] = 1;

}

//Label1.Text += criteria[i].userSortId + "," + criteria[j].userSortId + " point

is: " + Session[criteria[i].userSortId.ToString() + "," +

criteria[j].userSortId.ToString()].ToString() + "---" + comparisonValue + "----" +

arrayDeger[i, j].ToString("F6") + "----" + arrayDeger[j, i].ToString("F6") + " <br> ";

263 | B o o k W i z a r d

Page 264: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

arrayDeger[criteria[i].userSortId, criteria[i].userSortId] = 1;

}

#endregion

#region Books' Rating Data Normalization

double sumBookRating = 0;

for (int i = 0; i < bookCount; i++)

{

sumBookRating += books[i].rating;

}

double[] NormalizedBookRating= new double[bookCount];

for (int i = 0; i < bookCount; i++)

{

NormalizedBookRating[i] = (sumBookRating != 0) ? (books[i].rating /

sumBookRating) : 0;

}

264 | B o o k W i z a r d

Page 265: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

#endregion

#region Books' HasMovie Data Normalization

double sumMovie = 0;

for (int i = 0; i < bookCount; i++)

{

sumMovie += books[i].hasmovie;

}

double[] NormalizedBookHasMovie = new double[bookCount];

for (int i = 0; i < bookCount; i++)

{

NormalizedBookHasMovie[i] = (sumMovie != 0) ? (books[i].hasmovie /

sumMovie) : 0;

}

265 | B o o k W i z a r d

Page 266: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

#endregion

CalculateGeneral calc = new CalculateGeneral();

double[] eigenArrayDeger = new double[criteriaCount];

double ConsistencyRatio;

eigenArrayDeger = calc.CalculateEigen(criteriaCount, arrayDeger);

ConsistencyRatio = calc.CalculateConsistencyRatio(criteriaCount, arrayDeger);

if (ConsistencyRatio < 0.1)

{

Session["SubKnowBookComparisonEigen"] = eigenArrayDeger;

Session["NormalizedBookRating"] = NormalizedBookRating;

Session["NormalizedBookHasMovie"] = NormalizedBookHasMovie;

Response.Redirect("BookFamiliarity.aspx");

}

else

{

Response.Write("<script language=javascript>alert('The values are

inconsistent!Please select them again.');</script>");

}

}

266 | B o o k W i z a r d

Page 267: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

SubThemes.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/DSSAL.master"

AutoEventWireup="true" CodeFile="SubThemes.aspx.cs" Inherits="SubThemes" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<ajaxToolkit:ToolkitScriptManager runat="Server" />

<asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Verdana"

Font-Size="0.8em" PathSeparator=" : " style="z-index: 1; left: 3px; top: 1px; position:

absolute">

<CurrentNodeStyle ForeColor="#333333" />

<NodeStyle Font-Bold="True" ForeColor="#990000" />

<PathSeparatorStyle Font-Bold="True" ForeColor="#990000" />

<RootNodeStyle Font-Bold="True" ForeColor="#FF8000" />

</asp:SiteMapPath>

<asp:Panel ID="Panel1" runat="server" Height="316px" style="text-align: left">

<br />

<asp:Label ID="Label3" runat="server" Text="is <u>more</u> &lt;br

/&gt;important &lt;br /&gt;than" style="z-index: 1; left: 252px; top: 55px; position:

absolute; width: 87px;" Font-Bold="True" Font-Size="Small"></asp:Label>

<asp:Label ID="Label4" runat="server" style="z-index: 1; left: 375px; top:

55px; position: absolute; width: 87px;" Text="is equally&lt;br /&gt; important as"

Font-Bold="True" Font-Size="Small"></asp:Label>

<asp:Label ID="Label2" runat="server" style="z-index: 1; left: 490px; top:

55px; position: absolute; width: 67px; text-align: right;" Text="is <u>less</u>

&lt;br /&gt;important &lt;br /&gt;than" Font-Bold="True"

Font-Size="Small"></asp:Label>

267 | B o o k W i z a r d

Page 268: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<br />

<br />

<br />

<br />

<br />

</asp:Panel>

<br />

<asp:Button ID="Button2" runat="server" OnClick="Button1_Click" Text="Next

(7/7)" style="z-index: 1; left: 619px; top: 63px; position: absolute; width: 97px" />

</asp:Content>

SubThemes.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Reflection;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class SubThemes : System.Web.UI.Page

{

List<Book> books = new List<Book>();

List<Criterion> criterias = new List<Criterion>();

string PageType = "Cr4";

268 | B o o k W i z a r d

Page 269: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

protected void Page_Load(object sender, EventArgs e)

{

Criterion criterion1 = new Criterion("Cr1", 0, "10", "Family");

Criterion criterion2 = new Criterion("Cr1", 1, "12", "Women");

Criterion criterion3 = new Criterion("Cr1", 2, "23", "War");

Criterion criterion4 = new Criterion("Cr1", 3, "50", "Humor");

//string pType, int userSortId, string ID, string name, int adv, int fant, int hist, int

humor, int rom, int myst, int polt, int rat, int hmov, int aut, int authrate, int ages, int

ethnicity, int families, int humortheme, int philosophy, int war, int women

Book book1 = new Book("B3", 0, "10", "Harry Potter and the Philosopher's

Stone", 1242, 26832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);

Book book2 = new Book("B3", 1, "12", "The Essential Calvin and Hobbes", 112, 0,

0, 389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);

Book book3 = new Book("B3", 2, "23", "Pride and Prejudice", 704, 0, 700, 0, 4710,

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0);

Book book4 = new Book("B3", 3, "22", "John Adams", 0, 0, 1884, 0, 0, 0, 0, 0, 0, 0,

0, 0, 0, 0, 1, 0, 0, 0);

books.Add(book1);

books.Add(book2);

books.Add(book3);

books.Add(book4);

criterias.Add(criterion1);

criterias.Add(criterion2);

criterias.Add(criterion3);

criterias.Add(criterion4);

#region Adds sliders of elements to panel

int criteriaCount = criterias.Count;

269 | B o o k W i z a r d

Page 270: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

for (int i = 0; i < criteriaCount; i++)

{

for (int j = i + 1; j < criteriaCount; j++)

{

Control toAdd = LoadControl("UserControl.ascx", PageType,

criterias[i].name, criterias[j].name, criterias[i].userSortId, criterias[j].userSortId);

Panel1.Controls.Add(toAdd);

Panel1.Controls.Add(new LiteralControl("<br />"));

}

}

#endregion

}

private UserControl LoadControl(string userControlPath, params object[]

constructorParameters)

{

List<Type> constParamTypes = new List<Type>();

foreach (object constParam in constructorParameters)

{

constParamTypes.Add(constParam.GetType());

}

UserControl ctl = Page.LoadControl(userControlPath) as UserControl;

// Find the relevant constructor

ConstructorInfo constructor =

ctl.GetType().BaseType.GetConstructor(constParamTypes.ToArray());

//And then call the relevant constructor

270 | B o o k W i z a r d

Page 271: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

if (constructor == null)

{

throw new MemberAccessException("The requested constructor was not found

on : " + ctl.GetType().BaseType.ToString());

}

else

{

constructor.Invoke(ctl, constructorParameters);

}

// Finally return the user control

return ctl;

}

protected void Button1_Click(object sender, EventArgs e)

{

#region Genre Create MATrIX for User Rating

int bookCount = books.Count;

int criteriaCount = criterias.Count;

double[,] arrayDeger = new double[criteriaCount, criteriaCount];

for (int i = 0; i < criteriaCount; i++)

{

for (int j = i + 1; j < criteriaCount; j++)

{

int comparisonValueSw = Convert.ToInt32(Session[PageType + "-" +

criterias[i].userSortId.ToString() + "," + criterias[j].userSortId.ToString()].ToString());

271 | B o o k W i z a r d

Page 272: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

double comparisonValue = Convert.ToInt32(Session[PageType + "-" +

criterias[i].userSortId.ToString() + "," + criterias[j].userSortId.ToString()].ToString());

if (comparisonValue < 5)

{

switch (comparisonValueSw)

{

case 1:

comparisonValue = 5;

break;

case 2:

comparisonValue = 4;

break;

case 3:

comparisonValue = 3;

break;

case 4:

comparisonValue = 2;

break;

}

arrayDeger[criterias[i].userSortId, criterias[j].userSortId] =

comparisonValue;

arrayDeger[criterias[j].userSortId, criterias[i].userSortId] = 1.0 /

comparisonValue * 1.0;

}

else if (comparisonValue > 5)

{

272 | B o o k W i z a r d

Page 273: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

comparisonValue = comparisonValue - 4;

arrayDeger[criterias[j].userSortId, criterias[i].userSortId] =

comparisonValue;

arrayDeger[criterias[i].userSortId, criterias[j].userSortId] = 1.0 /

comparisonValue * 1.0;

}

else

{

arrayDeger[criterias[j].userSortId, criterias[i].userSortId] = 1;

arrayDeger[criterias[i].userSortId, criterias[j].userSortId] = 1;

}

//Label1.Text += genres[i].userSortId + "," + genres[j].userSortId + " point is:

" + Session[genres[i].userSortId.ToString() + "," +

genres[j].userSortId.ToString()].ToString() + "---" + comparisonValue + "----" +

arrayDeger[i, j].ToString("F6") + "----" + arrayDeger[j, i].ToString("F6") + " <br> ";

}

arrayDeger[criterias[i].userSortId, criterias[i].userSortId] = 1;

}

#endregion

#region Books' Theme Data Normalization

273 | B o o k W i z a r d

Page 274: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

int sumThemeFamilies = 0;

int sumThemeAges = 0;

int sumThemeEthnicity = 0;

int sumThemeWomen = 0;

int sumThemePhilosophyReligion = 0;

int sumThemeWarControversy = 0;

int sumThemeHumorSatire = 0;

for (int i = 0; i < bookCount; i++)

{

sumThemeFamilies += books[i].families;

sumThemeAges += books[i].ages;

sumThemeEthnicity += books[i].ethnicity;

sumThemeWomen += books[i].women;

sumThemePhilosophyReligion += books[i].philosophy;

sumThemeWarControversy += books[i].war;

sumThemeHumorSatire += books[i].humortheme;

}

double[,] NormalizedThemeBook = new double[bookCount, 7];

for (int i = 0; i < bookCount; i++)

{

NormalizedThemeBook[i, 0] = (sumThemeFamilies != 0) ? (books[i].families * 1.0

/ sumThemeFamilies) : 0;

NormalizedThemeBook[i, 1] = (sumThemeAges != 0) ? (books[i].ages * 1.0 /

sumThemeAges) : 0;

274 | B o o k W i z a r d

Page 275: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

NormalizedThemeBook[i, 2] = (sumThemeEthnicity != 0) ? (books[i].ethnicity *

1.0 / sumThemeEthnicity) : 0;

NormalizedThemeBook[i, 3] = (sumThemeWomen != 0) ? (books[i].women * 1.0 /

sumThemeWomen) : 0;

NormalizedThemeBook[i, 4] = (sumThemePhilosophyReligion != 0) ?

(books[i].philosophy * 1.0 / sumThemePhilosophyReligion) : 0;

NormalizedThemeBook[i, 5] = (sumThemeWarControversy != 0) ? (books[i].war

* 1.0 / sumThemeWarControversy) : 0;

NormalizedThemeBook[i, 6] = (sumThemeHumorSatire != 0) ?

(books[i].humortheme * 1.0 / sumThemeHumorSatire) : 0;

}

int lim = NormalizedThemeBook.GetLength(1);

for (int i = 0; i < lim; i++)

{

int rows = NormalizedThemeBook.GetLength(0);

int cols = NormalizedThemeBook.GetLength(1);

double[,] newArray = new double[NormalizedThemeBook.GetLength(0),

NormalizedThemeBook.GetLength(1) - 1];

if (NormalizedThemeBook[0, i] == 0 && NormalizedThemeBook[1, i] == 0 &&

NormalizedThemeBook[2, i] == 0 && NormalizedThemeBook[3, i] == 0)

{

for (int j = 0; j < NormalizedThemeBook.GetLength(0); j++)

{

for (int t = 0; t < NormalizedThemeBook.GetLength(1); t++)

275 | B o o k W i z a r d

Page 276: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

if (t < i)

newArray[j, t] = NormalizedThemeBook[j, t];

else if (t > i)

newArray[j, t - 1] = NormalizedThemeBook[j, t];

}

}

NormalizedThemeBook = new double[newArray.GetLength(0),

newArray.GetLength(1)];

NormalizedThemeBook = newArray;

lim = NormalizedThemeBook.GetLength(1);

i = -1;

}

}

#endregion

CalculateGeneral calc = new CalculateGeneral();

double[] eigenArrayDeger = new double[criteriaCount];

double ConsistencyRatio;

eigenArrayDeger = calc.CalculateEigen(criteriaCount, arrayDeger);

ConsistencyRatio = calc.CalculateConsistencyRatio(criteriaCount, arrayDeger);

if (ConsistencyRatio < 0.1)

276 | B o o k W i z a r d

Page 277: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

{

Session["NormalizedThemeBook"] = NormalizedThemeBook;

Session["BookThemeEigen"] = eigenArrayDeger;

Response.Redirect("SubGenres.aspx");

}

else

{

Response.Write("<script language=javascript>alert('The values are inconsistent!

Please select them again.');</script>");

}

}

}

TeamAL.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/AfterLogin.master"

AutoEventWireup="true" CodeFile="TeamAL.aspx.cs" Inherits="TeamAL" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<script language="javascript" type="text/javascript">

function onSuccess(result) {

alert(result);

}

277 | B o o k W i z a r d

Page 278: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

function onFailure(error) {

alert("Something is wrong.");

}

function DeleteBook(BookId) {

PageMethods.DeleteBookFromBasket_st(BookId, onSuccess, onFailure);

UpdatePanelforList();

this.event.returnValue = false;

//PageMethods.GetData(f, s, OnRequestComplete, OnRequestError);

}

</script>

<p>

<br />

<br />

<br />

<br />

<asp:Image ID="Image8" runat="server" ImageUrl="~/images/serhatonal.jpg"

style="z-index: 1; left: 40px; top: 420px; position: absolute; height: 148px; width:

111px;" />

<asp:Image ID="Image14" runat="server" ImageUrl="~/images/box_top.gif"

style="z-index: 1; left: 185px; top: 420px; width: 283px; position: absolute" />

<asp:Image ID="Image15" runat="server" ImageUrl="~/images/box_center.gif"

style="z-index: 1; left: 185px; top: 428px; position: absolute; height: 133px; width:

283px" />

<asp:Image ID="Image16" runat="server" ImageUrl="~/images/box_bottom.gif"

style="z-index: 1; left: 185px; top: 561px; width: 283px; position: absolute" />

278 | B o o k W i z a r d

Page 279: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="Label1" runat="server" ForeColor="#336600" style="z-index: 1;

left: 200px; top: 430px; position: absolute" Text="Serhat Önal"

Font-Bold="True"></asp:Label>

<asp:Label ID="Label4" runat="server" style="z-index: 1; left: 200px; top: 460px;

position: absolute; width: 271px; text-align: left;" Text="He is studying Management

Information Systems at Boğaziçi University. He is currrently working in

BSH."></asp:Label>

<asp:Label ID="Label11" runat="server" style="z-index: 1; left: 340px; top:

535px; position: absolute; width: 65px; text-align: left;" Text="more---->"

ForeColor="#FF6600"></asp:Label>

<asp:ImageButton ID="ImageButton1" runat="server" style="z-index: 1; left:

412px; top: 525px; position: absolute; height: 32px; width: 35px;"

ImageUrl="~/images/linkedin-31.png" PostBackUrl="http://tr.linkedin.com/pub/serhat-

%C3%B6nal/52/813/a7a" OnClientClick="target='_blank';" />

<br />

<asp:Image ID="Image9" runat="server" ImageUrl="~/images/cemyesil.jpg"

style="z-index: 1; left: 40px; top: 80px; position: absolute; height: 148px; width:

111px;" />

<asp:Image ID="Image2" runat="server" ImageUrl="~/images/box_top.gif"

style="z-index: 1; left: 185px; top: 80px; width: 283px; position: absolute" />

<asp:Image ID="Image3" runat="server" ImageUrl="~/images/box_center.gif"

style="z-index: 1; left: 185px; top: 88px; position: absolute; height: 133px; width:

283px" />

<asp:Image ID="Image4" runat="server" ImageUrl="~/images/box_bottom.gif"

style="z-index: 1; left: 185px; top: 221px; width: 283px; position: absolute" />

<asp:Label ID="Label6" runat="server" ForeColor="#336600" style="z-index: 1;

left: 200px; top: 90px; position: absolute" Text="Cem Yeşil"

Font-Bold="True"></asp:Label>

<asp:Label ID="Label7" runat="server" style="z-index: 1; left: 200px; top:

120px; position: absolute; width: 271px; text-align: left;" Text="He is studying

Management Information Systems at Boğaziçi University. He is currrently working in

GKFX."></asp:Label>

279 | B o o k W i z a r d

Page 280: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="Label10" runat="server" style="z-index: 1; left: 340px; top:

195px; position: absolute; width: 65px; text-align: left;" Text="more---->"

ForeColor="#FF6600"></asp:Label>

<asp:ImageButton ID="ImageButton3" runat="server" style="z-index: 1; left:

412px; top: 185px; position: absolute; height: 32px; width: 35px;"

ImageUrl="~/images/linkedin-31.png"

PostBackUrl="http://www.linkedin.com/pub/cem-ye%C5%9Fil/4a/8ab/557"

OnClientClick="target='_blank';" />

<br />

<br />

<br />

<asp:Label ID="Label5" runat="server" Font-Bold="True" Font-Size="Large"

ForeColor="#990000" style="z-index: 1; left: 171px; top: 30px; position: absolute"

Text="Book Wizard Team"></asp:Label>

<br />

<br />

<asp:Image ID="Image10" runat="server" ImageUrl="~/images/serkan.jpg"

style="z-index: 1; left: 40px; top: 590px; position: absolute; height: 148px; width:

111px;" />

<asp:Image ID="Image1" runat="server" ImageUrl="~/images/box_top.gif"

style="z-index: 1; left: 185px; top: 590px; width: 283px; position: absolute" />

<asp:Image ID="Image5" runat="server" ImageUrl="~/images/box_center.gif"

style="z-index: 1; left: 185px; top: 598px; position: absolute; height: 133px; width:

283px" />

<asp:Image ID="Image6" runat="server" ImageUrl="~/images/box_bottom.gif"

style="z-index: 1; left: 185px; top: 731px; width: 283px; position: absolute" />

<asp:Label ID="Label2" runat="server" ForeColor="#336600" style="z-index: 1;

left: 200px; top: 600px; position: absolute" Text="Serkan Toso" Font-

Bold="True"></asp:Label>

280 | B o o k W i z a r d

Page 281: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="Label8" runat="server" style="z-index: 1; left: 200px; top: 630px;

position: absolute; width: 271px; text-align: left;" Text="He is studying Management

Information Systems at Boğaziçi University. He is currrently working in

Turkcell."></asp:Label>

<asp:ImageButton ID="ImageButton2" runat="server" style="z-index: 1; left:

412px; top: 695px; position: absolute; height: 32px; width: 35px;"

ImageUrl="~/images/linkedin-31.png"

PostBackUrl="http://tr.linkedin.com/pub/serkan-toso/54/3a6/73"

OnClientClick="target='_blank';" />

<asp:Label ID="Label12" runat="server" style="z-index: 1; left: 340px; top:

705px; position: absolute; width: 65px; text-align: left;" Text="more---->"

ForeColor="#FF6600"></asp:Label>

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<asp:Image ID="Image11" runat="server" ImageUrl="~/images/mertatli.jpg"

style="z-index: 1; left: 40px; top: 250px; position: absolute; height: 148px; width:

111px;" />

<asp:Image ID="Image7" runat="server" ImageUrl="~/images/box_top.gif"

style="z-index: 1; left: 185px; top: 250px; width: 283px; position: absolute" />

<asp:Image ID="Image12" runat="server" ImageUrl="~/images/box_center.gif"

style="z-index: 1; left: 185px; top: 258px; position: absolute; height: 133px; width:

283px" />

281 | B o o k W i z a r d

Page 282: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Image ID="Image13" runat="server" ImageUrl="~/images/box_bottom.gif"

style="z-index: 1; left: 185px; top: 391px; width: 283px; position: absolute" />

<asp:Label ID="Label3" runat="server" ForeColor="#336600" style="z-index: 1;

left: 200px; top: 260px; position: absolute" Text="Mert Atlı"

Font-Bold="True"></asp:Label>

<asp:Label ID="Label9" runat="server" style="z-index: 1; left: 200px; top:

290px; position: absolute; width: 271px; text-align: left;" Text="He is studying

Management Information Systems at Boğaziçi University. He is currrently working in

Henkel."></asp:Label>

<asp:ImageButton ID="ImageButton4" runat="server" style="z-index: 1; left:

412px; top: 355px; position: absolute; height: 32px; width: 35px;"

ImageUrl="~/images/linkedin-31.png"

PostBackUrl="http://tr.linkedin.com/in/mertatli" OnClientClick="target='_blank';" />

<asp:Label ID="Label13" runat="server" style="z-index: 1; left: 340px; top:

365px; position: absolute; width: 65px; text-align: left;" Text="more---->"

ForeColor="#FF6600"></asp:Label>

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

282 | B o o k W i z a r d

Page 283: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

</p>

</asp:Content>

TeamAL.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Services;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class TeamAL : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

283 | B o o k W i z a r d

Page 284: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

[WebMethod]

public static string DeleteBookFromBasket_st(int BookId)

{

DeleteBookClass del = new DeleteBookClass();

string returnMessage = del.DeleteBookFromBasket(BookId);

return returnMessage;

}

}

TeamBL.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/BeforeLogin.master"

AutoEventWireup="true" CodeFile="TeamBL.aspx.cs" Inherits="TeamBL" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"

Runat="Server">

<script language="javascript" type="text/javascript">

function onSuccess(result) {

alert(result);

284 | B o o k W i z a r d

Page 285: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

}

function onFailure(error) {

alert("Something is wrong.");

}

function DeleteBook(BookId) {

PageMethods.DeleteBookFromBasket_st(BookId, onSuccess, onFailure);

UpdatePanelforList();

this.event.returnValue = false;

//PageMethods.GetData(f, s, OnRequestComplete, OnRequestError);

}

</script>

<p>

<br />

<br />

<br />

<br />

<asp:Image ID="Image8" runat="server" ImageUrl="~/images/serhatonal.jpg"

style="z-index: 1; left: 40px; top: 420px; position: absolute; height: 148px; width:

111px;" />

<asp:Image ID="Image14" runat="server" ImageUrl="~/images/box_top.gif"

style="z-index: 1; left: 185px; top: 420px; width: 283px; position: absolute" />

<asp:Image ID="Image15" runat="server" ImageUrl="~/images/box_center.gif"

style="z-index: 1; left: 185px; top: 428px; position: absolute; height: 133px; width:

283px" />

285 | B o o k W i z a r d

Page 286: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Image ID="Image16" runat="server" ImageUrl="~/images/box_bottom.gif"

style="z-index: 1; left: 185px; top: 561px; width: 283px; position: absolute" />

<asp:Label ID="Label1" runat="server" ForeColor="#336600" style="z-index: 1;

left: 200px; top: 430px; position: absolute" Text="Serhat Önal"

Font-Bold="True"></asp:Label>

<asp:Label ID="Label4" runat="server" style="z-index: 1; left: 200px; top: 460px;

position: absolute; width: 271px; text-align: left;" Text="He is studying Management

Information Systems at Boğaziçi University. He is currrently working in

BSH."></asp:Label>

<asp:Label ID="Label11" runat="server" style="z-index: 1; left: 340px; top:

535px; position: absolute; width: 65px; text-align: left;" Text="more---->"

ForeColor="#FF6600"></asp:Label>

<asp:ImageButton ID="ImageButton1" runat="server" style="z-index: 1; left:

412px; top: 525px; position: absolute; height: 32px; width: 35px;"

ImageUrl="~/images/linkedin-31.png" PostBackUrl="http://tr.linkedin.com/pub/serhat-

%C3%B6nal/52/813/a7a" OnClientClick="target='_blank';" />

<br />

<asp:Image ID="Image9" runat="server" ImageUrl="~/images/cemyesil.jpg"

style="z-index: 1; left: 40px; top: 80px; position: absolute; height: 148px; width:

111px;" />

<asp:Image ID="Image2" runat="server" ImageUrl="~/images/box_top.gif"

style="z-index: 1; left: 185px; top: 80px; width: 283px; position: absolute" />

<asp:Image ID="Image3" runat="server" ImageUrl="~/images/box_center.gif"

style="z-index: 1; left: 185px; top: 88px; position: absolute; height: 133px; width:

283px" />

<asp:Image ID="Image4" runat="server" ImageUrl="~/images/box_bottom.gif"

style="z-index: 1; left: 185px; top: 221px; width: 283px; position: absolute" />

<asp:Label ID="Label6" runat="server" ForeColor="#336600" style="z-index: 1;

left: 200px; top: 90px; position: absolute" Text="Cem Yeşil"

Font-Bold="True"></asp:Label>

286 | B o o k W i z a r d

Page 287: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="Label7" runat="server" style="z-index: 1; left: 200px; top:

120px; position: absolute; width: 271px; text-align: left;" Text="He is studying

Management Information Systems at Boğaziçi University. He is currrently working in

GKFX."></asp:Label>

<asp:Label ID="Label10" runat="server" style="z-index: 1; left: 340px; top:

195px; position: absolute; width: 65px; text-align: left;" Text="more---->"

ForeColor="#FF6600"></asp:Label>

<asp:ImageButton ID="ImageButton3" runat="server" style="z-index: 1; left:

412px; top: 185px; position: absolute; height: 32px; width: 35px;"

ImageUrl="~/images/linkedin-31.png"

PostBackUrl="http://www.linkedin.com/pub/cem-ye%C5%9Fil/4a/8ab/557"

OnClientClick="target='_blank';" />

<br />

<br />

<br />

<asp:Label ID="Label5" runat="server" Font-Bold="True" Font-Size="Large"

ForeColor="#990000" style="z-index: 1; left: 171px; top: 30px; position: absolute"

Text="Book Wizard Team"></asp:Label>

<br />

<br />

<asp:Image ID="Image10" runat="server" ImageUrl="~/images/serkan.jpg"

style="z-index: 1; left: 40px; top: 590px; position: absolute; height: 148px; width:

111px;" />

<asp:Image ID="Image1" runat="server" ImageUrl="~/images/box_top.gif"

style="z-index: 1; left: 185px; top: 590px; width: 283px; position: absolute" />

<asp:Image ID="Image5" runat="server" ImageUrl="~/images/box_center.gif"

style="z-index: 1; left: 185px; top: 598px; position: absolute; height: 133px; width:

283px" />

<asp:Image ID="Image6" runat="server" ImageUrl="~/images/box_bottom.gif"

style="z-index: 1; left: 185px; top: 731px; width: 283px; position: absolute" />

287 | B o o k W i z a r d

Page 288: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label ID="Label2" runat="server" ForeColor="#336600" style="z-index: 1;

left: 200px; top: 600px; position: absolute" Text="Serkan Toso" Font-

Bold="True"></asp:Label>

<asp:Label ID="Label8" runat="server" style="z-index: 1; left: 200px; top: 630px;

position: absolute; width: 271px; text-align: left;" Text="He is studying Management

Information Systems at Boğaziçi University. He is currrently working in

Turkcell."></asp:Label>

<asp:ImageButton ID="ImageButton2" runat="server" style="z-index: 1; left:

412px; top: 695px; position: absolute; height: 32px; width: 35px;"

ImageUrl="~/images/linkedin-31.png"

PostBackUrl="http://tr.linkedin.com/pub/serkan-toso/54/3a6/73"

OnClientClick="target='_blank';" />

<asp:Label ID="Label12" runat="server" style="z-index: 1; left: 340px; top:

705px; position: absolute; width: 65px; text-align: left;" Text="more---->"

ForeColor="#FF6600"></asp:Label>

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<asp:Image ID="Image11" runat="server" ImageUrl="~/images/mertatli.jpg"

style="z-index: 1; left: 40px; top: 250px; position: absolute; height: 148px; width:

111px;" />

<asp:Image ID="Image7" runat="server" ImageUrl="~/images/box_top.gif"

style="z-index: 1; left: 185px; top: 250px; width: 283px; position: absolute" />

288 | B o o k W i z a r d

Page 289: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Image ID="Image12" runat="server" ImageUrl="~/images/box_center.gif"

style="z-index: 1; left: 185px; top: 258px; position: absolute; height: 133px; width:

283px" />

<asp:Image ID="Image13" runat="server" ImageUrl="~/images/box_bottom.gif"

style="z-index: 1; left: 185px; top: 391px; width: 283px; position: absolute" />

<asp:Label ID="Label3" runat="server" ForeColor="#336600" style="z-index: 1;

left: 200px; top: 260px; position: absolute" Text="Mert Atlı"

Font-Bold="True"></asp:Label>

<asp:Label ID="Label9" runat="server" style="z-index: 1; left: 200px; top:

290px; position: absolute; width: 271px; text-align: left;" Text="He is studying

Management Information Systems at Boğaziçi University. He is currrently working in

Henkel."></asp:Label>

<asp:ImageButton ID="ImageButton4" runat="server" style="z-index: 1; left:

412px; top: 355px; position: absolute; height: 32px; width: 35px;"

ImageUrl="~/images/linkedin-31.png"

PostBackUrl="http://tr.linkedin.com/in/mertatli" OnClientClick="target='_blank';" />

<asp:Label ID="Label13" runat="server" style="z-index: 1; left: 340px; top:

365px; position: absolute; width: 65px; text-align: left;" Text="more---->"

ForeColor="#FF6600"></asp:Label>

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

289 | B o o k W i z a r d

Page 290: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

</p>

</asp:Content>

TeamBL.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Services;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class TeamBL : System.Web.UI.Page

{

290 | B o o k W i z a r d

Page 291: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

protected void Page_Load(object sender, EventArgs e)

{

}

[WebMethod]

public static string DeleteBookFromBasket_st(int BookId)

{

DeleteBookClass del = new DeleteBookClass();

string returnMessage = del.DeleteBookFromBasket(BookId);

return returnMessage;

}

}

UserControl.ascx

<%@ Control Language="C#" AutoEventWireup="true"

CodeFile="UserControl.ascx.cs" Inherits="UserControl" %>

<table>

<tr>

<td>

291 | B o o k W i z a r d

Page 292: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<asp:Label runat="server" ID="lbl1" Width="300" style="text-align:right;

max-width:250px" Text="kitap1" ></asp:Label>

</td>

<td>

<asp:TextBox runat="server" style="margin-right=0%" ID="txt1"

BackColor="Transparent"></asp:TextBox>

<asp:Label runat="server" ID="txt2" Width="300" style="text-align:left; max-

width:250px" ></asp:Label>

</td>

<td>

<ajaxToolkit:SliderExtender ID="SliderExtender1" runat="server"

TargetControlID="txt1"

TooltipText="Use this bar for priorities"

Minimum="1"

Maximum="9"

Steps="9"

Length="300"

BoundControlID="TextBox1" />

</td>

<td>

<asp:Label runat="server" ID="lbl2" Text="kitap1" Width="300" style="text-

align:left; max-width:300px" ></asp:Label>

</td>

</tr>

</table>

<asp:TextBox ID="TextBox1" runat="server"

OnTextChanged="TextBox1_TextChanged" BackColor="White" BorderWidth="0px"

ForeColor="White" TabIndex="-1"></asp:TextBox>

292 | B o o k W i z a r d

Page 293: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

UserControl.ascx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class UserControl : System.Web.UI.UserControl

{

public UserControl()

{ }

int firstIDvar;

int secondIDvar;

string pTypeUser;

public UserControl(string pType,string firsttext, string secondtext,int firstID, int

secondID )

{

pTypeUser=pType;

firstIDvar=firstID;

secondIDvar = secondID;

lbl1.Text = firsttext;

lbl2.Text = secondtext;

293 | B o o k W i z a r d

Page 294: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

/*

Table table = new Table();

TableRow tableRow = new TableRow();

TableCell tableCell0 = new TableCell();

TableCell tableCell1 = new TableCell();

TableCell tableCell2 = new TableCell();

TableCell tableCell3 = new TableCell();

TableCell tableCell4 = new TableCell();

TextBox textBox1 = new TextBox();

textBox1.ID = "textBox1";

TextBox textBox2 = new TextBox();

textBox2.ID = "textBox2";

Label first = new Label();

Label last = new Label();

first.Text = firsttext;

last.Text = secondtext;

AjaxControlToolkit.SliderExtender slider = new

AjaxControlToolkit.SliderExtender();

slider.Minimum = (int)0;

slider.Maximum = (int)9;

slider.Length = 10;

slider.Steps = 10;

slider.BoundControlID = textBox1.ID;

slider.TargetControlID = textBox2.ID;

tableCell0.Controls.Add(textBox1);

tableCell1.Controls.Add(textBox2);

tableCell3.Controls.Add(slider);

tableCell2.Controls.Add(first);

294 | B o o k W i z a r d

Page 295: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

tableCell4.Controls.Add(last);

tableRow.Width = 500;

tableRow.Cells.Add(tableCell0);

tableRow.Cells.Add(tableCell1);

tableRow.Cells.Add(tableCell2);

tableRow.Cells.Add(tableCell3);

tableRow.Cells.Add(tableCell4);

table.Rows.Add(tableRow);

this.Controls.Add(table);

Session["table"] = table;

*/

}

protected void TextBox1_TextChanged(object sender, EventArgs e)

{

Session[pTypeUser+"-" + firstIDvar.ToString() + "," + secondIDvar.ToString()] =

TextBox1.Text.ToString();

}

protected void Page_Load(object sender, EventArgs e)

{

}

}

Web.config

295 | B o o k W i z a r d

Page 296: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<?xml version="1.0"?>

<!--

For more information on how to configure your ASP.NET application, please visit

http://go.microsoft.com/fwlink/?LinkId=169433

-->

<configuration>

<appSettings>

<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />

</appSettings>

<system.web>

<compilation debug="true" targetFramework="4.5">

<assemblies>

<add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral,

PublicKeyToken=B77A5C561934E089"/>

<add assembly="WindowsBase, Version=4.0.0.0, Culture=neutral,

PublicKeyToken=31BF3856AD364E35"/>

</assemblies>

</compilation>

<httpRuntime targetFramework="4.5"/>

<pages>

<controls>

<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit"

namespace="AjaxControlToolkit"/>

</controls>

</pages>

</system.web>

<runtime>

296 | B o o k W i z a r d

Page 297: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<dependentAssembly>

<assemblyIdentity name="Microsoft.WindowsAzure.Storage"

publicKeyToken="31bf3856ad364e35" culture="neutral"/>

<bindingRedirect oldVersion="0.0.0.0-2.1.0.4" newVersion="2.1.0.4"/>

</dependentAssembly>

</assemblyBinding>

</runtime>

</configuration>

Web.sitemap

<?xml version="1.0" encoding="utf-8" ?>

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >

<siteMapNode url="~/MainComparison.aspx" title="Main Criteria Comparison"

description="Main Comparison">

<siteMapNode url="~/SubKnowAboutBook.aspx" title="Book Criteria"

description="aa">

<siteMapNode url="~/BookFamiliarity.aspx" title="Book Familiarity"

description="aa">

<siteMapNode url="~/SubAuthor.aspx" title="Author Criteria" description="aa">

<siteMapNode url="~/AuthorFamiliarity.aspx" title="Author Familiarity"

description="aa">

<siteMapNode url="~/SubThemes.aspx" title="Theme Comparison"

description="aa">

<siteMapNode url="~/SubGenres.aspx" title="Genre Comparison"

description="aa">

<siteMapNode url="~/DSSResult.aspx" title="Book Result" description="aa"/>

</siteMapNode>

</siteMapNode>

297 | B o o k W i z a r d

Page 298: I. INTRODUCTION - misprivate.boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web viewThe longest word is three letters long. Joyce, when he was frisky, ... We will prepare

</siteMapNode>

</siteMapNode>

</siteMapNode>

</siteMapNode>

</siteMapNode>

</siteMap>

298 | B o o k W i z a r d