private void button1_Click(object sender, EventArgs e) { bool[] authoritys = new bool[12]; authoritys[0] = checkBox1.Checked; authoritys[1] = checkBox2.Checked; authoritys[2] = checkBox3.Checked; authoritys[3] = checkBox4.Checked; authoritys[4] = checkBox5.Checked; authoritys[5] = checkBox6.Checked; authoritys[6] = checkBox7.Checked; authoritys[7] = checkBox8.Checked; authoritys[8] = checkBox9.Checked; authoritys[9] = checkBox10.Checked; authoritys[10] = checkBox11.Checked; authoritys[11] = checkBox12.Checked; Authority a1 = new Authority(); a1.DeleteAuthority((int)comboBox1.SelectedValue); for (int i = 0; i < 12; i++) { a1.AddAuthority((int)comboBox1.SelectedValue, i + 1, authoritys[i]); } MessageBox.Show("Yetkiler Güncellendi"); }