i have a problem with my code c# where statements **
if (i >0)
{
MessageBox.Show("data ada");
}
** is not working.. maybe anyone in here can help me please :)
if (pk_nama.Text == "" || pk_umur.Text == "" || pk_jenkel.Text == "" || pk_level.Text == "" || pk_alamat.Text == "")
{
MessageBox.Show("Isi data dulu");
}
else
{
MySqlConnection conn = konek.sambungkan();
conn.Open();
String query = "select * from tb_pekerja where pk_nama =' " + pk_nama.Text + " '";
MySqlCommand cmde=new MySqlCommand(query, conn);
dt = new DataTable();
da = new MySqlDataAdapter(query, conn);
da.Fill(dt);
int i = Convert.ToInt32(dt.Rows.Count.ToString());
if (i >0)
{
MessageBox.Show("data ada");
}
else
{
if (String.IsNullOrWhiteSpace(id_pekerja.Text))
}
}