Exemple #1
0
 private void OnSelectedEmployee(object sender, SelectionChangedEventArgs e)
 {
     if (e.AddedItems.Count > 0)
     {
         var employee = e.AddedItems[0] as Employee;
         if (employee != null && employee.EmployeeId != 0)
         {
             ExpensesList detail = new ExpensesList();
             detail.EmployeeId = employee.EmployeeId;
             detail.Show();
         }
     }
 }
Exemple #2
0
        private void OnSelectedEmployee(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems.Count > 0)
            {
                var employee = e.AddedItems[0] as Employee;
                if (employee != null && employee.EmployeeId != 0)
                {
                    Analytics.TrackEvent("Employee selected", new Dictionary <string, string> {
                        { "Name", employee.FirstName }, { "Surname", employee.LastName }, { "Id", employee.EmployeeId.ToString() }
                    });

                    ExpensesList detail = new ExpensesList();
                    detail.EmployeeId = employee.EmployeeId;
                    detail.Show();
                }
            }
        }