Mehmet Fatih

Mehmet Fatih

  • 855
  • 931
  • 39.9k

Mark a row containing a bool value as conditional

Mar 8 2024 9:01 AM

I have 3 rickboxes in the form. I fill them at different times. When the last rickbox is filled, I want the column named “tamamlandi” that contains the bool value to mark as checked. But I couldn't succeed. I need your help on this matter.

This is my code. 

string kayit = "update mytablename set  tamamlandi=@tamamlandi

 if (txt_gorusme1.Text != string.Empty && txt_gorusme2.Text != string.Empty && txt_gorusme3.Text != string.Empty)
 {
     komut.Parameters.AddWithValue("@tamamlandi", true);
 }
 else
 {
     komut.Parameters.AddWithValue("@tamamlandi", DBNull.Value);
 }


Answers (1)