public Boolean Exists(string name, string categoryid) { string SQL = "SELECT COUNT(*) FROM mst_subcategory WHERE name = '" + name + "' AND categoryid =" + categoryid; DBTool dbTool = new DBTool(); if (dbTool.GetCountRecord(SQL) > 0) { return true; } else { return false; } }
public Boolean Exists(string name) { string SQL = "SELECT COUNT(*) FROM mst_publisher WHERE name = '" + name + "'"; DBTool dbTool = new DBTool(); if (dbTool.GetCountRecord(SQL) > 0) { return true; } else { return false; } }