private void vkaydetBtn_Click(object sender, EventArgs e) { if (vsure.Text == "" || vpas.Text == "" || vsmac.Text == "") { MessageBox.Show("Lütfen tüm alanları doldurun!"); } else { veriBtn.Enabled = true; Voleybolcu v = new Voleybolcu { Name = vSporcu.SelectedItem.ToString(), Sure = Convert.ToInt32(vsure.Text), Pas = Convert.ToInt32(vpas.Text), Smac = Convert.ToInt32(vsmac.Text) }; VAntrenor a = new VAntrenor(); v.UyeEkle(a); v.Sure = Convert.ToInt32(vsure.Text); v.Pas = Convert.ToInt32(vpas.Text); v.Smac = Convert.ToInt32(vsmac.Text); } }