159
Boğaziçi University Department of Management Information Systems MIS 463 Decision Support Systems for Business PROJECT FINAL REPORT DSS FOR NOTEBOOK SELECTION Project Team No: 02 Ilkay Akgun Ceyda Arkin Mustafa Gulsoy Varol Tepecik Instructor: Aslı Sencer Erdem 1

Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Boğaziçi UniversityDepartment of Management Information Systems

MIS 463 Decision Support Systems for Business

PROJECT FINAL REPORT

DSS FOR NOTEBOOK SELECTION

Project Team No: 02

Ilkay AkgunCeyda Arkin

Mustafa GulsoyVarol Tepecik

Instructor: Aslı Sencer Erdem

İstanbul - December, 2011

1

Page 2: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

ContentsI. INTRODUCTION......................................................................................................................................3

I.1 The Decision Environment..................................................................................................................3

I.2 Mission of Project................................................................................................................................3

I.3 Scope of Project...................................................................................................................................4

I.4 Methodology........................................................................................................................................4

II. LITERATURE SURVEY.........................................................................................................................4

II.1. Website & Journal Review................................................................................................................4

II.2 Former Studies Research....................................................................................................................7

III. DEVELOPMENT OF THE DSS.............................................................................................................9

III.1. DSS Architecture.............................................................................................................................9

III.2 Technical Issues................................................................................................................................9

III.3. Model and Algorithms...................................................................................................................10

III.3.1 Model......................................................................................................................................12

III.3.2 Hierarchical Tree.....................................................................................................................13

III.3.3 Modeling of Selection.............................................................................................................15

III.3.4 Data Collection........................................................................................................................20

III.4. User Interface and Reports.............................................................................................................22

IV. ASSESSMENT......................................................................................................................................31

IV.1 Project Plan.....................................................................................................................................31

IV.2 Master Plan.....................................................................................................................................33

V.TESTING.................................................................................................................................................35

VI. CONCLUSION.....................................................................................................................................44

VII.REFERENCES......................................................................................................................................45

VIII.APPENDIX..........................................................................................................................................47

VIII.1.Survey..........................................................................................................................................47

VIII.2.Codes............................................................................................................................................55

VIII.2.1.Admin...................................................................................................................................55

VIII.2.2.AHP......................................................................................................................................77

VIII.2.3.Compare...............................................................................................................................86

VIII.2.4.Computer Information........................................................................................................102

VIII.2.5.Default................................................................................................................................104

VIII.2.6.Logout................................................................................................................................107

VIII.2.7.Products..............................................................................................................................107

VIII.2.8.Uploader.............................................................................................................................110

VIII.2.9.User Account......................................................................................................................111

VIII.2.10. Contact............................................................................................................................113

VIII.2.11.Team Members.................................................................................................................114

VIII.2.12.How El Turco Dss Works................................................................................................114

2

Page 3: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

I. INTRODUCTION

I.1 The Decision EnvironmentDSS for Notebook Selection has been aimed at understanding the importance of the requirement of a trustworthy decision support system in making decision to buy a notebook for consumers.

The purpose of this project is to provide an environment in which consumer preferences are transmitted to the system and the system returns the best alternative notebook for the consumer. Primarily our system concentrates on finding the best notebook that has closest specifications to consumer preferences and is most economic.

Preferences of consumer, their priorities and the major quantitative specifications of notebook create the decision environment. Consumer is the main decision maker in our system to buy notebook. Consumer demand is the main factor that determines the decision period. Urgency of the demand mainly shapes the decision period.

The complexity of decision environment results from;

High number of notebook models.

Reliability of the price. (Price of the notebook in our system may not be always consistent with price of same product on another suppliers)

A DSS for the notebook selection process is obviously essential to have a more systematic and reliable selection environment. To make the decision, some criteria have to be satisfied. The decision of selecting the best notebook is based on;

Set of requirements that are consistent, should meet the expectation of consumer

Decision making environment should be objective and reliable

Decision environment should be user friendly.

Consumers can select notebook with the conventional technique but computerized decision support system makes the results more reliable, objective and faster. The conventional technique with computerized decision support system can also be beneficial option. The system can maximize the possibility of buying the best alternative notebook at the most economic price. Because the system provides us the most objective and affordable choices, thus consumers don’t make any unproductive decisions. Moreover the decisions are made in less time in our system, compared to conventional technique.

I.2 Mission of ProjectThe mission of this project is to find the best notebook at the most economic price and mostly close to consumer preferences. Giving the best alternative among all the options is main purpose of the project.

3

Page 4: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

I.3 Scope of ProjectOur project considers both the qualitative preferences of consumer and the quantitative specifications of notebooks. These qualitative preferences include, brand, color, hardware specifications such as CPU, hard-drive capacity, RAM and video card, software such as operating system, warranty and price.

I.4 Methodology

In today’s world when consumers want to buy something such as notebook, they have too many options. Having too many options makes decision process very complex and time consuming. Moreover as stated in the paper of Columbia University Professor Sheena Iyengar, consumers given too many choices are 10 times less likely to buy.1 In the worse scenario, consumers can make a careless decision in this complex environment. DSS for Notebook Selection is the best way to solve this problem we face. We decided to use Analytic Hierarchy Process (AHP) to find the best selection. Consumers do not always choose by looking at the quantitative specifications of the products, instead they sometimes decide by looking the qualitative properties. Therefore, direct comparisons are necessary to establish measurements for intangible properties that have no scales of measurement.2 Because of the decision process includes both objective and subjective considerations; AHP would be useful to make bilateral comparisons by including weights. Choosing a notebook requires consumer to determine and evaluate a large number of criteria. In our methodology, consumer prioritizes the criteria which are required for decision making. DSS for Netbook Selection gives the final decision by firstly making the sub-criteria comparison and then comparison of sub-criteria results.

II. LITERATURE SURVEY

II.1. Website & Journal Review

What is Decision Support Systems?

Decision support systems (DSS) are computer technology solutions that can be used to support complex decision making and problem solving.3

DSS have evolved significantly since their early development in the 1970s. Over the past three decades, DSS have taken on both a narrower or broader definition, while other systems have emerged to assist specific types of decision-makers faced with specific kinds of problems. Research in this area has typically focused on how information technology can improve the efficiency with which a user makes a decision, and can improve the effectiveness of that decision.4 In our project, we created a DSS which tries to get optimal alternative according to users preferences. A DSS is required because it is a hard decision to select best laptop which meets user’s needs.There is a substantial amount of empirical evidence that human intuitive judgment and decision making can be far from optimal, and it deteriorates even further with complexity and stress. Because in many situations the quality of decisions is important, aiding the deficiencies of human judgment and decision making has been a major focus of science throughout history. Disciplines such as statistics, economics, and operations research developed various methods for making rational choices. More recently, these methods, often enhanced by a variety of techniques originating from information science, cognitive psychology, and artificial intelligence, have been implemented in the

4

Page 5: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

form of computer programs, either as stand-alone tools or as integrated computing environments for complex decision making. Such environments are often given the common name of decision support systems (DSSs). The concept of DSS is extremely broad, and its definitions vary, depending on the author’s point of view. To avoid exclusion of any of the existing types of DSSs, we will define them roughly as interactive computer-based systems that aid users in judgment and choice activities. Decision support systems can aid human cognitive deficiencies by integrating various sources of information, providing intelligent access to relevant knowledge, and aiding the process of structuring decisions. (Druzdzel & Flynn, 2002)

Analytic Hierarchical Process

The foundation of the Analytic Hierarchy Process (AHP) is a set of axioms that carefully delimits the scope of the problem environment (Saaty 1986). It is based on the well-defined mathematical structure of consistent matrices and their associated righteigenvector's ability to generate true or approximate weights, Merkin (1979), Saaty(1980, 1994). The AHP methodology compares criteria, or alternatives with respect to acriterion, in a natural, pairwise mode. To do so, the AHP uses a fundamental scale ofabsolute numbers that has been proven in practice and validated by physical and decision problem experiments.

AHP is a method for ranking decision alternatives and selecting the best one when the decision maker has multiple criteria (Taylor, 2004). It answers the question, “Which one?” With AHP, the decision maker selects the alternative that best meets his or her decision criteria developing a numerical score to rank each decision alternative based on how well each alternative meets them.

In AHP, preferences between alternatives are determined by making pairwise comparisons. In a pairwise comparison, the decision maker examines two alternatives by considering one criterion and indicates a preference. These comparisons are made using a preference scale, which assigns numerical values to different levels of preference (Taha, 2003). The standard preference scale used for AHP is 1-9 scale which lies between “equal importances” to “extreme importance” where sometimes different evaluation scales can be used such as 1 to 5. In the pairwise comparison matrix, the value 9 indicates that one factor is extremely more important than the other, and the value 1/9 indicates that one factor is extremely less important than the other, and the value 1 indicates equal importance (Sarkis and Talluri, 2004). Therefore, if the importance of one factor with respect to a second is given, then the importance of the second factor with respect to the first is the reciprocal. Ratio scale and the use of verbal comparisons are used for weighting of quantifiable and non-quantifiable elements (Pohekar ve Ramachandran, 2004).

Since 1977, Saaty (1980) proposed AHP as a decision aid to help solve unstructured problems in economics, social and management sciences. AHP has been applied in a variety of contexts: from the simple everyday problem of selecting a school to the complex problems of designing alternative future outcomes of a developing country, evaluating political candidacy, allocating energy resources, and so on. The AHP enables the decision-makers to structure a complex problem in the form of a simple hierarchy and to evaluate a large number of quantitative and qualitative factors in a systematic manner under multiple criteria environment in confliction (Cheng, et al, 1999).

5

Page 6: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

The application of the AHP to the complex problem usually involves four major steps (Cheng, et al, 1999):

1. Break down the complex problem into a number of small constituent elements and then structure the elements in a hierarchical form.

2. Make a series of pair wise comparisons among the elements according to a ratio scale.

3. Use the eigenvalue method to estimate the relative weights of the elements.

4. Aggregate these relative weights and synthesize them for the final measurement of given decision alternatives.

The AHP is a powerful and flexible multi-criteria decision-making tool for dealing with complex problems where both qualitative and quantitative aspects need to be considered. The AHP helps analysts to organize the critical aspects of a problem into a hierarchy rather like a family tree (Bevilacqua et al, 2004).

The essence of the process is decomposition of a complex problem into a hierarchy with goal (criterion) at the top of the hierarchy, criteria and sub-criteria at levels and sub-levels of the hierarchy, and decision alternatives at the bottom of the hierarchy. Elements at given hierarchy levels are compared in pairs to assess their relative preference with respect to each of the elements at the next higher level. The method computes and aggregates their eigenvectors until the composite final vector of weight coefficients for alternatives is obtained. The entries of final weight coefficients vector reflect the relative importance (value) of each alternative with respect to the goal stated at the top of the hierarchy (Pohekar ve Ramachandran, 2004). A decision maker may use this vector according to his particular needs and interests. To elicit pairwise comparisons performed at a given level, a matrix A is created in turn by putting the result of pairwise comparison of element i with element j into the position aji as below.

Figure 1: Pairwise comparison

6

Page 7: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Where

n = criteria number to be evaluated

Ci = i. criteria,

Aij = importance of i. criteria according to jth criteria

After obtaining the weight vector, it is then multiplied with the weight coefficient of the element at a higher level (that was used as criterion for pairwise comparisons). The procedure is repeated upward for each level, until the top of the hierarchy is reached (Saaty, 1994). The overall weight coefficient, with respect to the goal for each decision alternative is then obtained. The alternative with the highest weight coefficient value should be taken as the best alternative. Saaty’s AHP, is a well-known decision-making analytical tool used for modeling unstructured problems in various areas, e.g., social, economic, and management sciences (Bard and Sousk, 1990; Triantaphyllou and Mann, 1995; Wabalickis, 1988).

After obtaining the weight vector, it is then multiplied with the weight coefficient of the element at a higher level. The procedure is repeated upward for each level, until the top of the hierarchy is reached (Saaty, 1980). Then the overall weight coefficient, with respect to the goal for each decision alternative is obtained. The alternative with the highest weight coefficient value should be taken as the best alternative.

II.2 Former Studies ResearchOne common model-based approach is to model customers’ preferences using a vector of weights representing relevancies of product attributes to a given customer. Lee et al. used this approach for recommending DVDs to customers. Their agent based system used genetic algorithms to learn customers’ preferences. Similar approach was used in (Pazzani, Bilssus, 2002) where the system learned user preferences for the source of document recommendation. (Kim et al, 2002) utilized web usage mining for decision tree induction in order to generate personalized recommendations in e-shopping support. One way to elicit customer preferences is through the use of conjoint analysis: a technique long used in marketing (Louviere, 1988). In this approach customer is presented with different products and feature combinations and asked to compare them in terms of desirability.

7

Page 8: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Figure 2: Client-server system

In a previous study by Rustam Vahidov and Fei Li in 2005, fuzzy modeling was used to select the optimum notebook according to the given customer preferences. They also used constraints to get the list of feasible candidates as we are going to do. They stated the reason for choosing fuzzy modeling that they were allowing the customers to have some level of softness in expressing their preferences. Their model also reflects the degree of vagueness in customer preferences. Instead, our model chooses the optimum candidate among many, and do not reflects the customer vagueness therefore we don’t need to use fuzzy modeling; instead we decided to model our study using AHP.

8

Page 9: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

III. DEVELOPMENT OF THE DSSIII.1. DSS Architecture

Figure 3: Architecture of the system

III.2 Technical Issues

The system will be designed both of consumer and staff version of the Notebook Selection Software. Consumers can choice specifications and priorities for selection. On the other side, staff can add new notebooks in the system. We will design a web based application.For designed and coding application,

1- Microsoft Windows 7 Operating system will be used as platform.2- Microsoft Office 2007 will be used for program, calculation and documentation. Access

2007 will also used for database. 3- ASP.NET language will be used for coding.

9

Page 10: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

III.3. Model and Algorithms

Some of our algorithms are presented below

Figure 4: Sign-In Algorithm

10

Page 11: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Figure 5: Notebook Select Algorithm

Figure 6: Pair wise Algorithm

11

Page 12: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Figure 7: Notebook add Algorithm

III.3.1 Model

Objective: Selecting best suitable laptop for customer.Criteria: Performance

o CPUo RAMo HDD

Designo Screen sizeo Coloro Weighto Appearance

Brand Imageo Technical serviceo Customer satisfaction

Graphicso Video cardo Screen resolution

Featureso Battery lifeo Warranty

12

Page 13: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Alternatives: User is able to filter laptop alternatives according to her preferences in terms of some criteria and choose at most 7 alternatives from the list. Database includes 30 laptops which have different price ranges, brand names and features.

13

Page 14: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

III.3.2 Hierarchical Tree

15

Select a Notebook

Performance

CPU

Notebook1

Notebook2

Notebook3

RAM

Notebook1

Notebook2

Notebook3

HDD

Notebook1

Notebook2

Notebook3

Design

Screen Size

Notebook1

Notebook2

Notebook3

Color

Notebook1

Notebook2

Notebook3

Weight

Notebook1

Notebook2

Notebook3

Brand Image

Technical Service

Notebook1

Notebook2

Notebook3

Customer Satisfaction

Notebook1

Notebook2

Notebook3

Graphics

Video card

Notebook1

Notebook2

Notebook3

Screen Resolution

Notebook1

Notebook2

Notebook3

Features

Battery Life

Notebook1

Notebook2

Notebook3

Warranty

Notebook1

Notebook2

Notebook3

Page 15: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

III.3.3 Modeling of Selection

The criteria are determined and given relative importance for each criterion by consumer. 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 8: The Saaty Rating Scale

The next step is the calculation of a list of the relative weights, importance, or value, ofThe factors, such as price and CPU (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 9: Values of Consistency Ratio

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

According to our survey, price gets the highest point with 34 percent of iteration rate among other criteria, and CPU has second highest point with 24 percent. Brand, Ram and Video Card have same rate with 10 percent. Design and Screen Size have 6 percent of iteration rate.

Main Criteria Comparisons

17

Page 16: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Figure 10: Main Criterion Pair wise Comparison

Sub Criteria Comparisons

Figure 11: Performance

Figure 12: Design

Figure 13: Brand Image

18

Page 17: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Figure 13: Graphics

Figure 14: Features

Alternative Comparisons

Figure 15: CPU

Figure 15: RAM

Figure 16: HDD

Figure 17: Screen Size

Figure 18: Color

19

Page 18: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Figure 19: Weight

Figure 20: Techical Service

Figure 21: Customer Satisfaction

Figure 22: Video Card

Figure 23: Screen Resolution

Figure 24: Battery Life

Figure 25: Warranty

Figure 26: Weights including main criteria

20

Page 19: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Figure 27: Weights including sub criteria

Figure 28: Cost Benefit Table

Figure 29: Cost Benefit Ratio

21

Page 20: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

III.3.4 Data Collection

To determine criteria which we used to evaluate for selecting notebooks, we got information from sales representatives in computer stores about determinants of notebook selection of costumer. Moreover, we created a survey about notebook preferences of users. According to information we collected from sales representatives and the survey, most important factors of selection a notebook are performance, design, brand image, graphics and other features such as warranty and battery life. In our survey, we selected the highest five main criteria which had highest points and fourteen sub criteria. To get quantitative information about CPU, RAM, HDD, Screen Resolution and Video card performances, we created a database and use these data in alternative comparisons. Qualitative data like color and Screen Size will be obtained from user, because these preferences may change according to person. Price is not a criterion in our system but we use it while creating benefit/cost ratio which provide us an evolution about general value of the notebook considering also price. We gather price information of notebooks from some B2C companies such as Vatan Computer and Bimeks.

Figure 30: Survey Results-Age Interval

Figure 31: Survey Results-Performance

22

Page 21: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Figure 32: Survey Results-Laptop usage

Figure 33: Survey Results-Importance of HDD

Figure 33: Survey Results-Main Criteria Selection

23

Page 22: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

III.4. User Interface and Reports

Figure 34: Main Screen

Figure 35: Main Screen – Categories

24

Page 23: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Figure 36: Filter notebooks

Figure 37: After Filter

25

Page 24: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Figure 38: Select criteria

Figure 39: Pair wise comparison

26

Page 25: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Figure 40: Alternative comparison-Screen size*

*Screen size is accepted as qualitative data because user may prefer small screen or large screens. Therefore, we obtain this information from user.

Figure 41: Ranking screen*

27

Page 26: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

*Our optimal choice is first one according to benefit/cost ratio.

Figure 42: What if analysis*

*What if analysis shows what will be the optimal alternative and how the rank of alternatives will change if user changes her criteria weights. User can change the weight percentage of the criteria and then click the recalculate button. Then system recalculates new points for the alternatives and gives new benefit/cost ratios.

Figure 43: Changed weight percentages

28

Page 27: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Figure 43: New ranking after what if analysis*

*In this example, the optimal alternative (first one) did not change but the ranking of alternatives changed. Moreover, the final points and benefit/cost ratios for every alternative changed. The system also provides old points before the what if analysis.

Figure 44: Screen of How El Turco Works*

29

Page 28: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

*This page shows the user how to use this site which provides a DSS for notebook selection.Figure 44: Screen of How El Turco Works-2*

Figure 45: Team members screen

30

Page 29: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Database

31

Page 30: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

IV. ASSESSMENTWe decided to use Analytical Hierarchy Process as our methodology, and then we decided to make a DSS for Notebook Selection because each of us has a general knowledge about notebooks and their specifications.

Then two of us made an interview with a sales representative in a computer store and we prepared a survey. Thus we got the information to define criteria for notebook selection.

After our mid report presentation we improved our hierarchical tree based on the recommendation of our instructor Asli Sencer ERDEM.

Finally, we designed our system and started coding the system. Our time was restricted and the coding is complex and challenging. Our instructor also wanted us to make a what-if analysis, it was struggling for us because there were a little time to due date.

IV.1 Project Plan

Difficulties: Our schedules are not the same so finding a time that fits for everyone is a difficulty for us.

Meeting Place: We decided to meet at South campus study hall, but we are going to use the Library in North campus for the literature review. We also created a Google group (MIS463_DSSNotebook) for the project, so we are going to contact each other through this group and share documents and information related with the project.

Meeting Time: We decided to meet according to the schedules of the team members.

Coordinator: The team decided to work collaboratively, each group member attend the meetings and contribute to the project. By this way, we can make brainstorming and realize possible errors or deficiencies.

Task Allocation:

33

Page 31: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

IV.2 Master Plan

PhasePlanned Actual

Complete% ProblemsStart Finish Start Finish

Team Formation 01.10.2011 01.10.2011  01.10.2011 01.10.2011 100% None

Project Proposal 11.10.2011 16.10.2011  11.10.2011 15.10.2011 100% None

Presentation 15.10.2011 16.10.2011  15.10.2011 16.10.2011  100%  None

Literature Review (Library, Web, former studies) 19.10.2011 12.11.2011 19.10.2011 05.11.2011 100% 

 It is hard to find resources about notebook preferences

Interviews with experts, decision makers in the related area 12.11.2011 15.11.2011  05.10.2011 15.11.2011 100%   None

Development of the model 15.11.2011 19.11.2011  10.10.2011 19.11.2011 100%  There is a lot of notebook alternatives.

Midreport 19.10.2011 21.11.2011  19.10.2011 20.11.2011  100%  NonePresentation 19.11.2011 21.11.2011  19.11.2011 21.11.2011  100%  None Data Collection and Organization 22.11.2011 01.12.2011 24.11.2011  29.11.2.11  100%    None 

Coding interfaces 01.12.2011 20.12.2011  03.12.2011 22.12.2011  100%   The coding of What if analysis is very complex.

Validation (Optional) 20.12.2011 25.12.2011  22.12.2011 23.12.2011  100%   Database connection errors

Final Report 20.12.2011 26.12.2011  24.12.2011 25.12.2011  100%     None Presentation 20.12.2011 26.12.2011  23.12.2011 28.12.2011  100%     None 

35

Page 32: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

V.TESTINGUser PageA primary purpose of testing is to detect software failures so that defects may be discovered and corrected.In main page, user can see all computers and he/she can filter the products. Each filter criteria works properly, when user selects one of them such as ASUS in Brand criteria, all ASUS products are displayed on the screen. Users can filter the products according to Price, Brand, CPU, Hard disk Drive, RAM, Screen Resolution, Video Card and Warranty. Each criteria and results is showed in tables.

Price Combo Box:Selected Criteria ResultsLower than $500 All notebooks which prices lower than

$500 are showed.$500-$750 All notebooks which prices between $500

and $750 are showed.$750-$1000 All notebooks which prices between $750

and $1000 are showed.$1000-$1500 All notebooks which prices between

$1000 and $1500 are showed.$1500-$2000 All notebooks which prices between

$1500 and $2000 are showed.Higher than $2000 All notebooks which prices higher than

$2000 are showed.All price functions works properly.

Brand Combo Box:Selected Criteria ResultsAcer All related notebooks are showed.Apple All related notebooks are showed.Asus All related notebooks are showed.Dell All related notebooks are showed.HP All related notebooks are showed.Sony All related notebooks are showed.Toshiba All related notebooks are showed.All brand functions works properly.

Battery Life Combo Box:Selected Criteria Results3 All related notebooks are showed.4 All related notebooks are showed.5 All related notebooks are showed.6 All related notebooks are showed.7 All related notebooks are showed.All battery life functions works properly.CPU Combo Box:

37

Page 33: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Selected Criteria ResultsAMD Phenom P960 All related notebooks are showed.Intel Core Duo P6200 All related notebooks are showed.Intel i3 2310M All related notebooks are showed.Intel i3 2330M All related notebooks are showed.Intel i3 330M All related notebooks are showed.Intel i3 370M All related notebooks are showed.Intel i3 380M All related notebooks are showed.Intel i5 2410M All related notebooks are showed.Intel i5 2430M All related notebooks are showed.Intel i5 430M All related notebooks are showed.Intel i5 480M All related notebooks are showed.Intel i7 2620QM All related notebooks are showed.Intel i7 2630QM All related notebooks are showed.Intel i7 2760QM All related notebooks are showed.Intel i7 740QM All related notebooks are showed.All CPU functions works properly.

Hard disk Drive Combo Box:Selected Criteria Results1 TB SATA HDD All related notebooks are showed.320 GB SATA All related notebooks are showed.500 GB SATA All related notebooks are showed.640 GB SATA All related notebooks are showed.750 GB SATA All related notebooks are showed.All Hard disk functions works properly.

RAM Combo Box:Selected Criteria Results1 GB RAM All related notebooks are showed.2 GB RAM All related notebooks are showed.3 GB RAM All related notebooks are showed.4 GB RAM All related notebooks are showed.6 GB RAM All related notebooks are showed.8 GB RAM All related notebooks are showed.All RAM functions works properly.

Screen Resolution Combo Box:Selected Criteria Results1280x800 px All related notebooks are showed.1366x768 px All related notebooks are showed.1600x900 px All related notebooks are showed.1920x1080 px All related notebooks are showed.All screen resolution functions works properly.

Video Card Combo Box:

38

Page 34: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Selected Criteria ResultsGeForce GT520M All related notebooks are showed.Intel 3000 All related notebooks are showed.Nvidia GT 330M All related notebooks are showed.Nvidia GT 520M All related notebooks are showed.Nvidia GT 525M All related notebooks are showed.Nvidia GT 540M All related notebooks are showed.Nvidia GT 550M All related notebooks are showed.Nvidia GT 520 All related notebooks are showed.Nvidia GTS 360M All related notebooks are showed.Radeon HD 5470 All related notebooks are showed.Radeon HD 6470M All related notebooks are showed.Radeon HD 6770M All related notebooks are showed.All video card functions works properly.

Warranty Combo Box:Selected Criteria Results2 years All related notebooks are showed.All warranty functions works properly.

Users can select at least 3 different notebooks and at most 7 different notebooks. If user selects more than 7, the system warns the users with a pop-up screen after clicking on compare button.

After clicking on compare button Criteria page opens. User can select at most 7 different criteria, if he/she exceeds the number, system warns user again. The points of Performance, Graphics and Features come from database, and other points are indicated by users. If user clicks on Previous Step button, main page opens. Admin can also add new criteria. When users select check box which are related to their preferences and clicks on compare buttons, Compare product page opens. User determines their preferences weights by using slide bar. If consistency of weights is higher than ten percent, an error message is showed. Otherwise, system jumps to next step. If there is a criterion in Design and Brand image, user determines his/her personal weights. If consistency of weights is lower than 10 percent, system jumps to next step again when user clicks on next button. If user clicks on “Previous” or Previous Step”, Compare products page opens.

In Result page, computer is listed according to benefit/cost ratio. If user clicks notebook image or name, pages of related computer is showed. There is also a What If (Sensitivity) analyze table on the page. If users what to change weight of their preferences, they change them by using slide bar. If user increase or decrease the weights, others automatically change. When user clicks on re-calculate button, new list is displayed. If users click on “Previous” or Previous Step buttons, previous pages open.Registered users can log in the system by using Log in button. When users click on the button, user login page opens. User enters username and password and click on Log in button. If user registered, he/she log in the system.

39

Page 35: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

In main screen, if user clicks on notebook image or name, notebook specification page opens. When user clicks on Specifications, the page is scrolled down and specifications are displayed. All functions which are mentioned above work properly on the system. Admin PageTo provide security for information in database, admin panel was hidden. Admin can access the admin panel to enter …./admin.aspx. Admin enters the username and password which are “abc” in our system. If admin enter wrong username or password, system shows an error message like “Invalid username/password combination. Please try again.” If admin enters true username and password and clicks on “Login” button, system leads admin to Control panel. Control Panel consists of four main groups and nine functions.

Table: Admin Control Page

40

Page 36: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

New Computer:The button leads to Editing page properly.

Field and Buttons

Functions Errors Error Type

Computer Name Admin enters notebook name.

When admin enters the character of “ ‘ ” (single quote) and clicks on save button, system gives an error.

Syntax Error

Brand Name Admin selects Brand name

None None

Price Admin enters price of notebooks

when admin enters a character which is not any number, system gives an error

Syntax Error

Picture (Upload) Admin clicks the button to select an image

None None

Dosya Seç Admin clicks the button and a browser opens.

None None

Upload(in pop-up)

After selecting image, admin clicks on the button and image is uploaded.

None None

Description Admin enters description of notebook.

When admin enters the character of “ ‘ ” (single quote) and clicks on save button, system gives an error.

Syntax Error

Save Admin clicks on the button to save information and create a new notebook

None None

“Go to Panel Home” button leads home page of admin.

41

Page 37: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

List All Computers: The buttons leads Computer page.If admin clicks on the computer names, editing page opens successfully. If admin clicks on “delete” button, selected notebook is deleted properly.“Go to Panel Home” button leads home page of admin.

New Computer Brand:The buttons leads Edit Computer Brand page.

Field and Buttons Functions Errors Error Type

Brand Name Admin enters brand name.

When admin enters the character of “ ‘ ” (single quote) and clicks on save button, system gives an error.

Syntax Error

“Go to Panel Home” button leads home page of admin.

List All Computer Brands:The buttons leads Computer Brands page.If admin clicks on the brand names, editing page opens successfully. If admin clicks on “delete” button, selected brand is deleted properly.“Go to Panel Home” button leads home page of admin.

New Computer Part:The buttons leads editing computer part page.

Field and Buttons Functions Errors Error Type

Part Name Admin enters part name.

When admin enters the character of “ ‘ ” (single quote) and clicks on save button, system gives an error.

Syntax Error

Computer Specification

Admin selects part group related with new part.

None None

AHP Value Admin enters AHP value.

when admin enters a character which is not any number, system gives an error

Syntax Error

Save Save information None None

“Go to Panel Home” button leads home page of admin.

42

Page 38: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

List All Computer Parts The buttons leads computer parts page.

If admin clicks on the part names, editing page opens successfully. If admin clicks on “delete” button, selected part is deleted properly.“Go to Panel Home” button leads home page of admin.

New Computer SpecificationThe buttons leads “edit computer specification” page.

Field and Buttons

Functions Errors Error Type

Specification Name

Admin enters specification name.

When admin enters the character of “ ‘ ” (single quote) and clicks on save button, system gives an error.

Syntax Error

Computer Specification

Admin selects specification group related with new specification.

None None

Save Save information

None None

Go to Panel Home” button leads home page of admin.

List All SpecificationThe buttons leads “computer specifications” page.If admin clicks on the specification names, editing page opens successfully. If admin clicks on “delete” button, selected specification is deleted properly.“Go to Panel Home” button leads home page of admin.

List Attached Parts to ComputerThe buttons leads “attached computer parts” page.In the page, admin can see all computers and their attached parts. If admin clicks on the specification names, editing page opens successfully.

43

Page 39: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Combo Boxes and Buttons

Functions Errors Error Type

Batter Life Admin selects batter life of notebooks.

None None

CPU Admin selects CPU of notebooks.

None None

Harddisk Drive Admin selects Hard disk capacity of notebooks.

None None

RAM Admin selects RAM capacity of notebooks.

None None

Screen Resolution

Admin selects screen resolution of notebooks.

None None

Video Card Admin selects video card model of notebooks.

None None

Warranty Admin selects warranty life of notebooks.

None None

Save Save information

None None

“Go to Panel Home” button leads home page of admin.

Generally, to improve system better, all functions of the project were tested according to scalability, maintainability, usability, performance.Design of the website is user friendly and ease of use. According to Usability function of testing, our system is well designed and easy to understand. User can filter the computers according to many categories such as price, brand, CPU and etc. All pc has an image to identify their appearances. There is a check box under each computer it makes easy to select alternative computers for comparison. After user clicks the comparison button, criteria page opens. Comparison criteria are grouped under more general main criteria and there is an explanation area which explains how to make a comparison. After selection of criteria, product comparison page opens. There is a slider for each pair wise comparison which makes the usability easier and there is also explanation about the comparison. At the result page, computers are ordered according to benefit/cost ratio. User also can change the weights of selected criteria by using sliders and clicks on recalculate button. Each page has a back button to make it easy to shift between pages.Admin of the system can add, edit or delete the parts, new computer, new brands and new criteria. Therefore, our system is said to be flexible and our system suits the maintainability criteria of testing.

44

Page 40: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Because of our database provider, which is MS Access, there may be a problem on our website when there are many users at the same time. MS Access doesn’t provide its service for many users simultaneously. Thus, it can be said that scalability of the system is not perfect.General performance of the system is very high according to time and resources used. The system shows results successfully in short time and it works on different browsers properly.

45

Page 41: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

VI. CONCLUSIONUp to now, we have completed the all steps that are promised within the planned

intervals in the master plan. In the literature review, we have searched about the processes affected the decision process of selecting notebooks. Moreover, we looked for the AHP processes and applications to develop a model for our project. Then, we created a survey to eliminate criteria for notebook selection and polled the necessary information to understand the preferences and priorities of notebook customers. We also made interview with a computer vendor about the quantity of sales and what are the most important criteria determined according to sales. Then we analyzed all collected data from literature review, survey and interview and develop our model with AHP. We determined our criteria after the survey and composed a hierarchical tree. Then, we made a general pair wise comparison and a specific pair wise comparison for each criterion in terms of brand names. After all steps are completed for the model, we prepared our mid-report which include all processes of our work; literature view, developing model, and necessary diagrams. Consequently, we prepared for the presentation.

Generally, we corresponded with our master plan and achieved to complete all processes on time. Our literature review took less time than we assumed and so we started our next processes earlier than we planned. Therefore we focused on mostly developing the model. Our new master plan can be found above which included all processes done and the upcoming processes. Next processes include the processes of data collection and organization of this data, coding interfaces and validation of the system. We will proceed the next phases according our task allocation and master plan. Every group member will do the phase that is assigned to him/her and will complete them until the date that is determined in master plan.

We completed: Literature review of the project (Former studies, survey, web) Developing the model Mid report Application of the model Website Final report

Firstly, we changed the midreport after the presentation according to the instructor comments. Then we created a website and applied the methodology and model to this website after the mid-report. We prepared a system that works automatically to find the most suitable notebook for customer according to AHP model. The AHP model is determined by customer preferences. Customer filters the alternatives and select at least 3 and at most 7 notebook. Before calculation, user selects the criteria and compares them with pair wise comparison. If she wants, she can change the weight with the “what if analysis” which appear on results page. At the last step of the project, we tested the system. At the end, we prepared our final report and presentation.

46

Page 42: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

VII.REFERENCESYou will use the following format for journal paper, book and conference proceedings respectively.

Bard, J. F., & Sousk, S. F. (1990). “A Trade Analysis for Rough Terrain Cargo Handlers Using The AHP: An Example of Group Decision Making”, IEEE Transactions on Engineering Management, 37, 3, 222-228.

Bevilacqua, M., & Polonara, F. (2004). A Multi-Criteria Decision Approach to Choosing The Optimal Blanching-Freezing System, Journal of Food Engineering, 63, 253-263.

Carter, L.C and Hamilton, J.H. (1998) “Efficient Attribute-Oriented Generalization for Knowledge Discovery from Large Databases”, IEEE Transactions on Knowledge and Data Engineering 1998, Vol.10, no.2, pp.101-115.

Cheng, C. H., Hwang, C. L., & Yang, K. L. (1999). Evaluating Attack Helicopters by AHP Based on Linguistic Variable Weight, European Journal of Operational Research, 116, 423-435.

Druzdzel, M., & Flynn, R. (2002). “Decision Support Systems”. Decision Systems Laboratory School of Information Sciences and Intelligent Systems Program, University of Pittsburgh,Pittsburgh.

Gonzales, J.A and Dankel, D.D. (1993) “The Engineering of Knowledge-based Systems: Theory and Practice”, Prentice Hall, 1993.

Iyengar S. S, and Lepper M. R. (2000), “When choice is demotivating: Can one desire too much of a good thing?” Journal of Personality and Social Psychology, 2000, Vol. 79, No. 6, pp 995-1006 Keen P. and Morton M.S. (1978), “Decision Support Systems: An Organizational Perspective”, Addison-Wesley Publishing, Reading, MA, 1978.

Kim J.K., Cho Y.H., Kim W.J., Kim J.R. and Suh J.H. (2002), “A personalized recommendation procedure for internet shopping support”, Electronic Commerce Research and Applications 2002, Vol.1, pp. 301–313

Louviere J.J. (1988), “Analyzing Decision Making: Metric Conjoint Analysis”, Sage University, Newbury Park, 1988.

Merkin, B. G. 1979. Group Choice, John Wiley & Sons, NY.

Ozdağoğlu, A., and Ozdağoğlu, G. (2007). “Comparison of AHP and Fuzzy AHP for the Multicriteria Decision Making Processes with Linguistic Evaluations”, İstanbul Ticaret Üniversitesi Fen Bilimleri Dergisi 2006, Vol.11Bahar 2007/,1 pp. 65-85.

Pazzani M.J and Bilssus D. (2002), “Adaptive Web Site Agents”, Autonomous Agents and Multi-Agent Systems, 2002, Vol. 5, pp. 205–218

47

Page 43: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Pearson J.M. and Shim J.P. (1995), “An empirical investigation into DSS structures and environments.” Decision Support Systems 1995,Vol. 13 pp. 141–158. 

Pelc I.K (1997), "Patterns of Knowledge Generating Networks", Proceedings of PICMET'97, Portland, pp. 101-105.

Pohekar, S. D., & Ramachandran, M. (2004). Application of Multi-Criteria Decision Making to Sustainable Energy Planning, A Review Renewable and Sustainable Energy Reviews, 8, 365-381.

Pu P., Faltings B. and Torrens M. (2003), “User-involved preference elicitation” in: Presented at 18th International Joint Conference on Artificial Intelligence, Acapulco, Mexico, 2003.

Saaty, T.L. (1980). “The Analytic Hierarchy Process”, McGraw-Hill Book Company, Inc., New York.

Saaty T. L. (2008-06), "Relative Measurement and its Generalization in Decision Making: Why Pairwise Comparisons are Central in Mathematics for the measurement of Intangible Factors - The Analytic Hierarchy/Network Process" Rev. R. Acad. Cien. Serie A. Mat. 2008, Vol. 102 (2), pp. 251–318

Sarkis, J., & Talluri, S. (2004). Evaluating and Selecting e-Commerce Software and Communication Systems for a Supply Chain, European Journal of Operational Research, 159, 318-329.

Taha, H. A. (2003). Operations Research, Pearson Education Inc., Fayetteville.

Taylor, B. W. (2004). Introduction to Management Science, Pearson Education Inc., New Jersey.

Triantaphyllou, E., & Mann, S.H. (1995). Using the Analytic Hierarchy Process For Decision Making in Engineering Applications: Some Challenges, Inter'l Journal of Industrial Engineering: Applications and Practice, Vol. 2, No. 1, pp. 35-4

Triantaphyllou, E., & Mann, S.H. (1995). Using the Analytic Hierarchy Process For Decision Making in Engineering Applications: Some Challenges, Inter'l Journal of Industrial Engineering: Applications and Practice, Vol. 2, No. 1, pp. 35-4

Vahidov R., and JI F. (2005), “A Diversity-Based Method for Infrequent urchase Decision Support in e-commerce”, Electronic Commerce Research and Applications, 4, 143–158.

Wabalickis, R. (1988).  Justification of FMS with the analytic hierarchy process. J. Manuf. Sys., 17: 175-182.

48

Page 44: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

VIII.APPENDIXVIII.1.Survey

Dss For Notebook SelectionBu anket Dss for Notebook Selection projemize bilgi toplama amaciyla hazirlanmistir. Zaman ayirdiginiz icin tesekkurler...* Required

Kişisel Bilgiler1) Size uygun yaş aralığını aşağıdakilerden seçiniz *

17'den küçük

18-24

25-34

35-49

50-65

65'den büyük

2) Eğitim durumunuzu seçiniz *

İlköğretim

Lise

Üniversite

Yüksek Lisans

Doktora

3) Aylık gelir aralığınızı seçiniz *

1000'den az

1000-1500

1500-2500

2500-4000

4000'den fazla

49

Page 45: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Bilgisayar kullanımı4) Aşağıdaki bilgisayar türlerinden hangisi/hangilerini, ne sıklıkta kullanıyorsunuz? *

Kullanmıyorum Günde 1 saatten az

Günde 1-4 saat

Günde 4-7 saat

Günde 7 saatten fazla

Masaüstü bilgisayarı

Laptop

Netbook

Tablet pc

Cep bilgisayarı

5) Bilgisayarınızı hangi amaçla ve ne sıklıklıkla kullanıyorsunuz? *

Kullanmıyorum Günde 1 saatten az

Günde 1-4 saat

Günde 4-7 saat

Günde 7 saatten fazla

İnternette gezinmek

Oyun oynamak

Çizim yapmak

Film izlemek

Ödev yapmak

Müzik dinlemek

Ofis işleri

50

Page 46: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

6) Aşağıdakilerden kendizine uygun olanları seçiniz *1:Katılmıyorum 5:Katılıyorum

1 2 3 4 5

Bilgisayar alırken

performans benim için önemlidir.

Bilgisayar alırken marka

benim için önemlidir.

Bilgisayar alırken

fiyatı benim için önemlidir.

Bilgisayar alırken dizaynı

benim için önemlidir.

Bilgisayar alırken ses

sistemi benim için önemlidir.

Bilgisayar alırken grafik

özellikleri benim için önemlidir

51

Page 47: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

1 2 3 4 5

Ana Kriter Tercihleri7) Marka imajıyla karşılaştırdığımızda, aşağıdakiler sizin için ne kadar önemlidir? *1:En az önemli, 5:En çok önemli

1 2 3 4 5

Performans

Dizayn

Grafik

Ses sistemi

Özellikler (garanti,

pil ömrü)

8) Performans ile karşılaştırdığımızda, aşağıdakiler sizin için ne kadar önemlidir? *1:En az önemli, 5:En çok önemli

1 2 3 4 5

Marka imajı

Dizayn

Grafik

Ses sistemi

Özellikler (garanti, pil ömrü)

52

Page 48: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

9) Dizayn ile karşılaştırdığımızda, aşağıdakiler sizin için ne kadar önemlidir? *1:En az önemli, 5:En çok önemli

1 2 3 4 5

Marka imajı

Performans

Grafik

Ses sistemi

Özellikler (garanti,

pil ömrü)

10) Grafik özellikleri ile karşılaştırdığımızda, aşağıdakiler sizin için ne kadar önemlidir? *1:En az önemli, 5:En çok önemli

1 2 3 4 5

Marka imajı

Performans

Dizayn

Ses sistemi

Özellikler (garanti,

pil ömrü)

53

Page 49: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

11) Ses sistemi ile karşılaştırdığımızda, aşağıdakiler sizin için ne kadar önemlidir? *1:En az önemli, 5:En çok önemli

1 2 3 4 5

Marka imajı

Performans

Dizayn

Grafik

Özellikler (garanti,

pil ömrü)

12) Diğer özellikler(garanti, pil ömrü) ile karşılaştırdığımızda, aşağıdakiler sizin için ne kadar önemlidir? *1:En az önemli, 5:En çok önemli

1 2 3 4 5

Marka imajı

Performans

Dizayn

Grafik

Ses sistemi

54

Page 50: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

1 2 3 4 5

(ses kartı vs)

Alt Kriter Tercihleri13) Aşağıdakileri performans alt kriterleri sizin için önemlerine göre puanlayınız *1: Az önemli / 5: çok önemli

1 2 3 4 5

İşlemci (CPU)

Bellek (Ram)

Sabit disk (HDD)

İşletim sistemi

14) Aşağıdaki dizayn alt kriterlerini sizin için önemlerine göre puanlayınız *1: Az önemli / 5: çok önemli

1 2 3 4 5

Ekran boyutu

Renk

Ağırlık

Ergonomik yapı

15) Aşağıdaki marka imajı alt kriterlerini sizin için önemine göre puanlayınız. *1: Az önemli / 5: çok önemli

55

Page 51: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

1 2 3 4 5

Teknik servis

Müşteri memnuniyeti

Bilinirlik

17) Aşağıdaki grafik alt kriterlerini sizin için önemine göre puanlayınız. *1: Az önemli / 5: çok önemli

1 2 3 4 5

Ekran kartı

Ekran çözünürlüğü

HD, 3D özellikleri

18) Aşağıdaki özellikler kriterine ait alt kriterleri sizin için önemine göre puanlayınız. *1: Az önemli / 5: çok önemli

1 2 3 4 5

Garanti

Pil ömrü

USB çıkışları

Bluetooth

19) Aşağıdaki ses sistemi kriterine ait alt kriterleri sizin için önemine göre puanlayınız. *1: Az önemli / 5: çok önemli

56

Page 52: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

1 2 3 4 5

Ses kartı

Hoparlörler

Mikrofon

Link of the survey:https://docs.google.com/spreadsheet/viewform?formkey=dC1aVzExaEZBbm5WZTFmRmwxeTRtWUE6MQ

57

Page 53: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

VIII.2.Codes

VIII.2.1.Admin

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"%><asp:Content ID="Content1" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463 - Administration Panel</title> <style type="text/css"> #masterpage-content { padding: 17px 0 0 17px;color: #6B6B6C;font: bold 14px "Arial"; } th, td{ padding:5px 10px} #masterpage-content .button{ padding:5px; margin-bottom:5px} #masterpage-content select{width:170px} </style></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="CONTENT" runat="server"><%if (Session["userid"] != null && Session["userid"].ToString().Length > 0) Response.Redirect("Admin-default.aspx"); //Admin girişi kontrolü %><h4>Panel Login</h4><%if (Request.QueryString["error"] == "invalidlogin"){ //kullanıcı adı - şifresi hatalı ise hata mesajı gösteriyor%><div class="error">Invalid username/password combination. Please try again.</div><%} %><%if (Request.QueryString["error"] == "notloggedin"){ %><div class="error">The page you requested requires an admin authorization. In order to access please use the form below. </div><%} %><div class="block_content" id="masterpage-content"> <form action="Admin-login.aspx" method="post"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <th align="left">Username:</th> <td align="left"><input type="text" name="un" /></td> </tr> <tr> <th align="left">Password:</th> <td align="left"><input type="password" name="pw" /></td> </tr> <tr> <th align="left"></th> <td align="left"><input type="submit" value="Login" class="button" /></td> </tr> </table> </form></div> </asp:Content>

58

Page 54: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Admin Computer Parts

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"%><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content3" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463 - Administration Panel</title> <style type="text/css"> #masterpage-content { padding: 17px 0 0 17px;color: #6B6B6C;font: bold 14px "Arial"; } th, td{ padding:5px 10px} #masterpage-content .button{ padding:5px; margin-bottom:5px} #masterpage-content select{width:170px} </style></asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="CONTENT" runat="server"><input type="button" class="button" value="Go to Panel Home" onclick="window.location='Admin.aspx'" style="margin-bottom:10px" /><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin"); //Admin girişi yapılmadıysa giriş sayfasına yönlendir%><%if (Request.QueryString["message"] == "partUpdated"){ %><p class="warning">Changes saved.</p><%} %><%if (Request.QueryString["message"] == "partDeleted"){ %><p class="warning">Computer deleted.</p><%} %><h4>Computer Parts</h4><div class="block_content" id="masterpage-content"> <table border="0" cellpadding="0" cellspacing="0" class="std"> <tr> <th>Specification Name</th> <th>Part Name</th> <th>AHP Value</th> <th>Delete</th> </tr><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT a.*, b.SpecName FROM CompParts a, Specifications b WHERE a.SpecificationID=b.specificationID ORDER BY b.SpecName", cn); OleDbDataReader dr = cm.ExecuteReader(); while (dr.Read()) { %>

59

Page 55: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<tr> <td><%=dr["Specname"]%></td> <td><a href="Admin-compParts-edit.aspx?partID=<%=dr["partID"]%>"><%=dr["PartName"] %></a></td> <td><%=dr["AHPValue"] %></td> <td><a href="Admin-compParts-del.aspx?partID=<%=dr["partID"]%>">Delete</a></td> </tr> <%} dr.Close(); cn.Close(); %> </table></div> </asp:Content>

Add Computer Parts

<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin"); %><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT MAX(PartID)+1 FROM CompParts", cn);

object result = cm.ExecuteScalar(); if (result == null || result.ToString().Length <= 0) result = "1";

cm = new OleDbCommand("INSERT INTO CompParts(PartID) VALUES(" + result + ")", cn); cm.ExecuteNonQuery(); cn.Close(); Response.Redirect("Admin-compParts-edit.aspx?partID=" + result); %>

Delete Computer Parts<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin"); %><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;");

60

Page 56: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

cn.Open(); OleDbCommand cm = new OleDbCommand("DELETE FROM CompParts WHERE PartID=" + Request.QueryString["PartID"], cn);

cm.ExecuteNonQuery(); cn.Close(); Response.Redirect("Admin-compParts.aspx?message=partDeleted"); %>

Edit Computer Parts<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"%><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content3" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463 - Administration Panel</title> <style type="text/css"> #masterpage-content { padding: 17px 0 0 17px;color: #6B6B6C;font: bold 14px "Arial"; } th, td{ padding:5px 10px} #masterpage-content .button{ padding:5px; margin-bottom:5px} #masterpage-content select{width:170px} </style></asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="CONTENT" runat="server"><input type="button" class="button" value="Go to Panel Home" onclick="window.location='Admin.aspx'" style="margin-bottom:10px" /><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin");//Admin girişi yapılmadıysa giriş sayfasına yönlendir %><h4>Editing computer part</h4><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT * FROM CompParts WHERE PartID=" + Request.QueryString["partID"], cn); OleDbDataReader dr = cm.ExecuteReader(); dr.Read(); %><div class="block_content" id="masterpage-content"> <form action="Admin-compParts-edit2.aspx" method="post"> <input type="hidden" name="partID" value="<%=Request.QueryString["partID"]%>" /> <table border="0" cellpadding="0" cellspacing="0"> <tr> <th align="left">Part Name:</th> <td align="left"><input type="text" name="partName" value="<%=dr["PartName"] %>" /></td>

61

Page 57: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

</tr> <tr> <th align="left">Computer Specification:</th> <td align="left"> <select name="specificationID"> <option value="0"></option><% OleDbCommand cm2 = new OleDbCommand("SELECT * FROM Specifications ORDER BY SpecificationID", cn); OleDbDataReader dr2 = cm2.ExecuteReader(); while (dr2.Read()){ %> <%if (dr["SpecificationID"] != null && dr["SpecificationID"].ToString().Equals(dr2["SpecificationID"].ToString())){ %> <option value="<%=dr2["SpecificationID"]%>" selected="selected"><%=dr2["SpecName"]%></option> <%}else{ %> <option value="<%=dr2["SpecificationID"]%>"><%=dr2["SpecName"]%></option> <%} %> <%} dr2.Close(); %> </select> </td> </tr> <tr> <th align="left">AHP Value:</th> <td align="left"><input type="text" name="ahpValue" value="<%=dr["ahpvalue"]%>" /></td> </tr> <tr> <th align="left"></th> <td align="left"><input type="submit" value="Save" class="button" /></td> </tr> </table> </form></div> <%dr.Close(); cn.Close(); %></asp:Content>

<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin"); //Admin girişi yapılmadıysa giriş sayfasına yönlendir%><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;");

62

Page 58: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

cn.Open(); string t = "UPDATE CompParts SET PartName='" + Request.Form["PartName"] + "', AHPValue=" + Request.Form["AHPValue"]; if (Request.Form["SpecificationID"] != null && Request.Form["SpecificationID"].ToString().Length > 0) t = t + ", SpecificationID=" + Request.Form["SpecificationID"]; t = t + " WHERE PartID=" + Request.Form["PartID"]; OleDbCommand cm = new OleDbCommand(t, cn); cm.ExecuteNonQuery(); cn.Close(); Response.Redirect("Admin-compParts.aspx?message=partUpdated"); %>

Admin Computer Specifications<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"%><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content3" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463 - Administration Panel</title> <style type="text/css"> #masterpage-content { padding: 17px 0 0 17px;color: #6B6B6C;font: bold 14px "Arial"; } th, td{ padding:5px 10px} #masterpage-content .button{ padding:5px; margin-bottom:5px} #masterpage-content select{width:170px} </style></asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="CONTENT" runat="server"><input type="button" class="button" value="Go to Panel Home" onclick="window.location='Admin.aspx'" style="margin-bottom:10px" /><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin");//Admin girişi yapılmadıysa giriş sayfasına yönlendir %><%if (Request.QueryString["message"] == "specUpdated"){ %><p class="warning">Changes saved.</p><%} %><h4>Attached Computer Parts</h4><div class="block_content" id="masterpage-content"> <table border="0" cellpadding="0" cellspacing="0" class="std"> <tr> <th>Computer Name</th> <th>Specification Name</th> <th>Part Name</th> <th>AHP Value</th> </tr><%

63

Page 59: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT Computers.ComputerID, Computers.ComputerName, Computers.Price, Specifications.SpecificationID, Specifications.SpecName FROM Computers, Specifications ORDER BY Computers.ComputerName, Specifications.SpecName", cn); OleDbDataReader dr = cm.ExecuteReader(); string lstCompName = ""; while (dr.Read()) {%> <tr> <td> <%if(!lstCompName.Equals(dr["ComputerName"].ToString())){%> <a href="Admin-compSpecs-edit.aspx?computerID=<%=dr["ComputerID"]%>"><%=dr["ComputerName"]%> <%} lstCompName = dr["ComputerName"].ToString(); %> </td> <td><%=dr["SpecName"]%></td> <% OleDbCommand cm2 = new OleDbCommand("SELECT a.*, b.PartNAme, b.AHPValue FROM CompSpecs a, CompParts b WHERE a.PartID = b.PartID AND a.ComputerID=" + dr["ComputerID"] + " AND b.SpecificationID=" + dr["SpecificationID"], cn); OleDbDataReader dr2 = cm2.ExecuteReader(); string partname = ""; string AHPValue = ""; while (dr2.Read()) { partname = dr2["PartName"].ToString(); AHPValue = dr2["AHPValue"].ToString(); }%> <td><%=partname%></td> <td><%=AHPValue%></td> </tr> <%} dr.Close(); cn.Close(); %> </table></div> </asp:Content>

Edit Computer Specifications<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"%><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content3" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463 - Administration Panel</title> <style type="text/css">

64

Page 60: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

#masterpage-content { padding: 17px 0 0 17px;color: #6B6B6C;font: bold 14px "Arial"; } th, td{ padding:5px 10px} #masterpage-content .button{ padding:5px; margin-bottom:5px} #masterpage-content select{width:170px} </style></asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="CONTENT" runat="server"><input type="button" class="button" value="Go to Panel Home" onclick="window.location='Admin.aspx'" style="margin-bottom:10px" /><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin"); //Admin girişi yapılmadıysa giriş sayfasına yönlendir%><h4>Attached Computer Parts</h4><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT computerName FROM Computers WHERE computerID=" + Request.QueryString["computerID"], cn); string compName = cm.ExecuteScalar().ToString(); %><div class="block_content" id="masterpage-content"> <form action="Admin-compSpecs-edit2.aspx" method="post"> <input type="hidden" name="computerID" value="<%=Request.QueryString["computerID"]%>" /> <table border="0" cellpadding="0" cellspacing="0"> <tr> <th align="left">Computer Name:</th> <td align="left"><%=compName %></td> </tr><% //For each specification recorded in the system cm = new OleDbCommand("SELECT * FROM Specifications ORDER BY SpecName", cn); OleDbDataReader dr = cm.ExecuteReader(); while (dr.Read()){ %> <tr> <th align="left"><%=dr["SpecName"]%>:</th> <td align="left"> <select name="spec<%=dr["SpecificationID"]%>"> <option value="0"></option><% //Bring all parts attached to a specific computer OleDbCommand cm2 = new OleDbCommand("SELECT a.PartID FROM CompParts a, CompSpecs b WHERE a.PartID=b.PartID AND a.SpecificationID=" +

65

Page 61: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

dr["SpecificationID"] + " AND b.ComputerID=" + Request.QueryString["computerID"], cn); string partID = ""; object result = cm2.ExecuteScalar(); if (result != null && result.ToString().Length > 0) partID = result.ToString();

cm2 = new OleDbCommand("SELECT a.*, b.PartName, b.PartID FROM Specifications a LEFT JOIN CompParts b ON (a.SpecificationID=b.SpecificationID) WHERE a.SpecificationID=" + dr["SpecificationID"] + " ORDER BY PartName", cn); OleDbDataReader dr2 = cm2.ExecuteReader(); while (dr2.Read() && dr2["PartName"] != null && dr2["PartName"].ToString().Length>0){%> <%if(dr2["PartID"]!=null && dr2["PartID"].ToString().Equals(partID)){ %> <option value="<%=dr2["PartID"]%>" selected="selected"><%=dr2["PartName"]%></option> <%}else{ %> <option value="<%=dr2["PartID"]%>"><%=dr2["PartName"]%></option> <%} %><%} %> </select> </td> </tr><%} %> <tr> <th align="left"></th> <td align="left"><input type="submit" value="Save" class="button" /></td> </tr> </table> </form></div> <%dr.Close(); cn.Close(); %></asp:Content>

<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin"); //Admin girişi yapılmadıysa giriş sayfasına yönlendir%><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("DELETE FROM CompSpecs WHERE ComputerID=" + Request.Form["computerID"], cn); cm.ExecuteNonQuery();

66

Page 62: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

for (int i = 0; i < Request.Form.Count; i++) { if (Request.Form.GetKey(i).ToString().StartsWith("spec") && Request.Form[i]!= null && !Request.Form[i].ToString().Equals("0")) { cm = new OleDbCommand("INSERT INTO CompSpecs VALUES("+Request.Form["computerID"]+","+Request.Form[i]+")", cn); cm.ExecuteNonQuery(); } } cn.Close(); Response.Redirect("Admin-compSpecs.aspx?message=specUpdated"); %>

Admin Computer Brands<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"%><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content3" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463 - Administration Panel</title> <style type="text/css"> #masterpage-content { padding: 17px 0 0 17px;color: #6B6B6C;font: bold 14px "Arial"; } th, td{ padding:5px 10px} #masterpage-content .button{ padding:5px; margin-bottom:5px} #masterpage-content select{width:170px} </style></asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="CONTENT" runat="server"><input type="button" class="button" value="Go to Panel Home" onclick="window.location='Admin.aspx'" style="margin-bottom:10px" /><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin");//Admin girişi yapılmadıysa giriş sayfasına yönlendir %><%if (Request.QueryString["message"] == "brandUpdated"){ %><p class="warning">Changes saved.</p><%} %><%if (Request.QueryString["message"] == "brandDeleted"){ %><p class="warning">Computer deleted.</p><%} %><h4>Computer Brands</h4><div class="block_content" id="masterpage-content"> <table border="0" cellpadding="0" cellspacing="0" class="std"> <tr> <th>Brand Name</th> <th># of Laptops</th> <th>Delete</th> </tr><%

67

Page 63: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT a.BrandID, a.BrandName, Count(b.ComputerID) AS CompCount FROM computerBrands a LEFT JOIN Computers b ON (a.BrandID=b.BrandID) GROUP BY a.BrandID, a.BrandName ORDER BY Brandname", cn); OleDbDataReader dr = cm.ExecuteReader(); while (dr.Read()) { %> <tr> <td><a href="Admin-computerBrands-edit.aspx?brandID=<%=dr["brandID"]%>"><%=dr["brandName"] %></a></td> <td><%=dr["CompCount"]%></td> <td><a href="Admin-computerBrands-del.aspx?brandID=<%=dr["brandID"]%>">Delete</a></td> </tr> <%} dr.Close(); cn.Close(); %> </table></div> </asp:Content>

Add Computer Brands<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin"); //Admin girişi yapılmadıysa giriş sayfasına yönlendir%><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT MAX(BrandID)+1 FROM computerBrands", cn);

object result = cm.ExecuteScalar(); if (result == null || result.ToString().Length <= 0) result = "1"; cm = new OleDbCommand("INSERT INTO computerBrands(BrandID) VALUES(" + result + ")", cn); cm.ExecuteNonQuery(); cn.Close(); Response.Redirect("Admin-computerBrands-edit.aspx?brandID=" + result); %>

68

Page 64: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Delete Computer Brands<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin");//Admin girişi yapılmadıysa giriş sayfasına yönlendir %><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("DELETE FROM computerBrands WHERE BrandID=" + Request.QueryString["BrandID"], cn);

cm.ExecuteNonQuery(); cn.Close(); Response.Redirect("Admin-computerBrands.aspx?message=brandDeleted"); %>

Edit Computer Brands

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"%><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content3" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463 - Administration Panel</title> <style type="text/css"> #masterpage-content { padding: 17px 0 0 17px;color: #6B6B6C;font: bold 14px "Arial"; } th, td{ padding:5px 10px} #masterpage-content .button{ padding:5px; margin-bottom:5px} #masterpage-content select{width:170px} </style></asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="CONTENT" runat="server"><input type="button" class="button" value="Go to Panel Home" onclick="window.location='Admin.aspx'" style="margin-bottom:10px" /><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin"); //Admin girişi yapılmadıysa giriş sayfasına yönlendir%><h4>Edit computer brand</h4><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT * FROM computerBrands WHERE brandID=" + Request.QueryString["brandID"], cn); OleDbDataReader dr = cm.ExecuteReader();

69

Page 65: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

dr.Read(); %><div class="block_content" id="masterpage-content"> <form action="Admin-computerBrands-edit2.aspx" method="post"> <input type="hidden" name="brandID" value="<%=Request.QueryString["brandID"]%>" /> <table border="0" cellpadding="0" cellspacing="0"> <tr> <th align="left">Brand Name:</th> <td align="left"><input type="text" name="brandName" value="<%=dr["brandName"]%>" /></td> </tr> <tr> <th align="left"></th> <td align="left"><input type="submit" value="Save" class="button" /></td> </tr> </table> </form></div><% cn.Close(); %></asp:Content>

<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin"); //Admin girişi yapılmadıysa giriş sayfasına yönlendir%><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); string t = "UPDATE computerBrands SET BrandName='" + Request.Form["BrandName"]; t = t + "' WHERE BrandID=" + Request.Form["brandID"]; OleDbCommand cm = new OleDbCommand(t, cn); cm.ExecuteNonQuery(); cn.Close(); Response.Redirect("Admin-computerBrands.aspx?message=brandUpdated"); %>

Admin Computers<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"%><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content3" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463 - Administration Panel</title> <style type="text/css"> #masterpage-content

70

Page 66: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

{ padding: 17px 0 0 17px;color: #6B6B6C;font: bold 14px "Arial"; } th, td{ padding:5px 10px} #masterpage-content .button{ padding:5px; margin-bottom:5px} #masterpage-content select{width:170px} </style></asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="CONTENT" runat="server"><input type="button" class="button" value="Go to Panel Home" onclick="window.location='Admin.aspx'" style="margin-bottom:10px" /><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin");//Admin girişi yapılmadıysa giriş sayfasına yönlendir %><%if (Request.QueryString["message"] == "pcUpdated"){ %><p class="warning">Changes saved.</p><%} %><%if (Request.QueryString["message"] == "pcDeleted"){ %><p class="warning">Computer deleted.</p><%} %><h4>Computers</h4><div class="block_content" id="masterpage-content"> <table border="0" cellpadding="0" cellspacing="0" class="std"> <tr> <th>Brand Name</th> <th>Computer Name</th> <th>Price</th> <th>Delete</th> </tr><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT * FROM Computers a LEFT JOIN ComputerBrands b ON (a.BrandID=b.BrandID) ORDER BY Brandname,ComputerName", cn); OleDbDataReader dr = cm.ExecuteReader(); while (dr.Read()) { %> <tr> <td><%=dr["brandName"]%></td> <td><a href="Admin-computers-edit.aspx?computerID=<%=dr["computerID"]%>"><%=dr["ComputerName"] %></a></td> <td><%=dr["Price"] %></td> <td><a href="Admin-computers-del.aspx?computerID=<%=dr["computerID"]%>">Delete</a></td> </tr> <%}

71

Page 67: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

dr.Close(); cn.Close(); %> </table></div> </asp:Content>

Add Computer<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin"); //Admin girişi yapılmadıysa giriş sayfasına yönlendir%><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT MAX(ComputerID)+1 FROM Computers", cn);

object result = cm.ExecuteScalar(); if (result == null || result.ToString().Length <= 0) result = "1";

cm = new OleDbCommand("INSERT INTO Computers(ComputerID) VALUES("+result+")", cn); cm.ExecuteNonQuery(); cn.Close(); Response.Redirect("Admin-computers-edit.aspx?computerID=" + result); %>

Delete Computer<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin");//Admin girişi yapılmadıysa giriş sayfasına yönlendir %><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("DELETE FROM Computers WHERE ComputerID=" + Request.QueryString["computerID"], cn);

cm.ExecuteNonQuery(); cn.Close(); Response.Redirect("Admin-computers.aspx?message=pcDeleted"); %>Edit Computer

72

Page 68: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"%><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content3" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463 - Administration Panel</title> <style type="text/css"> #masterpage-content { padding: 17px 0 0 17px;color: #6B6B6C;font: bold 14px "Arial"; } th, td{ padding:5px 10px} #masterpage-content .button{ padding:5px; margin-bottom:5px} #masterpage-content select{width:170px} </style></asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="CONTENT" runat="server"><input type="button" class="button" value="Go to Panel Home" onclick="window.location='Admin.aspx'" style="margin-bottom:10px" /><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin");//Admin girişi yapılmadıysa giriş sayfasına yönlendir %><h4>Edit computer</h4><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT * FROM Computers WHERE ComputerID=" + Request.QueryString["computerID"], cn); OleDbDataReader dr = cm.ExecuteReader(); dr.Read(); if (dr["computerID"] == null || dr["computerID"].ToString().Length <= 0) { cn.Close(); Response.Redirect("Admin.aspx?error=true"); } %><div class="block_content" id="masterpage-content"> <form action="Admin-computers-edit2.aspx" method="post"> <input type="hidden" name="computerID" value="<%=Request.QueryString["computerID"]%>" /> <table border="0" cellpadding="0" cellspacing="0"> <tr> <th align="left">Computer Name:</th> <td align="left"><input type="text" name="productName" value="<%=dr["computerName"]%>" /></td> </tr> <tr> <th align="left">Brand Name:</th> <td align="left"> <select name="BrandID">

73

Page 69: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<option value="0"></option><% OleDbCommand cm2 = new OleDbCommand("SELECT * FROM ComputerBrands ORDER BY BrandName", cn); OleDbDataReader dr2 = cm2.ExecuteReader(); while(dr2.Read()){ %> <%if (dr["BrandID"] != null && dr2["BrandID"] != null && dr2["BrandID"].ToString().Length > 0 && dr["BrandID"].ToString().Equals(dr2["BrandID"].ToString())){ %> <option selected="selected" value="<%=dr2["BrandID"]%>"><%=dr2["BrandName"]%></option> <%}else{ %> <option value="<%=dr2["BrandID"]%>"><%=dr2["BrandName"]%></option> <%} %> <%}%> </select> </td> </tr> <tr> <th align="left">Price ($):</th> <td align="left"><input type="text" name="price" value="<%=dr["Price"]%>" /></td> </tr> <tr> <th align="left">Picture:</th> <td align="left"> <input type="hidden" id="picture" name="picture" /> <input type="button" onclick="uploadPopup('picture');" value="Upload" style="width:160px"><br /> </td> </tr> <tr> <th align="left">Description:</th> <td align="left"><textarea name="description" style="width:400px; height:150px"><%=dr["DEscription"]%></textarea></td> </tr> <tr> <th align="left"></th> <td align="left"><input type="submit" value="Save" class="button" /></td> </tr> </table> </form><% cn.Close(); %></div> </asp:Content>

74

Page 70: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin"); %><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); string t = "UPDATE Computers SET ComputerName='" + Request.Form["productName"] + "', Price=" + Request.Form["price"]; if(Request.Form["picture"] != null && Request.Form["picture"].ToString().Length>0) t = t + ", Picture='" + Request.Form["picture"]+ "'"; t = t + " , BrandID=" + Request.Form["BrandID"]; t = t + " , Description='"+Request.Form["Description"]+"'"; t = t + " WHERE ComputerID=" + Request.Form["computerID"]; OleDbCommand cm = new OleDbCommand(t, cn); cm.ExecuteNonQuery(); cn.Close(); Response.Redirect("Admin-computers.aspx?message=pcUpdated");%>

Admin default<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"%><asp:Content ID="Content3" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463 - Administration Panel</title> <style type="text/css"> #masterpage-content { padding: 17px 0 0 17px;color: #6B6B6C;font: bold 14px "Arial"; } th, td{ padding:5px 10px} #masterpage-content .button{ padding:5px; margin-bottom:5px} #masterpage-content select{width:170px} </style></asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="CONTENT" runat="server"><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin"); //Admin girişi yapılmadıysa giriş sayfasına yönlendir%><input type="button" class="button" value="Go to Panel Home" onclick="window.location='Admin.aspx'" style="margin-bottom:10px" /><h4>Panel Default</h4><%if (Request.QueryString["error"] == "invalidlogin"){ %><div class="error">Invalid username/password combination. Please try again.</div><%} %><div class="block_content" id="masterpage-content">

75

Page 71: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<form action="Admin-login.aspx" method="post"> <p class="warning">Computers</p> <a class="panelButton button" href="Admin-computers-add.aspx" >New Computer</a> <a class="panelButton button" href="Admin-computers.aspx" >List All Computers</a> <br /> <p class="warning">Computer Brands</p> <a class="panelButton button" href="Admin-computerBrands-add.aspx" >New Computer Brand</a> <a class="panelButton button" href="Admin-computerBrands.aspx" >List All Computer Brands</a> <br /> <p class="warning">Computer Parts</p> <a class="panelButton button" href="Admin-compParts-add.aspx" >New Computer Part</a> <a class="panelButton button" href="Admin-compParts.aspx" >List All Computer Parts</a> <br /> <p class="warning">Specifications&Parts Attached To Computers</p> <a class="panelButton button" href="Admin-Specifications-add.aspx" >New Computer Specification</a> <a class="panelButton button" href="Admin-Specifications.aspx" >List All Specifications</a> <a class="panelButton button" href="Admin-compSpecs.aspx" >List Attached Parts to Computers</a> <br /> </form></div> </asp:Content>

Admin Login<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><% Session.Clear(); OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT UserID FROM Users WHERE Username='"+Request.Form["un"]+"' AND Password='"+Request.Form["pw"]+"'", cn);

object result = cm.ExecuteScalar(); if (result != null && result.ToString().Length >= 1) { Session.Add("userid", result.ToString()); Session.Add("username",Request.Form["un"]); }

76

Page 72: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

cn.Close(); if (Session["userid"] != null && Session["userid"].ToString().Length > 0) Response.Redirect("Admin-default.aspx"); else Response.Redirect("Admin.aspx?error=invalidlogin"); %>

Admin Specifications<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"%><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content3" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463 - Administration Panel</title> <style type="text/css"> #masterpage-content { padding: 17px 0 0 17px;color: #6B6B6C;font: bold 14px "Arial"; } th, td{ padding:5px 10px} #masterpage-content .button{ padding:5px; margin-bottom:5px} #masterpage-content select{width:170px} </style></asp:Content><asp:Content ID="Content4" ContentPlaceHolderID="CONTENT" runat="server"><input type="button" class="button" value="Go to Panel Home" onclick="window.location='Admin.aspx'" style="margin-bottom:10px" /><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin"); //Admin girişi yapılmadıysa giriş sayfasına yönlendir %><%if (Request.QueryString["message"] == "specUpdated"){ %><p class="warning">Changes saved.</p><%} %><%if (Request.QueryString["message"] == "specDeleted"){ %><p class="warning">Specification deleted.</p><%} %><h4>Computer Specifications</h4><div class="block_content" id="masterpage-content"> <table border="0" cellpadding="0" cellspacing="0" class="std"> <tr> <th>Specification Name</th> <th># of Parts Attached</th> <th>Delete</th> </tr><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT a.SpecificationID, a.SpecName, Count(b.SpecificationID) AS SpecCount FROM Specifications a LEFT

77

Page 73: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

JOIN CompParts b ON (a.SpecificationID=b.SpecificationID) GROUP BY a.SpecificationID, a.SpecName ORDER BY a.SpecName", cn); OleDbDataReader dr = cm.ExecuteReader(); while (dr.Read()) { %> <tr> <td><a href="Admin-Specifications-edit.aspx?SpecificationID=<%=dr["SpecificationID"]%>"><%=dr["SpecName"]%></a></td> <td><%=dr["SpecCount"]%></td> <td><a href="Admin-Specifications-del.aspx?SpecificationID=<%=dr["SpecificationID"]%>">Delete</a></td> </tr> <%} dr.Close(); cn.Close(); %> </table></div> </asp:Content>

Add Admin Specifications<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><%//if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin"); %><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT MAX(SpecificationID)+1 FROM Specifications", cn);

object result = cm.ExecuteScalar(); if (result == null || result.ToString().Length <= 0) result = "1";

cm = new OleDbCommand("INSERT INTO Specifications(SpecificationID) VALUES(" + result + ")", cn); cm.ExecuteNonQuery(); cn.Close(); Response.Redirect("Admin-Specifications-edit.aspx?SpecificationID=" + result); %>

Delete Admin Specifications<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %>

78

Page 74: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin");//Admin girişi yapılmadıysa giriş sayfasına yönlendir %><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("DELETE FROM Specifications WHERE SpecificationID=" + Request.QueryString["SpecificationID"], cn);

cm.ExecuteNonQuery(); cn.Close(); Response.Redirect("Admin-Specifications.aspx?message=specDeleted"); %>

Edit Admin Specifications<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin");//Admin girişi yapılmadıysa giriş sayfasına yönlendir %><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("DELETE FROM Specifications WHERE SpecificationID=" + Request.QueryString["SpecificationID"], cn);

cm.ExecuteNonQuery(); cn.Close(); Response.Redirect("Admin-Specifications.aspx?message=specDeleted"); %>

<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><%if (Session["userid"] == null || Session["userid"].ToString().Length <= 0) Response.Redirect("Admin.aspx?error=notloggedin");//Admin girişi yapılmadıysa giriş sayfasına yönlendir %><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); string t = "UPDATE Specifications SET SpecName='" + Request.Form["SpecName"]; t = t + "', SpecGroup='"+Request.Form["SpecGroup"]+"'"; t = t + " WHERE SpecificationID=" + Request.Form["SpecificationID"]; OleDbCommand cm = new OleDbCommand(t, cn);

79

Page 75: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

cm.ExecuteNonQuery(); cn.Close(); Response.Redirect("Admin-Specifications.aspx?message=specUpdated"); %>

VIII.2.2.AHP<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="AHP.aspx.cs" Inherits="mis463Laptop.AHP" %><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content1" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463</title> <script type="text/javascript"> $(document).ready(function () { //Hiding irrelevant parts of the masterpage $('#tmspecials').hide(); $('#tmbanner1').hide(); $('#filters').hide(); $('#sorter-container').hide(); }); function Recalculate() { var link = ""; $(".slider").each(function (index, element) { link += $(this).slider("value") + "."; }); var querystring = "<%=Request.QueryString.ToString()%>"; if (querystring.indexOf("CVPVList=") != -1) querystring = querystring.substring(0, querystring.indexOf("CVPVList=")-1); //alert(querystring + "&CVPVList=" + link); window.location = "AHP.aspx?" + querystring+ "&CVPVList=" + link; } </script> <style type="text/css"> .criteria-container{ width:745px; padding-top:5px; height:30px } .slider{width:280px;} .criteriaTable td{padding:5px 10px} .criteria-name, .criteria{float:left;} .criteria-name{width:170px;color:#7A7A7B; font-size:12px; font-family:Arial; font-weight:bold; height:auto; line-height:12px; text-align:center } .criteria{width:280px;} .resultsTable th{padding: 10px 5px;font-weight: bold;font-size: 12px;border: 1px solid #35414F; color:#35414F; background-color:White} .resultsTable td{border: 1px dashed #35414F;padding: 8px 5px; color:#35414F; background-color:White}

80

Page 76: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

.navigation-button{ background-color:#C4323F; color:White; font-size:12px; padding:10px 15px; margin:5px; border:none; -webkit-border-radius: 4px; -moz-border-radius: 4px;border-radius: 4px; font-weight:bold; width:90px; margin-top:15px} .navigation-button-next{ background-color:#41C7FF;} .navigation-button-next:focus, .navigation-button-next:hover{ background-color:#C4323F; cursor:pointer} .navigation-button-prev{ background-color:#C4323F;} .navigation-button-prev:focus, .navigation-button-prev:hover{ background-color:#41C7FF; cursor:pointer} </style> </asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="CONTENT" runat="server"><% //if you specify this as true, the comments will be revealed const bool inDebug = false; OleDbConnection cn = null; OleDbCommand cm = null; //Specs for which the user has to specify values via sliders during AHP process string[] userDefinedSpecs = new string[] { "Screen Size","Color","Weight","Technical Service","Customer Satisfaction"}; List<string> selectedCriteriaNames = new List<string>(); List<string> selectedCriteriaIDS = new List<string>(); string DBC= Request.QueryString["DBCLIST"] != null && Request.QueryString["DBCLIST"].ToString().Length > 0 ? Request.QueryString["DBCLIST"].ToString() : ""; //DBC stands for DataBaseCriteria: Criteria list whose data will be used from the database while AHP comparison (via weighted average process) //If the user has selected any DBC Criteria, get all criteriIDs and criteriaNames into two Lists (selectedCriteriaIDS,selectedCriteriaNames) if (DBC.Length > 0) DBC = DBC.Substring(0, DBC.LastIndexOf(".")); string[] DBCList = DBC.Split('.'); if (DBC.Length > 0) { try { cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open();

for (int i = 0; i < DBCList.Length; i++) { cm = new OleDbCommand("SELECT SpecName FROM Specifications WHERE SpecificationID=" + DBCList[i], cn); object specID = cm.ExecuteScalar(); if (specID != null && specID.ToString().Length > 0) { selectedCriteriaIDS.Add(DBCList[i].ToString());

81

Page 77: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

selectedCriteriaNames.Add(specID.ToString()); } } cn.Close(); } catch (Exception) { Response.Write("Error from DBC"); } } else DBCList = new string[] { };

//Do the same for UDC (UserDefinedCriteria); Get all criteriaName for all selected criteria string UDC = Request.QueryString["UDCLIST"] != null && Request.QueryString["UDCLIST"].ToString().Length > 0 ? Request.QueryString["UDCLIST"].ToString() : ""; if (UDC.Length > 0) UDC = UDC.Substring(0, UDC.LastIndexOf(".")); string[] UDCList = UDC.Split('.'); if (UDC.Length > 0) { try { for (int i = 0; i < UDCList.Length; i++) { int id = Convert.ToInt16(UDCList[i].Replace("@", "")); selectedCriteriaIDS.Add("@" + id.ToString()); selectedCriteriaNames.Add(userDefinedSpecs[id].ToString()); } } catch (Exception) { Response.Write("Error from UDC"); } } else UDCList = new string[] { }; //Make a list of selected computers via splitting with . string CMPS = Request.QueryString["CMPS"].ToString(); CMPS = CMPS.Substring(0, CMPS.LastIndexOf('.')); string[] computerList = CMPS.Split('.');

//Create arrays in order to store a Computer's info (Computers will be ranked, so computer info should be kept in memory) string[] compIDList = new string[computerList.Length]; string[] compNameList = new string[computerList.Length]; int[] compPriceList = new int[computerList.Length]; string[] compImageList = new string[computerList.Length]; string[] compDescList = new string[computerList.Length]; cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); //Insert all info to related arrays for(int i=0;i<computerList.Length;i++)

82

Page 78: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

{ cm = new OleDbCommand("SELECT * FROM Computers WHERE ComputerID=" + computerList[i], cn); OleDbDataReader dr = cm.ExecuteReader(); dr.Read(); compIDList[i] = dr["computerID"].ToString(); compNameList[i] = dr["computerName"].ToString().Length > 20 ? dr["computerName"].ToString().Substring(0, 20) + "..." : dr["computerName"].ToString(); int price = 0; try{ price = Convert.ToInt16(dr["Price"].ToString()); }catch (Exception) {} compPriceList[i] = price; compImageList[i] = dr["Picture"].ToString(); compDescList[i] = dr["Description"].ToString(); } cn.Close(); %><h4>Compare Products</h4><div class="ui-widget" >

<div class="ui-state-highlight ui-corner-all" style="margin-top: 10px; margin-bottom:10px; padding: 10px .7em;">

<p style="padding:0px; padding-left:8px;"> <span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>

<strong style="font-weight:bold">Comparison Results</strong><br /><br /> Your final results are listed in the table below. Comparison algorithm has distributed points over 100, according to how each of the alternatives suits your needs.<br /> <br />Using these points, the algorithm has also made a <strong style="font-weight:bold">Benefit/Cost Analysis</strong>, so that you can understand how well each alternative deserves its cost.<br /> (If cost benefit ratio is greater than or equal to 1, it means it deserves its cost very well; The reverse case works for the ratios less than 1) <br /><br /> <a href="javascript:history.go(-1)" style="background-image:url(img/back.png); padding-left:10px; background-repeat:no-repeat; color:#7A7A7B; font-weight:bold; background-position:left center">Previous Step</a>

</p></div>

</div><div class="block_content" id="masterpage-content" style="padding-top:10px"><% if(inDebug) for (int i = 0; i < Request.QueryString.Count; i++)

83

Page 79: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

Response.Write(Request.QueryString.GetKey(i) + ": " + Request.QueryString[i] + "<br>");

//Start with criteria-wise comparisons, form a rating matrix and calculate priority vector using AHP //Form a n*n array using slider's values (where n is the selected criteria count) double[,] CriteriaWiseRatings = new double[selectedCriteriaNames.Count, selectedCriteriaNames.Count]; for (int i = 0; i < selectedCriteriaNames.Count; i++) for (int j = 0; j < selectedCriteriaNames.Count; j++) { if (i == j) CriteriaWiseRatings[i, j] = 1; else if (j > i) { double rating = Convert.ToDouble(Request.QueryString["CV" + selectedCriteriaIDS[i] + "." + selectedCriteriaIDS[j]].ToString()); if (rating <= 9) rating = 10 - rating; else rating = 1 / (rating - 8); CriteriaWiseRatings[i, j] = rating; } else { CriteriaWiseRatings[i, j] = 1 / CriteriaWiseRatings[j, i]; } } //Calculate priority vector of Criteria*Criteria comparison using back-end code double[] CriteriaWisePV = calculateAHP(CriteriaWiseRatings); //Then, start alternative-wise comparisons for each criterion List<double[]> AlternativeWisePVS = new List<double[]>(); if(UDC.Length > 0) for (int K = 0; K< UDCList.Length; K++) //For each UserDefinedCriteria, we have to form a rating matrix (n*n matrices) initially { double[,] AlternativeWiseRatings = new double[computerList.Length, computerList.Length]; for (int i = 0; i < computerList.Length; i++) for (int j = 0; j < computerList.Length; j++) { if (i == j) AlternativeWiseRatings[i, j] = 1; else if (j > i) { double rating = Convert.ToDouble(Request.QueryString["PV" + UDCList[K] + "." + computerList[i] + "." + computerList[j]].ToString()); if (rating <= 9)

84

Page 80: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

rating = 10 - rating; else rating = 1 / (rating - 8); AlternativeWiseRatings[i, j] = rating; } else { AlternativeWiseRatings[i, j] = 1 / AlternativeWiseRatings[j, i]; } } //Then using formed matrix, calculate a priority vector for the related criteria and store in a list AlternativeWisePVS.Add(calculateAHP(AlternativeWiseRatings)); } //Secondly for each selected specification, retrieve data from db //And calculate priority vectors into the priority vector list (AlternativeWisePVS) for (int K = 0; K < DBCList.Length; K++) { AlternativeWisePVS.Add(calculatePriorityVectorFromDB(computerList,DBCList[K])); }

//Finally, priority vector of Criteria-wise calculations must be multiplied with an array formed using priority vectors of alternatives //with respect to each criterion //However, second matrix is criterion*alternative, it must be transposed first... double[,] transposedAlternativeWisePVS = new double[computerList.Length, UDCList.Length + DBCList.Length ]; for(int i=0; i<computerList.Length;i++){ for (int j = 0; j < UDCList.Length; j++) transposedAlternativeWisePVS[i, j] = AlternativeWisePVS[j][i]; for (int j = 0; j < DBCList.Length; j++) transposedAlternativeWisePVS[i, j+ UDCList.Length] = AlternativeWisePVS[j + UDCList.Length][i]; }

double[] oldCriteriaWisePV =null; //if the user is trying what-if analysis, results will be calculated according to sliders' values if (Request.QueryString["CVPVList"] != null && Request.QueryString["CVPVList"].ToString().Length > 0) { oldCriteriaWisePV = new double[CriteriaWisePV.Length]; for (int i = 0; i < CriteriaWisePV.Length; i++) oldCriteriaWisePV[i] = CriteriaWisePV[i]; string[] splitted = Request.QueryString["CVPVList"].ToString().Split('.'); int[] tempArr = new int[CriteriaWisePV.Length]; for (int i = 0; i < CriteriaWisePV.Length; i++)

85

Page 81: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

{ tempArr[i] = Convert.ToInt32(splitted[i]); if(inDebug) Response.Write(tempArr[i] + "<br>"); } CriteriaWisePV = this.calculateWeightedAverage(tempArr); } for (int i = 0; i < CriteriaWisePV.Length; i++) if(inDebug) Response.Write(CriteriaWisePV[i] + "<br>"); //Multiply these matrices so that we will have the final results double[] results = multiplyMatrices(transposedAlternativeWisePVS, CriteriaWisePV); double[] oldResults = null; if (oldCriteriaWisePV != null) oldResults = multiplyMatrices(transposedAlternativeWisePVS, oldCriteriaWisePV); if(inDebug) Response.Write("CriteriaWise PV:<hr>"); if (inDebug) for (int i = 0; i < CriteriaWisePV.Length; i++) Response.Write(CriteriaWisePV[i] + "<br>"); if (inDebug) for (int i = 0; i < AlternativeWisePVS.Count; i++) { Response.Write("AlternativeWise PV For Criterion["+i+"]:<hr>"); for (int j = 0; j < AlternativeWisePVS[i].Length; j++) Response.Write(AlternativeWisePVS[i][j] + "<br>"); } if (inDebug) Response.Write("Results:<hr>"); if (inDebug) for (int i = 0; i < results.Length; i++) Response.Write(results[i] + "<br>"); %> <center> <table border="0" cellpadding="0" cellspacing="0" class="criteriaTable"> <%for(int i=0;i<selectedCriteriaNames.Count;i++){ %> <tr> <td valign="top" style="font-weight:bold;font-size:12px; color:#35414F;"><%=selectedCriteriaNames[i]%>:</td> <td valign="top" style="width:300px" align="center"><div class="slider" id="slider<%=i%>"></div><span style="color:#F6931F; font-weight:bold; font-size:11px">50</span></td> <%if(i==0){ %> <td align="center" valign="middle" rowspan="<%=selectedCriteriaNames.Count %>"> <input type="button" onclick="Recalculate()" value="Recalculate" class="navigation-button navigation-button-next" /> </td> <%} %> </tr> <%} %> </table><br />

86

Page 82: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<table border="0" cellpadding="0" cellspacing="0" class="resultsTable ui-state-highlight" style="width:100%; background-color:White; border:1px solid #35414F"> <tr> <th align="center" valign="middle">Ranking</th> <th align="center" valign="middle" colspan="2">Computer Name</th> <th align="center" valign="middle">Final Points<br />(distributed over 100)</th> <th align="center" valign="middle">Computer<br />Price<br />(Weighted Price<br />in brackets)</th> <th align="center" valign="middle">Benefit/Cost<br />Ratio</th> <!--<th align="center" valign="middle">Computer<br />Description</th>--> </tr><% /* List<string> compIDList = new List<string>(); List<string> compNameList = new List<string>(); List<int> compPriceList = new List<int>(); List<string> compImageList = new List<string>(); List<string> compDescList = new List<string>(); */ double[] weightedPrices = this.calculateWeightedAverage(compPriceList); double[] costBenefitRatio = new double[computerList.Length]; for(int i=0;i<computerList.Length;i++) costBenefitRatio[i] = results[i] / weightedPrices[i]; //Sorting computers according to their CostBenefitRatios (swap is a back-end function) for(int i=0;i<computerList.Length;i++) for(int j=0;j<computerList.Length;j++) if (costBenefitRatio[i] > costBenefitRatio[j]) { this.swap(ref weightedPrices[i], ref weightedPrices[j]); this.swap(ref costBenefitRatio[i], ref costBenefitRatio[j]); this.swap(ref compIDList[i], ref compIDList[j]); this.swap(ref compNameList[i], ref compNameList[j]); this.swap(ref compPriceList[i], ref compPriceList[j]); this.swap(ref compImageList[i], ref compImageList[j]); this.swap(ref compDescList[i], ref compDescList[j]); this.swap(ref results[i], ref results[j]); if (oldCriteriaWisePV != null) this.swap(ref oldCriteriaWisePV[i], ref oldCriteriaWisePV[j]); if (oldCriteriaWisePV != null) this.swap(ref oldResults[i], ref oldResults[j]); } for(int i=0;i<computerList.Length;i++){%> <tr> <td valign="middle" align="center" style="font-weight:bold; font-size:40px; color:#35414F;"><%=i+1%>. </td> <td valign="middle" align="center" style="width:160px"><a style="color:#35414F" href="computer-info.aspx?computerID=<%=compIDList[i] %>"><%=compNameList[i] %></a></td> <td valign="middle" align="center"> <a href="computer-info.aspx?computerID=<%=compIDList[i] %>">

87

Page 83: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<img src="resources/<%=compImageList[i] %>" alt="<%=compNameList[i] %>" style="max-width: 120px;max-height: 104px;" /> </a> </td> <td valign="middle" align="center" style="width:80px;color: green;font-size: 15px;font-weight: bold;"> <%=Math.Round(results[i]*100,0)%><br /> <%=oldCriteriaWisePV!=null ? "[Old: " + Math.Round(oldResults[i]*100,0) + "]" : ""%> </td> <td valign="middle" align="center" style=" font-weight:bold; color:Green; font-size:15px">$<%=compPriceList[i] %>.00<br />[<%=Math.Round(weightedPrices[i]*100,0)%> / 100]</td> <td valign="middle" align="center" style="color: green; font-weight:bold;font-size: 30px;"><%=Math.Round(costBenefitRatio[i],2) %></td> <!--<td valign="middle" align="center" style=""><%=(compDescList[i].Length>50 ? compDescList[i].Substring(0,50) + "..." : compDescList[i]) %></td>--> </tr> <%} %> </table> </center> <div style="width:620px"> <center> <input type="button" onclick="history.go(-1)" value="Previous" class="navigation-button navigation-button-prev" /> </center> </div></div> <% if (Request.QueryString["CVPVList"] != null && Request.QueryString["CVPVList"].ToString().Length > 0) { string[] splitted = Request.QueryString["CVPVList"].ToString().Split('.'); for (int i = 0; i < CriteriaWisePV.Length; i++) { CriteriaWisePV[i] = Convert.ToInt32(splitted[i]); } } else { for (int i = 0; i < CriteriaWisePV.Length; i++) CriteriaWisePV[i] *= 100; } %> <script type="text/javascript"> var loading = true; $(document).ready(function(){ $(".slider").each(function (index, element) { $(element).slider({ value: 50, min: 1, max: 100, range: 'min',

88

Page 84: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

slide: function (event, ui) { $(this).parent().children('span').html(ui.value); }, stop: function (event, ui) { if(loading) return; var newValue = parseInt(ui.value); var sum = 0; $(".slider").each(function(index2, element2){ if(index == index2) return; sum += parseInt($(element2).slider("value")); }); $(".slider").each(function(index2, element2){ if(index == index2) return; var remaining = 100 - newValue; var value = parseInt($(element2).slider("value")); var ratio = value / (sum*1.0); value = ratio * remaining; value = Math.round(value); $(element2).slider("value", value); $(element2).parent().children('span').html(value); }); } }); $(this).parent().parent().children('.first-criteria').children('span').html("(" + (1) + ")"); $(this).parent().parent().children('.second-criteria').children('span').html("(1/" + (1) + ")"); }); <%for(int i=0;i<selectedCriteriaNames.Count;i++){ %> $("#slider"+<%=i%>).slider("value",<%=CriteriaWisePV[i]%>); $("#slider"+<%=i%>).parent().children('span').html(<%=CriteriaWisePV[i]%>); <%} %> loading = false; }); </script></asp:Content>

VIII.2.3.Compare

Step1<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content1" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463</title> <script type="text/javascript"> $(document).ready(function () { $('#tmspecials').hide();

89

Page 85: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

//$('#tmbanner1').hide(); $('#filters').hide(); $('#sorter-container').hide(); });

function Continue() { var selectedCriteriaCount = $(".criteria-container input:checked").length; if (selectedCriteriaCount <= 2) { alert('In order to compare computers, you have to select at least 3 criteria! Please select more criteria.'); return; } if (selectedCriteriaCount >= 8) { alert('You can select at most 7 at a time! Please reduce your criteria set by deselecting some criteria.'); return; }

var url = "CMPS=" + $("#CMPS").val(); url += "&UDCLIST="; $(".criteria-container input:checked").each(function (index, element){ if($(element).attr("id").indexOf("UDC")!=-1) url += "@" + $(element).attr("id").replace("UDC", "") + "."; }); url += "&DBCLIST="; $(".criteria-container input:checked").each(function (index, element){ if($(element).attr("id").indexOf("DBC")!=-1) url += $(element).attr("id").replace("DBC","") + "."; }); window.location = "Compare-Step2.aspx?" + url; }

</script> <style type="text/css"> .criteria-container{ width:150px; padding-top:5px; height:40px; float:left; } .criteria-container{padding-left:15px} .criteria-container label{ color:#7A7A7B; padding-left:5px} .navigation-button{ background-color:#C4323F; color:White; font-size:12px; padding:10px 15px; margin:5px; border:none; -webkit-border-radius: 4px; -moz-border-radius: 4px;border-radius: 4px; font-weight:bold; width:90px; margin-top:15px} .navigation-button-next{ background-color:#41C7FF;} .navigation-button-next:focus, .navigation-button-next:hover{ background-color:#C4323F; cursor:pointer} .navigation-button-prev{ background-color:#C4323F;} .navigation-button-prev:focus, .navigation-button-prev:hover{ background-color:#41C7FF; cursor:pointer} </style> </asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="CONTENT" runat="server">

90

Page 86: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<form action="Compare-Step2.aspx" method="get"> <input type="hidden" id="CMPS" name="CMPS" value="<%=Request.QueryString["CMPS"]%>" /><h4>Compare Products</h4><div class="ui-widget" >

<div class="ui-state-highlight ui-corner-all" style="margin-top: 10px; margin-bottom:10px; padding: 10px .7em;">

<p style="padding:0px; padding-left:8px;"> <span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>

<strong style="font-weight:bold">How to compare products?</strong><br /><br /> Our product comparison feature actually includes a smart algorithm, that initially takes your makes you to compare criteria in pairs. Then, it also requests you to make pair-wise comparisons for computers so that it can choose you the computer that suits your requirements most.<br /> But firstly, you have to select a set of criteria that you are interested most while comparing products.<br /> Please check all criteria that you are interested in and click Continue button at the bottom. <br /><br /> <a href="javascript:history.go(-1)" style="background-image:url(img/back.png); padding-left:10px; background-repeat:no-repeat; color:#7A7A7B; font-weight:bold; background-position:left center">Previous Step</a> </p>

</div></div><div class="block_content" id="masterpage-content" style="padding-left:17px; padding-top:10px"><% string[] userDefinedSpecs = new string[] { "Screen Size", "Color", "Weight", "Technical Service", "Customer Satisfaction" };

OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); string[] specGroups = new string[] { "Performance", "Graphics", "Features"}; int recCount = 0; for (int s = 0; s < specGroups.Length; s++) {%> <div class="specGroup" style="width:100%; height:auto"> <p class="warning" style="margin-bottom:5px"><%= specGroups[s] %></p> <% OleDbCommand cm = new OleDbCommand("SELECT * FROM Specifications WHERE specGroup='"+specGroups[s]+"' ORDER BY SpecificationID", cn); OleDbDataReader dr = cm.ExecuteReader(); while (dr.Read()) {

91

Page 87: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

recCount++;%> <div class="criteria-container"> <input type="checkbox" name="DBC<%=dr["SpecificationID"]%>" id="DBC<%=dr["SpecificationID"]%>" /> <label for="DBC<%=dr["SpecificationID"]%>"><%=dr["SpecName"]%></label> </div> <%} %> </div> <%} %> <div class="specGroup" style="width:100%; height:auto"> <p class="warning" style="margin-bottom:5px">Design</p> <div class="criteria-container"> <input type="checkbox" name="UDC0" id="UDC0" /> <label for="UDC0">Screen Size</label> </div> <div class="criteria-container"> <input type="checkbox" name="UDC1" id="UDC1" /> <label for="UDC1">Color</label> </div> <div class="criteria-container"> <input type="checkbox" name="UDC2" id="UDC2" /> <label for="UDC2">Weight</label> </div> </div> <div class="specGroup" style="width:100%; height:auto"> <p class="warning" style="margin-bottom:5px">Brand Image</p> <div class="criteria-container"> <input type="checkbox" name="UDC3" id="UDC3" /> <label for="UDC3">Technical Service</label> </div> <div class="criteria-container"> <input type="checkbox" name="UDC4" id="UDC4" /> <label for="UDC4">Customer Satiscaftion</label> </div> </div> <div class="specGroup" style="width:100%; height:auto"> <p class="warning" style="margin-bottom:5px">Other Features</p> <% OleDbCommand cm2 = new OleDbCommand("SELECT * FROM Specifications WHERE specGroup='Other Features' ORDER BY SpecificationID", cn); OleDbDataReader dr2 = cm2.ExecuteReader(); bool noRec = true; while (dr2.Read()){ noRec = false; recCount++;%> <div class="criteria-container"> <input type="checkbox" name="DBC<%=dr2["SpecificationID"]%>" id="DBC<%=dr2["SpecificationID"]%>" />

92

Page 88: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<label for="DBC<%=dr2["SpecificationID"]%>"><%=dr2["SpecName"]%></label> </div> <%} if (noRec) Response.Write("<div style='color:gray; padding-left:15px; padding-top:5px'>(No Specifications)</div>"); %> </div></div> <div style="width:620px"> <center> <input type="button" onclick="history.go(-1)" value="Previous" class="navigation-button navigation-button-prev" /> <input type="button" onclick="Continue()" value="Next" class="navigation-button navigation-button-next" /> </center></div><% cn.Close();%></form> <script type="text/javascript"> $(document).ready(function () { $('.specGroup').each(function () { var elems = $(this).children('.criteria-container').length; if (elems == 0) elems = 5; elems = (elems / 4) + 1; elems = elems * 45; $(this).css('height', elems + "px"); }); }); </script> </asp:Content>

Step2<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content1" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463</title> <script type="text/javascript"> $(document).ready(function () { $('#tmspecials').hide(); //$('#tmbanner1').hide(); $('#filters').hide(); $('#sorter-container').hide();

$(".criteria div").each(function (index, element) { $(element).slider({ value: 9, min: 1, max: 17, slide: function (event, ui) { $(this).parent().children('input').val(ui.value);

93

Page 89: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

if (ui.value <= 9) { $(this).parent().parent().children('.first-criteria').children('span').html("(" + (10 - ui.value) + ")"); $(this).parent().parent().children('.second-criteria').children('span').html("(1/" + (10 - ui.value) + ")"); } else { $(this).parent().parent().children('.first-criteria').children('span').html("(1/" + (ui.value - 8) + ")"); $(this).parent().parent().children('.second-criteria').children('span').html("(" + (ui.value - 8) + ")"); } } }); $(this).parent().parent().children('.first-criteria').children('span').html("(" + (1) + ")"); $(this).parent().parent().children('.second-criteria').children('span').html("(1/" + (1) + ")"); }); });

function ConsistencyCheck() { var tempdata = "ItemCount=" + $("#itemCount").val(); $(".criteria input").each(function (index, element){ tempdata += "&" + $(element).attr("name") + "=" + $(element).val(); }); $.ajax({ url: 'Compare-Step2-ConsistencyCheck.aspx', cache: false, type: "POST", data: tempdata ,success: function (data) { var result = parseInt(data); if(result <= 10) document.forms["ConsistencyForm"].submit(); else{ alert("Your input ratings are inconsistent ("+result+"%)! Please re-evaluate your comparisons and try again."); } }, error: function (jqXHR, textStatus, errorThrown) { alert('Error!');} }); } </script> <style type="text/css"> .criteria-container{ width:745px; padding-top:5px; height:30px } .criteria-name, .criteria{float:left;} .criteria-name{width:170px;color:#7A7A7B; font-size:12px; font-family:Arial; font-weight:bold; height:auto; line-height:12px; text-align:center } .criteria{width:280px;}

94

Page 90: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

.guide div{float:left; width:105px; text-align:center; font-weight:bold; font-size:11px} .guide {width:100%; height:40px} .navigation-button{ background-color:#C4323F; color:White; font-size:12px; padding:10px 15px; margin:5px; border:none; -webkit-border-radius: 4px; -moz-border-radius: 4px;border-radius: 4px; font-weight:bold; width:90px; margin-top:15px} .navigation-button-next{ background-color:#41C7FF;} .navigation-button-next:focus, .navigation-button-next:hover{ background-color:#C4323F; cursor:pointer} .navigation-button-prev{ background-color:#C4323F;} .navigation-button-prev:focus, .navigation-button-prev:hover{ background-color:#41C7FF; cursor:pointer} </style> </asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="CONTENT" runat="server"><form name="ConsistencyForm" action="Compare-Step3.aspx" method="get"> <input type="hidden" name="CMPS" value="<%=Request.QueryString["CMPS"]%>" /> <input type="hidden" name="UDCLIST" value="<%=Request.QueryString["UDCLIST"]%>" /> <input type="hidden" name="DBCLIST" value="<%=Request.QueryString["DBCLIST"]%>" />

<% string[] userDefinedSpecs = new string[] { "Screen Size","Color","Weight","Technical Service","Customer Satisfaction"}; List<string> selectedCriteriaNames = new List<string>(); List<string> selectedCriteriaIDS = new List<string>(); string DBC= Request.QueryString["DBCLIST"] != null && Request.QueryString["DBCLIST"].ToString().Length > 0 ? Request.QueryString["DBCLIST"].ToString() : ""; if (DBC.Length > 0) { DBC = DBC.Substring(0, DBC.LastIndexOf(".")); string[] DBCList = DBC.Split('.'); try { OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open();

for (int i = 0; i < DBCList.Length; i++) { OleDbCommand cm = new OleDbCommand("SELECT SpecName FROM Specifications WHERE SpecificationID=" + DBCList[i], cn); object specID = cm.ExecuteScalar();

95

Page 91: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

if (specID != null && specID.ToString().Length > 0) { selectedCriteriaIDS.Add(DBCList[i].ToString()); selectedCriteriaNames.Add(specID.ToString()); } } cn.Close(); } catch (Exception) { Response.Write("Error from DBC"); } }

string UDC = Request.QueryString["UDCLIST"] != null && Request.QueryString["UDCLIST"].ToString().Length > 0 ? Request.QueryString["UDCLIST"].ToString() : ""; if (UDC.Length > 0) { UDC = UDC.Substring(0, UDC.LastIndexOf(".")); string[] UDCList = UDC.Split('.'); try { for (int i = 0; i < UDCList.Length; i++) { int id = Convert.ToInt16(UDCList[i].Replace("@", "")); selectedCriteriaIDS.Add("@" + id.ToString()); selectedCriteriaNames.Add(userDefinedSpecs[id].ToString()); } } catch (Exception) { Response.Write("Error from UDC"); } } %><h4>Compare Products</h4><div class="ui-widget" >

<div class="ui-state-highlight ui-corner-all" style="margin-top: 10px; margin-bottom:10px; padding: 10px .7em;">

<p style="padding:0px; padding-left:8px;"> <span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>

<strong style="font-weight:bold">How to compare products?</strong><br /><br /> Our product comparison feature actually includes a smart algorithm, that initially takes your makes you to compare criteria in pairs. Then, it also requests you to make pair-wise comparisons for computers so that it can choose you the computer that suits your requirements most.<br /> In the second step, you have to compare criteria in pairs.<br /> Using the buttons below, please provide rating values for each pair (pull buttons to the side if that side is more important for you, otherwise do quite the reverse). <br /><br />

96

Page 92: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<a href="javascript:history.go(-1)" style="background-image:url(img/back.png); padding-left:10px; background-repeat:no-repeat; color:#7A7A7B; font-weight:bold; background-position:left center">Previous Step</a> </p>

</div></div><div class="block_content" id="masterpage-content" style="padding-left:17px; padding-top:10px"><input type="hidden" id="itemCount" value="<%=selectedCriteriaNames.Count%>" /> <div class="guide"> <div style="padding-left:110px">is more important than</div> <div style="padding-left:40px">equally important with</div> <div style="padding-left:40px">is more important than</div> </div><% for (int i = 0; i < selectedCriteriaNames.Count; i++) for (int j = i + 1; j < selectedCriteriaNames.Count; j++) { %> <div class="criteria-container"> <div class="criteria-name first-criteria"><%=selectedCriteriaNames[i]%> <span></span></div> <div class="criteria" id="CV<%=selectedCriteriaIDS[i]%>.<%=selectedCriteriaIDS[j]%>"> <div></div><input type="hidden" value="9" name="CV<%=selectedCriteriaIDS[i]%>.<%=selectedCriteriaIDS[j]%>" /> </div> <div class="criteria-name second-criteria"><%=selectedCriteriaNames[j]%> <span></span></div> </div><% } %> <div style="width:620px"> <center> <input type="button" onclick="history.go(-1)" value="Previous" class="navigation-button navigation-button-prev" /> <input type="button" onclick="ConsistencyCheck()" value="Next" class="navigation-button navigation-button-next" /> </center> </div></div> </form></asp:Content>

Consistency Check<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Compare-Step2-ConsistencyCheck.aspx.cs" Inherits="mis463Laptop.Compare_Step2_ConsistencyCheck" %>using System;using System.Collections.Generic;using System.Linq;

97

Page 93: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data.OleDb;

namespace mis463Laptop{ public partial class Compare_Step2_ConsistencyCheck : System.Web.UI.Page { private double columnTotal(double[,] ratingsArray, int columnIndex) { int elemCount = Convert.ToInt32(Math.Sqrt(ratingsArray.LongLength)); double total = 0; for (int i = 0; i < elemCount; i++) total += ratingsArray[i, columnIndex]; return total; } private double[] calculatePriorityVector(double[,] normalizedRatings) { int elemCount = Convert.ToInt32(Math.Sqrt(normalizedRatings.LongLength)); double[] priorityVector = new double[elemCount]; for (int i = 0; i < elemCount; i++) priorityVector[i] = rowTotal(normalizedRatings, i) / elemCount; return priorityVector; } private double rowTotal(double[,] ratingsArray, int rowIndex) { int elemCount = Convert.ToInt32(Math.Sqrt(ratingsArray.LongLength)); double total = 0; for (int i = 0; i < elemCount; i++) total += ratingsArray[rowIndex, i]; return total; } private double[,] normalize(double[,] ratingsArray) { int elemCount = Convert.ToInt32(Math.Sqrt(ratingsArray.LongLength)); double[,] temp = new double[elemCount, elemCount]; for (int i = 0; i < elemCount; i++) for (int j = 0; j < elemCount; j++) temp[i, j] = ratingsArray[i, j] / columnTotal(ratingsArray, j); return temp; } private double[] multiplyMatrices(double[,] matrix1, double[] matrix2) { int elemCount = Convert.ToInt32(Math.Sqrt(matrix1.LongLength)); double[] resultMatrix = new double[elemCount]; for (int i = 0; i < elemCount; i++) { double total = 0; for (int j = 0; j < elemCount; j++)

98

Page 94: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

total += matrix1[i, j] * matrix2[j]; resultMatrix[i] = total; } return resultMatrix; } private double[] calculateAxOverXArray(double[] AX, double[] priorityVector) { double[] AX_X = new double[priorityVector.Length]; for (int i = 0; i < priorityVector.Length; i++) AX_X[i] = AX[i] / priorityVector[i]; return AX_X; } private double averageOfArray(double[] array) { double average = 0; for (int i = 0; i < array.Length; i++) average += array[i]; average = average / array.Length; return average; } private double calculateConsistencyRatio(double avgOfAX_X, int countOfCriteria) { double temp = (avgOfAX_X - countOfCriteria) / (countOfCriteria - 1); double[] consistencyIndexTable = new double[] { 0, 0, 0.58, 0.9, 1.12, 1.24, 1.32, 1.41, 1.45, 1.49, 1.51, 1.48, 1.56, 1.57, 1.59 }; return temp / consistencyIndexTable[countOfCriteria - 1]; } public double[] calculateAHP(double[,] ratingsArray, out bool consistent, out double consistencyRatio) { //Normalize the rating Array double[,] normalizedRatings = normalize(ratingsArray); double[] priorityVector = calculatePriorityVector(normalizedRatings); double[] AX = multiplyMatrices(ratingsArray, priorityVector); double[] AX_X = calculateAxOverXArray(AX, priorityVector); double avgOfAX_X = averageOfArray(AX_X); consistencyRatio = calculateConsistencyRatio(avgOfAX_X, Convert.ToInt32(Math.Sqrt(ratingsArray.LongLength))); consistent = consistencyRatio <= 0.1; return priorityVector; } protected void Page_Load(object sender, EventArgs e) { int itemCount = Convert.ToInt16(Request.Form["ItemCount"].ToString()); double[,] RatingsArray = new double[itemCount, itemCount]; int valueCounter = 1; for (int i = 0; i < itemCount; i++) for (int j = 0; j < itemCount; j++) if (i == j)

99

Page 95: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

RatingsArray[i, j] = 1; else if (j > i) { double rating = Convert.ToDouble(Request.Form[valueCounter].ToString()); valueCounter++; if (rating <= 9) RatingsArray[i, j] = 10 - rating; else RatingsArray[i, j] = 1 / (rating - 8); } else { RatingsArray[i, j] = 1 / RatingsArray[j, i]; }

bool isConsistent; double consistencyRatio; double[] CriteriaWisePV = calculateAHP(RatingsArray, out isConsistent, out consistencyRatio); Response.Write(Math.Round(consistencyRatio*100,0)); } }}

Step3<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content1" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463</title> <script type="text/javascript"> $(document).ready(function () { $('#tmspecials').hide(); //$('#tmbanner1').hide(); $('#filters').hide(); $('#sorter-container').hide(); $(".criteria div").each(function (index, element) { $(element).slider({ value: 9, min: 1, max: 17, slide: function (event, ui) { $(this).parent().children('input').val(ui.value); if (ui.value <= 9) { $(this).parent().parent().children('.first-criteria').children('span').html("(" + (10 - ui.value) + ")"); $(this).parent().parent().children('.second-criteria').children('span').html("(1/" + (10 - ui.value) + ")"); } else {

100

Page 96: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

$(this).parent().parent().children('.first-criteria').children('span').html("(1/" + (ui.value - 8) + ")"); $(this).parent().parent().children('.second-criteria').children('span').html("(" + (ui.value - 8) + ")"); } } }); $(this).parent().parent().children('.first-criteria').children('span').html("(" + (1) + ")"); $(this).parent().parent().children('.second-criteria').children('span').html("(1/" + (1) + ")"); }); }); function ConsistencyCheck() { var consistentCounter = 0; var itemCount = parseInt($("#itemCount0").val()); var criteriaCount = parseInt($("#criteriaCount").val()); $(".outer-container").each(function (indx, element) { var tempdata = "ItemCount=" + itemCount; $(".outer-container" + indx + " input").each(function (index, element) { tempdata += "&" + $(element).attr("name") + "=" + $(element).val(); }); $.ajax({ url: 'Compare-Step2-ConsistencyCheck.aspx', cache: false, async: false, type: "POST", data: tempdata, success: function (data) { var result = parseInt(data); if (result > 10) alert("Your input ratings in "+(indx+1)+".criterion are inconsistent (" + result + "%)! Please re-evaluate your comparisons and try again."); else consistentCounter++; }, error: function (jqXHR, textStatus, errorThrown) { alert('Error!'); } }); }); if(consistentCounter>=criteriaCount) document.forms["ConsistencyForm"].submit(); } </script> <style type="text/css"> .criteria-container{ width:745px; padding-top:5px; height:30px } .criteria-name, .criteria{float:left;} .criteria-name{width:190px;color:#7A7A7B; font-size:12px; font-family:Arial; font-weight:bold; height:auto; line-height:12px; text-align:center } .criteria{width:280px;} .guide div{float:left; width:105px; text-align:center; font-weight:bold; font-size:11px} .guide {width:100%; height:40px}

101

Page 97: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

.navigation-button{ background-color:#C4323F; color:White; font-size:12px; padding:10px 15px; margin:5px; border:none; -webkit-border-radius: 4px; -moz-border-radius: 4px;border-radius: 4px; font-weight:bold; width:90px; margin-top:15px} .navigation-button-next{ background-color:#41C7FF;} .navigation-button-next:focus, .navigation-button-next:hover{ background-color:#C4323F; cursor:pointer} .navigation-button-prev{ background-color:#C4323F;} .navigation-button-prev:focus, .navigation-button-prev:hover{ background-color:#41C7FF; cursor:pointer}

</style> </asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="CONTENT" runat="server"><form action="AHP.aspx" name="ConsistencyForm" method="get"><%for (int i = 0; i < Request.QueryString.Count; i++){%> <input type="hidden" name="<%=Request.QueryString.GetKey(i)%>" value="<%=Request.QueryString[i]%>" /><%} %><% OleDbConnection cn = null; OleDbCommand cm = null; string[] userDefinedSpecs = new string[] {"Screen Size","Color","Weight","Technical Service","Customer Satisfaction"}; List<string> selectedCriteriaNames = new List<string>(); List<string> selectedCriteriaIDS = new List<string>(); string UDC = Request.QueryString["UDCLIST"] != null && Request.QueryString["UDCLIST"].ToString().Length > 0 ? Request.QueryString["UDCLIST"].ToString() : ""; if (UDC.Length > 0) { UDC = UDC.Substring(0, UDC.LastIndexOf(".")); string[] UDCList = UDC.Split('.'); try { for (int i = 0; i < UDCList.Length; i++) { int id = Convert.ToInt16(UDCList[i].Replace("@", "")); selectedCriteriaIDS.Add("@" + id.ToString()); selectedCriteriaNames.Add(userDefinedSpecs[id].ToString()); } } catch (Exception) { Response.Write("Error from UDC"); } } else { //IF the user has not selected any UserDefinedCriteria, he must skip this step because all ratings will be used from the database %> <script type="text/javascript"> function goOn() { document.forms["ConsistencyForm"].submit(); }

102

Page 98: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

goOn(); </script> <%}%><h4>Compare Products</h4><div class="ui-widget" >

<div class="ui-state-highlight ui-corner-all" style="margin-top: 10px; margin-bottom:10px; padding: 10px .7em;">

<p style="padding:0px; padding-left:8px;"> <span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>

<strong style="font-weight:bold">How to compare products?</strong><br /><br /> Our product comparison feature actually includes a smart algorithm, that initially takes your makes you to compare criteria in pairs. Then, it also requests you to make pair-wise comparisons for computers so that it can choose you the computer that suits your requirements most.<br /> In the third step, you have to compare computers in pairs with respect to each criterion.<br /> Using the buttons below, please provide rating values for each pair (pull buttons to the side if that side is more important for you, otherwise do quite the reverse). <br /><br /> <a href="javascript:history.go(-1)" style="background-image:url(img/back.png); padding-left:10px; background-repeat:no-repeat; color:#7A7A7B; font-weight:bold; background-position:left center">Previous Step</a>

</p></div>

</div><div class="block_content" id="masterpage-content" style="padding-left:17px; padding-top:10px"><% int CriteriaCounter = 0; string CMPS = Request.QueryString["CMPS"].ToString(); CMPS = CMPS.Substring(0, CMPS.LastIndexOf('.')); string[] compIDList = CMPS.Split('.'); string[] compNameList = new string[compIDList.Length]; cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); for (int i = 0; i < compIDList.Length; i++) { CriteriaCounter++; cm = new OleDbCommand("SELECT ComputerName FROM Computers WHERE ComputerID=" + compIDList[i], cn); compNameList[i] = cm.ExecuteScalar().ToString().Length > 20 ? cm.ExecuteScalar().ToString().Substring(0,20) + "..." : cm.ExecuteScalar().ToString(); } cn.Close(); for (int k = 0; k< selectedCriteriaNames.Count; k++){%> <div class="outer-container">

103

Page 99: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<input type="hidden" id="itemCount<%=k%>" value="<%=compNameList.Length%>" /> <p class="warning" style="margin-bottom:10px"><%=k+1 %>. <%=selectedCriteriaNames[k]%></p> <div class="guide"> <div style="padding-left:130px">is more important than</div> <div style="padding-left:40px">equally important with</div> <div style="padding-left:40px">is more important than</div> </div> <% for(int i = 0 ; i<compNameList.Length;i++) for (int j = i + 1; j < compNameList.Length; j++) { %> <div class="criteria-container"> <div class="criteria-name first-criteria"><a href="Computer-info.aspx?ComputerID=<%=compIDList[i]%>" target="_blank"><%=compNameList[i]%></a> <span></span></div> <div class="criteria outer-container<%=k %>" id="PV<%=selectedCriteriaIDS[k]%>.<%=compIDList[i]%>.<%=compIDList[j]%>"> <div></div><input type="hidden" value="9" name="PV<%=selectedCriteriaIDS[k]%>.<%=compIDList[i]%>.<%=compIDList[j]%>" /> </div> <div class="criteria-name second-criteria"><a href="Computer-info.aspx?ComputerID=<%=compIDList[j]%>" target="_blank"><%=compNameList[j]%></a> <span></span></div> </div> <% } %> </div> <%} %> <input type="hidden" value="<%=selectedCriteriaNames.Count%>" id="criteriaCount" /> <div style="width:620px"> <center> <input type="button" onclick="history.go(-1)" value="Previous" class="navigation-button navigation-button-prev" /> <input type="button" onclick="ConsistencyCheck()" value="Next" class="navigation-button navigation-button-next" /> </center> </div></div>

</form></asp:Content>

104

Page 100: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

VIII.2.4.Computer Information<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content1" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463</title> <script type="text/javascript"> $(document).ready(function () { $('#tmspecials').hide(); //$('#tmbanner1').hide(); $('#filters').hide(); $('#sorter-container').hide(); //$('#left_column').hide(); });

</script> </asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="CONTENT" runat="server"></div><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = new OleDbCommand("SELECT * FROM Computers WHERE ComputerID=" + Request.QueryString["ComputerID"], cn); OleDbDataReader dr = cm.ExecuteReader(); dr.Read(); string ComputerName = dr["ComputerName"].ToString(); %><!-- Breadcrumb --><div class="breadcrumb_wrap"> <div class="breadcrumb">

<a href="/" title="return to Home">Home</a> <span class="navigation-pipe">&gt;</span> <span class="navigation_end"><%=ComputerName%></span><br /> <a href="javascript:history.go(-1)" style="line-height:30px">Previous</a> </div></div><!-- /Breadcrumb --><h1>&nbsp; </h1><div id="primary_block" class="clearfix"><div id="primary_block2"><div id="primary_block3">

<div id="pb-right-column"><div id="image-block">

<img src="resources/<%=dr["Picture"]%>" title="<%=ComputerName %>" alt="<%=ComputerName %>" id="bigpic" width="195" height="195" />

</div>

105

Page 101: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<div id="views_block"> <div>

<ul id="thumbs_list"> <li id="thumbnail_4" style="display: list-item; "> <a href="resources/<%=dr["Picture"]%>" rel="other-views" class="thickbox shown" target="_blank" title="<%=ComputerName %>"> <img id="thumb_4" src="resources/<%=dr["Picture"]%>" alt="<%=ComputerName %>" height="59" width="59" /> </a> </li> </ul>

</div></div>

</div><div id="pb-left-column"> <div id="short_description_block"> <div id="short_description_content" class="rte align_justify"

style="padding-bottom:60px"> <%=dr["Description"]%> </div>

<p class="buttons_bottom_block"> <a href="javascript:$('html,body').animate({ scrollTop: $('#more_info_tab_more_info').offset().top - 50 }, 700);" class="button">Specifications</a> </p>

</div><form id="buy_block" action="/" method="post">

<p class="price"> <span class="our_price_display"> <span id="our_price_display">$<%=dr["Price"] %>.00</span>tax incl. </span> </p> <div id="other_prices"></div>

<p id="quantity_wanted_p" style="display:none"><label>Quantity :</label><input type="text" name="qty" id="quantity_wanted"

class="text" value="1" size="2" maxlength="3" /></p><p id="oosHook" style="display: none;"></p>

<p id="add_to_cart" class="buttons_bottom_block"> <input id="add2cartbtn" type="submit" name="Submit"

value="Add to cart" /></p><div class="clearblock"></div>

</form></div><div class="clearblock"></div>

</div></div></div>

106

Page 102: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<ul id="usefull_link_block"><li><a href="javascript:print();">Print</a></li><li><span id="view_full_size" class="span_link"

onclick="window.location='resources/<%=dr["Picture"]%>';">View full size</span></li></ul><div id="more_info_block" class="clear">

<ul id="more_info_tabs" class="idTabs idTabsShort"><li><a id="more_info_tab_more_info" href="#idTab2"

class="selected">Specifications</a></li></ul><div id="more_info_sheets" class="sheets align_justify">

<div id="more_info_sheets_inner"> <ul id="idTab2" class="bullet">

<li><span>Computer Name: </span><%=dr["ComputerName"]%></li><% OleDbCommand cm2 = new OleDbCommand("SELECT * FROM Specifications ORDER BY SpecificationID", cn); OleDbDataReader dr2 = cm2.ExecuteReader(); while(dr2.Read()){ OleDbCommand cm3 = new OleDbCommand("SELECT Partname FROM CompParts a INNER JOIN CompSpecs b ON (a.PartID=b.PartID) WHERE a.SpecificationID="+dr2["SpecificationID"]+" AND b.ComputerID=" + dr["ComputerID"], cn); %>

<li><span><%=dr2["SpecName"]%>: </span> <%=cm3.ExecuteScalar() %></li><% } %>

</ul> </div>

</div></div><% cn.Close(); %><div></asp:Content>

VIII.2.5.Default<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"%><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content1" ContentPlaceHolderID="HEADER" runat="server"> <%Server.Transfer("Products.aspx");%>

<title>MIS463</title> <script type="text/javascript"> $(window).load(function () { /* $('#slide_holder').show();

107

Page 103: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

$('#slider').nivoSlider({ effect: 'fade', //Specify sets like: 'fold,fade,sliceDown' slices: 20, animSpeed: 500, //Slide transition speed pauseTime: 5000, startSlide: 0, //Set starting Slide (0 index) directionNav: false, //Next & Prev directionNavHide: false, //Only show on hover controlNav: true, //1,2,3... controlNavThumbs: false, //Use thumbnails for Control Nav controlNavThumbsFromRel: false, //Use image rel for thumbs controlNavThumbsSearch: '.jpg', //Replace this with... controlNavThumbsReplace: '_thumb.jpg', //...this in thumb Image src keyboardNav: true, //Use left & right arrows pauseOnHover: true, //Stop animation while hovering manualAdvance: false, //Force manual transitions captionOpacity: 0.8, //Universal caption opacity beforeChange: function () { }, afterChange: function () { }, slideshowEnd: function () { } //Triggers after all slides have been shown }); */ }); function compare() { var computerCount = $('.compareCheckbox input:checked').length; if (computerCount <= 2) { alert('In order to compare computers, you have to select at least 3 of them! Please select more computers.'); return; } if (computerCount >= 8) { alert('You can compare 7 computers at a time! Please reduce your computer set by deselecting some computers.'); return; }

var computers = ""; $('.compareCheckbox input:checked').each(function (index, element) { computers += $(element).attr("id").replace("compare", "") + "."; }); window.location = 'Compare-Step1.aspx?CMPS=' + computers; } </script> <style type="text/css"> .compareCheckbox label{color:#7A7A7B; font-size:12px; font-family:Arial} .compareCheckbox label:hover, .compareCheckbox label:focus{cursor:pointer} .compareCheckbox{padding: 9px 24px 0px 24px;} </style> </asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="CONTENT" runat="server"><h4>Featured products</h4><input onclick="compare()" type="button" value="Compare" class="button exclusive ajax_add_to_cart_button" style="margin-top:10px; float:right"><div class="block_content" id="masterpage-content" style="padding-top:40px"> <ul><%

108

Page 104: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = null; cm = new OleDbCommand("SELECT ComputerID FROM Computers", cn); OleDbDataReader dr = cm.ExecuteReader(); List<string> compID = new List<string>(); while (dr.Read()) compID.Add(dr["ComputerID"].ToString());

Random r = new Random(); while (compID.Count >9) if (r.Next(0, 100) <= 50) { compID.RemoveAt(r.Next(0, compID.Count)); } string compIDStr = ""; for (int i = 0; i < compID.Count; i++) compIDStr += compID[i] + ","; compIDStr = compIDStr.Substring(0, compIDStr.LastIndexOf(','));

cm = new OleDbCommand("SELECT * FROM Computers WHERE ComputerID in("+compIDStr+")", cn); dr = cm.ExecuteReader(); while (dr.Read()) {%> <li class="ajax_block_product"> <a class="product_image" href="computer-info.aspx?computerID=<%=dr["ComputerID"]%>" title="<%=dr["ComputerName"]%>"> <img src="resources/<%=dr["Picture"]%>" alt="<%=dr["ComputerName"]%>" style="max-width:208px; max-height:144px" /> </a> <h5 style="padding-top:12px"> <a class="product_link" href="computer-info.aspx?computerID=<%=dr["ComputerID"]%>" title="<%=dr["ComputerName"]%>"> <%=(dr["ComputerName"] != null && dr["ComputerName"].ToString().Length > 40) ? dr["ComputerName"].ToString().Substring(0, 40) + "..." : dr["ComputerName"]%> </a> </h5> <span class="price" style="padding-top:6px">$<%=dr["Price"]%></span> <div class="compareCheckbox"> <input type="checkbox" id="compare<%=dr["ComputerID"]%>" name="compare<%=dr["ComputerID"]%>" /> <label for="compare<%=dr["ComputerID"]%>">Check to compare</label> </div> <div class="buttons" style="padding-top:9px">

109

Page 105: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_<%=dr["ComputerID"]%>" amount="1" href="javascript:none" title="Add to cart">Add to cart</a> <a class="button" href="computer-info.aspx?computerID=<%=dr["ComputerID"]%>" title="View">View</a> </div> </li><%} cn.Close();%> </ul></div> </asp:Content>

VIII.2.6.Logout<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><% Session.Clear(); Response.Redirect("Default.aspx"); Response.End();%>

VIII.2.7.Products<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content1" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463</title> <script type="text/javascript"> $(document).ready(function () { $('#tmspecials').hide(); //$('#tmbanner1').hide(); $('#filters').show(); $('#sorter-container').show(); });

function compare() { var computerCount = $('.compareCheckbox input:checked').length; if (computerCount <= 2) { alert('In order to compare computers, you have to select at least 3 of them! Please select more computers.'); return; } if (computerCount >= 8) { alert('You can compare 7 computers at a time! Please reduce your computer set by deselecting some computers.'); return; }

var computers = ""; $('.compareCheckbox input:checked').each(function (index,element) { computers += $(element).attr("id").replace("compare", "") + "."; }); window.location = 'Compare-Step1.aspx?CMPS=' + computers; } </script> <style type="text/css"> .compareCheckbox label{color:#7A7A7B; font-size:12px; font-family:Arial}

110

Page 106: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

.compareCheckbox label:hover, .compareCheckbox label:focus{cursor:pointer} .compareCheckbox{padding: 20px 24px 0px 24px;} </style> </asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="CONTENT" runat="server"><h4>Featured products</h4><input onclick="compare()" type="button" value="Compare" class="button exclusive ajax_add_to_cart_button" style="margin-top:10px; float:right"><div class="block_content" id="masterpage-content" style="padding-top:40px"> <ul><% OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + MapPath("mis463.accdb") + ";Persist Security Info=False;"); cn.Open(); OleDbCommand cm = null; string sqlstr = "SELECT * FROM Computers WHERE TRUE ";

//Price and Brand filters are database-independent; so we check for the existence of such criteria initially if (Request.QueryString["brandID"] != null && Request.QueryString["brandID"].ToString().Length > 0) sqlstr += " AND brandID=" + Request.QueryString["brandID"]; if (Request.QueryString["priceID"] != null && Request.QueryString["priceID"].ToString().Length > 0) { string price = Request.QueryString["priceID"]; switch (price[0]) { case 'L': sqlstr += " AND Price<" + price.Replace("L", ""); break; case 'G': sqlstr += " AND Price>=" + price.Replace("G", ""); break; default: sqlstr += " AND Price>=" + price.Substring(0, price.IndexOf('-')) + " AND Price<" + price.Substring(price.IndexOf('-') + 1); break; } }

//Then for each filter selected, form the sql string accordingly sqlstr += " AND (ComputerID IN( "; sqlstr += " SELECT ComputerID FROM CompSpecs WHERE TRUE "; //filter-dr["SpecificationID"] int filterCount = 0; for(int i=0;i<Request.QueryString.Count;i++) if (Request.QueryString.GetKey(i)!= null && Request.QueryString.GetKey(i).ToString().Length>0 && Request.QueryString.GetKey(i).StartsWith("filter-")) { filterCount++; //filter-5:4 specID:PartID sqlstr += " AND PartID=" + Request.QueryString[i] ; }

111

Page 107: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

//If no filters attached, all products should be shown (via OR TRUE hack) if (filterCount != 0) sqlstr += "))"; else sqlstr += ") OR TRUE)";

if (Request.QueryString["sortBy"] != null && Request.QueryString["sortBy"].ToString().Length > 0) sqlstr += " ORDER BY " + Request.QueryString["sortBy"] + " " + Request.QueryString["sortDir"]; else sqlstr += " ORDER BY ComputerName"; //Response.Write(sqlstr); //Response.End(); cm = new OleDbCommand(sqlstr, cn); OleDbDataReader dr = cm.ExecuteReader(); while (dr.Read()) {%> <li class="ajax_block_product"> <a class="product_image" href="computer-info.aspx?computerID=<%=dr["ComputerID"]%>" title="<%=dr["ComputerName"]%>"> <img src="resources/<%=dr["Picture"]%>" alt="<%=dr["ComputerName"]%>" style="max-width:208px; max-height:144px" /> </a> <h5> <a class="product_link" href="computer-info.aspx?computerID=<%=dr["ComputerID"]%>" title="<%=dr["ComputerName"]%>"> <%=(dr["ComputerName"] != null && dr["ComputerName"].ToString().Length > 40) ? dr["ComputerName"].ToString().Substring(0, 40) + "..." : dr["ComputerName"]%> </a> </h5> <span class="price">$<%=dr["Price"]%></span> <div class="compareCheckbox"> <input type="checkbox" id="compare<%=dr["ComputerID"]%>" name="compare<%=dr["ComputerID"]%>" /> <label for="compare<%=dr["ComputerID"]%>">Check to compare</label> </div> <!-- <div class="buttons">

<a class="exclusive ajax_add_to_cart_button" rel="ajax_id_product_<%=dr["ComputerID"]%>" amount="1" href="javascript:none" title="Add to cart">Add to cart</a> <a class="button" href="computer-info.aspx?computerID=<%=dr["ComputerID"]%>" title="View">View</a> </div> --> </li>

112

Page 108: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<%} cn.Close(); %> </ul></div> </asp:Content>

VIII.2.8.Uploader<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8" %><%@ Import Namespace="System.IO" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> protected void Button1_Click(object sender, EventArgs e) { string image = ""; if (imageFile.HasFile) { string filename = String.Format("{0:yyyy-MM-dd-HH-mm-ss-fff}", DateTime.Now) + imageFile.FileName.Substring(imageFile.FileName.LastIndexOf('.')); image = "resources\\" + filename; string fileFullPath = MapPath("\\") + image; imageFile.SaveAs(fileFullPath); Response.Redirect("/uploader2.aspx?src=" + filename + "&hf=" + Request.QueryString["hf"].ToString()); } else { Response.Write("Dosya seçmediniz!"); } }</script><html xmlns="http://www.w3.org/1999/xhtml"><head> <script type="text/javascript" src="/uploader.js" language="javascript"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>File Uploader</title> <link href="/global.css" rel="stylesheet" type="text/css" media="all" />

<style type="text/css"> body { background-image:url(/img/bg_pattern.gif); background-repeat:repeat; } </style></head><body> <form runat="server"> <center><br /> <asp:FileUpload ID="imageFile" runat="server" /><br /><br />

113

Page 109: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<asp:Button ID="Button1" runat="server" Text="Upload" CssClass="button" onclick="Button1_Click" /> </center> </form></body></html>

<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> </script><html xmlns="http://www.w3.org/1999/xhtml"><head><!--js--><script type="text/javascript" src="/uploader.js" language="javascript"></script><script type="text/javascript" language="javascript"> function bodyLoad() { handleParent(document.getElementById('tx_as').value, document.getElementById('hf').value); }</script><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title></title></head><body onload="bodyLoad();"><input type="hidden" id="tx_as" value='<%=Request.QueryString["src"].ToString()%>' /><input type="hidden" id="hf" value='<%=Request.QueryString["hf"].ToString()%>' /></body></html>

VIII.2.9.User Account<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true"%><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content1" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463 Login</title> </asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="CONTENT" runat="server"><h4>Log in</h4><div class="block_content" id="masterpage-content"><%if (Request.QueryString["error"] == "invalidlogin"){ %><div class="error">Invalid username/password combination. Please try again.</div><%} %> <form action="User-account2.aspx" method="post" id="login_form" class="std">

<fieldset> <h3>Log in to the system</h3> <p class="text">

<label for="email">Username</label>

114

Page 110: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<input type="text" id="username" name="username" value="" class="account_input">

</p> <p class="text">

<label for="passwd">Password</label> <input type="password" id="password" name="password"

value="" class="account_input"> </p> <p class="submit">

<input type="submit" id="SubmitLogin" name="SubmitLogin" class="button" value="Log in">

</p> <p class="lost_password"><a href="javascript:void">Forgot your

password?</a></p> </fieldset>

</form></div></asp:Content>

<%@ Page Language="C#" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><% Session.Clear(); string[] usernameArr = new string[] {"varoltepecik", "ilkayakgun", "ceydaarkin" }; string[] passwordArr = new string[] {"varoltepecik", "ilkayakgun", "ceydaarkin" };

bool success = false; for(int i=0;i<usernameArr.Length;i++) if (Request.Form["username"] != null && Request.Form["password"] != null && Request.Form["username"].ToString().Equals(usernameArr[i]) && Request.Form["password"].ToString().Equals(passwordArr[i])) { Session.Add("classic-userid", i); Session.Add("classic-username", usernameArr[i]); success = true; break; } if (success) Response.Redirect("Default.aspx"); else Response.Redirect("User-account.aspx?error=invalidlogin"); Response.End();%>

VIII.2.10. Contact<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content1" ContentPlaceHolderID="HEADER" runat="server">

115

Page 111: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<title>MIS463</title> <script type="text/javascript"> $(document).ready(function () { $('#tmspecials').hide(); //$('#tmbanner1').hide(); $('#filters').hide(); $('#sorter-container').hide(); //$('#left_column').hide(); });

</script> </asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="CONTENT" runat="server"> <center> <div> El Turco Cooparation<br />Wilton Crescent, London, England, United Kingdom<br />020 7487 5280<br /> <iframe width="700" height="394" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=london+king+street+2+4&amp;aq=&amp;sll=39.887101,-83.449426&amp;sspn=0.009286,0.019827&amp;vpsrc=0&amp;ie=UTF8&amp;hq=&amp;hnear=2-4+New+King+St,+London+SE8+3HS,+United+Kingdom&amp;t=m&amp;layer=c&amp;cbll=51.500864,-0.154884&amp;panoid=LtkcZNtdaR45w6Va5fZ1xw&amp;cbp=13,6.56,,0,0&amp;ll=51.494864,-0.154924&amp;spn=0.021054,0.060081&amp;z=14&amp;output=svembed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=london+king+street+2+4&amp;aq=&amp;sll=39.887101,-83.449426&amp;sspn=0.009286,0.019827&amp;vpsrc=0&amp;ie=UTF8&amp;hq=&amp;hnear=2-4+New+King+St,+London+SE8+3HS,+United+Kingdom&amp;t=m&amp;layer=c&amp;cbll=51.500864,-0.154884&amp;panoid=LtkcZNtdaR45w6Va5fZ1xw&amp;cbp=13,6.56,,0,0&amp;ll=51.494864,-0.154924&amp;spn=0.021054,0.060081&amp;z=14" style="color:#0000FF;text-align:left">View Larger Map</a></small> </div> </center></asp:Content>

VIII.2.11.Team Members<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content1" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463</title> <script type="text/javascript">

116

Page 112: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

$(document).ready(function () { $('#tmspecials').hide(); //$('#tmbanner1').hide(); $('#filters').hide(); $('#sorter-container').hide(); //$('#left_column').hide(); });

</script> </asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="CONTENT" runat="server"> <center> <div> <img src="images/sonhali.jpg" alt="team members" /> </div> </center></asp:Content>

VIII.2.12.How El Turco Dss Works

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" %><%@ Import Namespace="System.Data.OleDb" %><asp:Content ID="Content1" ContentPlaceHolderID="HEADER" runat="server">

<title>MIS463</title> <script type="text/javascript"> $(document).ready(function () { $('#tmspecials').hide(); //$('#tmbanner1').hide(); $('#filters').hide(); $('#sorter-container').hide(); //$('#left_column').hide(); });

</script> </asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="CONTENT" runat="server"> <center> <div> <table width="300"> <tr> <td><img src="images/howelturcodssworks1.png" width="666" height="483" /></td> </tr> <tr> <td><img src="images/howelturcodssworks2.png" width="623" height="485" /></td> </tr> <tr>

117

Page 113: Project Format, mis463 - boun.edu.trmisprivate.boun.edu.tr/sencer/mis463...  · Web view*What if analysis shows what will be the optimal alternative and how the rank of alternatives

<td><img src="images/howelturcodssworks3.png" width="624" height="412" /></td> </tr> <tr> <td><img src="images/howelturcodssworks4.png" width="598" height="360" /></td> </tr> <tr> <td><img src="images/howelturcodssworks5.png" width="652" height="379" /></td> </tr> <tr> <td><img src="images/howelturcodssworks6.png" width="609" height="428" /></td> </tr> <tr> <td><img src="images/howelturcodssworks7.png" width="633" height="447" /></td> </tr> </table> </div> </center></asp:Content>

118