for (I = 0; I < ds.Tables[0].Rows.Count; I++)
{
if (Convert.ToBoolean(ds.Tables[0].Rows[I]["IsDefault"].ToString()) == true && Convert.ToBoolean(ds.Tables[0].Rows[I]["IsBill"].ToString()) == true)
.
.
.
.
Error: System.FormatException: String was not recognized as a valid Boolean.
Is default and IsBill are boolean values only
I think some values are null in your table.
You might have to use Convert.IsDBNull function to check whether the value is NULL.