public int GetCountNotifications( ENotificationStatus status, NotificationPriorityM priority, NotificationTypeM type, string filterText, int?countInPage = 100, int?pageNum = null) { using (ISQLCommand sqlCmd = _app.SqlWork()) { sqlCmd.sql = @"SELECT count(*) as cnt FROM notification.view_user_notifications"; sqlCmd.sql += " WHERE 1=1"; string where = GenerateWhereSQL(status, priority, type, filterText); sqlCmd.sql += where; sqlCmd.sql += ";"; try { return(sqlCmd.ExecuteScalar <int>()); } catch (Exception ex) { throw ex; } } }