Imagara 2 tahun lalu
induk
melakukan
3d833ca62e

+ 1 - 1
RaspisKusach/EDM.Designer.cs

@@ -1,4 +1,4 @@
-// Создание кода T4 для модели "C:\Users\milic\source\repos\RaspisKusach\RaspisKusach\EDM.edmx" включено. 
+// Создание кода T4 для модели "C:\Users\pc\source\repos\RaspisKusach\RaspisKusach\EDM.edmx" включено. 
 // Чтобы включить формирование кода прежних версий, измените значение свойства "Стратегия создания кода" конструктора
 // на "Legacy ObjectContext". Это свойство доступно в окне "Свойства", если модель
 // открыта в конструкторе.

+ 173 - 28
RaspisKusach/EDM.edmx.sql

@@ -2,8 +2,8 @@
 -- --------------------------------------------------
 -- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
 -- --------------------------------------------------
+-- Date Created: 07/24/2022 19:15:44
+-- Generated from EDMX file: C:\Users\pc\source\repos\RaspisKusach\RaspisKusach\EDM.edmx
 -- --------------------------------------------------
 
 SET QUOTED_IDENTIFIER OFF;
@@ -17,16 +17,43 @@ GO
 -- Dropping existing FOREIGN KEY constraints
 -- --------------------------------------------------
 
+IF OBJECT_ID(N'[dbo].[FK_Routes_Trains]', 'F') IS NOT NULL
+    ALTER TABLE [dbo].[Routes] DROP CONSTRAINT [FK_Routes_Trains];
+GO
+IF OBJECT_ID(N'[dbo].[FK_RoutesStations_Routes]', 'F') IS NOT NULL
+    ALTER TABLE [dbo].[RoutesStations] DROP CONSTRAINT [FK_RoutesStations_Routes];
+GO
+IF OBJECT_ID(N'[dbo].[FK_RoutesStations_Station]', 'F') IS NOT NULL
+    ALTER TABLE [dbo].[RoutesStations] DROP CONSTRAINT [FK_RoutesStations_Station];
+GO
+IF OBJECT_ID(N'[dbo].[FK_Tickets_Carriages]', 'F') IS NOT NULL
+    ALTER TABLE [dbo].[Tickets] DROP CONSTRAINT [FK_Tickets_Carriages];
+GO
+IF OBJECT_ID(N'[dbo].[FK_Tickets_Routes]', 'F') IS NOT NULL
+    ALTER TABLE [dbo].[Tickets] DROP CONSTRAINT [FK_Tickets_Routes];
+GO
+IF OBJECT_ID(N'[dbo].[FK_Tickets_Users]', 'F') IS NOT NULL
+    ALTER TABLE [dbo].[Tickets] DROP CONSTRAINT [FK_Tickets_Users];
+GO
 
 -- --------------------------------------------------
 -- Dropping existing tables
 -- --------------------------------------------------
 
+IF OBJECT_ID(N'[dbo].[Carriages]', 'U') IS NOT NULL
+    DROP TABLE [dbo].[Carriages];
+GO
 IF OBJECT_ID(N'[dbo].[Routes]', 'U') IS NOT NULL
     DROP TABLE [dbo].[Routes];
 GO
-IF OBJECT_ID(N'[dbo].[TestTable]', 'U') IS NOT NULL
-    DROP TABLE [dbo].[TestTable];
+IF OBJECT_ID(N'[dbo].[RoutesStations]', 'U') IS NOT NULL
+    DROP TABLE [dbo].[RoutesStations];
+GO
+IF OBJECT_ID(N'[dbo].[Station]', 'U') IS NOT NULL
+    DROP TABLE [dbo].[Station];
+GO
+IF OBJECT_ID(N'[dbo].[sysdiagrams]', 'U') IS NOT NULL
+    DROP TABLE [dbo].[sysdiagrams];
 GO
 IF OBJECT_ID(N'[dbo].[Tickets]', 'U') IS NOT NULL
     DROP TABLE [dbo].[Tickets];
@@ -34,9 +61,6 @@ GO
 IF OBJECT_ID(N'[dbo].[Trains]', 'U') IS NOT NULL
     DROP TABLE [dbo].[Trains];
 GO
-IF OBJECT_ID(N'[dbo].[TrainsCarriages]', 'U') IS NOT NULL
-    DROP TABLE [dbo].[TrainsCarriages];
-GO
 IF OBJECT_ID(N'[dbo].[Users]', 'U') IS NOT NULL
     DROP TABLE [dbo].[Users];
 GO
@@ -45,25 +69,45 @@ GO
 -- Creating all tables
 -- --------------------------------------------------
 
+-- Creating table 'Carriages'
+CREATE TABLE [dbo].[Carriages] (
+    [IdCarriage] int  NOT NULL,
+    [Count] int  NOT NULL
+);
+GO
+
 -- Creating table 'Routes'
 CREATE TABLE [dbo].[Routes] (
     [IdRoute] int  NOT NULL,
     [IdTrain] int  NOT NULL,
-    [Departure_Station] nvarchar(50)  NOT NULL,
-    [Arrival_Station] nvarchar(50)  NOT NULL,
     [Departure_Date] datetime  NOT NULL,
     [Arrival_Date] datetime  NOT NULL
 );
 GO
 
-CREATE TABLE [dbo].[TestTable] (
+-- Creating table 'RoutesStations'
+CREATE TABLE [dbo].[RoutesStations] (
+    [IdRouteStation] int  NOT NULL,
     [IdRoute] int  NOT NULL,
-    [IdTrain] int  NOT NULL,
-    [Departure] nvarchar(50)  NOT NULL,
-    [Arrival] nvarchar(50)  NOT NULL,
-    [DepartureDate] datetime  NOT NULL,
-    [ArrivalDate] datetime  NOT NULL
+    [IdStation] int  NOT NULL
+);
+GO
+
+-- Creating table 'Station'
+CREATE TABLE [dbo].[Station] (
+    [IdStation] int  NOT NULL,
+    [Name] nvarchar(50)  NOT NULL,
+    [Location] nvarchar(50)  NOT NULL
+);
+GO
+
+-- Creating table 'sysdiagrams'
+CREATE TABLE [dbo].[sysdiagrams] (
+    [name] nvarchar(128)  NOT NULL,
+    [principal_id] int  NOT NULL,
+    [diagram_id] int IDENTITY(1,1) NOT NULL,
+    [version] int  NULL,
+    [definition] varbinary(max)  NULL
 );
 GO
 
@@ -72,7 +116,7 @@ CREATE TABLE [dbo].[Tickets] (
     [IdTicket] int  NOT NULL,
     [IdUser] int  NOT NULL,
     [IdRoute] int  NOT NULL,
-    [IdTrainCarriage] int  NOT NULL,
+    [IdCarriage] int  NOT NULL,
     [PlaceNumber] int  NOT NULL,
     [Category] int  NOT NULL,
     [BuyDate] datetime  NOT NULL
@@ -86,13 +130,6 @@ CREATE TABLE [dbo].[Trains] (
 );
 GO
 
-CREATE TABLE [dbo].[TrainsCarriages] (
-    [IdCarriage] int  NOT NULL,
-    [Count] int  NOT NULL
-);
-GO
-
 -- Creating table 'Users'
 CREATE TABLE [dbo].[Users] (
     [IdUser] int  NOT NULL,
@@ -109,16 +146,34 @@ GO
 -- Creating all PRIMARY KEY constraints
 -- --------------------------------------------------
 
+-- Creating primary key on [IdCarriage] in table 'Carriages'
+ALTER TABLE [dbo].[Carriages]
+ADD CONSTRAINT [PK_Carriages]
+    PRIMARY KEY CLUSTERED ([IdCarriage] ASC);
+GO
+
 -- Creating primary key on [IdRoute] in table 'Routes'
 ALTER TABLE [dbo].[Routes]
 ADD CONSTRAINT [PK_Routes]
     PRIMARY KEY CLUSTERED ([IdRoute] ASC);
 GO
 
-ALTER TABLE [dbo].[TestTable]
-ADD CONSTRAINT [PK_TestTable]
-    PRIMARY KEY CLUSTERED ([IdRoute] ASC);
+-- Creating primary key on [IdRouteStation] in table 'RoutesStations'
+ALTER TABLE [dbo].[RoutesStations]
+ADD CONSTRAINT [PK_RoutesStations]
+    PRIMARY KEY CLUSTERED ([IdRouteStation] ASC);
+GO
+
+-- Creating primary key on [IdStation] in table 'Station'
+ALTER TABLE [dbo].[Station]
+ADD CONSTRAINT [PK_Station]
+    PRIMARY KEY CLUSTERED ([IdStation] ASC);
+GO
+
+-- Creating primary key on [diagram_id] in table 'sysdiagrams'
+ALTER TABLE [dbo].[sysdiagrams]
+ADD CONSTRAINT [PK_sysdiagrams]
+    PRIMARY KEY CLUSTERED ([diagram_id] ASC);
 GO
 
 -- Creating primary key on [IdTicket] in table 'Tickets'
@@ -133,12 +188,6 @@ ADD CONSTRAINT [PK_Trains]
     PRIMARY KEY CLUSTERED ([IdTrain] ASC);
 GO
 
-ALTER TABLE [dbo].[TrainsCarriages]
-ADD CONSTRAINT [PK_TrainsCarriages]
-    PRIMARY KEY CLUSTERED ([IdCarriage] ASC);
-GO
-
 -- Creating primary key on [IdUser] in table 'Users'
 ALTER TABLE [dbo].[Users]
 ADD CONSTRAINT [PK_Users]
@@ -149,6 +198,96 @@ GO
 -- Creating all FOREIGN KEY constraints
 -- --------------------------------------------------
 
+-- Creating foreign key on [IdCarriage] in table 'Tickets'
+ALTER TABLE [dbo].[Tickets]
+ADD CONSTRAINT [FK_Tickets_Carriages]
+    FOREIGN KEY ([IdCarriage])
+    REFERENCES [dbo].[Carriages]
+        ([IdCarriage])
+    ON DELETE NO ACTION ON UPDATE NO ACTION;
+GO
+
+-- Creating non-clustered index for FOREIGN KEY 'FK_Tickets_Carriages'
+CREATE INDEX [IX_FK_Tickets_Carriages]
+ON [dbo].[Tickets]
+    ([IdCarriage]);
+GO
+
+-- Creating foreign key on [IdTrain] in table 'Routes'
+ALTER TABLE [dbo].[Routes]
+ADD CONSTRAINT [FK_Routes_Trains]
+    FOREIGN KEY ([IdTrain])
+    REFERENCES [dbo].[Trains]
+        ([IdTrain])
+    ON DELETE NO ACTION ON UPDATE NO ACTION;
+GO
+
+-- Creating non-clustered index for FOREIGN KEY 'FK_Routes_Trains'
+CREATE INDEX [IX_FK_Routes_Trains]
+ON [dbo].[Routes]
+    ([IdTrain]);
+GO
+
+-- Creating foreign key on [IdRoute] in table 'RoutesStations'
+ALTER TABLE [dbo].[RoutesStations]
+ADD CONSTRAINT [FK_RoutesStations_Routes]
+    FOREIGN KEY ([IdRoute])
+    REFERENCES [dbo].[Routes]
+        ([IdRoute])
+    ON DELETE NO ACTION ON UPDATE NO ACTION;
+GO
+
+-- Creating non-clustered index for FOREIGN KEY 'FK_RoutesStations_Routes'
+CREATE INDEX [IX_FK_RoutesStations_Routes]
+ON [dbo].[RoutesStations]
+    ([IdRoute]);
+GO
+
+-- Creating foreign key on [IdRoute] in table 'Tickets'
+ALTER TABLE [dbo].[Tickets]
+ADD CONSTRAINT [FK_Tickets_Routes]
+    FOREIGN KEY ([IdRoute])
+    REFERENCES [dbo].[Routes]
+        ([IdRoute])
+    ON DELETE NO ACTION ON UPDATE NO ACTION;
+GO
+
+-- Creating non-clustered index for FOREIGN KEY 'FK_Tickets_Routes'
+CREATE INDEX [IX_FK_Tickets_Routes]
+ON [dbo].[Tickets]
+    ([IdRoute]);
+GO
+
+-- Creating foreign key on [IdStation] in table 'RoutesStations'
+ALTER TABLE [dbo].[RoutesStations]
+ADD CONSTRAINT [FK_RoutesStations_Station]
+    FOREIGN KEY ([IdStation])
+    REFERENCES [dbo].[Station]
+        ([IdStation])
+    ON DELETE NO ACTION ON UPDATE NO ACTION;
+GO
+
+-- Creating non-clustered index for FOREIGN KEY 'FK_RoutesStations_Station'
+CREATE INDEX [IX_FK_RoutesStations_Station]
+ON [dbo].[RoutesStations]
+    ([IdStation]);
+GO
+
+-- Creating foreign key on [IdUser] in table 'Tickets'
+ALTER TABLE [dbo].[Tickets]
+ADD CONSTRAINT [FK_Tickets_Users]
+    FOREIGN KEY ([IdUser])
+    REFERENCES [dbo].[Users]
+        ([IdUser])
+    ON DELETE NO ACTION ON UPDATE NO ACTION;
+GO
+
+-- Creating non-clustered index for FOREIGN KEY 'FK_Tickets_Users'
+CREATE INDEX [IX_FK_Tickets_Users]
+ON [dbo].[Tickets]
+    ([IdUser]);
+GO
+
 -- --------------------------------------------------
 -- Script has ended
 -- --------------------------------------------------

+ 35 - 0
RaspisKusach/ErrorWindow.xaml

@@ -0,0 +1,35 @@
+<Window x:Class="RaspisKusach.ErrorWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:RaspisKusach"
+        mc:Ignorable="d"
+        Title="ErrorWindow" 
+        MinHeight="120" 
+        Height="120"
+        Width="300" 
+        WindowStartupLocation="CenterScreen" 
+        WindowStyle="None" 
+        ResizeMode="NoResize">
+    <Border Background="{StaticResource Color2}"
+            MouseDown="Border_MouseDown">
+        <StackPanel>
+            <TextBlock Name="ErrorLabel" 
+               Text="Ошибка." 
+               TextWrapping="Wrap"
+               HorizontalAlignment="Center" 
+               Margin="19,10,19,0" 
+               VerticalAlignment="Top" 
+               Width="262">
+            </TextBlock>
+            <Button Content="Закрыть" 
+                VerticalAlignment="Bottom" 
+                HorizontalAlignment="Center" 
+                Height="30" 
+                Width="130" 
+                Margin="0,0,0,15" 
+                Click="BackClick"/>
+        </StackPanel>
+    </Border>
+</Window>

+ 24 - 0
RaspisKusach/ErrorWindow.xaml.cs

@@ -0,0 +1,24 @@
+using System.Windows;
+using System.Windows.Input;
+namespace RaspisKusach
+{
+    public partial class ErrorWindow : Window
+    {
+        public ErrorWindow(string error)
+        {
+            InitializeComponent();
+            ErrorLabel.Text = error;
+        }
+        private void BackClick(object sender, RoutedEventArgs e)
+        {
+            this.Close();
+        }
+
+        private void Border_MouseDown(object sender, MouseButtonEventArgs e)
+        {
+            if (e.LeftButton == MouseButtonState.Pressed)
+                DragMove();
+        }
+    }
+}
+

+ 8 - 8
RaspisKusach/Functions.cs

@@ -59,14 +59,14 @@ namespace RaspisKusach
             else
                 return true;
         }
-        //// Проверка на правильность введеных данных при входе
-        //public static bool LoginCheck(string login, string password)
-        //{
-        //    if (cnt.db.User.Select(item => item.NickName + item.Password).Contains(login + Encrypt.GetHash(password)))
-        //        return true;
-        //    else
-        //        return false;
-        //}
+        // Проверка на правильность введеных данных при входе
+        public static bool LoginCheck(string login, string password)
+        {
+            if (cnt.db.Users.Select(item => item.Login + item.Password).Contains(login + Encrypt.GetHash(password)))
+                return true;
+            else
+                return false;
+        }
         //// Проверка на уникальность логина
         //public static bool IsLoginAlreadyTaken(string login)
         //{

+ 22 - 1
RaspisKusach/Pages/LoginPage.xaml.cs

@@ -20,6 +20,7 @@ namespace RaspisKusach.Pages
     /// </summary>
     public partial class LoginPage : Page
     {
+        bool Test = true;
         public LoginPage()
         {
             InitializeComponent();
@@ -32,7 +33,27 @@ namespace RaspisKusach.Pages
 
         private void LogButton_Click(object sender, RoutedEventArgs e)
         {
-            NavigationService.Navigate(new Pages.MainPage());
+            if (Test)
+                NavigationService.Navigate(new Pages.MainPage());
+            else
+            {
+                try
+                {
+                    if (!Functions.IsValidLogAndPass(LogBox.Text, PassBox.Password))
+                        new ErrorWindow("Поля не могут быть пустыми").Show();
+                    else if (!Functions.LoginCheck(LogBox.Text, PassBox.Password))
+                        new ErrorWindow("Неверный логин или пароль").Show();
+                    else
+                    {
+                        //Profile.userId = cnt.db.User.Where(item => item.NickName == LogBox.Text).Select(item => item.Id).FirstOrDefault();
+                        NavigationService.Navigate(new Pages.MainPage());
+                    }
+                }
+                catch
+                {
+                    new ErrorWindow("Ошибка входа").ShowDialog();
+                }
+            }
         }
     }
 }

+ 115 - 22
RaspisKusach/Pages/MainPage.xaml

@@ -22,7 +22,7 @@
                 BorderBrush="{StaticResource Selection}"
                 Margin="5"
                 Grid.Column="0">
-            
+
             <Grid Background="{x:Null}">
                 <StackPanel>
                     <Label Content="Направление"
@@ -72,7 +72,7 @@
                             Click="FindRoutesButton_Click">
                     </Button>
                 </StackPanel>
-                
+
             </Grid>
         </Border>
 
@@ -81,6 +81,7 @@
               Background="{x:Null}"
               Grid.Column="1"
               Visibility="Collapsed">
+            
             <Border Height="120"
                     CornerRadius="10"
                     Background="{StaticResource Color2}"
@@ -88,6 +89,7 @@
                     BorderBrush="{StaticResource Selection}"
                     Margin="10,2,10,2"
                     MouseDown="Border_MouseDown">
+                
                 <Grid Background="{x:Null}">
                     <Grid.ColumnDefinitions>
                         <ColumnDefinition/>
@@ -98,6 +100,7 @@
                         <RowDefinition/>
                     </Grid.RowDefinitions>
 
+                    <!--UPLEFT-->
                     <StackPanel Orientation="Horizontal"
                             Grid.Column="0">
                         <Image Width="35"
@@ -112,9 +115,9 @@
                                    Margin="0,-7,0,0"/>
                         </StackPanel>
                     </StackPanel>
-
+                    <!--UPRIGHT-->
                     <StackPanel Orientation="Horizontal"
-                                    Grid.Column="1"
+                                Grid.Column="1"
                                 HorizontalAlignment="Right">
                         <Image Source="/Resources/Train.png"
                                        Margin="3">
@@ -128,9 +131,39 @@
 
                     </StackPanel>
 
-                    <Grid Grid.Row="1" Grid.ColumnSpan="2">
-                        <StackPanel>
-                            <Label Name="FROML"
+                    <!--DOWNLEFT-->
+                    <Grid Grid.Row="1" Grid.Column="0"
+                          Background="{x:Null}">
+                        <Grid Background="{x:Null}">
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition/>
+                                <ColumnDefinition/>
+                                <ColumnDefinition/>
+                            </Grid.ColumnDefinitions>
+                            
+                            <StackPanel>
+                                <Label Content="City">
+
+                                </Label>
+                                <Label Content="Time">
+
+                                </Label>
+                            </StackPanel>
+
+                            <Label Content="TimeBetween" Grid.Column="1">
+
+                            </Label>
+
+                            <StackPanel Grid.Column="2">
+                                <Label Content="City">
+
+                                </Label>
+                                <Label Content="Time">
+
+                                </Label>
+                            </StackPanel>
+                            
+                            <!--<Label Name="FROML"
                                    Content="{Binding Station.Name}">
                                 
                             </Label>
@@ -140,12 +173,26 @@
                             <Label Name="ToL"
                                    Content="{Binding Station.Name}">
                                 
-                            </Label>
-                        </StackPanel>
+                            </Label>-->
+                        </Grid>
                     </Grid>
+
+                    <ListBox Grid.Row="1" Grid.Column="1"
+                          Background="{x:Null}">
+                        <Grid Width="260" Height="20" Background="Black">
+                            
+                        </Grid>
+                        <Grid Width="260" Height="20" Background="Black">
+                            
+                        </Grid>
+                        <Grid Width="260" Height="20" Background="Black">
+                            
+                        </Grid>
+                    </ListBox>
+                    
                 </Grid>
 
-                
+
             </Border>
         </Grid>
 
@@ -161,6 +208,7 @@
                     BorderBrush="{StaticResource Selection}"
                     Margin="10,2,10,2"
                     MouseDown="Border_MouseDown">
+
                         <Grid Background="{x:Null}">
                             <Grid.ColumnDefinitions>
                                 <ColumnDefinition/>
@@ -171,6 +219,7 @@
                                 <RowDefinition/>
                             </Grid.RowDefinitions>
 
+                            <!--UPLEFT-->
                             <StackPanel Orientation="Horizontal"
                             Grid.Column="0">
                                 <Image Width="35"
@@ -185,9 +234,9 @@
                                    Margin="0,-7,0,0"/>
                                 </StackPanel>
                             </StackPanel>
-
+                            <!--UPRIGHT-->
                             <StackPanel Orientation="Horizontal"
-                                    Grid.Column="1"
+                                Grid.Column="1"
                                 HorizontalAlignment="Right">
                                 <Image Source="/Resources/Train.png"
                                        Margin="3">
@@ -201,21 +250,65 @@
 
                             </StackPanel>
 
-                            <Grid Grid.Row="1" Grid.ColumnSpan="2">
-                                <StackPanel>
-                                    <Label Name="FROML"
-                                   Content="{Binding stationArrival}">
+                            <!--DOWNLEFT-->
+                            <Grid Grid.Row="1" Grid.Column="0"
+                          Background="{x:Null}">
+                                <Grid Background="{x:Null}">
+                                    <Grid.ColumnDefinitions>
+                                        <ColumnDefinition/>
+                                        <ColumnDefinition/>
+                                        <ColumnDefinition/>
+                                    </Grid.ColumnDefinitions>
 
-                                    </Label>
-                                    <Label Content="To">
+                                    <StackPanel>
+                                        <Label Content="City">
 
-                                    </Label>
-                                    <Label Name="ToL"
-                                   Content="{Binding stationDeparture}">
+                                        </Label>
+                                        <Label Content="Time">
+
+                                        </Label>
+                                    </StackPanel>
+
+                                    <Label Content="TimeBetween" Grid.Column="1">
 
                                     </Label>
-                                </StackPanel>
+
+                                    <StackPanel Grid.Column="2">
+                                        <Label Content="City">
+
+                                        </Label>
+                                        <Label Content="Time">
+
+                                        </Label>
+                                    </StackPanel>
+
+                                    <!--<Label Name="FROML"
+                                   Content="{Binding Station.Name}">
+                                
+                            </Label>
+                            <Label Content="To">
+                                
+                            </Label>
+                            <Label Name="ToL"
+                                   Content="{Binding Station.Name}">
+                                
+                            </Label>-->
+                                </Grid>
                             </Grid>
+
+                            <ListBox Grid.Row="1" Grid.Column="1"
+                          Background="{x:Null}">
+                                <Grid Width="260" Height="20" Background="Black">
+
+                                </Grid>
+                                <Grid Width="260" Height="20" Background="Black">
+
+                                </Grid>
+                                <Grid Width="260" Height="20" Background="Black">
+
+                                </Grid>
+                            </ListBox>
+
                         </Grid>
 
 

+ 7 - 0
RaspisKusach/RaspisKusach.csproj

@@ -84,6 +84,9 @@
       <DependentUpon>EDM.edmx</DependentUpon>
     </Compile>
     <Compile Include="Encrypt.cs" />
+    <Compile Include="ErrorWindow.xaml.cs">
+      <DependentUpon>ErrorWindow.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Functions.cs" />
     <Compile Include="Pages\LoginPage.xaml.cs">
       <DependentUpon>LoginPage.xaml</DependentUpon>
@@ -117,6 +120,10 @@
     <Compile Include="Users.cs">
       <DependentUpon>EDM.tt</DependentUpon>
     </Compile>
+    <Page Include="ErrorWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="MainWindow.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>