using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; /// /// Summary description for tervitusteenus /// [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService] public class tervitusteenus : System.Web.Services.WebService { public tervitusteenus () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public string HelloWorld() { return "Hello World"; } [WebMethod] public string tervita(string eesnimi) { return "Tere, " + eesnimi; } [WebMethod] public double arvutaKroonideks(string valuuta, double kogus) { double vastus = -1; if (valuuta == "EUR") { vastus = kogus * 15.6; } if (valuuta == "USD") { vastus = kogus * 12.5; } if (valuuta == "RUR") { vastus = kogus * 0.5; } return vastus; } }