public ActionResult ReportSheet(FormCollection fm)
        {
            var capture = fm["ExamId"];

            if (capture.IsEmpty())
            {
                ViewBag.ExamId = new SelectList(_examinationRepository.GetExaminations.OrderBy(x => x.Name).ToList(), "Id", "Name");
                return(View());
            }

            int capture2 = int.Parse(capture);
            var data     =
                _examinationRepository.GetResultManagers.Where(x => x.Examination.Id == capture2)
                .OrderByDescending(x => x.StarTime)
                .ToList();
            var info = new ReportSheet
            {
                ExamName      = _examinationRepository.GetExaminationData(capture2).Name,
                TotalAttempts = data.Count,
                ResultList    = data
            };

            ViewBag.NeededExamId = capture2;
            return(View(info));// ReportSheet(info);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 清除元素的内容
        /// </summary>
        /// <param name="ELement"></param>
        public void DelContent(GridElement Element)
        {
            if (Element == null)
            {
                return;
            }

            Cell Cell = ReportSheet.GetCellFromTag(null, Element.Index);

            Cell.Value = null;
            Cell.Tag   = null;
        }
Exemplo n.º 3
0
        /// <summary>
        /// 清除元素的风格
        /// </summary>
        /// <param name="Element"></param>
        public void DelStyle(GridElement Element)
        {
            if (Element == null)
            {
                return;
            }

            Cell Cell = ReportSheet.GetCellFromTag(null, Element.Index);

            Cell.BackColor = Color.White;
            Cell.ForeColor = Color.Black;
            Cell.Border    = null;

            Element.Style.FormatInfo = null;
        }
Exemplo n.º 4
0
        /// <summary>
        /// 清除元素的全部
        /// </summary>
        public void DelElement(GridElement Element)
        {
            if (Element == null)
            {
                return;
            }

            Cell Cell = ReportSheet.GetCellFromTag(null, Element.Index);

            Cell.BackColor = Color.White;
            Cell.ForeColor = Color.Black;
            Cell.Border    = null;
            Cell.Value     = null;
            Cell.Tag       = null;
        }
Exemplo n.º 5
0
        /// <summary>
        /// 获得某个位置上的报表元素类型
        /// </summary>
        public GridElement GetElement(string Index)
        {
            if (string.IsNullOrEmpty(Index))
            {
                return(null);
            }

            Cell        Cell    = ReportSheet.GetCellFromTag(null, Index);
            GridElement Element = Cell.Value as GridElement;

            if (Element != null)
            {
                Element.Report = ReportSheet;
            }

            return(Element);
        }