Esempio n. 1
0
        public async Task <IViewComponentResult> InvokeAsync(grdictParams dp)
        {
            try
            {
                dp.page = await db.getPage(dp.f, dp.incp.currentPage, 100);

                return(View("wordsList", dp));
            }
            catch (Exception ex)
            {
                ApplicationLogging.CreateLogger <wordsList>().LogError(new EventId(0), ex, ex.Message);
                throw new Exception("Помилка БД. Зверніться до розробника");
            }
        }
Esempio n. 2
0
        public async Task <ActionResult> Search(incParams incp, filter f)
        {
            var dpg = new grdictParams()
            {
                f = f, incp = incp
            };

            await SearchData(incp.wordSearch, incp, f, dpg);

            ViewBag.dp = new dictParams()
            {
                gr = dpg, vtype = viewtype.dict
            };
            return(Redirect(Url.Action("SearchWord", "inflection",
                                       new { isStrFiltering = f.isStrFiltering, str = f.str, isInverse = f.isInverse, ispclass = f.ispclass, pclass = f.pclass, ispofs = f.ispofs, pofs = f.pofs, currentPage = incp.currentPage, wordSearch = incp.wordSearch, wid = incp.wid, count = dpg.count, maxpage = dpg.maxpage }, null, null, $"wid-{incp.wid}")));
        }
Esempio n. 3
0
        public async Task <ActionResult> Search(incParams incp, filter f)
        {
            try
            {
                var dpg = new grdictParams()
                {
                    f = f, incp = incp
                };
                await SearchData(incp.wordSearch, incp, f, dpg);

                ViewBag.dp = new dictParams()
                {
                    gr = dpg, vtype = viewtype.dict
                };
                return(Redirect(Url.Action("SearchWord", "inflection",
                                           new { isStrFiltering = f.isStrFiltering, str = f.str, isInverse = f.isInverse, ispclass = f.ispclass, pclass = f.pclass, ispofs = f.ispofs, pofs = f.pofs, currentPage = incp.currentPage, wordSearch = incp.wordSearch, wid = incp.wid, count = dpg.count, maxpage = dpg.maxpage }, null, null, $"wid-{incp.wid}")));
            }
            catch (Exception ex)
            {
                ApplicationLogging.CreateLogger <inflectionController>().LogError(new EventId(0), ex, ex.Message);
                return(BadRequest("Зверніться до розробника"));
            }
        }
Esempio n. 4
0
        public async Task <IViewComponentResult> InvokeAsync(grdictParams dp)
        {
            dp.page = await db.getPage(dp.f, dp.incp.currentPage, 100);

            return(View("wordsList", dp));
        }