Exemple #1
0
        public async Task <IActionResult> Index(incParams incp, filter f, pclsfilter pclsf)
        {
            try
            {
                var dp = new dictParams()
                {
                    gr = new grdictParams()
                    {
                        f = f, incp = incp
                    },
                    pcls = new pclsdictParams()
                    {
                        indents = db.indent, f = pclsf, pclsinfo = await db.getPClass(pclsf.pclassPcls)
                    },
                    vtype = viewtype.pclass
                };

                if (pclsf.ispofsPcls)
                {
                    dp.pcls.indents = (from c in db.indents where c.gr_id == pclsf.pofsPcls select c).ToArray();
                }
                ViewBag.dp = dp;
                return(View(dp.pcls.pclsinfo));
            }
            catch (Exception ex)
            {
                ApplicationLogging.CreateLogger <flexesController>().LogError(new EventId(0), ex, ex.Message);
                return(BadRequest("Зверніться до розробника"));
            }
        }
        public async Task <IActionResult> Index(incParams incp, filter f, pclsfilter pclsf)
        {
            var dp = new dictParams()
            {
                gr = new grdictParams()
                {
                    f = f, incp = incp
                },
                pcls = new pclsdictParams()
                {
                    indents = db.indents, f = pclsf, pclsinfo = await db.getPClass(pclsf.pclassPcls)
                },
                vtype = viewtype.pclass
            };

            if (pclsf.ispofsPcls)
            {
                dp.pcls.indents = (from c in db.indents where c.gr_id == pclsf.pofsPcls select c).ToArray();
            }
            ViewBag.dp = dp;
            return(View(dp.pcls.pclsinfo));
        }