internal static List<Tax> GetTaxes(int portalID)
{
List<Tax> colTaxs = null;
Tax Tax = null;
using (SqlConnection sqlConnection = new SqlConnection(CMSCoreBase.CMSCoreConnectionString))
{
SqlCommand sqlCommand = new SqlCommand(SN_TAX_GET_ALL, sqlConnection);
sqlCommand.CommandType = System.Data.CommandType.StoredProcedure;
SqlParameter sqlParameter = new SqlParameter();
sqlParameter = new SqlParameter(PN_TAX_PORTAL_ID, System.Data.SqlDbType.Int);
sqlParameter.Direction = System.Data.ParameterDirection.Input;
sqlParameter.Value = portalID;
sqlCommand.Parameters.Add(sqlParameter);
sqlCommand.Connection.Open();
using (SqlDataReader sqlDataReader = sqlCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection))
{
colTaxs = new List<Tax>();
while (sqlDataReader.Read())
{
Tax = GetTax(colTaxs, sqlDataReader);
FillFromReader(Tax, sqlDataReader);
}
sqlDataReader.Close();
sqlCommand.Connection.Close();
}
}
return colTaxs;
}