Ejemplo n.º 1
0
 protected ChartSchemaItem(SerializationInfo info, StreamingContext context)
 {
     try
     {
         int version = info.GetInt32("Version");
         _level = info.GetInt32("Level");
         if (version == 1)
         {
             _items = new Hashtable();
             ChartSchemaItemAmong sia = new ChartSchemaItemAmong();
             sia.ChartXml  = info.GetString("ChartXML");
             sia.Source    = (ArrayList)info.GetValue("Source", typeof(ArrayList));
             sia.OrderType = info.GetInt32("OrderType");
             sia.TopRank   = info.GetInt32("TopRank");
             sia.Caption   = U8ResService.GetResStringEx("U8.Report.ChartSchema") + " 1";
             _defaultid    = sia.ID;
             _items.Add(sia.ID, sia);
         }
         else if (version == 2)
         {
             _items     = (Hashtable)info.GetValue("Items", typeof(Hashtable));
             _defaultid = info.GetString("DefaultID");
         }
     }
     catch
     {
     }
 }
Ejemplo n.º 2
0
 private void EmptyView()
 {
     tlbrefresh.Enabled = true;
     picwait.SetTipType(TipType.Info);
     picwait.SetInfo(U8ResService.GetResStringEx("U8.UAP.Report.监控数据未生成"));
     picwait.Visible = true;
     UnableToolBarButRefresh();
 }
Ejemplo n.º 3
0
 private void PortalView()
 {
     UnableToolBarAll();
     picwait.SetTipType(TipType.Info);
     picwait.SetInfo(U8ResService.GetResStringEx("U8.UAP.Report.ChooseView"));
     picwait.Visible = true;
     _title          = U8ResService.GetResStringEx("U8.UAP.Report.ViewViewer");
 }
Ejemplo n.º 4
0
        public ChartSchemaItemAmong AddAChart(int level, string id)
        {
            this.SetCurrentLevelChart(level);
            ChartSchemaItemAmong csia = new ChartSchemaItemAmong(this[level, id]);

            csia.Caption = U8ResService.GetResStringEx("U8.Report.ChartSchema");
            SetCaptionPostfix(csia);
            this.CurrentLevelChart.Add(csia);
            return(csia);
        }
Ejemplo n.º 5
0
 private void tlbrefresh_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show(U8ResService.GetResStringEx("U8.UAP.Report.RefreshConfirm"), String4Report.GetString("Report"), MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         if (_context.FilterArgs != null)
         {
             _context.FilterArgs.Args.Add("RefreshInvoked", 1);
         }
         Refresh();
     }
 }
Ejemplo n.º 6
0
 public ChartSchemaItemAmong this[int level, string id]
 {
     get
     {
         if (!Contains(level))
         {
             throw new Exception(U8ResService.GetResStringEx("U8.Report.ChartNotDefine"));
         }
         return((_items[level] as ChartSchemaItem)[id]);
     }
 }
Ejemplo n.º 7
0
 public override string ToString()
 {
     if (this._displayText.Substring(0, 1).ToLower() == "u")
     {
         return(U8ResService.GetResString(this._displayText, System.Threading.Thread.CurrentThread.CurrentUICulture.Name));
     }
     else
     {
         return(this._displayText);
     }
 }
Ejemplo n.º 8
0
        private void OpenView(string instanceid, StaticArgs e)
        {
            if (instanceid != null && instanceid.Trim().ToUpper() == "E13B77F9-4122-4BF1-8C38-97313111C36D")
            {
                PortalView();
            }
            else
            {
                _publishid = instanceid;
                if (CheckRealTimeQuery(instanceid))
                {
                    _brealtime = true;
                    PublishService ps = new PublishService(ClientReportContext.Login.U8Login);
                    _context.FilterArgs = ps.GetFilterArgs(_publishid);

                    if (!string.IsNullOrEmpty(_currentduration))
                    {
                        if (_context.FilterArgs.FltSrv.Contains("CurrentDuration"))
                        {
                            _context.FilterArgs.FltSrv["CurrentDuration"].Value1 = _currentduration;
                        }
                        else if (_context.FilterArgs.FltSrv.Contains("AutoCurrentDuration"))
                        {
                            _context.FilterArgs.FltSrv["AutoCurrentDuration"].Value1 = _currentduration;
                        }
                    }
                    RealTimeQuery(true);
                }
                else
                {
                    SetInfos(instanceid);
                    if (!string.IsNullOrEmpty(_staticid))
                    {
                        UnableToolBarAll();
                        tlbtime.Text        = U8ResService.GetResStringEx("U8.UAP.Report.数据生成时间") + _datatime.ToLongDateString() + " " + _datatime.ToLongTimeString();
                        tlbtime.ToolTipText = tlbtime.Text;
                        _context.Initialize(_staticid, ReportStates.Static, ReportType.IndicatorReport);

                        if (e == null)
                        {
                            e = new StaticArgs();
                        }
                        e.staticid    = _context.StaticID;
                        e.eventfilter = _eventfilter;
                        RunWithCache(e);
                    }
                    else
                    {
                        EmptyView();
                    }
                }
            }
        }
Ejemplo n.º 9
0
 private void OnError(string code, string msg)
 {
     //System.Diagnostics.Trace.WriteLine("Catch server error....");
     if (ErrorEvent != null)
     {
         if (msg == "StaticReportNotExist")
         {
             code = msg;
             msg  = U8ResService.GetResStringEx("U8.UAP.Report.监控数据未生成");
         }
         InvokeEvent(ErrorEvent, new object[] { code, msg });
     }
 }
Ejemplo n.º 10
0
 private void tlcfilter_DropDown(object sender, EventArgs e)
 {
     try
     {
         this.tlcfilter.Items.Clear();
         this.tlcfilter.Items.Add(U8ResService.GetResStringEx("U8.UAP.Report.All"));
         RemoteDataHelper rdh = DefaultConfigs.GetRemoteHelper();
         DataTable        dt  = rdh.GetIndicatorFilter(_context.Report.FilterSource.Name, _context.Report.BaseTable, _eventfilter, ClientReportContext.Login.UfDataCnnString);
         foreach (DataRow dr in dt.Rows)
         {
             this.tlcfilter.Items.Add(dr[0].ToString());
         }
     }
     catch (Exception ex)
     {
         ReportViewControl.ShowInformationMessageBox(ex.Message);
     }
 }
Ejemplo n.º 11
0
        public PortalViewControl()
        {
            InitializeComponent();
            this.tlbprint.Text     = U8ResService.GetResStringEx("U8.UAP.Report.打印");
            this.tlbprintview.Text = U8ResService.GetResStringEx("U8.UAP.Report.打印预览");
            this.tlbrefresh.Text   = U8ResService.GetResStringEx("UFIDA.U8.UAP.Services.ReportManagement.刷新");

            this.tlbsetting.Text = U8ResService.GetResStringEx("U8.UAP.Report.Setting");
            this.tlbchart.Text   = U8ResService.GetResStringEx("U8.UAP.Services.ReportDesigner.GroupPabel.图表");
            this.tlbmatrix.Text  = U8ResService.GetResStringEx("U8.UAP.Report.Data");
            this.tlbquery.Text   = U8ResService.GetResStringEx("U8.UAP.Report.Query");

            this.reportcontrol.SendInformation += new SendInformationHandler(reportcontrol_SendInformation);
            this.reportcontrol.Resize          += new EventHandler(reportcontrol_Resize);
            _resizeevent   = new ManualResetEvent(false);
            _barpagehelper = new BarPageHelper(this.toolStrip1);
            _barpagehelper.PageIndexClick += new EventHandler(_barpagehelper_PageIndexClick);
            _releaseevent  = new AutoResetEvent(true);
            this.Disposed += new EventHandler(PortalViewControl_Disposed);
            //UnableToolBarAll();

            PleaseChangeToSilverlight();
        }
Ejemplo n.º 12
0
        private Cell MoreLabel(bool bmore, Cell sourcecell, int x, int y, int w, int h)
        {
            CommonLabel cl = new CommonLabel(sourcecell);

            cl.X = x;
            cl.SetY(y);
            cl.Width        = w;
            cl.Height       = h;
            cl.CaptionAlign = ContentAlignment.TopLeft;
            if (bmore)
            {
                cl.Caption = U8ResService.GetResStringEx("U8.UAP.Report.ViewAll");
                _currentreport.RowsCount   = (sourcecell.Tag as SemiRowsContainerPerhaps4Matrix).RowsCount;
                _currentreport.PageRecords = (sourcecell as IIndicatorMetrix).PageSize;
                cl.Report = _currentreport;
                (sourcecell.Tag as SemiRowsContainerPerhaps4Matrix).SetDrillTag(new DrillData(_viewid, _currentreport.ViewID), _cellnametocolumnname);
                cl.Tag = sourcecell.Tag;
            }
            else
            {
                if (sourcecell.Tag is SemiRowsContainer)
                {
                    (sourcecell.Tag as SemiRowsContainer).Canceled();
                }
                cl.Tag = "NoMore";
            }

            cl.Border.Left   = false;
            cl.Border.Bottom = false;
            cl.Border.Right  = false;

            cl.ServerFont.UnderLine = true;
            cl.ForeColor            = Color.Blue;

            //cl.BackColor = Color.Red;
            return(cl);
        }