/// <summary> /// SelectNumsOfMembers method /// - Select number of Member table rows by memberName /// </summary> /// <param name="memberName"></param> /// <returns></returns> public int SelectNumsOfMembers(string memberName) { try { using (connection) { connection.Open(); int ret = (int)MsSqlDataHelperFactory.SelectScalar(connection, CommandType.StoredProcedure, "Product.dbo.sp_Memberships_Select_Num_Of_Members_By_MemberName", MsSqlParameterHelperFactory.CreateParameter(providerName, "@MemberName", memberName, ParameterDirection.Input) ); return(ret); } } catch (Exception ex) { throw ex; } }
/// <summary> /// SelectNumsOfMembers method /// - Select number of Member table rows by memberName /// </summary> /// <param name="memberName"></param> /// <returns></returns> public int SelectNumsOfMembers(string memberName) { try { using (connection) { connection.Open(); int ret = (int)MsSqlDataHelperFactory.SelectScalar(connection, CommandType.Text, @"SELECT COUNT(*) " + @"FROM Product.dbo.Member " + @"WHERE MemberName like '%' + @MemberName + '%' ", MsSqlParameterHelperFactory.CreateParameter(providerName, "@MemberName", memberName, ParameterDirection.Input) ); return(ret); } } catch (Exception ex) { throw ex; } }