فهرست منبع

Изменена верстка нескольких страниц

unknown 4 هفته پیش
والد
کامیت
e1e470f6e8
3فایلهای تغییر یافته به همراه35 افزوده شده و 16 حذف شده
  1. 3 4
      AvaloniaHomeTry/ViewModels/AdminPageViewModel.cs
  2. 4 1
      AvaloniaHomeTry/Views/AdminPage.axaml
  3. 28 11
      AvaloniaHomeTry/Views/UserPage.axaml

+ 3 - 4
AvaloniaHomeTry/ViewModels/AdminPageViewModel.cs

@@ -13,8 +13,8 @@ namespace AvaloniaHomeTry.ViewModels
 	{
 
         UsersTable myUsers = new UsersTable();
-
-		UsersTable editedUser = new UsersTable();
+        
+        UsersTable editedUser = new UsersTable();
 
 		List<Gender> genderList;
 
@@ -64,8 +64,7 @@ namespace AvaloniaHomeTry.ViewModels
             if(!string.IsNullOrEmpty(Find)) UsersTables = UsersTables.Where(x => x.Surname.Contains(Find)).ToList();
             if (filterGender != null && filterGender.Id != 0)UsersTables = UsersTables.Where(x=>x.GenderNavigation == FilterGender).ToList();
         }
-        
-        
+
         public void MyProfile() => MainWindowViewModel.Self.UC = new UserPage(MainWindowViewModel.Self.ID);
         public void Exit() => MainWindowViewModel.Self.UC = new AuthPage();
     }

+ 4 - 1
AvaloniaHomeTry/Views/AdminPage.axaml

@@ -53,7 +53,10 @@
 				<ListBox.ItemTemplate>
 					<DataTemplate>
 						<StackPanel>
-							<TextBlock Text="{Binding Surname, StringFormat=Имя: {0}}"/>
+							<TextBlock Text="{Binding Surname, StringFormat=Фамилия: {0}}" />
+							<TextBlock Text="{Binding Firstname, StringFormat=Имя: {0}}" />
+							<TextBlock Text="{Binding Patronymic, StringFormat=Отчество: {0}}" />
+							<TextBlock Text="{Binding GenderNavigation.GenderName, StringFormat=Пол: {0}}" />
 							<TextBlock Text="{Binding Dataofbirth, StringFormat=Дата рождения: {0:dd/MM/yyyy}}"/>
 						</StackPanel>
 					</DataTemplate>

+ 28 - 11
AvaloniaHomeTry/Views/UserPage.axaml

@@ -17,42 +17,59 @@
 			<RowDefinition Height="60"/>
 			<RowDefinition Height="60"/>
 		</Grid.RowDefinitions>
+
+		<Grid.ColumnDefinitions>
+			<ColumnDefinition Width="*"/>
+			<ColumnDefinition Width="*"/>
+			<ColumnDefinition Width="*"/>
+		</Grid.ColumnDefinitions>
 		
-		<StackPanel HorizontalAlignment="Center" Margin="10" Grid.Row="0">
+		<StackPanel HorizontalAlignment="Center" Margin="10" Grid.Row="0" Grid.Column="1">
 			<TextBlock Text="Личный кабинет" HorizontalAlignment="Center"/>
 		</StackPanel>
 		
-			<StackPanel Grid.Row="1" Margin="5" HorizontalAlignment="Center">
-				<TextBlock Text="Фамилия"/>
-				<TextBox Text="{Binding CurrentUser.Surname}" Width="200" HorizontalAlignment="Left"/>
-			</StackPanel>
+		<StackPanel Grid.Row="1" Grid.Column="0" Margin="5" HorizontalAlignment="Center">
+			<TextBlock Text="Фамилия"/>
+			<TextBox Text="{Binding CurrentUser.Surname}" Width="200" HorizontalAlignment="Left"/>
+		</StackPanel>
 		
+		<StackPanel Grid.Row="1" Grid.Column="1" Margin="5" HorizontalAlignment="Center">
+			<TextBlock Text="Имя"/>
+			<TextBox Text="{Binding CurrentUser.Firstname}" Width="200" HorizontalAlignment="Left"/>
+		</StackPanel>
+		
+		<StackPanel Grid.Row="1" Grid.Column="2" Margin="5" HorizontalAlignment="Center">
+			<TextBlock Text="Отчество"/>
+			<TextBox Text="{Binding CurrentUser.Patronymic}" Width="200" HorizontalAlignment="Left"/>
+		</StackPanel>
 		<StackPanel Grid.Row="2" Margin="5" HorizontalAlignment="Center">
 			<TextBlock Text="Логин"/>
 			<TextBox Text="{Binding CurrentUser.Login}" Width="200" HorizontalAlignment="Left"/>
 		</StackPanel>
 		
-		<StackPanel Grid.Row="3" Margin="5" HorizontalAlignment="Center">
+		<StackPanel Grid.Row="2" Grid.Column="2" Margin="5" HorizontalAlignment="Center">
 			<TextBlock Text="Пол"/>
-			<ComboBox ItemsSource="{Binding Genders}" SelectedItem="{Binding GenderIndex}" Width="200" HorizontalAlignment="Left"/>
+			<ComboBox ItemsSource="{Binding Genders}" 
+					  SelectedItem="{Binding GenderIndex}" 
+					  Width="200" HorizontalAlignment="Left"/>
 
 		</StackPanel>
 			
-		<StackPanel Grid.Row="4" Margin="5" HorizontalAlignment="Center">
+		<StackPanel Grid.Row="2" Grid.Column="1" Margin="5" HorizontalAlignment="Center">
 			<TextBlock Text="Дата рождения"/>
 			<DatePicker SelectedDate="{Binding DR}"/>
 		</StackPanel>
 		
-		<StackPanel Grid.Row="5" Margin="5" HorizontalAlignment="Center">
+		<StackPanel Grid.Row="3" Margin="5" HorizontalAlignment="Left">
 			<TextBlock Text="Роль в системе:"/>
 			<TextBlock Text="{Binding CurrentUser.RoleNavigation.RoleName}"/>
 		</StackPanel>
 		
-		<StackPanel Grid.Row="6" HorizontalAlignment="Center" Margin="5">
+		<StackPanel Grid.Row="6" Grid.ColumnSpan="3" HorizontalAlignment="Center" Margin="5">
 			<Button Content="Сохранить изменения" Command="{Binding SaveData}"/>
 		</StackPanel>
 
-		<StackPanel Grid.Row="7" HorizontalAlignment="Center" Margin="5">
+		<StackPanel Grid.Row="7" Grid.ColumnSpan="3" HorizontalAlignment="Center" Margin="5">
 			<Button Content="Выйти" Command="{Binding Exit}"/>
 		</StackPanel>
 	</Grid>