protected void btnUpdate_Click(object sender, EventArgs e) { if (Page.IsValid) { try { proxy = new BolnicaService.Service1Client(); BolnicaService.Terapija t = new BolnicaService.Terapija(); try { t.IDTerapija = Convert.ToInt32(txtIDTerapija.Text); t.Naziv = txtNaziv.Text; t.DaniTrajanja = Convert.ToInt32(txtDaniTrajanja.Text); t.BolestID = Convert.ToInt32(ddlBolesti.SelectedValue); proxy.UpdateTerapija(t); lblStatus.Text = "Operacija uspješno spremljena"; FillGridView(); } catch (Exception ex) { lblStatus.Text = ("Operacija nije izvršena, greška: " + ex); } ClearAll(); } catch (Exception ex) { lblStatus.Text = ("Pogreška kod pristupa wfc service-u, greška: " + ex); } FillGridView(); btnSave.Enabled = true; btnDelete.Enabled = false; btnUpdate.Enabled = false; } }