示例#1
0
文件: Form1.cs 项目: yegsoft/kartApp
 private void btnKategori_Click(object sender, EventArgs e)
 {
     foreach (DataGridViewRow row in grdOgrenci.Rows)
     {
         if (row.Cells[0].Value != null && row.Cells[0].Value.Equals(true))
         {
             row.Selected = true;
             row.DefaultCellStyle.SelectionBackColor = Color.LightSlateGray;
         }
         else
         {
             row.Selected = false;
         }
     }
     foreach (DataGridViewRow row in grdOgrenci.Rows)
     {
         if (row.Selected == true)
         {
             string b = row.Cells[1].Value.ToString();
             string a = cmbKategori.SelectedValue.ToString();
             Yardimci.Tablo(Yardimci.KisiKategoriGuncelle(a, b));
         }
         else
         {
             continue;
         }
     }
     grdOgrenci.DataSource = Yardimci.Tablo(Yardimci.VeriGetir());
     grdOgrenci.ClearSelection();
 }