using System;
using System.Web.UI;
using localhost;

public partial class StockTickerClient : Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack) {
            lblMessage.Text = "Pierwsze wczytanie o godzinie " +
               DateTime.Now.ToLongTimeString();
        } else {
            lblMessage.Text = "Odświeżenie o godzinie " +
               DateTime.Now.ToLongTimeString();
        }
    }

    protected void btnWebService_Click(object sender, EventArgs e) 
    {
        StockTickerSimple proxy = new StockTickerSimple();
        lblMessage.Text = String.Format("Usługa sieciowa zwraca cenę MSFT: {0}",
                                        proxy.GetPrice("MSFT").ToString());
    }
}
