public bool IsPackageExist(string packageName) { PackageData packageData = new PackageData(); StringBuilder strSql = new StringBuilder(); string strWhere = ""; if (!string.IsNullOrEmpty(packageName.Trim())) { strSql.AppendFormat(" PackageName = '{0}' ", packageName); } strWhere = strSql.ToString(); int cnt = packageData.GetRecordCount(strWhere); if (cnt > 0) { return(true); } else { return(false); } }