protected void btnDodaj_Click(object sender, EventArgs e) { try { proxy = new BolnicaService.Service1Client(); BolnicaService.TerapijaLijek tl = new BolnicaService.TerapijaLijek(); tl.TerapijaID = Convert.ToInt32(GridViewTerapija.DataKeys[GridViewTerapija.SelectedRow.RowIndex].Value); tl.LijekID = Convert.ToInt32(ddlLijek.SelectedValue); proxy.AddTerapijaLijek(tl); lblStatusDodavanja.Text = "Lijek uspješno dodan terapiji"; FillGridViewLijek(); } catch (Exception ex) { lblStatusDodavanja.Text = ("Pogreška kod dodavanja lijeka u terapiju, greška: " + ex); } }