private bool IfProductsExists(Sqlconnection con, string productCode)
{
SqlDataAdapter sda = new SqlDataAdapter("Select 1 From [Store] WHERE [ProductCode]='" + productCode + "'", con);
DataTable dt = new DataTable();
sda.Fill(dt);
if (dt.Rows.Count > 0)
return true;
else
return false;
}
Comments
Post a Comment