-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmployeeInfo.xaml.cs
55 lines (44 loc) · 1.32 KB
/
EmployeeInfo.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using System.Windows;
using EmployeeViewer.Model;
namespace EmployeeViewer
{
public partial class EmployeeInfo : Window
{
#region Properties
public Employee CurrentEmployee { get; set; }
#endregion
#region Constructor
public EmployeeInfo()
{
InitializeComponent();
CurrentEmployee = new Employee();
if (CurrentEmployee != null)
DataContext = CurrentEmployee;
}
#endregion
#region Private methods
/// <summary>
/// SaveButton's Click event is handled by this event handler
/// </summary>
private void SaveItem_Button_Click(object sender, RoutedEventArgs e)
{
this.DialogResult = true;
}
/// <summary>
/// ClearButton's Click event is handled by this event handler
/// </summary>
private void Clear_Button_Click(object sender, RoutedEventArgs e)
{
this.DataContext = default(Employee);
CurrentEmployee = null;
}
/// <summary>
/// CancelButton's Click event is handled by this event handler
/// </summary>
private void Cancel_Button_Click(object sender, RoutedEventArgs e)
{
Close();
}
#endregion
}
}