Pārlūkot izejas kodu

Добавлена страница заглушка присвоения ТС водителю

Вадим Королёв 6 mēneši atpakaļ
vecāks
revīzija
9131627ea7

+ 4 - 3
src/SASDesktop/Navigation.cs

@@ -26,7 +26,8 @@ namespace SASDesktop
 
         public static DelegateCommand ToTransportAssign { get; set; }   = new DelegateCommand(ToTransportAssignExecuted);
 
-        public static DelegateCommand Logout            { get; set; }   = new DelegateCommand(LogoutExecuted);//shotup
+        public static DelegateCommand Logout            { get; set; }   = new DelegateCommand(LogoutExecuted);
+        public static DelegateCommand GoBackCmd         { get; set; }   = new DelegateCommand(GoBack);
         #endregion
 
         /// <summary>
@@ -124,9 +125,9 @@ namespace SASDesktop
             Popups.NotImplementedSorry();
         }
         
-        public static void ToTransportAssign()
+        public static void ToTransportAssignExecuted()
         {
-            Popups.NotImplementedSorry();
+            GetMainFrame().Navigate(new Views.Management.Assign());
         }
     }
 }

+ 7 - 0
src/SASDesktop/SASDesktop.csproj

@@ -217,6 +217,9 @@
     <Compile Include="Views\Transport\List.xaml.cs">
       <DependentUpon>List.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\Management\Assign.xaml.cs">
+      <DependentUpon>Assign.xaml</DependentUpon>
+    </Compile>
     <Page Include="MainWindow.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
@@ -265,6 +268,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\Management\Assign.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Properties\AssemblyInfo.cs">

+ 70 - 0
src/SASDesktop/Views/Management/Assign.xaml

@@ -0,0 +1,70 @@
+<Page x:Class="SASDesktop.Views.Management.Assign"
+      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+      xmlns:local="clr-namespace:SASDesktop.Views.Management"
+      mc:Ignorable="d"
+      d:DesignHeight="600" d:DesignWidth="800"
+      Title="Список ТС">
+    <!--Страница присвоения водителю ТС-->
+    <ScrollViewer>
+        <StackPanel
+            CanVerticallyScroll="True"
+            Style="{StaticResource FormContainer}">
+
+            <!--Заголовок страницы-->
+            <TextBlock 
+                HorizontalAlignment="Center"
+                Style="{StaticResource H2}"
+                Text="Присвоение ТС водителю"/>
+
+            <!--Кнопки управления-->
+            <StackPanel Orientation="Horizontal">
+                <Button
+                    Content="Сохранить"
+                    Style="{StaticResource StandartButton}"/>
+                <Button
+                    Content="Отменить"
+                    Style="{StaticResource StandartButton}"
+                    Command="{Binding Source={x:Static root:Navigation.GoBack}}"/>
+            </StackPanel>
+            
+            <!--Выбор-->
+            <StackPanel Orientation="Vertical">
+
+                <Grid>
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="*"/>
+                        <ColumnDefinition Width="*"/>
+                    </Grid.ColumnDefinitions>
+                    <Grid.RowDefinitions>
+                        <RowDefinition Height="Auto"/>
+                    </Grid.RowDefinitions>
+
+                    <!--Владелец-->
+                    <StackPanel Grid.Column="0" Grid.Row="0" Margin="4">
+                        <!--Надпись-->
+                        <StackPanel Orientation="Horizontal">
+                            <TextBlock Style="{StaticResource H5}" Text="Владелец"/>
+                            <Label Style="{StaticResource RequiredMark}" Margin="4,0,0,0"/>
+                        </StackPanel>
+                        <!--Выпадающий список-->
+                        <TextBox/>
+                    </StackPanel>
+                    
+                    <!--ТС-->
+                    <StackPanel Grid.Column="0" Grid.Row="0" Margin="4">
+                        <!--Надпись-->
+                        <StackPanel Orientation="Horizontal">
+                            <TextBlock Style="{StaticResource H5}" Text="Транспортное средство"/>
+                            <Label Style="{StaticResource RequiredMark}" Margin="4,0,0,0"/>
+                        </StackPanel>
+                        <!--Выпадающий список-->
+                        <TextBox/>
+                    </StackPanel>
+                </Grid>
+            </StackPanel>
+        </StackPanel>
+    </ScrollViewer>
+</Page>

+ 28 - 0
src/SASDesktop/Views/Management/Assign.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace SASDesktop.Views.Management
+{
+    /// <summary>
+    /// Логика взаимодействия для Create.xaml
+    /// </summary>
+    public partial class Assign : Page
+    {
+        public List()
+        {
+            InitializeComponent();
+        }
+    }
+}