private void GarsonSecim(object sender, EventArgs e) { ControlGarsonCheckButton button = (ControlGarsonCheckButton)sender; btnGarsonSecim.Adi = button.Adi; btnGarsonSecim.Soyadi = button.Soyadi; btnGarsonSecim.GarsonId = button.GarsonId; secilenAdisyon.GarsonId = button.GarsonId; navigationKategori.SelectedPage = pageKategoriUrunler; }
void GarsonButtonOlustur() { foreach (var garson in worker.GarsonService.GetList(null)) { ControlGarsonCheckButton button = new ControlGarsonCheckButton { Name = garson.Id.ToString(), Text = $"{garson.Adi} {garson.Soyadi}", Height = 150, Width = 150, Font = new Font("Tahoma", 12, FontStyle.Bold), GroupIndex = 1, GarsonId = garson.Id, Adi = garson.Adi, Soyadi = garson.Soyadi }; button.CheckedChanged += GarsonSecim; flowGarson.Controls.Add(button); } }