Imagara 2 vuotta sitten
vanhempi
commit
469b6f9064

+ 1 - 0
RaspisKusach/Carriages.cs

@@ -23,6 +23,7 @@ namespace RaspisKusach
         public int IdCarriage { get; set; }
         public int IdTrain { get; set; }
         public int Places { get; set; }
+        public string Category { get; set; }
     
         public virtual Trains Trains { get; set; }
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]

+ 6 - 3
RaspisKusach/EDM.edmx

@@ -12,6 +12,7 @@
           <Property Name="IdCarriage" Type="int" Nullable="false" />
           <Property Name="IdTrain" Type="int" Nullable="false" />
           <Property Name="Places" Type="int" Nullable="false" />
+          <Property Name="Category" Type="nvarchar" MaxLength="50" Nullable="false" />
         </EntityType>
         <EntityType Name="Routes">
           <Key>
@@ -57,7 +58,6 @@
           <Property Name="IdTrip" Type="int" Nullable="false" />
           <Property Name="IdCarriage" Type="int" Nullable="false" />
           <Property Name="PlaceNumber" Type="int" Nullable="false" />
-          <Property Name="Category" Type="int" Nullable="false" />
           <Property Name="BuyDate" Type="datetime" Nullable="false" />
         </EntityType>
         <EntityType Name="Trains">
@@ -84,6 +84,7 @@
           <Property Name="IdUser" Type="int" Nullable="false" />
           <Property Name="Login" Type="nvarchar" MaxLength="50" Nullable="false" />
           <Property Name="Password" Type="nvarchar" MaxLength="50" Nullable="false" />
+          <Property Name="Email" Type="nvarchar" MaxLength="50" Nullable="false" />
           <Property Name="Passport" Type="nvarchar" MaxLength="10" />
           <Property Name="Surname" Type="nvarchar" MaxLength="50" />
           <Property Name="Name" Type="nvarchar" MaxLength="50" />
@@ -285,6 +286,7 @@
           <Property Name="Places" Type="Int32" Nullable="false" />
           <NavigationProperty Name="Trains" Relationship="RouteScheduleDataBaseModel.FK_Carriages_Trains" FromRole="Carriages" ToRole="Trains" />
           <NavigationProperty Name="Tickets" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Carriages" FromRole="Carriages" ToRole="Tickets" />
+          <Property Name="Category" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
         </EntityType>
         <EntityType Name="Routes">
           <Key>
@@ -335,7 +337,6 @@
           <Property Name="IdTrip" Type="Int32" Nullable="false" />
           <Property Name="IdCarriage" Type="Int32" Nullable="false" />
           <Property Name="PlaceNumber" Type="Int32" Nullable="false" />
-          <Property Name="Category" Type="Int32" Nullable="false" />
           <Property Name="BuyDate" Type="DateTime" Nullable="false" Precision="3" />
           <NavigationProperty Name="Carriages" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Carriages" FromRole="Tickets" ToRole="Carriages" />
           <NavigationProperty Name="Trips" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Trips" FromRole="Tickets" ToRole="Trips" />
@@ -376,6 +377,7 @@
           <Property Name="Patronymic" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
           <Property Name="Permissions" Type="Int32" Nullable="false" />
           <NavigationProperty Name="Tickets" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Users" FromRole="Users" ToRole="Tickets" />
+          <Property Name="Email" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
         </EntityType>
         <Association Name="FK_Carriages_Trains">
           <End Type="RouteScheduleDataBaseModel.Trains" Role="Trains" Multiplicity="1" />
@@ -482,6 +484,7 @@
           <EntitySetMapping Name="Carriages">
             <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Carriages">
               <MappingFragment StoreEntitySet="Carriages">
+                <ScalarProperty Name="Category" ColumnName="Category" />
                 <ScalarProperty Name="Places" ColumnName="Places" />
                 <ScalarProperty Name="IdTrain" ColumnName="IdTrain" />
                 <ScalarProperty Name="IdCarriage" ColumnName="IdCarriage" />
@@ -531,7 +534,6 @@
             <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Tickets">
               <MappingFragment StoreEntitySet="Tickets">
                 <ScalarProperty Name="BuyDate" ColumnName="BuyDate" />
-                <ScalarProperty Name="Category" ColumnName="Category" />
                 <ScalarProperty Name="PlaceNumber" ColumnName="PlaceNumber" />
                 <ScalarProperty Name="IdCarriage" ColumnName="IdCarriage" />
                 <ScalarProperty Name="IdTrip" ColumnName="IdTrip" />
@@ -562,6 +564,7 @@
           <EntitySetMapping Name="Users">
             <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Users">
               <MappingFragment StoreEntitySet="Users">
+                <ScalarProperty Name="Email" ColumnName="Email" />
                 <ScalarProperty Name="Permissions" ColumnName="Permissions" />
                 <ScalarProperty Name="Patronymic" ColumnName="Patronymic" />
                 <ScalarProperty Name="Name" ColumnName="Name" />

+ 1 - 1
RaspisKusach/EDM.edmx.diagram

@@ -4,7 +4,7 @@
   <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
     <!-- Diagram content (shape and connector positions) -->
     <edmx:Diagrams>
-      <Diagram DiagramId="cbfc4ddba6b5479eb5c52b1c4156acc9" Name="Diagram1">
+      <Diagram DiagramId="cbfc4ddba6b5479eb5c52b1c4156acc9" Name="Diagram1" ZoomLevel="98">
         <EntityTypeShape EntityType="RouteScheduleDataBaseModel.Carriages" Width="1.5" PointX="12" PointY="7.375" />
         <EntityTypeShape EntityType="RouteScheduleDataBaseModel.Routes" Width="1.5" PointX="14.625" PointY="4.125" />
         <EntityTypeShape EntityType="RouteScheduleDataBaseModel.RoutesStations" Width="1.5" PointX="14.625" PointY="1" />

+ 2 - 4
RaspisKusach/Encrypt.cs

@@ -1,15 +1,13 @@
 using System.Linq;
-using System.Security.Cryptography;
-using System.Text;
 namespace RaspisKusach
 {
     public class Encrypt
     {
         public static string GetHash(string password)
         {
-            using (var hash = SHA1.Create())
+            using (var hash = System.Security.Cryptography.SHA1.Create())
             {
-                return string.Concat(hash.ComputeHash(Encoding.UTF8.GetBytes(password)).Select(x => x.ToString("X2")));
+                return string.Concat(hash.ComputeHash(System.Text.Encoding.UTF8.GetBytes(password)).Select(x => x.ToString("X2")));
             }
         }
     }

+ 4 - 2
RaspisKusach/ErrorWindow.xaml

@@ -7,12 +7,14 @@
         mc:Ignorable="d"
         Title="ErrorWindow" 
         Height="100"
-        Width="300"
+        Width="600"
         WindowStartupLocation="CenterScreen" 
         WindowStyle="None" 
         ResizeMode="NoResize">
     <Border Background="{StaticResource ItemColor}"
-            MouseDown="Border_MouseDown">
+            MouseDown="Border_MouseDown"
+            BorderBrush="Black"
+            BorderThickness="1.5">
         <Grid>
             <Grid.RowDefinitions>
                 <RowDefinition Height="auto"/>

+ 14 - 16
RaspisKusach/Functions.cs

@@ -12,7 +12,7 @@ namespace RaspisKusach
         // Получение направления по маршруту или поездке
         public static string GetRouteDirection(Trips trip)
         {
-            return GetDepartureStationLocation(trip) + " - " + GetArrivalStationLocation(trip);
+            return GetDepartureStationLocation(trip.Routes) + " - " + GetArrivalStationLocation(trip.Routes);
         }
         // Получение времени прибытия поезда на станцию
         public static DateTime GetArrivalTime(Stations station, Trips trip)
@@ -40,23 +40,20 @@ namespace RaspisKusach
             return date;
         }
         // Получение станции отправления (первой)
-        public static string GetDepartureStationLocation(Trips trip)
-        {
-            return cnt.db.RoutesStations.Where(item => item.IdRoute == trip.Routes.IdRoute).OrderByDescending(item => item.IdRouteStation).Select(item => item.Stations.Location).FirstOrDefault();
-        }
         public static string GetDepartureStationLocation(Routes route)
         {
             return cnt.db.RoutesStations.Where(item => item.IdRoute == route.IdRoute).OrderByDescending(item => item.IdRouteStation).Select(item => item.Stations.Location).FirstOrDefault();
         }
         // Получение станции прибытия (последней)
-        public static string GetArrivalStationLocation(Trips trip)
-        {
-            return cnt.db.RoutesStations.Where(item => item.IdRoute == trip.Routes.IdRoute).Select(item => item.Stations.Location).FirstOrDefault();
-        }
         public static string GetArrivalStationLocation(Routes route)
         {
             return cnt.db.RoutesStations.Where(item => item.IdRoute == route.IdRoute).Select(item => item.Stations.Location).FirstOrDefault();
         }
+        public static int GetAvailableSeats(Carriages carriage)
+        {
+            //temp
+            return 0;
+        }
 
         // Валидация номера телефона
         public static bool IsPhoneNumberCorrect(string phoneNumber)
@@ -69,11 +66,16 @@ namespace RaspisKusach
             return true;
         }
 
-        // Валидация электронной почты
+        // Проверка электронной почты на правильность ввода
         public static bool IsEmailCorrect(string email)
         {
             return Regex.IsMatch(email, @"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$");
         }
+        // Проверка на уникальность электронной почты
+        public static bool IsEmailAlreadyTaken(string Email)
+        {
+            return cnt.db.Users.Select(item => item.Email).Contains(Email);
+        }
         // Валидация дня рождения
         public static bool IsDateOfBirthdayCorrect(DateTime Date)
         {
@@ -87,7 +89,7 @@ namespace RaspisKusach
         // Валидация логина и пароля
         public static bool IsLogEqualPass(string login, string password)
         {
-            return login == password; // RE
+            return login != password;
         }
         // Валидация логина и пароля
         public static bool IsLengthCorrect(string str)
@@ -104,11 +106,7 @@ namespace RaspisKusach
         {
             return cnt.db.Users.Select(item => item.Login).Contains(login);
         }
-        //// Проверка на уникальность электронной почты
-        //public static bool IsEmailAlreadyTaken(string Email)
-        //{
-        //    return cnt.db.Users.Select(item => item.).Contains(Email);
-        //}
+
         //// Проверка на уникальность электронной почты
         //public static bool IsPhoneNumberAlreadyTaken(string Phone)
         //{

+ 57 - 18
RaspisKusach/Pages/RegisterPage.xaml

@@ -31,41 +31,80 @@
             <Grid Style="{x:Null}" 
                   Background="{x:Null}">
                 <Grid Background="#a0a0a0"
-                      Opacity="0.85"/>
-                <StackPanel Orientation="Vertical"
-                        Margin="10"
-                        VerticalAlignment="Center"
-                        HorizontalAlignment="Center">
-                    <Label Content="Логин:" 
-                       HorizontalContentAlignment="Left"
-                       Height="40" 
-                       Width="240"
-                       FontSize="20"/>
-                    <TextBox Name="LogBox" 
+                      Opacity="0.85">
+                </Grid>
+                <Grid>
+                    <Grid.RowDefinitions>
+                        <RowDefinition Height="108*"/>
+                        <RowDefinition Height="37*"/>
+                    </Grid.RowDefinitions>
+                    
+                    <StackPanel Name="RegA"
+                                Visibility="Visible"
+                                Orientation="Vertical"
+                                Margin="10"
+                                VerticalAlignment="Center"
+                                HorizontalAlignment="Center">
+                        <Label Content="Логин:" 
+                               HorizontalContentAlignment="Left"
+                               Height="40" 
+                               Width="240"
+                               FontSize="20"/>
+                        <TextBox Name="LogBox" 
                              TextWrapping="Wrap" 
                              Height="40" 
                              Width="240"
                              FontSize="20"/>
-                    <Label Content="Пароль:"
+                        <Label Content="Пароль:"
                            HorizontalContentAlignment="Left"
                            Height="40" 
                            Width="240"
                            FontSize="20"/>
-                    <PasswordBox Name="PassBox"
+                        <PasswordBox Name="PassBox"
                                  Height="40" 
                                  Width="240"
                                  FontSize="20"/>
+                    </StackPanel>
+
+                    <StackPanel Name="RegB"
+                                Visibility="Collapsed"
+                                Orientation="Vertical"
+                                Margin="10"
+                                VerticalAlignment="Center"
+                                HorizontalAlignment="Center">
+                        <Label Content="ФИО:" 
+                               HorizontalContentAlignment="Left"
+                               Height="40" 
+                               Width="240"
+                               FontSize="20"/>
+                        <TextBox Name="FIOBox" 
+                             TextWrapping="Wrap" 
+                             Height="40" 
+                             Width="240"
+                             FontSize="20"/>
+                        <Label Content="Электронная почта:"
+                           HorizontalContentAlignment="Left"
+                           Height="40" 
+                           Width="240"
+                           FontSize="20"/>
+                        <TextBox Name="EmailBox"
+                                 Height="40" 
+                                 Width="240"
+                                 FontSize="20"/>
+                    </StackPanel>
+                    
                     <StackPanel Orientation="Horizontal"
-                                Margin="0,20,0,0">
-                        <Button Name="BackButton" 
-                                Content="Назад"
+                                Grid.Row="1"
+                                VerticalAlignment="Center"
+                                HorizontalAlignment="Center">
+                        <Button Content="Назад"
                                 Height="40" 
                                 Width="150" 
                                 Margin="0,0,30,0"
                                 FontSize="20"
                                 Click="BackButton_Click"/>
                         <Button x:Name="RegisterButton" 
-                                Content="Регистрация"
+                                Content="Далее"
                                 Height="40" 
                                 Width="150"
                                 FontSize="20"
@@ -73,7 +112,7 @@
                                 Click="RegisterButton_Click">
                         </Button>
                     </StackPanel>
-                </StackPanel>
+                </Grid>
             </Grid>
         </Border>
     </Grid>

+ 56 - 3
RaspisKusach/Pages/RegisterPage.xaml.cs

@@ -20,6 +20,7 @@ namespace RaspisKusach.Pages
     /// </summary>
     public partial class RegisterPage : Page
     {
+        byte registerStage = 1;
         public RegisterPage()
         {
             InitializeComponent();
@@ -27,13 +28,65 @@ namespace RaspisKusach.Pages
 
         private void BackButton_Click(object sender, RoutedEventArgs e)
         {
-            NavigationService.Navigate(new Pages.LoginPage());
+            NavigationService.GoBack();
         }
 
         private void RegisterButton_Click(object sender, RoutedEventArgs e)
         {
-            MessageBox.Show("{Status here}");
-            NavigationService.Navigate(new Pages.LoginPage());
+            try
+            {
+                if (registerStage == 1)
+                {
+                    if (!Functions.IsLengthCorrect(LogBox.Text.Trim()))
+                        new ErrorWindow("Поле «Логин» должно содержать не менее 5 символов.").Show();
+                    else if (!Functions.IsLengthCorrect(PassBox.Password.Trim()))
+                        new ErrorWindow("Поле «Пароль» должно содержать не менее 5 символов.").Show();
+                    else if (!Functions.IsLogEqualPass(LogBox.Text, PassBox.Password))
+                        new ErrorWindow("Поля «Логин» и «Пароль» не должны быть равны.").Show();
+                    else if (Functions.IsLoginAlreadyTaken(LogBox.Text))
+                        new ErrorWindow("Данный логин уже занят").Show();
+                    else
+                    {
+                        RegA.Visibility = Visibility.Collapsed;
+                        RegB.Visibility = Visibility.Visible;
+                        registerStage = 2;
+                        RegisterButton.Content = "Регистрация";
+                    }
+                }
+                else
+                {
+                    if (!Functions.IsEmailCorrect(EmailBox.Text))
+                        new ErrorWindow("Email введен неверно.").Show();
+                    else if (Functions.IsEmailAlreadyTaken(EmailBox.Text))
+                        new ErrorWindow("Данный email уже используется.").Show();
+                    else
+                    {
+                        string[] fio = new string[3];
+                        fio = FIOBox.Text.Split(' ');
+                        Users newUser = new Users()
+                        {
+                            IdUser = cnt.db.Users.Select(p => p.IdUser).DefaultIfEmpty(0).Max() + 1,
+                            Login = LogBox.Text,
+                            Password = Encrypt.GetHash(PassBox.Password),
+                            Email = EmailBox.Text,
+                            Surname = fio[0],
+                            Name = fio[1],
+                            Patronymic = fio[2],
+                            Permissions = cnt.db.Users.Count() == 0 ? 1 : 0,
+                        };
+                        cnt.db.Users.Add(newUser);
+                        cnt.db.SaveChanges();
+                        new ErrorWindow("Успешная регистрация").ShowDialog();
+
+                        Session.User = cnt.db.Users.Max();
+                        NavigationService.Navigate(new ProfilePage());
+                    }
+                }
+            }
+            catch
+            {
+                new ErrorWindow("Ошибка.").ShowDialog();
+            }
         }
     }
 }

+ 2 - 2
RaspisKusach/Pages/SearchForTicketsPage.xaml.cs

@@ -76,9 +76,9 @@ namespace RaspisKusach.Pages
                 if (((TripClass)ListBox.SelectedItem) != null)
                     NavigationService.Navigate(new TripInfoPage(((TripClass)ListBox.SelectedItem).trip));
             }
-            catch
+            catch (Exception ex)
             {
-                new ErrorWindow("Ошибка открытия окна.").ShowDialog();
+                new ErrorWindow("Ошибка открытия окна: " + ex.Message).ShowDialog();
             }
         }
 

+ 9 - 13
RaspisKusach/Pages/TripInfoPage.xaml

@@ -80,7 +80,7 @@
             temp
             <ListBox.ItemTemplate>
                 <DataTemplate>
-                    <Border Height="120"
+                    <Border Height="90"
                             Width="{Binding Path=ActualWidth, Mode=OneWay, ElementName=CarriageListBox, Converter={StaticResource math}, ConverterParameter=x-15}"
                             CornerRadius="10"
                             Background="{StaticResource ItemColor}"
@@ -91,19 +91,20 @@
 
                         <Grid Margin="7">
                             <Grid.RowDefinitions>
-                                <RowDefinition Height="40"/>
+                                <RowDefinition Height="27"/>
                                 <RowDefinition/>
                             </Grid.RowDefinitions>
 
                             <!--UP-->
                             <StackPanel Orientation="Horizontal">
-                                <Image Width="35"
-                                       Height="35"
-                                       Margin="5"
+                                <Image Width="30"
+                                       Height="30"
                                        HorizontalAlignment="Left"
                                        Source="/RaspisKusach;component/Resources/Сarriage.png">
                                 </Image>
-                                <Label Content="Вагон #2"/>
+                                <Label Content="Вагон #"/>
+                                <Label Content="{Binding CarriageNum}"
+                                       Margin="-10,0,0,0"/>
                             </StackPanel>
 
                             <!--DOWN-->
@@ -119,17 +120,12 @@
                                 </StackPanel>
                                 <StackPanel Grid.Column="1">
                                     <Label Content="Класс: "/>
-                                    <Label Content="Люкс"/>
+                                    <Label Content="{Binding Carriage.Category}"/>
                                 </StackPanel>
 
-
-                                <Label Grid.Column="1"
-                                       Content=""/>
-
-
                                 <Button Grid.Column="2"
                                         Content="Купить"
-                                        Margin="10">
+                                        Margin="6">
                                     
                                 </Button>
                             </Grid>

+ 20 - 37
RaspisKusach/Pages/TripInfoPage.xaml.cs

@@ -18,60 +18,43 @@ namespace RaspisKusach.Pages
 {
     public partial class TripInfoPage : Page
     {
-        public TripInfoPage(Trips trip)
+        Trips trip;
+        public TripInfoPage(Trips _trip)
         {
             InitializeComponent();
+            trip = _trip;
+
             string stationsList = "";
+
             foreach (RoutesStations rs in cnt.db.RoutesStations.Where(item => item.IdRoute == trip.IdRoute))
-                stationsList += rs.Stations.Location == Functions.GetDepartureStationLocation(trip) ? rs.Stations.Name : $"{rs.Stations.Name} → ";
+                stationsList += rs.Stations.Location == Functions.GetDepartureStationLocation(trip.Routes) ? rs.Stations.Name : $"{rs.Stations.Name} → ";
 
             Direction.Content = stationsList;
+
+
+            CarriageListBox.Items.Clear();
             UpdateCarriagesList();
         }
         private void UpdateCarriagesList()
         {
-
-            Stations arrivalStation = cnt.db.Stations.Where(item => item.Location == StationArrivalComboBox.Text).FirstOrDefault(),
-                departureStation = cnt.db.Stations.Where(item => item.Location == StationDepartureComboBox.Text).FirstOrDefault();
-            if (arrivalStation == null || departureStation == null)
-                return;
-
-            List<TripClass> routeList = new List<TripClass>();
-
-            foreach (Trips trip in cnt.db.Trips)
+            List<CarriageClass> routeList = new List<CarriageClass>();
+            int carrNum = 2;
+            foreach (Carriages item in cnt.db.Carriages.Where(item => item.IdTrain == trip.IdTrain))
             {
-                if (cnt.db.RoutesStations.Select(item => item.Stations.Location + " " + item.IdRoute).Contains(arrivalStation.Location + " " + trip.IdRoute)
-                    && cnt.db.RoutesStations.Select(item => item.Stations.Location + " " + item.IdRoute).Contains(departureStation.Location + " " + trip.IdRoute)
-                    && Functions.GetArrivalTime(arrivalStation, trip) > Functions.GetDepartureTime(departureStation, trip)
-                    && (Functions.GetArrivalTime(arrivalStation, trip).ToShortDateString() == ArrivalDate.Text
-                        || ArrivalDate.Text == null
-                        || ArrivalDate.Text.Trim() == ""))
+                routeList.Add(new CarriageClass()
                 {
-                    TripClass rt = new TripClass();
-                    rt.trip = trip;
-                    rt.trainCategory = trip.Trains.Category;
-                    rt.stationDeparture = StationDepartureComboBox.Text;
-                    rt.stationArrival = StationArrivalComboBox.Text;
-                    rt.timeArrival = Functions.GetArrivalTime(arrivalStation, trip).ToString(new CultureInfo("ru-RU"));
-                    rt.timeDeparture = Functions.GetDepartureTime(departureStation, trip).ToString(new CultureInfo("ru-RU"));
-
-                    rt.timeBetween = Functions.GetArrivalTime(arrivalStation, trip) - Functions.GetDepartureTime(departureStation, trip);
-
-                    routeList.Add(rt);
-                }
+                    Carriage = item,
+                    CarriageNum = carrNum
+                });
+                carrNum++;
             }
 
             CarriageListBox.ItemsSource = routeList;
         }
-        public class TripClass
+        public class CarriageClass
         {
-            public Carriages carriage { get; set; }
-            public string trainCategory { get; set; }
-            public string stationDeparture { get; set; }
-            public string stationArrival { get; set; }
-            public string timeDeparture { get; set; }
-            public string timeArrival { get; set; }
-            public TimeSpan timeBetween { get; set; }
+            public Carriages Carriage { get; set; }
+            public int CarriageNum { get; set; }
         }
 
     }

+ 1 - 0
RaspisKusach/RaspisKusach.csproj

@@ -242,6 +242,7 @@
       <DependentUpon>EDM.edmx</DependentUpon>
       <LastGenOutput>EDM.cs</LastGenOutput>
     </Content>
+    <Resource Include="todo.txt" />
     <Resource Include="Resources\Сarriage.png" />
     <Resource Include="Resources\Train.png" />
     <Resource Include="Resources\Background.jpg" />

+ 2 - 0
RaspisKusach/Styles/Style.xaml

@@ -101,5 +101,7 @@
         </Setter>
         <Setter Property="Foreground" Value="{StaticResource TextColor}"/>
     </Style>
+    
+    
 
 </ResourceDictionary>

+ 0 - 1
RaspisKusach/Tickets.cs

@@ -19,7 +19,6 @@ namespace RaspisKusach
         public int IdTrip { get; set; }
         public int IdCarriage { get; set; }
         public int PlaceNumber { get; set; }
-        public int Category { get; set; }
         public System.DateTime BuyDate { get; set; }
     
         public virtual Carriages Carriages { get; set; }

+ 1 - 0
RaspisKusach/Users.cs

@@ -28,6 +28,7 @@ namespace RaspisKusach
         public string Name { get; set; }
         public string Patronymic { get; set; }
         public int Permissions { get; set; }
+        public string Email { get; set; }
     
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
         public virtual ICollection<Tickets> Tickets { get; set; }

+ 8 - 0
RaspisKusach/todo.txt

@@ -0,0 +1,8 @@
+✘Подредактировать регистрацию + вход
+✘Добавить проверку на фио
+✘Добавить авто форматирование фио
+✘Добавить возможность покупки билетов
+✘Добавить Админ меню(?)
+✘Сделать юнит тесты
+✘Получить 4/5 за защиту
+✓Пойти спать