Exemplo n.º 1
0
        private void LoadTabs()
        {
            int id = 0, id1 = 0;

            id = this.CreateRootTabs(_tabView, _user.Name, _user.IsLoggedIn, true, PageBase.RootTabsEnum.Olap_Reports);

            _tabView.AddTab(id, "  List  ", Request.ApplicationPath + "/ReportList.aspx?content=List&rpttype=" + _report.GetTypeCode().ToString(), false, false);


            FI.Common.Data.FIDataTable rptTable = _user.ReportSystem.GetReportHeaders(_report.GetType());
            foreach (System.Data.DataRow row in rptTable.Rows)
            {
                decimal rptId       = decimal.Parse(row["id"].ToString());
                bool    rptSelected = (bool)row["is_selected"];
                bool    rptOpen     = (_report != null && rptId == _report.ID?true:false);
                string  rptName     = (string)row["name"];
                FI.BusinessObjects.Report.SharingEnum rptSharingStatus = (FI.BusinessObjects.Report.SharingEnum) int.Parse(row["sharing_status"].ToString());
                FI.BusinessObjects.Report.SharingEnum rptMaxSubscriberSharingStatus = (FI.BusinessObjects.Report.SharingEnum) int.Parse(row["max_subscriber_sharing_status"].ToString());

                if (rptSelected)
                {
                    int reportType = _report.GetTypeCode();
                    id1 = _tabView.AddTab(id, rptName, Request.ApplicationPath + "/ReportList.aspx?content=Load&action=Open&rptid=" + rptId + "&rpttype=" + reportType.ToString(), rptOpen, false);


                    if (rptSharingStatus == FI.BusinessObjects.Report.SharingEnum.SnapshotSubscriber)
                    {
                        _tabView.AddImage(id1, "images/share.gif");
                    }
                    else if (rptSharingStatus == FI.BusinessObjects.Report.SharingEnum.InheriteSubscriber)
                    {
                        _tabView.AddImage(id1, "images/share_change.gif");
                    }
                    else if (rptMaxSubscriberSharingStatus == FI.BusinessObjects.Report.SharingEnum.SnapshotSubscriber)
                    {
                        _tabView.AddImage(id1, "images/distr.gif");
                    }
                    else if (rptMaxSubscriberSharingStatus == FI.BusinessObjects.Report.SharingEnum.InheriteSubscriber)
                    {
                        _tabView.AddImage(id1, "images/distr_change.gif");
                    }
                }
            }

            _tabView.AddTab(id1, "  Table  ", Request.ApplicationPath + "/OlapReport/Table.aspx", true, false);
            _tabView.AddTab(id1, "  Graph  ", Request.ApplicationPath + "/OlapReport/Graph.aspx", false, false);
            _tabView.AddTab(id1, "  Design  ", Request.ApplicationPath + "/OlapReport/Design.aspx", false, false);
            _tabView.AddTab(id1, "  Format  ", Request.ApplicationPath + "/OlapReport/Format.aspx", false, false);
        }
Exemplo n.º 2
0
        public void CreateReportTabs(FI.UI.Web.Controls.Tabs.TabView tv, string contentType)
        {
            int reportTabId = 0;
            int rootTabId   = this.CreateRootTabs(tv, _user.Name, _user.IsLoggedIn, true, PageBase.RootTabsEnum.Storecheck_Reports);

            tv.AddTab(rootTabId, "  List  ", Request.ApplicationPath + "/ReportList.aspx?content=List&rpttype=" + _report.GetTypeCode().ToString(), false, false);


            FI.Common.Data.FIDataTable rptTable = _user.ReportSystem.GetReportHeaders(_report.GetType());
            foreach (System.Data.DataRow row in rptTable.Rows)
            {
                decimal rptId       = decimal.Parse(row["id"].ToString());
                bool    rptSelected = (bool)row["is_selected"];
                bool    rptOpen     = (_report != null && rptId == _report.ID?true:false);
                string  rptName     = (string)row["name"];
                FI.BusinessObjects.Report.SharingEnum rptSharingStatus = (FI.BusinessObjects.Report.SharingEnum) int.Parse(row["sharing_status"].ToString());
                FI.BusinessObjects.Report.SharingEnum rptMaxSubscriberSharingStatus = (FI.BusinessObjects.Report.SharingEnum) int.Parse(row["max_subscriber_sharing_status"].ToString());

                if (rptSelected)
                {
                    int reportType = _report.GetTypeCode();
                    reportTabId = tv.AddTab(rootTabId, rptName, Request.ApplicationPath + "/ReportList.aspx?content=Load&action=Open&rptid=" + rptId + "&rpttype=" + reportType.ToString(), rptOpen, false);

                    if (rptSharingStatus == FI.BusinessObjects.Report.SharingEnum.SnapshotSubscriber)
                    {
                        tv.AddImage(reportTabId, "images/share.gif");
                    }
                    else if (rptSharingStatus == FI.BusinessObjects.Report.SharingEnum.InheriteSubscriber)
                    {
                        tv.AddImage(reportTabId, "images/share_change.gif");
                    }
                    else if (rptMaxSubscriberSharingStatus == FI.BusinessObjects.Report.SharingEnum.SnapshotSubscriber)
                    {
                        tv.AddImage(reportTabId, "images/distr.gif");
                    }
                    else if (rptMaxSubscriberSharingStatus == FI.BusinessObjects.Report.SharingEnum.InheriteSubscriber)
                    {
                        tv.AddImage(reportTabId, "images/distr_change.gif");
                    }
                }
            }

            this.AddNotDeliveredTab(tv, reportTabId, (contentType == "NotDelivered"?true:false));
            this.AddNeverDeliveredTab(tv, reportTabId, (contentType == "NeverDelivered"?true:false));
            this.AddDeliveredTab(tv, reportTabId, (contentType == "Delivered"?true:false));
            this.AddDesignTab(tv, reportTabId, (contentType == "" || contentType == null?true:false));
        }
        private void LoadTabs()
        {
            int id = 0, id1 = 0;

            FI.UI.Web.Controls.Tabs.TabView tv = (FI.UI.Web.Controls.Tabs.TabView) this.FindControl("TabView1");


            if (_reportsType == _user.ReportSystem.GetReportTypeCode(typeof(BusinessObjects.OlapReport)))
            {
                id = this.CreateRootTabs(tv, _user.Name, _user.IsLoggedIn, true, PageBase.RootTabsEnum.Olap_Reports);

                tv.AddTab(id, "  List  ", "", true, false);
            }
            else if (_reportsType == _user.ReportSystem.GetReportTypeCode(typeof(BusinessObjects.StorecheckReport)))
            {
                id = this.CreateRootTabs(tv, _user.Name, _user.IsLoggedIn, true, PageBase.RootTabsEnum.Storecheck_Reports);

                tv.AddTab(id, "  List  ", "", true, false);
            }
            else if (_reportsType == _user.ReportSystem.GetReportTypeCode(typeof(BusinessObjects.CustomSqlReport)))
            {
                id = this.CreateRootTabs(tv, _user.Name, _user.IsLoggedIn, true, PageBase.RootTabsEnum.Custom_SQL_Reports);

                tv.AddTab(id, "  List  ", "", true, false);
            }
            else if (_reportsType == _user.ReportSystem.GetReportTypeCode(typeof(BusinessObjects.CustomMdxReport)))
            {
                id = this.CreateRootTabs(tv, _user.Name, _user.IsLoggedIn, true, PageBase.RootTabsEnum.Custom_MDX_Reports);

                tv.AddTab(id, "  List  ", "", true, false);
            }


            FI.Common.Data.FIDataTable rptTable = _user.ReportSystem.GetReportHeaders(_user.ReportSystem.GetReportType(_reportsType));
            foreach (System.Data.DataRow row in rptTable.Rows)
            {
                decimal rptId       = decimal.Parse(row["id"].ToString());
                bool    rptSelected = (bool)row["is_selected"];
                string  rptName     = (string)row["name"];
                FI.BusinessObjects.Report.SharingEnum rptSharingStatus = (FI.BusinessObjects.Report.SharingEnum) int.Parse(row["sharing_status"].ToString());
                FI.BusinessObjects.Report.SharingEnum rptMaxSubscriberSharingStatus = (FI.BusinessObjects.Report.SharingEnum) int.Parse(row["max_subscriber_sharing_status"].ToString());

                if (rptSelected)
                {
                    id1 = tv.AddTab(id, rptName, Request.ApplicationPath + "/ReportList.aspx?content=Load&action=Open&rptid=" + rptId + "&rpttype=" + _reportsType.ToString(), false, false);

                    if (rptSharingStatus == FI.BusinessObjects.Report.SharingEnum.SnapshotSubscriber)
                    {
                        tv.AddImage(id1, "images/share.gif");
                    }
                    else if (rptSharingStatus == FI.BusinessObjects.Report.SharingEnum.InheriteSubscriber)
                    {
                        tv.AddImage(id1, "images/share_change.gif");
                    }
                    else if (rptMaxSubscriberSharingStatus == FI.BusinessObjects.Report.SharingEnum.SnapshotSubscriber)
                    {
                        tv.AddImage(id1, "images/distr.gif");
                    }
                    else if (rptMaxSubscriberSharingStatus == FI.BusinessObjects.Report.SharingEnum.InheriteSubscriber)
                    {
                        tv.AddImage(id1, "images/distr_change.gif");
                    }
                }
            }
        }