コード例 #1
0
 public JobPage()
 {
     this.InitializeComponent();
     graph = new GraphBLL();
     this.ProductsGrid.ItemsSource = graph.GetEmployeeGraph();
     // timer
     timer.Interval = new TimeSpan(0, 0, 1);
     timer.Tick    += Timer_Tick;
     timer.Start();
 }
コード例 #2
0
 /// <summary>
 /// Refreshes the grid of recently commed employees
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BtnRefresh_Click(object sender, RoutedEventArgs e)
 {
     graph = new GraphBLL();
     if (IsToday)
     {
         this.ProductsGrid.ItemsSource = graph.GetEmployeeGraph();
     }
     else
     {
         this.ProductsGrid.ItemsSource = graph.GetEmployeeGraphMounght();
     }
 }
コード例 #3
0
 /// <summary>
 /// Ticks in 2 seconds for Automatic Refresh checkbox
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Timer_Tick(object sender, object e)
 {
     if (AutomaticCheckOnn)
     {
         graph = new GraphBLL();
         if (IsToday)
         {
             this.ProductsGrid.ItemsSource = graph.GetEmployeeGraph();
         }
         else
         {
             this.ProductsGrid.ItemsSource = graph.GetEmployeeGraphMounght();
         }
     }
 }
コード例 #4
0
        /// <summary>
        /// When the user select timezone
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TimelineComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            string TimeLine = e.AddedItems[0].ToString();

            switch (TimeLine)
            {
            case "This Month":
                this.IsToday = false;
                this.ProductsGrid.ItemsSource = graph.GetEmployeeGraphMounght();
                break;

            case "Today":
                this.IsToday = true;
                this.ProductsGrid.ItemsSource = graph.GetEmployeeGraph();
                break;
            }
        }