Inheritance: System.EventArgs
Example #1
0
        /// <summary>
        /// Handles the chart click.
        /// </summary>
        private void HandleChartClick()
        {
            var            eventArgs      = this.Page.Request.Params["__EVENTARGUMENT"].Split(';');
            ChartClickArgs chartClickArgs = new ChartClickArgs();

            foreach (var parts in eventArgs)
            {
                var param = parts.Split('=');
                if (param[0] == "DateStamp")
                {
                    long dateStamp = 0;
                    if (long.TryParse(param[1], out dateStamp))
                    {
                        chartClickArgs.DateTimeValue = new DateTime(1970, 1, 1).AddMilliseconds(dateStamp);
                    }
                }
                else if (param[0] == "YValue")
                {
                    chartClickArgs.YValue = param[1].AsInteger();
                }
                else if (param[0] == "SeriesId")
                {
                    // only include SeriesId when CombineValues is false
                    if (!this.CombineValues)
                    {
                        chartClickArgs.SeriesId = param[1];
                    }
                }
                else if (param[0] == "MetricValueId" && !this.CombineValues)
                {
                    // only include MetricValueId when CombineValues is false
                    if (!this.CombineValues)
                    {
                        chartClickArgs.MetricValueId = param[1].AsIntegerOrNull();
                    }
                }
            }

            if (ChartClick != null)
            {
                ChartClick(this, chartClickArgs);
            }
        }
Example #2
0
 /// <summary>
 /// Lcs the attendance_ chart click.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The e.</param>
 protected void lcAttendance_ChartClick( object sender, ChartClickArgs e )
 {
     if ( this.DetailPageGuid.HasValue )
     {
         Dictionary<string, string> qryString = new Dictionary<string, string>();
         qryString.Add( "YValue", e.YValue.ToString() );
         qryString.Add( "DateTimeValue", e.DateTimeValue.ToString( "o" ) );
         NavigateToPage( this.DetailPageGuid.Value, qryString );
     }
 }
Example #3
0
        /// <summary>
        /// Handles the chart click.
        /// </summary>
        private void HandleChartClick()
        {
            var eventArgs = this.Page.Request.Params["__EVENTARGUMENT"].Split( ';' );
            ChartClickArgs chartClickArgs = new ChartClickArgs();
            foreach ( var parts in eventArgs )
            {
                var param = parts.Split( '=' );
                if ( param[0] == "DateStamp" )
                {
                    long dateStamp = 0;
                    if ( long.TryParse( param[1], out dateStamp ) )
                    {
                        chartClickArgs.DateTimeValue = new DateTime( 1970, 1, 1 ).AddMilliseconds( dateStamp );
                    }
                }
                else if ( param[0] == "YValue" )
                {
                    chartClickArgs.YValue = param[1].AsInteger();
                }
                else if ( param[0] == "SeriesId" )
                {
                    // only include SeriesId when CombineValues is false
                    if ( !this.CombineValues )
                    {
                        chartClickArgs.SeriesId = param[1];
                    }
                }
                else if ( param[0] == "MetricValueId" && !this.CombineValues )
                {
                    // only include MetricValueId when CombineValues is false
                    if ( !this.CombineValues )
                    {

                        chartClickArgs.MetricValueId = param[1].AsIntegerOrNull();
                    }
                }
            }

            if ( ChartClick != null )
            {
                ChartClick( this, chartClickArgs );
            }
        }
        /// <summary>
        /// Lcs the example_ chart click.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The e.</param>
        public void lcExample_ChartClick( object sender, ChartClickArgs e )
        {
            Guid? detailPageGuid = ( GetAttributeValue( "DetailPage" ) ?? string.Empty ).AsGuidOrNull();
            if ( detailPageGuid.HasValue )
            {
                Dictionary<string, string> qryString = new Dictionary<string, string>();
                qryString.Add( "MetricValueId", e.MetricValueId.ToString() );

                qryString.Add( "MetricId", this.MetricId.ToString() );
                qryString.Add( "SeriesId", e.SeriesId );
                qryString.Add( "YValue", e.YValue.ToString() );
                qryString.Add( "DateTimeValue", e.DateTimeValue.ToString( "o" ) );
                NavigateToPage( detailPageGuid.Value, qryString );
            }
        }
 /// <summary>
 /// Lcs the example_ chart click.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The e.</param>
 public void lcExample_ChartClick( object sender, ChartClickArgs e )
 {
     if ( this.DetailPageGuid.HasValue )
     {
         Dictionary<string, string> qryString = new Dictionary<string, string>();
         qryString.Add( "MetricValueId", e.MetricValueId.ToString() );
         qryString.Add( "MetricId", this.MetricId.ToString() );
         qryString.Add( "SeriesId", e.SeriesId );
         qryString.Add( "YValue", e.YValue.ToString() );
         qryString.Add( "DateTimeValue", e.DateTimeValue.ToString( "o" ) );
         NavigateToPage( this.DetailPageGuid.Value, qryString );
     }
 }
Example #6
0
 /// <summary>
 /// Lcs the attendance_ chart click.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The e.</param>
 protected void lcAmount_ChartClick( object sender, ChartClickArgs e )
 {
     if ( GetAttributeValue( "DetailPage" ).AsGuidOrNull().HasValue )
     {
         Dictionary<string, string> qryString = new Dictionary<string, string>();
         qryString.Add( "YValue", e.YValue.ToString() );
         qryString.Add( "DateTimeValue", e.DateTimeValue.ToString( "o" ) );
         NavigateToLinkedPage( "DetailPage", qryString );
     }
 }