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(); }
public int Add(int firstNumber, int secondNumber) { ServiceReference1.ITrainServices client = new TrainServicesClient(); return client.Add(firstNumber, secondNumber); }