using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
namespace WebService1
{
///
/// Summary description for Service1.
///
public class Service1 : System.Web.Services.WebService
{
public Service1()
{
//CODEGEN: This call is required by the ASP.NET Web Services Designer
InitializeComponent();
}
#region Component Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
}
#endregion
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
}
// WEB SERVICE EXAMPLE
// The HelloWorld() example service returns the string Hello World
// To build, uncomment the following lines then save and build the project
// To test this web service, press F5
[WebMethod]
public String getAnimalSign(string year)
{
String result = "";
switch(year)
{
case "1936": case "1948": case "1960": case "1972": case "1984": case "1996":
result = "RAT: You are ambitious yet honest. Prone to spend freely.Seldom make lasting friendships. "+
"Most compatible with Dragons and Monkeys. Least compatible with Horses.";
break;
case "1937": case "1949": case "1961": case "1973": case "1985": case "1997":
result = "OX: Bright, patient and inspiring to others. You can be happy by yourself. Yet make an "+
"outstanding parent. Marry a Snake or Cock. The Sheep will bring trouble.";
break;
case "1938": case "1950": case "1962": case "1974": case "1986": case "1998":
result = "TIGER: Aggressive, courageous, candid and sensitive. Look to the Horse and Dog for happiness. "+
"Beware of the Monkey.";
break;
case "1939": case "1951": case "1963": case "1975": case "1987": case "1999":
result = "RABBIT: Luckiest of all signs, you are also talented and articulate. Affectionated, yet shy, "+
"you seek peace throughout your life. Marry a Sheep or Boar. Your opposite is the Cock.";
break;
case "1940": case "1952": case "1964": case "1976": case "1988": case "2000":
result = "DRAGON: You are eccentric and your life complex. You have a very passionate nature and abundant "+
"health. Marry a Monkey or Rat late in life. Avoid the Dog.";
break;
case "1941": case "1953": case "1965": case "1977": case "1989": case "2001":
result = "SNAKE: Wise and intense with a tendency toward physical beauty. Vain and high tempered. The Boar "+
"is your enemy. The Cock or Ox are your best signs.";
break;
case "1942": case "1954": case "1966": case "1978": case "1990": case "2002":
result = "HORSE: Popular and attractive to the opposite sex. You are often ostentatious and impatient. "+
"You need people. Marry a Tiger or a Dog early, but never a Rat.";
break;
case "1943": case "1955": case "1967": case "1979": case "1991": case "2003":
result = "SHEEP: Elegant and creative, you are timid and prefer anonymity. you are most compatible with "+
"Boars and Rabbits but never the Ox.";
break;
case "1944": case "1956": case "1968": case "1980": case "1992": case "2004":
result = "MONKEY: You are very intelligent and are able to influence people. An enthusiastic achiever, you "+
"are easily dicouraged and confused. Avoid Tigers. Seek a Dragon or a Rat.";
break;
case "1945": case "1957": case "1969": case "1981": case "1993": case "2005":
result = "COCK: A pioneer in spirit, you are devoted to work and quest after knowledge. you are selfish "+
"and eccentric. Rabbits are trouble. Snakes andn Oxen are fine.";
break;
case "1946": case "1958": case "1970": case "1982": case "1994": case "2006":
result = "DOG: Loyal and honest. You work well with other. Generous yet stubborn and often selfish. Look "+
"to the Horse or Tiger. Watch out for Dragons.";
break;
case "1947": case "1959": case "1971": case "1983": case "1995": case "2007":
result = "BOAR: Noble and chivalrous. You friends will be lifelong, yet you are prone tomarital strife. "+
"Avoid other Boars. Marry a Rabbit or a Sheep.";
break;
default:
result = "Invalid Year!!!";
break;
}
return result;
}
}
}