Ejemplo n.º 1
0
        public async Task <IActionResult> EventReport()
        {
            var vm = new ViewModel.InformationViewModel();
            // await FInformtionSErvices.AddAsync(vmodel.Information);
            var x = await FreportServices.GetAllReportAsync();

            if (x.Any())
            {
                ViewBag.Error = true;
                foreach (var item in x)
                {
                    vm.ReportList.Add(new WebEventoo_DomainClasses.Model.Report
                    {
                        Event      = item.Event,
                        RoleReport = WebEventoo_DomainClasses.Model.Report.TypeReport.ReportEvent,

                        CaptionReport = item.CaptionReport
                    });
                    if (vm.ReportList.Count < 0)
                    {
                        ViewBag.Count = 0;
                    }
                    if (vm.ReportList.Count > 0)
                    {
                        ViewBag.Count = vm.ReportList.Count;
                    }
                    return(View(vm));
                }
            }
            ViewBag.Error = false;
            return(View(vm));
        }