Esempio n. 1
0
 internal Pashto() : base("ps-AF")
 {
     EmptyTable     = "جدول خالي دی";
     Info           = $"د {START} څخه تر {END} پوري، له ټولو {TOTAL} څخه";
     InfoEmpty      = "د 0 څخه تر 0 پوري، له ټولو 0 څخه";
     InfoFiltered   = $"(لټول سوي له ټولو {MAX} څخه)";
     InfoPostFix    = "";
     InfoThousands  = ",";
     LengthMenu     = $"{MENU} کتاره وښايه";
     LoadingRecords = "منتظر اوسئ...";
     Processing     = "منتظر اوسئ...";
     Search         = "لټون:";
     ZeroRecords    = "د لټون مطابق معلومات و نه موندل سول";
     Paginate       = new Paginate
     {
         First    = "لومړۍ",
         Previous = "شاته",
         Next     = "بله",
         Last     = "وروستۍ",
     };
     Aria = new Aria
     {
         SortAscending  = ": په صعودي ډول مرتبول",
         SortDescending = ": په نزولي ډول مرتبول",
     };
 }
Esempio n. 2
0
 internal Welsh() : base("cy")
 {
     EmptyTable     = "Dim data ar gael yn y tabl";
     Info           = $"Dangos {START} i {END} o {TOTAL} cofnod";
     InfoEmpty      = "Dangos 0 i 0 o 0 cofnod";
     InfoFiltered   = $"(wedi hidlo o gyfanswm o {MAX} cofnod)";
     InfoPostFix    = "";
     InfoThousands  = ",";
     LengthMenu     = $"Dangos {MENU} cofnod";
     LoadingRecords = "Wrthi'n llwytho...";
     Processing     = "Wrthi'n prosesu...";
     Search         = "Chwilio:";
     ZeroRecords    = "Heb ddod o hyd i gofnodion sy'n cyfateb";
     Paginate       = new Paginate
     {
         First    = "Cyntaf",
         Previous = "Blaenorol",
         Next     = "Nesaf",
         Last     = "Olaf",
     };
     Aria = new Aria
     {
         SortAscending  = ": rhoi ar waith i drefnu colofnau o'r lleiaf i'r mwyaf",
         SortDescending = ": rhoi ar waith i drefnu colofnau o'r mwyaf i'r lleiaf",
     };
 }
Esempio n. 3
0
            public void PaginateSetsDocumentsInMetadata()
            {
                // Given
                List <IList <string> > content = new List <IList <string> >();
                Engine      engine             = new Engine();
                CountModule count = new CountModule("A")
                {
                    AdditionalOutputs = 7
                };
                Paginate paginate   = new Paginate(3, count);
                Execute  gatherData = new Execute((d, c) =>
                {
                    content.Add(d.Get <IList <IDocument> >(Keys.PageDocuments).Select(x => x.Content).ToList());
                    return(null);
                });

                engine.Pipelines.Add(paginate, gatherData);

                // When
                engine.Execute();

                // Then
                Assert.AreEqual(3, content.Count);
                CollectionAssert.AreEqual(new[] { "1", "2", "3" }, content[0]);
                CollectionAssert.AreEqual(new[] { "4", "5", "6" }, content[1]);
                CollectionAssert.AreEqual(new[] { "7", "8" }, content[2]);
            }
Esempio n. 4
0
        public void PaginateSetsCorrectMetadata()
        {
            // Given
            List<int> currentPage = new List<int>();
            List<int> totalPages = new List<int>();
            List<bool> hasNextPage = new List<bool>();
            List<bool> hasPreviousPage = new List<bool>();
            Engine engine = new Engine();
            engine.Trace.AddListener(new TestTraceListener());
            CountModule count = new CountModule("A")
            {
                AdditionalOutputs = 7
            };
            Paginate paginate = new Paginate(3, count);
            Execute gatherData = new Execute((d, c) =>
            {
                currentPage.Add(d.Get<int>(Keys.CurrentPage));
                totalPages.Add(d.Get<int>(Keys.TotalPages));
                hasNextPage.Add(d.Get<bool>(Keys.HasNextPage));
                hasPreviousPage.Add(d.Get<bool>(Keys.HasPreviousPage));
                return null;
            });
            engine.Pipelines.Add(paginate, gatherData);

            // When
            engine.Execute();

            // Then
            CollectionAssert.AreEqual(new[] { 1, 2, 3 }, currentPage);
            CollectionAssert.AreEqual(new[] { 3, 3, 3 }, totalPages);
            CollectionAssert.AreEqual(new[] { true, true, false }, hasNextPage);
            CollectionAssert.AreEqual(new[] { false, true, true }, hasPreviousPage);
        }
Esempio n. 5
0
 internal Galician() : base("gl")
 {
     EmptyTable     = "Ningún dato dispoñible nesta táboa";
     Info           = $"Mostrando rexistros do {START} ao {END} dun total de {TOTAL} rexistros";
     InfoEmpty      = "Mostrando rexistros do 0 ao 0 dun total de 0 rexistros";
     InfoFiltered   = $"(filtrado dun total de {MAX} rexistros)";
     InfoPostFix    = "";
     InfoThousands  = ",";
     LengthMenu     = $"Mostrar {MENU} rexistros";
     LoadingRecords = "Cargando...";
     Processing     = "Procesando...";
     Search         = "Buscar:";
     ZeroRecords    = "Non se atoparon resultados";
     Paginate       = new Paginate
     {
         First    = "Primeiro",
         Previous = "Anterior",
         Next     = "Seguinte",
         Last     = "Último",
     };
     Aria = new Aria
     {
         SortAscending  = ": Activar para ordenar a columna de maneira ascendente",
         SortDescending = ": Activar para ordenar a columna de maneira descendente",
     };
 }
Esempio n. 6
0
 internal Croatian() : base("hr")
 {
     EmptyTable     = "Nema podataka u tablici";
     Info           = $"Prikazano {START} do {END} od {TOTAL} rezultata";
     InfoEmpty      = "Prikazano 0 do 0 od 0 rezultata";
     InfoFiltered   = $"(filtrirano iz {MAX} ukupnih rezultata)";
     InfoPostFix    = "";
     InfoThousands  = ",";
     LengthMenu     = $"Prikaži {MENU} rezultata po stranici";
     LoadingRecords = "Dohvaćam...";
     Processing     = "Obrađujem...";
     Search         = "Pretraži:";
     ZeroRecords    = "Ništa nije pronađeno";
     Paginate       = new Paginate
     {
         First    = "Prva",
         Previous = "Nazad",
         Next     = "Naprijed",
         Last     = "Zadnja",
     };
     Aria = new Aria
     {
         SortAscending  = ": aktiviraj za rastući poredak",
         SortDescending = ": aktiviraj za padajući poredak",
     };
 }
Esempio n. 7
0
        public override ResponseStatus  GetMuti(object list_obj, Paginate paginate)
        {
            if (!(list_obj is List <Department>))
            {
                return(ResponseStatus.FAILED);
            }
            List <Department> list_Dep = (List <Department>)list_obj;

            dalBase.sql = "SELECT * FROM db_department";
            bool isSuccess = dalBase.Run(Behavious.SELECT_WITHOUT_PARAM, false);

            return(this.JudgeDBResult(isSuccess,
                                      () =>
            {
                while (dalBase.DataRead.Read())
                {
                    depInfo = new Department()
                    {
                        ID = Convert.ToInt32(dalBase.DataRead["depid"]),
                        Name = dalBase.DataRead["depname"].ToString(),
                        Introduce = dalBase.DataRead["depintroduction"].ToString(),
                        WeiboId = dalBase.DataRead["weiboId"] != DBNull.Value?
                                  dalBase.DataRead["weiboId"].ToString():"0"
                    };
                    list_Dep.Add(depInfo);
                }
            }, null));
        }
        public static async Task <IPaginate <T> > ToPaginateAsync <T>(this IQueryable <T> source, int index, int size,
                                                                      int from = 0, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (from > index)
            {
                throw new ArgumentException($"From: {from} > Index: {index}, must From <= Index");
            }

            var count = await source.CountAsync(cancellationToken).ConfigureAwait(false);

            var items = await source.Skip((index - from) *size)
                        .Take(size).ToListAsync(cancellationToken).ConfigureAwait(false);

            var list = new Paginate <T>
            {
                Index = index,
                Size  = size,
                From  = from,
                Count = count,
                Items = items,
                Pages = (int)Math.Ceiling(count / (double)size)
            };

            return(list);
        }
Esempio n. 9
0
        public IHttpActionResult GetProduct(SProducts sProducts)
        {
            if (sProducts == null)
            {
                sProducts            = new SProducts();
                sProducts.CategoryId = 0;
                sProducts.KeyWord    = "";
            }

            var products = productDO.TakeProduct(sProducts.CategoryId, sProducts.KeyWord, sProducts.Page, sProducts.Size);
            var paginate = new Paginate()
            {
                CurrentPage = sProducts.Page,
                PageSize    = sProducts.Size,
                TotalPage   = productDO.GetTotalPage(sProducts.Size, sProducts.CategoryId, sProducts.KeyWord)
            };

            return(Json(new
            {
                success = true,
                message = "acction success",
                data = products,
                paginate = paginate
            }));
        }
Esempio n. 10
0
        public ResponseStatus PermissionNewUser(HttpRequestBase req, Paginate userPaginate,
                                                Container_list_UserWaitForPass conTa_list_u_Sta)
        {
            UserDAL userDAL = new UserDAL();

            if (req.Form.Count > 0)
            {
                List <string> list_userID = new List <string>();
                for (int i = 0; i < req.Form.Count; ++i)
                {
                    list_userID.Add(req.Form.AllKeys[i]);
                }
                userDAL.SetWaitForPass(list_userID);
            }

            conTa_list_u_Sta.list_UserStatus = userDAL.GetWaitForPass(req.Cookies[GLB.userId].Value, userPaginate);
            conTa_list_u_Sta.paginate        = userPaginate;
            userDAL.ReturnUnitToPool();
            if (conTa_list_u_Sta.list_UserStatus != null && conTa_list_u_Sta.list_UserStatus.Count > 0)
            {
                return(ResponseStatus.SUCCESS);
            }
            else
            {
                return(ResponseStatus.NOT_PERMIS_NEWUSER);
            }
        }
Esempio n. 11
0
 internal Swahili() : base("sw")
 {
     EmptyTable     = "Hakuna data iliyo patikana";
     Info           = $"Inaonyesha {START} mpaka {END} ya matokeo {TOTAL}";
     InfoEmpty      = "Inaonyesha 0 hadi 0 ya matokeo 0";
     InfoFiltered   = $"(uschujo kutoka matokeo idadi {MAX})";
     InfoPostFix    = "";
     InfoThousands  = ",";
     LengthMenu     = $"Onyesha {MENU} matokeo";
     LoadingRecords = "Inapakia...";
     Processing     = "Processing...";
     Search         = "Tafuta:";
     ZeroRecords    = "Rekodi vinavyolingana haziku patikana";
     Paginate       = new Paginate
     {
         First    = "Mwanzo",
         Previous = "Kabla",
         Next     = "Ijayo",
         Last     = "Mwisho",
     };
     Aria = new Aria
     {
         SortAscending  = ": seti kulainisha sanjari kwa mtindo wa upandaji",
         SortDescending = ": seti kulainisha sanjari kwa mtindo wa mteremko",
     };
 }
Esempio n. 12
0
 internal Swedish() : base("sv")
 {
     EmptyTable     = "Tabellen innehåller ingen data";
     Info           = $"Visar {START} till {END} av totalt {TOTAL} rader";
     InfoEmpty      = "Visar 0 till 0 av totalt 0 rader";
     InfoFiltered   = $"(filtrerade från totalt {MAX} rader)";
     InfoPostFix    = "";
     InfoThousands  = " ";
     LengthMenu     = $"Visa {MENU} rader";
     LoadingRecords = "Laddar...";
     Processing     = "Bearbetar...";
     Search         = "Sök:";
     ZeroRecords    = "Hittade inga matchande resultat";
     Paginate       = new Paginate
     {
         First    = "Första",
         Previous = "Föregående",
         Next     = "Nästa",
         Last     = "Sista",
     };
     Aria = new Aria
     {
         SortAscending  = ": aktivera för att sortera kolumnen i stigande ordning",
         SortDescending = ": aktivera för att sortera kolumnen i fallande ordning",
     };
 }
Esempio n. 13
0
        public async IAsyncEnumerable <ListResponse <AppUserVM> > UserList(
            AppUserFilter filter,
            AppUserSort sort,
            Paginate paginate)
        {
            yield return(await HubHelper.WrapAsync(_logger, async() =>
            {
                IQueryable <AppUser> query = _db.Users
                                             .Include(m => m.UserClaims)
                                             .Include(m => m.UserRoles)
                                             .ThenInclude(m => m.Role);

                switch (sort)
                {
                case AppUserSort.EmailAsc:
                    query = query.OrderBy(m => m.Email);
                    break;

                case AppUserSort.EmailDesc:
                    query = query.OrderByDescending(m => m.Email);
                    break;
                }

                if (!string.IsNullOrEmpty(filter.Email))
                {
                    query = query.Where(m => EF.Functions.ILike(m.Email, $"%{filter.Email}%"));
                }

                return await PaginationHelper.FromQueryAsync <AppUser, AppUserVM>(paginate, query);
            }));
        }
Esempio n. 14
0
 internal Mongolian() : base("mn-Cyrl")
 {
     EmptyTable     = "Хүснэгт хоосон байна";
     Info           = $"Нийт {TOTAL} бичлэгээс {START} - {END} харуулж байна";
     InfoEmpty      = "Тохирох үр дүн алга";
     InfoFiltered   = $"(нийт {MAX} бичлэгээс шүүв)";
     InfoPostFix    = "";
     InfoThousands  = ",";
     LengthMenu     = $"Дэлгэцэд {MENU} бичлэг харуулна";
     LoadingRecords = "Ачааллаж байна...";
     Processing     = "Боловсруулж байна...";
     Search         = "Хайлт:";
     ZeroRecords    = "Тохирох бичлэг олдсонгүй";
     Paginate       = new Paginate
     {
         First    = "Эхнийх",
         Previous = "Дараах",
         Next     = "Өмнөх",
         Last     = "Сүүлийнх",
     };
     Aria = new Aria
     {
         SortAscending  = ": цагаан толгойн дарааллаар эрэмбэлэх",
         SortDescending = ": цагаан толгойн эсрэг дарааллаар эрэмбэлэх",
     };
 }
Esempio n. 15
0
 internal Slovenian() : base("sl")
 {
     EmptyTable     = "Nobenih podatkov ni na voljo";
     Info           = $"Prikazujem {START} do {END} od {TOTAL} zapisov";
     InfoEmpty      = "Prikazujem 0 do 0 od 0 zapisov";
     InfoFiltered   = $"(filtrirano od {MAX} vseh zapisov)";
     InfoPostFix    = "";
     InfoThousands  = ",";
     LengthMenu     = $"Prikaži {MENU} zapisov";
     LoadingRecords = "Nalagam...";
     Processing     = "Obdelujem...";
     Search         = "Išči:";
     ZeroRecords    = "Nobeden zapis ne ustreza";
     Paginate       = new Paginate
     {
         First    = "Prvi",
         Previous = "Pred.",
         Next     = "Nasl.",
         Last     = "Zadnji",
     };
     Aria = new Aria
     {
         SortAscending  = ": vključite za naraščujoči sort",
         SortDescending = ": vključite za padajoči sort",
     };
 }
Esempio n. 16
0
 internal Uzbek() : base("uz-Latn")
 {
     EmptyTable     = "Ma'lumot yo'q";
     Info           = $"Umumiy {TOTAL} yozuvlarlardan {START} dan {END} gachasi ko'rsatilmoqda";
     InfoEmpty      = "Umumiy 0 yozuvlardan 0 dan 0 gachasi ko'rsatilmoqda";
     InfoFiltered   = $"({MAX} yozuvlardan filtrlandi)";
     InfoPostFix    = "";
     InfoThousands  = null;
     LengthMenu     = $"{MENU} ta yozuvlarni ko'rsat";
     LoadingRecords = "Yozuvlar yuklanmoqda...";
     Processing     = "Ishlayapman...";
     Search         = "Izlash:";
     ZeroRecords    = "Ma'lumot yo'q.";
     Paginate       = new Paginate
     {
         First    = "Birinchi",
         Previous = "Avvalgi",
         Next     = "Keyingi",
         Last     = "Son'ggi",
     };
     Aria = new Aria
     {
         SortAscending  = ": to'g'ri tartiblash",
         SortDescending = ": teskari tartiblash",
     };
 }
Esempio n. 17
0
 internal Basque() : base("eu")
 {
     EmptyTable     = "Taula hontan ez dago inongo datu erabilgarririk";
     Info           = $"{START} -etik {END} -erako erregistroak erakusten, guztira {TOTAL} erregistro";
     InfoEmpty      = "0tik 0rako erregistroak erakusten, guztira 0 erregistro";
     InfoFiltered   = $"(guztira {MAX} erregistro iragazten)";
     InfoPostFix    = "";
     InfoThousands  = ",";
     LengthMenu     = $"Erakutsi {MENU} erregistro";
     LoadingRecords = "Abiarazten...";
     Processing     = "Prozesatzen...";
     Search         = "Aurkitu:";
     ZeroRecords    = "Ez da emaitzarik aurkitu";
     Paginate       = new Paginate
     {
         First    = "Lehena",
         Previous = "Aurrekoa",
         Next     = "Hurrengoa",
         Last     = "Azkena",
     };
     Aria = new Aria
     {
         SortAscending  = ": Zutabea goranzko eran ordenatzeko aktibatu ",
         SortDescending = ": Zutabea beheranzko eran ordenatzeko aktibatu",
     };
 }
Esempio n. 18
0
 internal Amharic() : base("am")
 {
     EmptyTable     = "ባዶ ሰንጠረዥ";
     Info           = $"ከጠቅላላው {TOTAL} ዝርዝሮች ውስጥ ከ {START} እስከ {END} ያሉት ዝርዝር";
     InfoEmpty      = "ከጠቅላላው 0 ዝርዝሮች ውስጥ ከ 0 እስከ 0 ያሉት ዝርዝር";
     InfoFiltered   = $"(ከጠቅላላው {MAX} የተመረጡ ዝርዝሮች)";
     InfoPostFix    = "";
     InfoThousands  = ",";
     LengthMenu     = $"የዝርዝሮች ብዛት {MENU}";
     LoadingRecords = "በማቅረብ ላይ...";
     Processing     = "በማቀናበር ላይ...";
     Search         = "ፈልግ:";
     ZeroRecords    = "ከሚፈለገው ጋር የሚሚሳሰል ዝርዝር አልተገኘም";
     Paginate       = new Paginate
     {
         First    = "መጀመሪያ",
         Previous = "የበፊቱ",
         Next     = "ቀጣዩ",
         Last     = "መጨረሻ",
     };
     Aria = new Aria
     {
         SortAscending  = ": ከመጀመሪያ ወደ መጨረሻ(ወጪ) አደራደር",
         SortDescending = ": ከመጨረሻ ወደ መጀመሪያ(ወራጅ) አደራደር",
     };
 }
Esempio n. 19
0
 internal French() : base("fr-FR")
 {
     EmptyTable     = "Aucune donn&eacute;e disponible dans le tableau";
     Info           = $"Affichage de l'&eacute;l&eacute;ment {START} &agrave; {END} sur {TOTAL} &eacute;l&eacute;ments";
     InfoEmpty      = "Affichage de l'&eacute;l&eacute;ment 0 &agrave; 0 sur 0 &eacute;l&eacute;ment";
     InfoFiltered   = $"(filtr&eacute; de {MAX} &eacute;l&eacute;ments au total)";
     InfoPostFix    = "";
     InfoThousands  = null;
     LengthMenu     = $"Afficher {MENU} &eacute;l&eacute;ments";
     LoadingRecords = "Chargement en cours...";
     Processing     = "Traitement en cours...";
     Search         = "Rechercher&nbsp;:";
     ZeroRecords    = "Aucun &eacute;l&eacute;ment &agrave; afficher";
     Paginate       = new Paginate
     {
         First    = "Premier",
         Previous = "Pr&eacute;c&eacute;dent",
         Next     = "Suivant",
         Last     = "Dernier",
     };
     Aria = new Aria
     {
         SortAscending  = ": activer pour trier la colonne par ordre croissant",
         SortDescending = ": activer pour trier la colonne par ordre d&eacute;croissant",
     };
     Select = new Select
     {
         Rows = new Rows
         {
             Multiple = "%d lignes s&eacute;lectionn&eacute;es",
             Single   = "1 ligne s&eacute;lectionn&eacute;e",
             None     = "Aucune ligne s&eacute;lectionn&eacute;e",
         },
     };
 }
Esempio n. 20
0
 internal Korean() : base("ko")
 {
     EmptyTable     = "데이터가 없습니다";
     Info           = $"{START} - {END} / {TOTAL}";
     InfoEmpty      = "0 - 0 / 0";
     InfoFiltered   = $"(총 {MAX} 개)";
     InfoPostFix    = "";
     InfoThousands  = ",";
     LengthMenu     = $"페이지당 줄수 {MENU}";
     LoadingRecords = "읽는중...";
     Processing     = "처리중...";
     Search         = "검색:";
     ZeroRecords    = "검색 결과가 없습니다";
     Paginate       = new Paginate
     {
         First    = "처음",
         Previous = "이전",
         Next     = "다음",
         Last     = "마지막",
     };
     Aria = new Aria
     {
         SortAscending  = ": 오름차순 정렬",
         SortDescending = ": 내림차순 정렬",
     };
 }
            public void ExcludesDocumentsThatFailPredicate()
            {
                // Given
                List <IList <string> > content = new List <IList <string> >();
                Engine      engine             = new Engine();
                CountModule count = new CountModule("A")
                {
                    AdditionalOutputs = 7
                };
                Paginate paginate   = new Paginate(3, count).Where((doc, ctx) => doc.Content != "5");
                Execute  gatherData = new Execute(
                    (d, c) =>
                {
                    content.Add(d.Get <IList <IDocument> >(Keys.PageDocuments).Select(x => x.Content).ToList());
                    return(null);
                }, false);

                engine.Pipelines.Add(paginate, gatherData);

                // When
                engine.Execute();

                // Then
                Assert.AreEqual(3, content.Count);
                CollectionAssert.AreEqual(new[] { "1", "2", "3" }, content[0]);
                CollectionAssert.AreEqual(new[] { "4", "6", "7" }, content[1]);
                CollectionAssert.AreEqual(new[] { "8" }, content[2]);
            }
Esempio n. 22
0
            public void PaginateSetsCorrectMetadata()
            {
                // Given
                List <int>  currentPage     = new List <int>();
                List <int>  totalPages      = new List <int>();
                List <bool> hasNextPage     = new List <bool>();
                List <bool> hasPreviousPage = new List <bool>();
                Engine      engine          = new Engine();
                CountModule count           = new CountModule("A")
                {
                    AdditionalOutputs = 7
                };
                Paginate paginate   = new Paginate(3, count);
                Execute  gatherData = new Execute((d, c) =>
                {
                    currentPage.Add(d.Get <int>(Keys.CurrentPage));
                    totalPages.Add(d.Get <int>(Keys.TotalPages));
                    hasNextPage.Add(d.Get <bool>(Keys.HasNextPage));
                    hasPreviousPage.Add(d.Get <bool>(Keys.HasPreviousPage));
                    return(null);
                });

                engine.Pipelines.Add(paginate, gatherData);

                // When
                engine.Execute();

                // Then
                CollectionAssert.AreEqual(new[] { 1, 2, 3 }, currentPage);
                CollectionAssert.AreEqual(new[] { 3, 3, 3 }, totalPages);
                CollectionAssert.AreEqual(new[] { true, true, false }, hasNextPage);
                CollectionAssert.AreEqual(new[] { false, true, true }, hasPreviousPage);
            }
            public void SetsPreviousAndNextDocuments()
            {
                // Given
                List <IList <string> > previousPages = new List <IList <string> >();
                List <IList <string> > nextPages     = new List <IList <string> >();
                Engine      engine = new Engine();
                CountModule count  = new CountModule("A")
                {
                    AdditionalOutputs = 7
                };
                Paginate paginate   = new Paginate(3, count);
                Execute  gatherData = new Execute(
                    (d, c) =>
                {
                    previousPages.Add(d.Document(Keys.PreviousPage)?.Get <IList <IDocument> >(Keys.PageDocuments).Select(x => x.Content).ToList());
                    nextPages.Add(d.Document(Keys.NextPage)?.Get <IList <IDocument> >(Keys.PageDocuments).Select(x => x.Content).ToList());
                    return(null);
                }, false);

                engine.Pipelines.Add(paginate, gatherData);

                // When
                engine.Execute();

                // Then
                Assert.AreEqual(3, previousPages.Count);
                Assert.AreEqual(3, nextPages.Count);
                CollectionAssert.AreEqual(null, previousPages[0]);
                CollectionAssert.AreEqual(new[] { "1", "2", "3" }, previousPages[1]);
                CollectionAssert.AreEqual(new[] { "4", "5", "6" }, previousPages[2]);
                CollectionAssert.AreEqual(new[] { "4", "5", "6" }, nextPages[0]);
                CollectionAssert.AreEqual(new[] { "7", "8" }, nextPages[1]);
                CollectionAssert.AreEqual(null, nextPages[2]);
            }
Esempio n. 24
0
 internal Afrikaans() : base("af")
 {
     EmptyTable     = "Geen data beskikbaar in tabel";
     Info           = $"uitstalling {START} to {END} of {TOTAL} inskrywings";
     InfoEmpty      = "uitstalling 0 to 0 of 0 inskrywings";
     InfoFiltered   = $"(gefiltreer uit {MAX} totaal inskrywings)";
     InfoPostFix    = "";
     InfoThousands  = ",";
     LengthMenu     = $"uitstal {MENU} inskrywings";
     LoadingRecords = "laai...";
     Processing     = "verwerking...";
     Search         = "soektog:";
     ZeroRecords    = "Geen treffers gevind";
     Paginate       = new Paginate
     {
         First    = "eerste",
         Previous = "vorige",
         Next     = "volgende",
         Last     = "laaste",
     };
     Aria = new Aria
     {
         SortAscending  = ": aktiveer kolom stygende te sorteer",
         SortDescending = ": aktiveer kolom orde te sorteer",
     };
 }
Esempio n. 25
0
 internal Ukrainian() : base("uk")
 {
     EmptyTable     = null;
     Info           = $"Записи з {START} по {END} із {TOTAL} записів";
     InfoEmpty      = "Записи з 0 по 0 із 0 записів";
     InfoFiltered   = $"(відфільтровано з {MAX} записів)";
     InfoPostFix    = "";
     InfoThousands  = null;
     LengthMenu     = $"Показати {MENU} записів";
     LoadingRecords = null;
     Processing     = "Зачекайте...";
     Search         = "Пошук:";
     ZeroRecords    = "Записи відсутні.";
     Paginate       = new Paginate
     {
         First    = "Перша",
         Previous = "Попередня",
         Next     = "Наступна",
         Last     = "Остання",
     };
     Aria = new Aria
     {
         SortAscending  = ": активувати для сортування стовпців за зростанням",
         SortDescending = ": активувати для сортування стовпців за спаданням",
     };
 }
Esempio n. 26
0
        public void PaginateSetsDocumentsInMetadata()
        {
            // Given
            List<IList<string>> content = new List<IList<string>>();
            Engine engine = new Engine();
            engine.Trace.AddListener(new TestTraceListener());
            CountModule count = new CountModule("A")
            {
                AdditionalOutputs = 7
            };
            Paginate paginate = new Paginate(3, count);
            Execute gatherData = new Execute((d, c) =>
            {
                content.Add(d.Get<IList<IDocument>>(Keys.PageDocuments).Select(x => x.Content).ToList());
                return null;
            });
            engine.Pipelines.Add(paginate, gatherData);

            // When
            engine.Execute();

            // Then
            Assert.AreEqual(3, content.Count);
            CollectionAssert.AreEqual(new[] { "1", "2", "3" }, content[0]);
            CollectionAssert.AreEqual(new[] { "4", "5", "6" }, content[1]);
            CollectionAssert.AreEqual(new[] { "7", "8" }, content[2]);
        }
Esempio n. 27
0
 internal Persian() : base("fa")
 {
     EmptyTable     = "هیچ داده ای در جدول وجود ندارد";
     Info           = $"نمایش {START} تا {END} از {TOTAL} رکورد";
     InfoEmpty      = "نمایش 0 تا 0 از 0 رکورد";
     InfoFiltered   = $"(فیلتر شده از {MAX} رکورد)";
     InfoPostFix    = "";
     InfoThousands  = ",";
     LengthMenu     = $"نمایش {MENU} رکورد";
     LoadingRecords = "در حال بارگزاری...";
     Processing     = "در حال پردازش...";
     Search         = "جستجو:";
     ZeroRecords    = "رکوردی با این مشخصات پیدا نشد";
     Paginate       = new Paginate
     {
         First    = "ابتدا",
         Previous = "قبلی",
         Next     = "بعدی",
         Last     = "انتها",
     };
     Aria = new Aria
     {
         SortAscending  = ": فعال سازی نمایش به صورت صعودی",
         SortDescending = ": فعال سازی نمایش به صورت نزولی",
     };
 }
Esempio n. 28
0
 internal Italian() : base("it-it")
 {
     EmptyTable     = "Nessun dato presente nella tabella";
     Info           = $"Vista da {START} a {END} di {TOTAL} elementi";
     InfoEmpty      = "Vista da 0 a 0 di 0 elementi";
     InfoFiltered   = $"(filtrati da {MAX} elementi totali)";
     InfoPostFix    = "";
     InfoThousands  = ".";
     LengthMenu     = $"Visualizza {MENU} elementi";
     LoadingRecords = "Caricamento...";
     Processing     = "Elaborazione...";
     Search         = "Cerca:";
     ZeroRecords    = "La ricerca non ha portato alcun risultato.";
     Paginate       = new Paginate
     {
         First    = "Inizio",
         Previous = "Precedente",
         Next     = "Successivo",
         Last     = "Fine",
     };
     Aria = new Aria
     {
         SortAscending  = ": attiva per ordinare la colonna in ordine crescente",
         SortDescending = ": attiva per ordinare la colonna in ordine decrescente",
     };
 }
Esempio n. 29
0
 internal Tamil() : base("ta")
 {
     EmptyTable     = "அட்டவணையில் தரவு கிடைக்கவில்லை";
     Info           = $"உள்ளீடுகளை் {START} முதல {END} உள்ள {TOTAL} காட்டும்";
     InfoEmpty      = "0 உள்ளீடுகளை 0 0 காட்டும்";
     InfoFiltered   = $"({MAX} மொத்த உள்ளீடுகளை இருந்து வடிகட்டி)";
     InfoPostFix    = "";
     InfoThousands  = ",";
     LengthMenu     = $"{MENU} காண்பி";
     LoadingRecords = "ஏற்றுகிறது ...";
     Processing     = "செயலாக்க ...";
     Search         = "தேடல்:";
     ZeroRecords    = "பொருத்தமான பதிவுகள் இல்லை";
     Paginate       = new Paginate
     {
         First    = "முதல்",
         Previous = "முந்தைய",
         Next     = "அடுத்து",
         Last     = "இறுதி",
     };
     Aria = new Aria
     {
         SortAscending  = ": நிரலை ஏறுவரிசையில் வரிசைப்படுத்த செயல்படுத்த",
         SortDescending = ": நிரலை இறங்கு வரிசைப்படுத்த செயல்படுத்த",
     };
 }
Esempio n. 30
0
 internal NorwegianNynorsk() : base("nn")
 {
     EmptyTable     = "Inga data tilgjengeleg i tabellen";
     Info           = $"Syner {START} til {END} av {TOTAL} linjer";
     InfoEmpty      = "Syner 0 til 0 av 0 linjer";
     InfoFiltered   = $"(filtrert frå {MAX} totalt antal linjer)";
     InfoPostFix    = "";
     InfoThousands  = " ";
     LengthMenu     = $"Syn {MENU} linjer";
     LoadingRecords = "Lastar...";
     Processing     = "Lastar...";
     Search         = "S&oslash;k:";
     ZeroRecords    = "Inga linjer treff p&aring; s&oslash;ket";
     Paginate       = new Paginate
     {
         First    = "Fyrste",
         Previous = "Forrige",
         Next     = "Neste",
         Last     = "Siste",
     };
     Aria = new Aria
     {
         SortAscending  = ": aktiver for å sortere kolonna stigande",
         SortDescending = ": aktiver for å sortere kolonna synkande",
     };
 }
Esempio n. 31
0
        //public static ArticleDAL Instance()
        //{
        //    if (arDal == null)
        //    {
        //        arDal = new ArticleDAL();
        //    }
        //    return arDal;
        //}

        public void GetAll(Paginate arPage)
        {
            dalBase.sql = "SELECT COUNT(*) FROM db_article  WHERE ispass=1 AND publishTime <= CURDATE()";
            dalBase.Run(Behavious.SELECT_WITHOUT_PARAM, false);
            dalBase.DataRead.Read();
            arPage.TotalRecords = int.Parse(dalBase.DataRead[0].ToString());

            int start       = arPage.StartRow;
            int perPageSize = arPage.PageSize;

            dalBase.sql = string.Format("SELECT * FROM db_article   WHERE ispass=1 AND publishTime <= CURDATE() ORDER BY id DESC  LIMIT {0},{1}", start, perPageSize);
            dalBase.Run(Behavious.SELECT_WITHOUT_PARAM, false);
            list_ArticleInfo.Clear();
            while (dalBase.DataRead.Read())
            {
                articleInfo = new Article()
                {
                    ID      = Convert.ToInt32(dalBase.DataRead["id"]),
                    Title   = dalBase.DataRead["title"].ToString(),
                    Summary = dalBase.DataRead["summary"].ToString(),
                    //Body = dalBase.MySqldr["body"].ToString(),
                    PublishTime = Convert.ToDateTime(dalBase.DataRead["publishTime"].ToString()),
                    Author      = dalBase.DataRead["author"].ToString(),
                    //ReprintName = mySqldr["reprintName"].ToString(),
                    //ReprintAdress = mySqldr["reprintAdress"].ToString()
                };
                list_ArticleInfo.Add(articleInfo);
            }
            dalBase.CloseConnect();
        }
Esempio n. 32
0
 internal PortugueseBrasil() : base("pt-BR")
 {
     EmptyTable     = "Nenhum registro encontrado";
     Info           = $"Mostrando de {START} até {END} de {TOTAL} registros";
     InfoEmpty      = "Mostrando 0 até 0 de 0 registros";
     InfoFiltered   = $"(Filtrados de {MAX} registros)";
     InfoPostFix    = "";
     InfoThousands  = ".";
     LengthMenu     = $"{MENU} resultados por página";
     LoadingRecords = "Carregando...";
     Processing     = "Processando...";
     Search         = "Pesquisar";
     ZeroRecords    = "Nenhum registro encontrado";
     Paginate       = new Paginate
     {
         First    = "Primeiro",
         Previous = "Anterior",
         Next     = "Próximo",
         Last     = "Último",
     };
     Aria = new Aria
     {
         SortAscending  = ": Ordenar colunas de forma ascendente",
         SortDescending = ": Ordenar colunas de forma descendente",
     };
     Select = new Select
     {
         Rows = new Rows
         {
             Multiple = "Selecionado %d linhas",
             Single   = "Selecionado 1 linha",
             None     = "Nenhuma linha selecionada",
         },
     };
 }
Esempio n. 33
0
            public void ExcludesDocumentsThatFailPredicate()
            {
                // Given
                List<IList<string>> content = new List<IList<string>>();
                Engine engine = new Engine();
                CountModule count = new CountModule("A")
                {
                    AdditionalOutputs = 7
                };
                Paginate paginate = new Paginate(3, count).Where((doc, ctx) => doc.Content != "5");
                Execute gatherData = new Execute((d, c) =>
                {
                    content.Add(d.Get<IList<IDocument>>(Keys.PageDocuments).Select(x => x.Content).ToList());
                    return null;
                });
                engine.Pipelines.Add(paginate, gatherData);

                // When
                engine.Execute();

                // Then
                Assert.AreEqual(3, content.Count);
                CollectionAssert.AreEqual(new[] { "1", "2", "3" }, content[0]);
                CollectionAssert.AreEqual(new[] { "4", "6", "7" }, content[1]);
                CollectionAssert.AreEqual(new[] { "8" }, content[2]);
            }