コード例 #1
0
 void db_GetRecordsCompleted(object sender, GetRecordsCompletedEventArgs e)
 {
     if (e.Error == null)
     {
         PagedCollectionView pagedView = new PagedCollectionView(GenerateEHistory(e.Result));
         dgEDetails.ItemsSource = pagedView;
     }
 }
コード例 #2
0
        void srv_GetRecordsCompleted(object sender, GetRecordsCompletedEventArgs e)
        {
            RequestDataResult feedback = e.UserState as RequestDataResult;

            if (feedback == null)
            {
                return;
            }
            feedback.RaiseFeedback(e.Result.GetRecordsResult);
        }
コード例 #3
0
        void db_GetRecordsCompleted(object sender, GetRecordsCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                pcv = new PagedCollectionView(GenerateData(e.Result));                
                pcv.GroupDescriptions.Add(new PropertyGroupDescription("Type") );
                dgEDetails.ItemsSource = pcv;

                dgEDetails.LayoutUpdated += new EventHandler(dgEDetails_LayoutUpdated);

                dgEDetails.UnloadingRowGroup += (s, ea) => { Resize(); };
                dgEDetails.LoadingRowGroup += (s, ea) => { refreshUI = true; };
            }
        }
コード例 #4
0
ファイル: UIGraph.xaml.cs プロジェクト: sajidk/Estimate-SL
        void dbCol1_GetRecordsCompleted(object sender, GetRecordsCompletedEventArgs e)
        {
         
            if (e.Error == null)
            {
                List<EstCol> estCols = GenerateColData1(e.Result);
                Dictionary<string, ColChart> ColValue = new Dictionary<string, ColChart>();
                ColChart chart;

                foreach (EstCol estcol in estCols)
                {
                    if (!ColValue.ContainsKey(estcol.Nm))
                        ColValue.Add(estcol.Nm, new ColChart()
                        {
                            Title = estcol.Nm,
                            ItemSource = new List<EstCol> { new EstCol() { Amount = estcol.Amount, Month = estcol.Month } },
                        });
                    else
                    {
                        chart = ColValue[estcol.Nm];
                        List<EstCol> amt = chart.ItemSource;
                        amt.Add(new EstCol() { Amount = estcol.Amount, Month = estcol.Month });
                    }
                }            


                pieChart.Series.Clear();
                int i = 0;
                foreach (KeyValuePair<string, ColChart> kvp in ColValue)
                {
                    DataPointSeries series = new ColumnSeries();
                    series.Title = (kvp.Value).Title;
                    series.ItemsSource = (kvp.Value).ItemSource;                    
                    series.DependentValuePath = "Amount";
                    series.IndependentValuePath = "Month";                    
                    if (i == 0)
                    {
                        Style style = new Style(typeof(Control));
                        Setter str1 = new Setter(Control.BackgroundProperty, new SolidColorBrush(GetColorFromHexa("#FF938C39")));
                        style.Setters.Add(str1);
                        series.DataPointStyle = style;
                    }
                    else
                    {
                        Style style = new Style(typeof(Control));
                        Setter str1 = new Setter(Control.BackgroundProperty, new SolidColorBrush(GetColorFromHexa("#FF70282B")));
                        style.Setters.Add(str1);
                        series.DataPointStyle = style;
                    }
                    pieChart.Series.Add(series);
                    i++;
                }

                CategoryAxis xAxis = new CategoryAxis();                
                xAxis.Title = "月(" + dateFrom.ToString("yyyy/MM/dd") + " ~ " + dateTo.ToString("yyyy/MM/dd") + ")";
                xAxis.SortOrder = CategorySortOrder.Ascending;
                //xAxis.Orientation = AxisOrientation.X;                
                pieChart.Axes.Add(xAxis);
                LinearAxis yAxis = new LinearAxis();
                yAxis.Title = "金額(万)";
                yAxis.Orientation = AxisOrientation.Y;
                pieChart.Axes.Add(yAxis);
                yAxis.Minimum = 0;
            }
        }
コード例 #5
0
ファイル: UIGraph.xaml.cs プロジェクト: sajidk/Estimate-SL
 void db_GetRecordsCompleted(object sender, GetRecordsCompletedEventArgs e)
 {
     if (e.Error == null)
     {
         ((PieSeries)pieChart2.Series[0]).ItemsSource = GenerateData(e.Result);
     }
 }
コード例 #6
0
ファイル: UIGraph.xaml.cs プロジェクト: sajidk/Estimate-SL
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void dbCol_GetRecordsCompleted(object sender, GetRecordsCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                List<EstCol> estCols = GenerateColData(e.Result);
                Dictionary<string, ColChart> ColValue = new Dictionary<string, ColChart>();
                ColChart chart;

                foreach (EstCol estcol in estCols)
                {
                    if (!ColValue.ContainsKey(estcol.Nm))
                        ColValue.Add(estcol.Nm, new ColChart()
                        {
                            Title = estcol.Nm,
                            ItemSource = new List<EstCol> { new EstCol() { Amount = estcol.Amount, Month = estcol.Month } },
                        });
                    else
                    {
                        chart = ColValue[estcol.Nm];
                        List<EstCol> amt = chart.ItemSource;
                        amt.Add(new EstCol() { Amount = estcol.Amount, Month = estcol.Month });
                    }
                }

                pieChart3.Series.Clear();
                foreach (KeyValuePair<string, ColChart> kvp in ColValue)
                {
                    DataPointSeries series = new ColumnSeries();
                    series.Title = (kvp.Value).Title;
                    series.ItemsSource = (kvp.Value).ItemSource;
                    series.DependentValuePath = "Amount";
                    series.IndependentValuePath = "Month";                    
                    pieChart3.Series.Add(series);
                }
                
                CategoryAxis xAxis = new CategoryAxis();
                xAxis.Title = "月(" + dateFrom.ToString("yyyy/MM/dd") + " ~ " + dateTo.ToString("yyyy/MM/dd") + ")";
                xAxis.SortOrder = CategorySortOrder.Ascending; 
                xAxis.Orientation = AxisOrientation.X;
                pieChart3.Axes.Add(xAxis);
                LinearAxis yAxis = new LinearAxis();
                yAxis.Title = "金額(万)";
                yAxis.Orientation = AxisOrientation.Y;
                pieChart3.Axes.Add(yAxis);
            }
        }
コード例 #7
0
ファイル: UIGraph.xaml.cs プロジェクト: sajidk/Estimate-SL
 void dbLine_GetRecordsCompleted(object sender, GetRecordsCompletedEventArgs e)
 {
     if (e.Error == null)
     {
         ((LineSeries)pieChart1.Series[0]).ItemsSource = GenerateData1(e.Result)[0];
         ((LineSeries)pieChart1.Series[1]).ItemsSource = GenerateData1(e.Result)[1];
         ((LineSeries)pieChart1.Series[0]).Title = "受注";
         ((LineSeries)pieChart1.Series[1]).Title = "完了";   
     }
 }