Esempio n. 1
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            ServiceReference1.ITrainServices client = new TrainServicesClient();

            lblResult.Text =  client.Add(Convert.ToInt16(txtFirstNumber.Text), Convert.ToInt16(txtSecondNumber.Text)).ToString();

            gvCalculations.DataSource = client.GetCalculations();
            gvCalculations.DataBind();

        }
Esempio n. 2
0
 public int Add(int firstNumber, int secondNumber)
 {
     ServiceReference1.ITrainServices client = new TrainServicesClient();
     return client.Add(firstNumber, secondNumber);
 }