示例#1
0
        private void LoadCaseReport()
        {
            Diary.Entity.ReportEntity reportEntity = new Diary.Entity.ReportEntity();
            reportEntity.ReportType = Diary.Common.Enum.ReportTypes.CaseInfo.ToString();

            DataSet ds = new DataSet();

            DateTime fromDate = DateTime.Parse(deFromDate.Value.ToString());
            DateTime toDate   = DateTime.Parse(deToDate.Value.ToString());

            ds = reports.ReportCaseInfo(fromDate, toDate);
            reportEntity.ReportData  = ds;
            Session["CurrentReport"] = reportEntity;
        }
        private void LoadCaseReport()
        {
            Diary.Entity.ReportEntity reportEntity=new Diary.Entity.ReportEntity();
            reportEntity.ReportType = Diary.Common.Enum.ReportTypes.CaseInfo.ToString();

            DataSet ds = new DataSet();

            DateTime fromDate =DateTime.Parse(deFromDate.Value.ToString());
            DateTime toDate = DateTime.Parse(deToDate.Value.ToString());

            ds = reports.ReportCaseInfo(fromDate, toDate);
            reportEntity.ReportData = ds;
            Session["CurrentReport"] = reportEntity;
        }
        protected void Page_Init(object sender, EventArgs e)
        {
            if (Session[Constant.SESSION_LOGGEDUSER] == null)
            {
                Response.Redirect(Constant.URL_LOGIN, false);
                return;
            }

            if (Session["CurrentReport"] != null)
            {
                Diary.Entity.ReportEntity reportEntity = new Diary.Entity.ReportEntity();
                reportEntity = (Diary.Entity.ReportEntity)Session["CurrentReport"];
                gvReports.DataSource = reportEntity.ReportData;
                gvReports.DataBind();
                cbmExporter.Visible = true;

                if (reportEntity.ReportType == Diary.Common.Enum.ReportTypes.CaseInfo.ToString())
                {

                    //GridViewDataDateColumn col = gvReports.Columns["TaskDate"] as GridViewDataDateColumn;
                    //col.PropertiesDateEdit.DisplayFormatString = "dd-MMM-yy";

                    DevExpress.Web.ASPxGridView.ASPxSummaryItem totalHours = new DevExpress.Web.ASPxGridView.ASPxSummaryItem();
                    totalHours.FieldName = "TotalHours";
                    totalHours.ShowInColumn = "TotalHours";
                    totalHours.SummaryType = SummaryItemType.Sum;
                    totalHours.DisplayFormat = "Total {0}";
                    totalHours.ShowInGroupFooterColumn = "TotalHours";
                    gvReports.TotalSummary.Add(totalHours);

                    DevExpress.Web.ASPxGridView.ASPxSummaryItem totalHoursGroup = new DevExpress.Web.ASPxGridView.ASPxSummaryItem();
                    totalHoursGroup.FieldName = "TotalHours";
                    totalHoursGroup.SummaryType = SummaryItemType.Sum;
                    totalHoursGroup.DisplayFormat = "Total {0}";

                    gvReports.GroupSummary.Add(totalHoursGroup);

                }

            }
            else
            {
                cbmExporter.Visible = false;
            }
        }
示例#4
0
        protected void Page_Init(object sender, EventArgs e)
        {
            if (Session[Constant.SESSION_LOGGEDUSER] == null)
            {
                Response.Redirect(Constant.URL_LOGIN, false);
                return;
            }

            if (Session["CurrentReport"] != null)
            {
                Diary.Entity.ReportEntity reportEntity = new Diary.Entity.ReportEntity();
                reportEntity         = (Diary.Entity.ReportEntity)Session["CurrentReport"];
                gvReports.DataSource = reportEntity.ReportData;
                gvReports.DataBind();
                cbmExporter.Visible = true;

                if (reportEntity.ReportType == Diary.Common.Enum.ReportTypes.CaseInfo.ToString())
                {
                    //GridViewDataDateColumn col = gvReports.Columns["TaskDate"] as GridViewDataDateColumn;
                    //col.PropertiesDateEdit.DisplayFormatString = "dd-MMM-yy";

                    DevExpress.Web.ASPxGridView.ASPxSummaryItem totalHours = new DevExpress.Web.ASPxGridView.ASPxSummaryItem();
                    totalHours.FieldName               = "TotalHours";
                    totalHours.ShowInColumn            = "TotalHours";
                    totalHours.SummaryType             = SummaryItemType.Sum;
                    totalHours.DisplayFormat           = "Total {0}";
                    totalHours.ShowInGroupFooterColumn = "TotalHours";
                    gvReports.TotalSummary.Add(totalHours);


                    DevExpress.Web.ASPxGridView.ASPxSummaryItem totalHoursGroup = new DevExpress.Web.ASPxGridView.ASPxSummaryItem();
                    totalHoursGroup.FieldName     = "TotalHours";
                    totalHoursGroup.SummaryType   = SummaryItemType.Sum;
                    totalHoursGroup.DisplayFormat = "Total {0}";

                    gvReports.GroupSummary.Add(totalHoursGroup);
                }
            }
            else
            {
                cbmExporter.Visible = false;
            }
        }