-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDetailsWindowVM.cs
More file actions
67 lines (51 loc) · 1.39 KB
/
Copy pathDetailsWindowVM.cs
File metadata and controls
67 lines (51 loc) · 1.39 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Imaging;
namespace UMS1
{
public partial class DetailsWindowVM : ObservableObject
{
public Person Student { get; private set; }
public Action CloseAction { get; internal set; }
[ObservableProperty]
public string firstname;
[ObservableProperty]
public string lastname;
[ObservableProperty]
public string? dob;
[ObservableProperty]
public double? gpa;
[ObservableProperty]
public string email;
[ObservableProperty]
public string other;
[ObservableProperty]
public BitmapImage imgURL;
public DetailsWindowVM(Person p)
{
Student = p;
firstname=Student.FirstName;
lastname=Student.LastName;
dob = Student.DOB;
gpa = Student.GPA;
email = Student.Mail;
other = Student.Other;
imgURL = Student.Image;
}
public DetailsWindowVM()
{
}
[RelayCommand]
public void OK()
{
CloseAction();
Application.Current.MainWindow.Show();
}
}
}