using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
    public Service () {

        //如果使用设计的组件，请取消注释以下行 
        //InitializeComponent(); 
    }

    [WebMethod]
    public string HelloWorld() {
        return "Hello World";
    }

    [WebMethod]
    public string ChaXunWeiHan(string weiwenzi)
    {
        try
        {
            DB db = new DB();
            return db.GetUy2Ch(weiwenzi.Trim());
        }
        catch (Exception ex)
        {
            return ex.Message;
        }
        return "Hello World";
    }
    [WebMethod]
    public string ChaXunHanWei(string hanzi)
    {
        try
        {
            DB db = new DB();
            return db.GetCh2Uy(hanzi.Trim());
        }
        catch (Exception ex)
        {
            return ex.Message;
        }
        return "Hello World";
    }
}
