protected void btnSave_Click(object sender, EventArgs e) { if (Page.IsValid) { try { proxy = new BolnicaService.Service1Client(); BolnicaService.Bolest b = new BolnicaService.Bolest(); try { b.NazivBolesti = txtNazivBolesti.Text; b.GodinaOtkrica = Convert.ToInt32(txtGodinaOtkrica.Text); b.OpasnostID = Convert.ToInt32(ddlOpasnosti.SelectedValue); proxy.AddBolest(b); 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; } }