public bool CheckProjectFound(string argProjName, int argCompId) { bool bAns = false; try { argProjName = CommFun.Insert_SingleQuot(argProjName); string sSql = "Select CompetitorId From dbo.CompetitorDetails Where ProjectName='" + argProjName + "' and CompetitorId <> " + argCompId; SqlDataAdapter sda = new SqlDataAdapter(sSql, BsfGlobal.OpenCRMDB()); DataTable dt = new DataTable(); sda.Fill(dt); if (dt.Rows.Count > 0) { bAns = true; } sda.Dispose(); dt.Dispose(); BsfGlobal.g_CRMDB.Close(); } catch (Exception ex) { BsfGlobal.CustomException(ex.Message, ex.StackTrace); } return(bAns); }