public static ProspectList GetProspectTypeByCompanyId(int companyId, int ProspectId, bool YesException)
    {
        ProspectList retval = new ProspectList();

        SqlParameter[] param = new SqlParameter[]{
            new SqlParameter("@CompanyId", companyId),
            new SqlParameter("@ProspectId", ProspectId),
            new SqlParameter("@Exclude", YesException)
        };

        using (SqlDataReader reader = SqlHelper.ExecuteReader(Helper.ConnectionString, CommandType.StoredProcedure, "app_Prospect_ProspectTypeByCompanyId", param))
        {
            while (reader.Read())
            {
                retval.Add(Read(reader));
            }
        }

        return retval;
    }
    public static ProspectList GetProspects_ByName(string sql, int page, int pageSize, out int count)
    {
        ProspectList retval = new ProspectList();

        SqlParameter pOut = new SqlParameter("@Count", SqlDbType.Int, 4);
        pOut.Direction = ParameterDirection.Output;

        SqlParameter[] param = new SqlParameter[]{
            new SqlParameter("@Sql", sql),
            new SqlParameter("@Page", page),
            new SqlParameter("@PageSize", pageSize),
            pOut
        };

        using (SqlDataReader reader = SqlHelper.ExecuteReader(Helper.ConnectionString, CommandType.StoredProcedure, "[GetProspects_ByName]", param))
        {
            while (reader.Read())
            {

                retval.Add(Read(reader));
            }
        }

        count = Helper.ToInt32(pOut.Value);

        return retval;
    }