-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainPage.xaml
More file actions
105 lines (105 loc) · 6.68 KB
/
MainPage.xaml
File metadata and controls
105 lines (105 loc) · 6.68 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<Page
x:Class="SchoolManagement.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:SchoolManagement"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls">
<Grid Background="{ThemeResource SystemControlAcrylicWindowBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="学生数据管理系统" FontWeight="Bold" FontSize="32" Margin="16,16,0,0"/>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Orientation="Horizontal" Spacing="10" Margin="0,0,16,0">
<muxc:PersonPicture
x:Name="UserAvatar"
Width="48"
Height="48"
Initials="AD"
ProfilePicture="ms-appx:///Assets/default_avatar.png"
DisplayName="Alice Brown"/>
<StackPanel>
<TextBlock Text="用户名" x:Name="Usr_textblock" FontSize="16" FontWeight="Bold"/>
<TextBlock Text="管理员" FontSize="10"/>
</StackPanel>
<Button x:Name="Logout_Btn" Content="登出" Click="Logout_Btn_Click"/>
</StackPanel>
<Grid Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,16,0,0" Width="1100">
<StackPanel VerticalAlignment="Top" Spacing="5" HorizontalAlignment="Left">
<TextBlock Text="学生数据" FontWeight="Bold" FontSize="24"/>
<TextBox x:Name="NameTextBox" Header="学生姓名" Width="300"/>
<DatePicker x:Name="DateOfBirthPicker" Header="出生日期" Width="300"/>
<Button x:Name="StudentBtn1" Content="添加学生" Click="AddStudentButton_Click" Width="300" HorizontalAlignment="Left"/>
<Button Content="删除学生" Click="DeleteStudentButton_Click" Width="300" HorizontalAlignment="Left"/>
<ListView x:Name="StudentsListView" Width="300" Height="600" Margin="0,20,0,0" SelectionChanged="StudentsListView_SelectionChanged">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Spacing="5">
<TextBlock Text="{Binding StudentID}"/>
<TextBlock Text="{Binding Name}"/>
<TextBlock Text="{Binding BirthYear}"/>
<TextBlock Text="{Binding BirthMonth}"/>
<TextBlock Text="{Binding BirthDate}"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackPanel>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Top" Spacing="5">
<TextBlock Text="选课数据" FontWeight="Bold" FontSize="24"/>
<Button x:Name="AddSCBtn" Content="添加选课" Click="AddSCBtn_Click" Width="400" HorizontalAlignment="Left" IsEnabled="False"/>
<Button x:Name="DeleteSCBtn" Content="删除选课" Click="DeleteSCBtn_Click" Width="400" HorizontalAlignment="Left" IsEnabled="False"/>
<TextBox x:Name="GradeTxbox" Header="录入成绩" Width="400"/>
<StackPanel Orientation="Horizontal" Spacing="10">
<Button Content="缺考" x:Name="Grade_AbsentBtn" Click="Grade_AbsentBtn_Click" IsEnabled="False"/>
<Button Content="录入成绩" x:Name="GradeBtn" Click="GradeBtn_Click" IsEnabled="False" Width="240"/>
<Button Content="作弊" x:Name="Grade_CheatBtn" Click="Grade_CheatBtn_Click" IsEnabled="False"/>
</StackPanel>
<ListView x:Name="SCListView" Width="400" Height="600" Margin="0,20,0,0" SelectionChanged="SCListView_SelectionChanged">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Spacing="5">
<TextBlock Text="{Binding ID}"/>
<TextBlock Text="{Binding StudentID}"/>
<TextBlock Text="{Binding StudentName}"/>
<TextBlock Text="{Binding CourseID}"/>
<TextBlock Text="{Binding CourseName}"/>
<TextBlock Text="{Binding TeacherName}"/>
<TextBlock Text="{Binding Schedule}"/>
<TextBlock Text="{Binding Classroom}"/>
<TextBlock Text="{Binding Grade}"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackPanel>
<StackPanel HorizontalAlignment="Right" VerticalAlignment="Top" Spacing="5">
<TextBlock Text="课程数据" FontWeight="Bold" FontSize="24"/>
<TextBox x:Name="CourseNameTextBox" Header="课程名称" Width="300"/>
<TextBox x:Name="TeacherNameTextBox" Header="教师姓名" Width="300"/>
<StackPanel>
<TextBox x:Name="ScheduleTimeTextBox" Header="安排时间" Width="300"/>
<TextBox x:Name="ScheduleClassromTextBox" Header="安排教室" Width="300"/>
</StackPanel>
<Button x:Name="CourseBtn_1" Content="添加课程" Click="AddCourseButton_Click" Width="300" />
<Button Content="删除课程" Click="DeleteCourseButton_Click" Width="300" />
<ListView x:Name="CourseListView" Width="300" Height="600" Margin="0,20,0,0" SelectionChanged="CourseListView_SelectionChanged">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Spacing="5">
<TextBlock Text="{Binding CourseID}"/>
<TextBlock Text="{Binding CourseName}"/>
<TextBlock Text="{Binding Schedule}"/>
<TextBlock Text="{Binding TeacherName}"/>
<TextBlock Text="{Binding Classroom}"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackPanel>
</Grid>
</Grid>
</Page>