Example #1
0
    protected void ButtonUpdate_Click(object sender, EventArgs e)
    {
        ServiceReference1.UpdateFlatRequest updateFlat = new ServiceReference1.UpdateFlatRequest();

        updateFlat.flatId      = Convert.ToInt32(DropDownList1.SelectedValue);
        updateFlat.rent        = Convert.ToDouble(TextBoxRent.Text);
        updateFlat.deposit     = Convert.ToDouble(TextBoxDeposit.Text);
        updateFlat.description = TextBoxDescription.Text;

        client.UpdateFlat(updateFlat.flatId, updateFlat.rent, updateFlat.deposit, updateFlat.description);
        if (client.UpdateFlat(updateFlat.flatId, updateFlat.rent, updateFlat.deposit, updateFlat.description) == true)
        {
            LabelUpdated.Text = "Flat sucessfully updated";
        }
        else
        {
            LabelUpdated.Text = "Flat failed to be updated";
        }
    }