// Token: 0x060008C2 RID: 2242 RVA: 0x0003F144 File Offset: 0x0003D344
        protected override SqlCommand ComposeSelectCountCommand(NotificationItemFilter filter)
        {
            SqlCommand sqlCommand = new SqlCommand("SELECT COUNT(RenewalID) FROM NotificationMaintenanceRenewals LEFT JOIN NotificationItems ON \r\n                                         NotificationMaintenanceRenewals.RenewalID = NotificationItems.NotificationID");
            SqlCommand result;

            try
            {
                StringBuilder stringBuilder = new StringBuilder();
                if (!filter.IncludeAcknowledged)
                {
                    SqlHelper.AddCondition(stringBuilder, "AcknowledgedAt IS NULL", "AND");
                }
                if (!filter.IncludeIgnored)
                {
                    SqlHelper.AddCondition(stringBuilder, "Ignored=0", "AND");
                }
                MaintenanceRenewalFilter maintenanceRenewalFilter = filter as MaintenanceRenewalFilter;
                if (maintenanceRenewalFilter != null && !string.IsNullOrEmpty(maintenanceRenewalFilter.ProductTag))
                {
                    SqlHelper.AddCondition(stringBuilder, "ProductTag=@ProductTag", "AND");
                    sqlCommand.Parameters.AddWithValue("@ProductTag", maintenanceRenewalFilter.ProductTag);
                }
                SqlCommand sqlCommand2 = sqlCommand;
                sqlCommand2.CommandText += stringBuilder.ToString();
                result = sqlCommand;
            }
            catch (Exception ex)
            {
                sqlCommand.Dispose();
                NotificationItemDAL.log.Error(string.Format("Error while composing SELECT COUNT SQL command for {0}: ", base.GetType().Name) + ex.ToString());
                throw;
            }
            return(result);
        }
 // Token: 0x060008C5 RID: 2245 RVA: 0x0003F244 File Offset: 0x0003D444
 public static ICollection <MaintenanceRenewalItemDAL> GetItems(MaintenanceRenewalFilter filter)
 {
     return(NotificationItemDAL.GetItems <MaintenanceRenewalItemDAL>(filter));
 }