gr672_pgv před 4 roky
rodič
revize
96abe59cb2
42 změnil soubory, kde provedl 1025 přidání a 89 odebrání
  1. binární
      .vs/FillingColumn/v16/.suo
  2. 0 0
      .vs/FillingColumn/v16/Server/sqlite3/db.lock
  3. binární
      .vs/FillingColumn/v16/Server/sqlite3/storage.ide
  4. 1 1
      FillingColumn/AddDataOfCardWindow.xaml
  5. 1 1
      FillingColumn/AddDataOfCardWindow.xaml.cs
  6. 1 1
      FillingColumn/DataFromCamera.cs
  7. 20 0
      FillingColumn/DataOfPayment.cs
  8. 22 0
      FillingColumn/EnterPINWindow.xaml
  9. 37 0
      FillingColumn/EnterPINWindow.xaml.cs
  10. 18 1
      FillingColumn/FillingColumn.csproj
  11. 3 1
      FillingColumn/Helper.cs
  12. 25 0
      FillingColumn/NoMoneyWindow.xaml
  13. 49 0
      FillingColumn/NoMoneyWindow.xaml.cs
  14. 1 2
      FillingColumn/RefuelingPage.xaml
  15. 246 15
      FillingColumn/RefuelingPage.xaml.cs
  16. 18 0
      FillingColumn/RootDataOfPayment.cs
  17. 19 0
      FillingColumn/RootDataOfRefuling.cs
  18. binární
      FillingColumn/bin/Debug/FillingColumn.exe
  19. binární
      FillingColumn/bin/Debug/FillingColumn.pdb
  20. binární
      FillingColumn/obj/Debug/AddDataOfCardWindow.baml
  21. 1 1
      FillingColumn/obj/Debug/AddDataOfCardWindow.g.cs
  22. 1 1
      FillingColumn/obj/Debug/AddDataOfCardWindow.g.i.cs
  23. binární
      FillingColumn/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  24. binární
      FillingColumn/obj/Debug/EnterPINWindow.baml
  25. 106 0
      FillingColumn/obj/Debug/EnterPINWindow.g.cs
  26. 106 0
      FillingColumn/obj/Debug/EnterPINWindow.g.i.cs
  27. 1 1
      FillingColumn/obj/Debug/FillingColumn.csproj.CoreCompileInputs.cache
  28. 4 0
      FillingColumn/obj/Debug/FillingColumn.csproj.FileListAbsolute.txt
  29. binární
      FillingColumn/obj/Debug/FillingColumn.csprojAssemblyReference.cache
  30. binární
      FillingColumn/obj/Debug/FillingColumn.exe
  31. binární
      FillingColumn/obj/Debug/FillingColumn.g.resources
  32. binární
      FillingColumn/obj/Debug/FillingColumn.pdb
  33. 3 3
      FillingColumn/obj/Debug/FillingColumn_MarkupCompile.cache
  34. 3 3
      FillingColumn/obj/Debug/FillingColumn_MarkupCompile.i.cache
  35. 1 2
      FillingColumn/obj/Debug/FillingColumn_MarkupCompile.i.lref
  36. 2 0
      FillingColumn/obj/Debug/FillingColumn_MarkupCompile.lref
  37. binární
      FillingColumn/obj/Debug/NoMoneyWindow.baml
  38. 151 0
      FillingColumn/obj/Debug/NoMoneyWindow.g.cs
  39. 151 0
      FillingColumn/obj/Debug/NoMoneyWindow.g.i.cs
  40. binární
      FillingColumn/obj/Debug/RefuelingPage.baml
  41. 17 28
      FillingColumn/obj/Debug/RefuelingPage.g.cs
  42. 17 28
      FillingColumn/obj/Debug/RefuelingPage.g.i.cs

binární
.vs/FillingColumn/v16/.suo


+ 0 - 0
.vs/FillingColumn/v16/Server/sqlite3/db.lock


binární
.vs/FillingColumn/v16/Server/sqlite3/storage.ide


+ 1 - 1
FillingColumn/AddDataOfCardWindow.xaml

@@ -5,7 +5,7 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:FillingColumn"
         mc:Ignorable="d"
-        Title="Добавление данных карты" Height="300" Width="600">
+        Title="Добавление данных карты" Height="300" Width="600" WindowStartupLocation="CenterScreen">
     <Grid>
         <Grid.RowDefinitions>
             <RowDefinition/>

+ 1 - 1
FillingColumn/AddDataOfCardWindow.xaml.cs

@@ -30,7 +30,7 @@ namespace FillingColumn
 
         private void BtnAddCardData_Click(object sender, RoutedEventArgs e)
         {
-            if (string.IsNullOrEmpty(TxtCardNumber.Text) || TxtCardNumber.Text.All(char.IsDigit) == false)
+            if (string.IsNullOrEmpty(TxtCardNumber.Text) || TxtCardNumber.Text.Any(char.IsLetter) == true)
             {
                 MessageBox.Show("Не корректный номер карты", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
                 return;

+ 1 - 1
FillingColumn/DataFromCamera.cs

@@ -6,7 +6,7 @@ using System.Threading.Tasks;
 
 namespace FillingColumn
 {
-    public class DataFromCamera
+    public class DataOfCamera
     {
         public int DataFromCameraID { get; set; }
         public DateTime Date { get; set; }

+ 20 - 0
FillingColumn/DataOfPayment.cs

@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace FillingColumn
+{
+   public class DataOfPayment
+   {
+        public decimal PriceRefueling { get; set; }
+        public string NumberCard { get; set; }
+        public string CardExpDate { get; set; }
+        public decimal Balance { get; set; }
+        public string CardHolder { get; set; }
+        public string PIN { get; set; }
+        public string KeySession { get; set; }
+        public int IDGasStation { get; set; }
+    }
+}

+ 22 - 0
FillingColumn/EnterPINWindow.xaml

@@ -0,0 +1,22 @@
+<Window x:Class="FillingColumn.EnterPINWindow"
+        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:FillingColumn"
+        mc:Ignorable="d"
+        Title="Ввод ПИН кода" Height="300" Width="600" WindowStartupLocation="CenterScreen" MaxHeight="300" MaxWidth="600">
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition/>
+            <RowDefinition/>
+            <RowDefinition/>
+        </Grid.RowDefinitions>
+
+        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="30">Введите пин код</TextBlock>
+
+        <TextBox Grid.Row="1" Name="TxtPIN" VerticalAlignment="Center" Margin="50,0,50,0" MaxLines="4"></TextBox>
+
+        <Button Grid.Row="2" Content="Подтвердить" Name="BtnEnterPIN" Click="BtnEnterPIN_Click" Margin="150,30,150,30" ></Button>
+    </Grid>
+</Window>

+ 37 - 0
FillingColumn/EnterPINWindow.xaml.cs

@@ -0,0 +1,37 @@
+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.Shapes;
+
+namespace FillingColumn
+{
+    /// <summary>
+    /// Логика взаимодействия для EnterPINWindow.xaml
+    /// </summary>
+    public partial class EnterPINWindow : Window
+    {
+        public EnterPINWindow()
+        {
+            InitializeComponent();
+        }
+
+        private void BtnEnterPIN_Click(object sender, RoutedEventArgs e)
+        {
+            if (string.IsNullOrEmpty(TxtPIN.Text) || TxtPIN.Text.All(char.IsDigit) == false || TxtPIN.Text.Length != 4) 
+            {
+                MessageBox.Show("Не корректный ПИН", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+            }
+            Helper.EnterPIN = TxtPIN.Text;
+            this.Close();
+        }
+    }
+}

+ 18 - 1
FillingColumn/FillingColumn.csproj

@@ -62,15 +62,24 @@
       <DependentUpon>AddDataOfCardWindow.xaml</DependentUpon>
     </Compile>
     <Compile Include="CardIssuer.cs" />
-    <Compile Include="DataFromCamera.cs" />
+    <Compile Include="DataOfCamera.cs" />
+    <Compile Include="DataOfPayment.cs" />
+    <Compile Include="EnterPINWindow.xaml.cs">
+      <DependentUpon>EnterPINWindow.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Helper.cs" />
     <Compile Include="ManagerFrame.cs" />
+    <Compile Include="NoMoneyWindow.xaml.cs">
+      <DependentUpon>NoMoneyWindow.xaml</DependentUpon>
+    </Compile>
     <Compile Include="RefuelingPage.xaml.cs">
       <DependentUpon>RefuelingPage.xaml</DependentUpon>
     </Compile>
     <Compile Include="RootDataOfCar.cs" />
     <Compile Include="RootDataOfCard.cs" />
     <Compile Include="RootDataOfGasStation.cs" />
+    <Compile Include="RootDataOfPayment.cs" />
+    <Compile Include="RootDataOfRefuling.cs" />
     <Compile Include="StartWorkPage.xaml.cs">
       <DependentUpon>StartWorkPage.xaml</DependentUpon>
     </Compile>
@@ -78,6 +87,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="EnterPINWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="MainWindow.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
@@ -91,6 +104,10 @@
       <DependentUpon>MainWindow.xaml</DependentUpon>
       <SubType>Code</SubType>
     </Compile>
+    <Page Include="NoMoneyWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="RefuelingPage.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 3 - 1
FillingColumn/Helper.cs

@@ -12,6 +12,8 @@ namespace FillingColumn
         public static string KeySession;
         public static RootDataOfCar FindCar;
         public static RootDataOfCard EnterBankCard;
-
+        public static int TypeOfNoMoney;
+        public static DataOfCamera DataFromCamera;
+        public static string EnterPIN;
     }
 }

+ 25 - 0
FillingColumn/NoMoneyWindow.xaml

@@ -0,0 +1,25 @@
+<Window x:Class="FillingColumn.NoMoneyWindow"
+        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:FillingColumn"
+        mc:Ignorable="d"
+        Title="Не достаточно средств на карте!" Height="300" Width="900" MaxHeight="300" WindowStartupLocation="CenterScreen" MaxWidth="900">
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition/>
+            <ColumnDefinition/>
+            <ColumnDefinition/>
+        </Grid.ColumnDefinitions>
+        <Button VerticalAlignment="Center" Name="BtnPaymentOFCard" Click="BtnPaymentOFCard_Click" Height="50" Margin="20">
+            <TextBlock Text="Оплатить с кредитной карты" TextWrapping="Wrap" TextAlignment="Center"></TextBlock>
+        </Button>
+        <Button VerticalAlignment="Center" Name="BtnRefulingOnAll" Grid.Column="1" Click="BtnRefulingOnAll_Click" Height="50" Margin="20">
+            <TextBlock TextWrapping="Wrap" Name="TxtRefulingOnAll" TextAlignment="Center"></TextBlock>
+        </Button>
+        <Button VerticalAlignment="Center" Name="BtnAddOnCreditCard" Grid.Column="2" Click="BtnAddOnCreditCard_Click" Height="70" Margin="20">
+            <TextBlock x:Name="TxtAddOnCreditCard" TextWrapping="Wrap" TextAlignment="Center"></TextBlock>
+        </Button>
+    </Grid>
+</Window>

+ 49 - 0
FillingColumn/NoMoneyWindow.xaml.cs

@@ -0,0 +1,49 @@
+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.Shapes;
+
+namespace FillingColumn
+{
+    /// <summary>
+    /// Логика взаимодействия для NoMoneyWindow.xaml
+    /// </summary>
+    public partial class NoMoneyWindow : Window
+    {
+        public NoMoneyWindow(decimal MissingAmount, bool CreditCardIsEnable, int AvailableAmountFuel)
+        {
+            InitializeComponent();
+            Helper.TypeOfNoMoney = 0;
+            TxtRefulingOnAll.Text = $"Заправить {AvailableAmountFuel} литров за накопленные баллы";
+            BtnAddOnCreditCard.IsEnabled = CreditCardIsEnable;
+            TxtAddOnCreditCard.Text = $"Добавить недостающую сумму {MissingAmount.ToString("F2")} рублей с помощью кредитной карты";
+        }
+
+        private void BtnPaymentOFCard_Click(object sender, RoutedEventArgs e)
+        {
+            Helper.TypeOfNoMoney = 1;
+            this.Close();
+        }
+
+        private void BtnRefulingOnAll_Click(object sender, RoutedEventArgs e)
+        {
+            Helper.TypeOfNoMoney = 2;
+            this.Close();
+        }
+
+        private void BtnAddOnCreditCard_Click(object sender, RoutedEventArgs e)
+        {
+            Helper.TypeOfNoMoney = 3;
+            this.Close();
+        }
+    }
+}

+ 1 - 2
FillingColumn/RefuelingPage.xaml

@@ -33,8 +33,7 @@
             <ComboBox Name="CmbTypeOfRefueling" Grid.Column="1" Grid.Row="2" Margin="10,20,10,20" SelectedIndex="0" SelectionChanged="CmbTypeOfRefueling_SelectionChanged"></ComboBox>
             <TextBlock Text="Способ оплаты" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
             <ComboBox Name="CmbTypeOfPayment" SelectedIndex="0" Grid.Column="2" Grid.Row="3" Margin="10,20,10,20" SelectionChanged="CmbTypeOfPayment_SelectionChanged"></ComboBox>
-            <TextBlock x:Name="TxtCardNumber" Visibility="Hidden" Grid.Row="4" Grid.ColumnSpan="2" VerticalAlignment="Top"></TextBlock>
-            <Button Name="BtnEnterDataOfCard" Click="BtnEnterDataOfCard_Click" Visibility="Hidden" VerticalAlignment="Bottom" Grid.Row="4" Grid.ColumnSpan="2" Margin="20" Content="Ввод данных карты"></Button>
+            <Button Name="BtnEnterDataOfCard" Click="BtnEnterDataOfCard_Click" Visibility="Hidden" Grid.Row="4" Grid.ColumnSpan="2" Margin="20" Content="Ввод данных карты"></Button>
         </Grid>
         <Grid Grid.Column="1">
             <Grid.ColumnDefinitions>

+ 246 - 15
FillingColumn/RefuelingPage.xaml.cs

@@ -25,7 +25,6 @@ namespace FillingColumn
     /// </summary>
     public partial class RefuelingPage : Page
     {
-
         public RefuelingPage()
         {
             InitializeComponent();
@@ -47,7 +46,8 @@ namespace FillingColumn
                 HttpClient client = new HttpClient();
                 var response = await client.GetAsync("http://127.0.0.1:7070/getDataFromCamera/");
                 var Body = await response.Content.ReadAsStringAsync();
-                DataFromCamera dataFromCamera = JsonConvert.DeserializeObject<DataFromCamera>(Body);
+                DataOfCamera dataFromCamera = JsonConvert.DeserializeObject<DataOfCamera>(Body);
+                Helper.DataFromCamera = dataFromCamera;
                 TxtDataOfCamera.Text = "Гос. номер распознан: " + dataFromCamera.CarNumber;
                 FindCar(Body);
             }
@@ -57,7 +57,7 @@ namespace FillingColumn
                 Helper.FindCar = null;
             }
         }
-
+        
         public async void FindCar(string JsonDataOfCamera)
         {
             string IDGasStation = Helper.CurrentGasStation.GasStationID.ToString();
@@ -92,29 +92,32 @@ namespace FillingColumn
             socket.Close();
         }
 
+
+        //Задание ограничений по типам запрвки
         public void AddTypeOFRefueling()
         {
 
             List<string> TypeOfRefueling = new List<string>();
             TypeOfRefueling.Add("Фиксированный объем");
             TypeOfRefueling.Add("Фиксированная цена");
+            TypeOfRefueling.Add("До полного бака с ограничением по объему");
             List<string> TypeOfPayment = new List<string>();
             TypeOfPayment.Add("Банковской картой");
 
             if (Helper.FindCar != null)
             {
-                if (Helper.FindCar.VolumeTank != null)
-                {
-                    TypeOfRefueling.Add("До полного бака с ограничением по объему");
-                }
-                if (Helper.FindCar.CardOfCars.FirstOrDefault(x=>x.IDCardType == 3) != null)
+                if (Helper.FindCar.CardOfCars != null)
                 {
-                    TypeOfPayment.Add("Накопительной картой");
-                }
-                if (Helper.FindCar.CardOfCars.FirstOrDefault(x => x.IDCardType == 2) != null)
-                {
-                    TypeOfPayment.Add("Кредитной картой");
+                    if (Helper.FindCar.CardOfCars.FirstOrDefault(x => x.IDCardType == 3) != null)
+                    {
+                        TypeOfPayment.Add("Накопительной картой");
+                    }
+                    if (Helper.FindCar.CardOfCars.FirstOrDefault(x => x.IDCardType == 1) != null)
+                    {
+                        TypeOfPayment.Add("Кредитной картой");
+                    }
                 }
+   
             }
             CmbTypeOfPayment.ItemsSource = TypeOfPayment;
             CmbTypeOfRefueling.ItemsSource = TypeOfRefueling;
@@ -130,10 +133,228 @@ namespace FillingColumn
 
         private void BtnPayment_Click(object sender, RoutedEventArgs e)
         {
+            if (TbAmount.Text == string.Empty && CmbTypeOfRefueling.SelectedIndex == 0)
+            {
+                MessageBox.Show("Не указан объём топлива", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
+            if (TbCost.Text == string.Empty && CmbTypeOfRefueling.SelectedIndex == 1)
+            {
+                MessageBox.Show("Не указана стоимость для заправки", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
+            if (TxtErroreMessage.Visibility == Visibility.Visible)
+            {
+                MessageBox.Show("Не корректные данные", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
+            decimal cost = string.IsNullOrEmpty(TbCost.Text) ? Convert.ToDecimal(TxtCost.Text.Split(' ')[0]) : Convert.ToDecimal(TbCost.Text);
+            int amount = string.IsNullOrEmpty(TbAmount.Text) ? Convert.ToInt32(TxtAmount.Text.Split(' ')[0]) : Convert.ToInt32(TbAmount.Text);
+            int FuelID = (CmbTypeOfFuel.SelectedItem as FuelInCurrentGasStation).IDFuelType;
+            switch (CmbTypeOfPayment.SelectedValue.ToString())
+            {
+                case "Банковской картой":
+                    PaymentBankCard(cost, amount, FuelID); break;
+                case "Накопительной картой":
+                    PaymentSavingCard(cost, amount, FuelID); break;
+                case "Кредитной картой":
+                    PaymentCreditCard(cost,amount, FuelID); break;
+            }
+        }
+        //Оплат банковской картой
+        public async void PaymentBankCard(decimal cost, int amount, int FuelID)
+        {
+            Helper.EnterPIN = string.Empty;
+            if (Helper.EnterBankCard == null && Helper.FindCar.CardOfCars.FirstOrDefault(x => x.IDCardType == 2) == null)
+            {
+                MessageBox.Show("Введите информацию о карте", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
+            var CurrentFuel = Helper.CurrentGasStation.FuelInCurrentGasStation.FirstOrDefault(x => x.IDFuelType == FuelID);
+            if (CurrentFuel.AmountOfFuel < amount)
+            {
+                MessageBox.Show($"Не достаточно топлива в хранилище! Доступно {CurrentFuel.AmountOfFuel} л.", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
+            var BankCard = Helper.EnterBankCard is null ? Helper.FindCar.CardOfCars.FirstOrDefault(x => x.IDCardType == 2) : Helper.EnterBankCard;
+            EnterPINWindow enterPINWindow = new EnterPINWindow();
+            enterPINWindow.ShowDialog();
+            if (Helper.EnterPIN == string.Empty)
+            {
+                MessageBox.Show("Введите ПИН", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
+            DataOfPayment dataOfPayment = new DataOfPayment()
+            {
+                PriceRefueling = cost,
+                NumberCard = BankCard.NumberCard,
+                CardExpDate = BankCard.CardExpDate,
+                Balance = BankCard.Balance,
+                CardHolder = BankCard.CardHolder,
+                KeySession = Helper.KeySession,
+                PIN = Helper.EnterPIN
+            };
+            HttpClient BankClient = new HttpClient();
+            string Json = JsonConvert.SerializeObject(dataOfPayment);
+            StringContent content = new StringContent(Json, Encoding.UTF8);
+            var response = await BankClient.PostAsync($"http://127.0.0.1:8081/pay", content);
+            var ResponseMessage = await response.Content.ReadAsStringAsync();
+            MessageBox.Show($"{ResponseMessage}", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+            if (ResponseMessage.Contains("Отклонено")) return;
+            RootDataOfRefuling rootDataOfRefuling = new RootDataOfRefuling
+            {
+                Car = Helper.FindCar,
+                KeySession = Helper.KeySession,
+                DataOfCamera = Helper.DataFromCamera,
+                VolumeFuel = amount,
+                CurrentFuelID = CurrentFuel.IDFuelType,
+                GasStationID = Helper.CurrentGasStation.GasStationID
+            };
 
+            RootDataOfPayment rootDataOfPayment = new RootDataOfPayment()
+            {
+                RootDataOfCard = BankCard,
+                PriceRefueling = cost,
+                Status = true,
+                TransactionCode = DateTime.Now.ToString("ddMMyyyy-hhmmss"),
+                RootDataOfRefuling = rootDataOfRefuling
+            };
+            PostDataOfPayment(JsonConvert.SerializeObject(rootDataOfPayment));
         }
 
+        //Оплата накопительной картой
+        public void PaymentSavingCard(decimal cost, int amount, int FuelID)
+        {
+            var CurrentFuel = Helper.CurrentGasStation.FuelInCurrentGasStation.FirstOrDefault(x => x.IDFuelType == FuelID);
+            if( CurrentFuel.AmountOfFuel < amount)
+            {
+                MessageBox.Show($"Не достаточно топлива в хранилище! Доступно {CurrentFuel.AmountOfFuel} л.", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
+            var SavingCard = Helper.FindCar.CardOfCars.FirstOrDefault(x => x.IDCardType == 3);
+            if (SavingCard.Balance < cost)
+            {
+                double Amount = Convert.ToDouble(SavingCard.Balance) / CurrentFuel.Price;
+                double AvailableAmountFuel = Math.Truncate(Amount) * CurrentFuel.Price;
+                bool CreditCardIsEnable = Helper.FindCar.CardOfCars.FirstOrDefault(x => x.IDCardType == 3) is null ? false : true;
+                decimal MissingAmount = cost - SavingCard.Balance;
+                if (Helper.FindCar.CardOfCars.FirstOrDefault(x => x.IDCardType == 3).Balance < MissingAmount)
+                {
+                    CreditCardIsEnable = false;
+                }
+                NoMoneyWindow noMoneyWindow = new NoMoneyWindow(MissingAmount, CreditCardIsEnable,  Convert.ToInt32(Math.Truncate(Amount)));
+                noMoneyWindow.ShowDialog();
+                if (Helper.TypeOfNoMoney == 0)
+                {
+                    return;
+                }
+                switch (Helper.TypeOfNoMoney)
+                {
+                    //Оплата кредитной картой
+                    case 1:
+                        PaymentBankCard(cost, amount, FuelID);
+                         break;
+                    //Оплата на все накопленные бонусы
+                    case 2: amount = Convert.ToInt32(Math.Truncate(Amount));
+                        cost = (decimal)AvailableAmountFuel;
+                        break;
+                    //Оплата кредитной и накопительной картой
+                    case 3: PaymentCreditCard(cost - (decimal)AvailableAmountFuel, amount - Convert.ToInt32(Math.Truncate(Amount)), FuelID);
+                        amount = Convert.ToInt32(Math.Truncate(Amount));
+                        cost = (decimal)AvailableAmountFuel;
+                        break;
+                }
+            }
+
+            RootDataOfRefuling rootDataOfRefuling = new RootDataOfRefuling
+            {
+                Car = Helper.FindCar,
+                KeySession = Helper.KeySession,
+                DataOfCamera = Helper.DataFromCamera,
+                VolumeFuel = amount,
+                CurrentFuelID = CurrentFuel.IDFuelType,
+                GasStationID = Helper.CurrentGasStation.GasStationID
+            };
+
+            RootDataOfPayment rootDataOfPayment = new RootDataOfPayment()
+            {
+                RootDataOfCard = SavingCard,
+                PriceRefueling = cost,
+                Status = true,
+                TransactionCode = DateTime.Now.ToString("ddMMyyyy-hhmmss"),
+                RootDataOfRefuling = rootDataOfRefuling
+            };
+            PostDataOfPayment(JsonConvert.SerializeObject(rootDataOfPayment));
+        
+        }
+
+
+        //Оплата кредитной картой заправки
+        public void PaymentCreditCard(decimal cost, int amount, int FuelID)
+        {
+            var CurrentFuel = Helper.CurrentGasStation.FuelInCurrentGasStation.FirstOrDefault(x => x.IDFuelType == FuelID);
+            if (CurrentFuel.AmountOfFuel < amount)
+            {
+                MessageBox.Show($"Не достаточно топлива в хранилище! Доступно {CurrentFuel.AmountOfFuel} л.", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
+            var CreditCard = Helper.FindCar.CardOfCars.FirstOrDefault(x => x.IDCardType == 2);
+            if (CreditCard.Balance < cost)
+            {
+                MessageBox.Show($"Не достаточно средств на карте", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+                return;
+            }
+            RootDataOfRefuling rootDataOfRefuling = new RootDataOfRefuling
+            {
+                Car = Helper.FindCar,
+                KeySession = Helper.KeySession,
+                DataOfCamera = Helper.DataFromCamera,
+                VolumeFuel = amount,
+                CurrentFuelID= CurrentFuel.IDFuelType,
+                GasStationID = Helper.CurrentGasStation.GasStationID
+            };
+
+            RootDataOfPayment rootDataOfPayment = new RootDataOfPayment()
+            {
+                RootDataOfCard = CreditCard,
+                PriceRefueling = cost,
+                Status = true,
+                TransactionCode = DateTime.Now.ToString("ddMMyyyy-hhmmss"),
+                RootDataOfRefuling = rootDataOfRefuling
+            };
+            PostDataOfPayment(JsonConvert.SerializeObject(rootDataOfPayment));
+        }
         
+        //Отправка данных об покупке топлива
+        public async void PostDataOfPayment(string JsonDataOfPayment)
+        {
+            string IDGasStation = Helper.CurrentGasStation.GasStationID.ToString();
+            if (IDGasStation.Length == 1)
+            {
+                IDGasStation = IDGasStation.Insert(0, "0"); 
+            }
+            string port = "102" + IDGasStation;
+            IPEndPoint IpPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), Convert.ToInt32(port));
+            Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+            socket.Connect(IpPoint);
+            string request = "POST data of payment=" + JsonDataOfPayment;
+            byte[] data = Encoding.UTF8.GetBytes(request);
+            socket.Send(data);
+            data = new byte[256]; // буфер для ответа
+            StringBuilder builder = new StringBuilder();
+            int bytes = 0; // количество полученных байт
+            do
+            {
+                bytes = socket.Receive(data, data.Length, 0);
+                builder.Append(Encoding.UTF8.GetString(data, 0, bytes));
+            }
+            while (socket.Available > 0);
+
+            MessageBox.Show(builder.ToString());
+            socket.Shutdown(SocketShutdown.Both);
+            socket.Close();
+        }
+
         private void CmbTypeOfRefueling_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
             if (CmbTypeOfRefueling.SelectedIndex == 0)
@@ -151,6 +372,14 @@ namespace FillingColumn
                 TbCost.Visibility = Visibility.Visible;
                 TxtCost.Visibility = Visibility.Hidden;
             }
+            if (CmbTypeOfRefueling.SelectedIndex == 3)
+            {
+                TbAmount.Visibility = Visibility.Visible;
+                TxtAmount.Visibility = Visibility.Hidden;
+                TbCost.Visibility = Visibility.Hidden;
+                TxtCost.Visibility = Visibility.Visible;
+                TbAmount.Text = Helper.FindCar.VolumeTank.ToString();
+            }
         }
 
         private void TbAmount_TextChanged(object sender, TextChangedEventArgs e)
@@ -184,12 +413,14 @@ namespace FillingColumn
                 TxtAmount.Text = string.Empty;
                 return;
             }
-            if (TbCost.Text.All(char.IsDigit) == true)
+            if (TbCost.Text.Any(char.IsLetter) == false)
             {
                 TxtErroreMessage.Visibility = Visibility.Hidden;
                 var CurrentFuel = CmbTypeOfFuel.SelectedItem as FuelInCurrentGasStation;
                 double Amount = Convert.ToDouble(TbCost.Text) / CurrentFuel.Price;
-                TxtAmount.Text = Amount.ToString("F2") + " л.";
+                double CorrectCost = Math.Truncate(Amount) * CurrentFuel.Price;
+                TbCost.Text = CorrectCost.ToString("F2");
+                TxtAmount.Text = Convert.ToInt32(Math.Truncate(Amount)).ToString() + " л.";
             }
             else
             {

+ 18 - 0
FillingColumn/RootDataOfPayment.cs

@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace FillingColumn
+{
+   public class RootDataOfPayment
+    {
+        public int PaymentID { get; set; }
+        public decimal PriceRefueling { get; set; }
+        public bool Status { get; set; }
+        public string TransactionCode { get; set; }
+        public RootDataOfCard RootDataOfCard { get; set; }
+        public RootDataOfRefuling RootDataOfRefuling { get; set; }
+    }
+}

+ 19 - 0
FillingColumn/RootDataOfRefuling.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace FillingColumn
+{
+    public class RootDataOfRefuling
+    {
+        public int RefuelingID { get; set; }
+        public RootDataOfCar Car { get; set; }
+        public int CurrentFuelID { get; set; }
+        public int GasStationID { get; set; } 
+        public int VolumeFuel { get; set; }
+        public DataOfCamera DataOfCamera { get; set; }
+        public string KeySession { get; set; }
+    }
+}

binární
FillingColumn/bin/Debug/FillingColumn.exe


binární
FillingColumn/bin/Debug/FillingColumn.pdb


binární
FillingColumn/obj/Debug/AddDataOfCardWindow.baml


+ 1 - 1
FillingColumn/obj/Debug/AddDataOfCardWindow.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\AddDataOfCardWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "2ACF45CF77663F1FDB9EB80DD6155E7D2D151A6851F7CDB4112B94CA80914EC6"
+#pragma checksum "..\..\AddDataOfCardWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "69F2C5448B54A3658D488D0BD0BCFC3FF28A03EA63C4081A5A38999B2D45D0D2"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.

+ 1 - 1
FillingColumn/obj/Debug/AddDataOfCardWindow.g.i.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\AddDataOfCardWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "2ACF45CF77663F1FDB9EB80DD6155E7D2D151A6851F7CDB4112B94CA80914EC6"
+#pragma checksum "..\..\AddDataOfCardWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "69F2C5448B54A3658D488D0BD0BCFC3FF28A03EA63C4081A5A38999B2D45D0D2"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.

binární
FillingColumn/obj/Debug/DesignTimeResolveAssemblyReferences.cache


binární
FillingColumn/obj/Debug/EnterPINWindow.baml


+ 106 - 0
FillingColumn/obj/Debug/EnterPINWindow.g.cs

@@ -0,0 +1,106 @@
+#pragma checksum "..\..\EnterPINWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D8711C1B2C229D29EAB69463DDADB9817D08E091F1138D3A7D9CFE99B96A57BB"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using FillingColumn;
+using System;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Effects;
+using System.Windows.Media.Imaging;
+using System.Windows.Media.Media3D;
+using System.Windows.Media.TextFormatting;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Windows.Shell;
+
+
+namespace FillingColumn {
+    
+    
+    /// <summary>
+    /// EnterPINWindow
+    /// </summary>
+    public partial class EnterPINWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        
+        #line 18 "..\..\EnterPINWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TxtPIN;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 20 "..\..\EnterPINWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnEnterPIN;
+        
+        #line default
+        #line hidden
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/FillingColumn;component/enterpinwindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\EnterPINWindow.xaml"
+            System.Windows.Application.LoadComponent(this, resourceLocater);
+            
+            #line default
+            #line hidden
+        }
+        
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
+        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
+            switch (connectionId)
+            {
+            case 1:
+            this.TxtPIN = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 2:
+            this.BtnEnterPIN = ((System.Windows.Controls.Button)(target));
+            
+            #line 20 "..\..\EnterPINWindow.xaml"
+            this.BtnEnterPIN.Click += new System.Windows.RoutedEventHandler(this.BtnEnterPIN_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 106 - 0
FillingColumn/obj/Debug/EnterPINWindow.g.i.cs

@@ -0,0 +1,106 @@
+#pragma checksum "..\..\EnterPINWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D8711C1B2C229D29EAB69463DDADB9817D08E091F1138D3A7D9CFE99B96A57BB"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using FillingColumn;
+using System;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Effects;
+using System.Windows.Media.Imaging;
+using System.Windows.Media.Media3D;
+using System.Windows.Media.TextFormatting;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Windows.Shell;
+
+
+namespace FillingColumn {
+    
+    
+    /// <summary>
+    /// EnterPINWindow
+    /// </summary>
+    public partial class EnterPINWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        
+        #line 18 "..\..\EnterPINWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox TxtPIN;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 20 "..\..\EnterPINWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnEnterPIN;
+        
+        #line default
+        #line hidden
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/FillingColumn;component/enterpinwindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\EnterPINWindow.xaml"
+            System.Windows.Application.LoadComponent(this, resourceLocater);
+            
+            #line default
+            #line hidden
+        }
+        
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
+        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
+            switch (connectionId)
+            {
+            case 1:
+            this.TxtPIN = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 2:
+            this.BtnEnterPIN = ((System.Windows.Controls.Button)(target));
+            
+            #line 20 "..\..\EnterPINWindow.xaml"
+            this.BtnEnterPIN.Click += new System.Windows.RoutedEventHandler(this.BtnEnterPIN_Click);
+            
+            #line default
+            #line hidden
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 1 - 1
FillingColumn/obj/Debug/FillingColumn.csproj.CoreCompileInputs.cache

@@ -1 +1 @@
-617114e0de0a07763e3be8baa5b76c598356c395
+cf87049ce265c4678ad52b5a897d10b9f65196d3

+ 4 - 0
FillingColumn/obj/Debug/FillingColumn.csproj.FileListAbsolute.txt

@@ -44,3 +44,7 @@ Z:\WSR\FillingColumn\FillingColumn\obj\Debug\FillingColumn.csproj.CoreCompileInp
 Z:\WSR\FillingColumn\FillingColumn\obj\Debug\FillingColumn.csproj.CopyComplete
 Z:\WSR\FillingColumn\FillingColumn\obj\Debug\AddDataOfCardWindow.g.cs
 Z:\WSR\FillingColumn\FillingColumn\obj\Debug\AddDataOfCardWindow.baml
+Z:\WSR\FillingColumn\FillingColumn\obj\Debug\NoMoneyWindow.g.cs
+Z:\WSR\FillingColumn\FillingColumn\obj\Debug\NoMoneyWindow.baml
+Z:\WSR\FillingColumn\FillingColumn\obj\Debug\EnterPINWindow.g.cs
+Z:\WSR\FillingColumn\FillingColumn\obj\Debug\EnterPINWindow.baml

binární
FillingColumn/obj/Debug/FillingColumn.csprojAssemblyReference.cache


binární
FillingColumn/obj/Debug/FillingColumn.exe


binární
FillingColumn/obj/Debug/FillingColumn.g.resources


binární
FillingColumn/obj/Debug/FillingColumn.pdb


+ 3 - 3
FillingColumn/obj/Debug/FillingColumn_MarkupCompile.cache

@@ -10,11 +10,11 @@ none
 false
 DEBUG;TRACE
 Z:\WSR\FillingColumn\FillingColumn\App.xaml
-4915611580
+6463821628
 
-16-1868983636
+21411405869
 14-1072283763
-AddDataOfCardWindow.xaml;MainWindow.xaml;RefuelingPage.xaml;StartWorkPage.xaml;
+AddDataOfCardWindow.xaml;EnterPINWindow.xaml;MainWindow.xaml;NoMoneyWindow.xaml;RefuelingPage.xaml;StartWorkPage.xaml;
 
 False
 

+ 3 - 3
FillingColumn/obj/Debug/FillingColumn_MarkupCompile.i.cache

@@ -10,11 +10,11 @@ none
 false
 DEBUG;TRACE
 Z:\WSR\FillingColumn\FillingColumn\App.xaml
-4915611580
+6463821628
 
-171223055212
+22-791522579
 14-1072283763
-AddDataOfCardWindow.xaml;MainWindow.xaml;RefuelingPage.xaml;StartWorkPage.xaml;
+AddDataOfCardWindow.xaml;EnterPINWindow.xaml;MainWindow.xaml;NoMoneyWindow.xaml;RefuelingPage.xaml;StartWorkPage.xaml;
 
 True
 

+ 1 - 2
FillingColumn/obj/Debug/FillingColumn_MarkupCompile.i.lref

@@ -1,5 +1,4 @@
 
 
-FZ:\WSR\FillingColumn\FillingColumn\AddDataOfCardWindow.xaml;;
-FZ:\WSR\FillingColumn\FillingColumn\RefuelingPage.xaml;;
+FZ:\WSR\FillingColumn\FillingColumn\EnterPINWindow.xaml;;
 

+ 2 - 0
FillingColumn/obj/Debug/FillingColumn_MarkupCompile.lref

@@ -4,4 +4,6 @@ FZ:\WSR\FillingColumn\FillingColumn\MainWindow.xaml;;
 FZ:\WSR\FillingColumn\FillingColumn\RefuelingPage.xaml;;
 FZ:\WSR\FillingColumn\FillingColumn\StartWorkPage.xaml;;
 FZ:\WSR\FillingColumn\FillingColumn\AddDataOfCardWindow.xaml;;
+FZ:\WSR\FillingColumn\FillingColumn\NoMoneyWindow.xaml;;
+FZ:\WSR\FillingColumn\FillingColumn\EnterPINWindow.xaml;;
 

binární
FillingColumn/obj/Debug/NoMoneyWindow.baml


+ 151 - 0
FillingColumn/obj/Debug/NoMoneyWindow.g.cs

@@ -0,0 +1,151 @@
+#pragma checksum "..\..\NoMoneyWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1E97CE022D3A1481B1F1B13BD1883C685042A9EFCF3E68E14B779B4F6D4A934D"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using FillingColumn;
+using System;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Effects;
+using System.Windows.Media.Imaging;
+using System.Windows.Media.Media3D;
+using System.Windows.Media.TextFormatting;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Windows.Shell;
+
+
+namespace FillingColumn {
+    
+    
+    /// <summary>
+    /// NoMoneyWindow
+    /// </summary>
+    public partial class NoMoneyWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        
+        #line 15 "..\..\NoMoneyWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnPaymentOFCard;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 18 "..\..\NoMoneyWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnRefulingOnAll;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 19 "..\..\NoMoneyWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock TxtRefulingOnAll;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 21 "..\..\NoMoneyWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnAddOnCreditCard;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 22 "..\..\NoMoneyWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock TxtAddOnCreditCard;
+        
+        #line default
+        #line hidden
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/FillingColumn;component/nomoneywindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\NoMoneyWindow.xaml"
+            System.Windows.Application.LoadComponent(this, resourceLocater);
+            
+            #line default
+            #line hidden
+        }
+        
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
+        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
+            switch (connectionId)
+            {
+            case 1:
+            this.BtnPaymentOFCard = ((System.Windows.Controls.Button)(target));
+            
+            #line 15 "..\..\NoMoneyWindow.xaml"
+            this.BtnPaymentOFCard.Click += new System.Windows.RoutedEventHandler(this.BtnPaymentOFCard_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 2:
+            this.BtnRefulingOnAll = ((System.Windows.Controls.Button)(target));
+            
+            #line 18 "..\..\NoMoneyWindow.xaml"
+            this.BtnRefulingOnAll.Click += new System.Windows.RoutedEventHandler(this.BtnRefulingOnAll_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 3:
+            this.TxtRefulingOnAll = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 4:
+            this.BtnAddOnCreditCard = ((System.Windows.Controls.Button)(target));
+            
+            #line 21 "..\..\NoMoneyWindow.xaml"
+            this.BtnAddOnCreditCard.Click += new System.Windows.RoutedEventHandler(this.BtnAddOnCreditCard_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 5:
+            this.TxtAddOnCreditCard = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

+ 151 - 0
FillingColumn/obj/Debug/NoMoneyWindow.g.i.cs

@@ -0,0 +1,151 @@
+#pragma checksum "..\..\NoMoneyWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1E97CE022D3A1481B1F1B13BD1883C685042A9EFCF3E68E14B779B4F6D4A934D"
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программой.
+//     Исполняемая версия:4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
+//     повторной генерации кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using FillingColumn;
+using System;
+using System.Diagnostics;
+using System.Windows;
+using System.Windows.Automation;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Media.Effects;
+using System.Windows.Media.Imaging;
+using System.Windows.Media.Media3D;
+using System.Windows.Media.TextFormatting;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Windows.Shell;
+
+
+namespace FillingColumn {
+    
+    
+    /// <summary>
+    /// NoMoneyWindow
+    /// </summary>
+    public partial class NoMoneyWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+        
+        
+        #line 15 "..\..\NoMoneyWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnPaymentOFCard;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 18 "..\..\NoMoneyWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnRefulingOnAll;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 19 "..\..\NoMoneyWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock TxtRefulingOnAll;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 21 "..\..\NoMoneyWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button BtnAddOnCreditCard;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 22 "..\..\NoMoneyWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock TxtAddOnCreditCard;
+        
+        #line default
+        #line hidden
+        
+        private bool _contentLoaded;
+        
+        /// <summary>
+        /// InitializeComponent
+        /// </summary>
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        public void InitializeComponent() {
+            if (_contentLoaded) {
+                return;
+            }
+            _contentLoaded = true;
+            System.Uri resourceLocater = new System.Uri("/FillingColumn;component/nomoneywindow.xaml", System.UriKind.Relative);
+            
+            #line 1 "..\..\NoMoneyWindow.xaml"
+            System.Windows.Application.LoadComponent(this, resourceLocater);
+            
+            #line default
+            #line hidden
+        }
+        
+        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
+        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
+        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
+            switch (connectionId)
+            {
+            case 1:
+            this.BtnPaymentOFCard = ((System.Windows.Controls.Button)(target));
+            
+            #line 15 "..\..\NoMoneyWindow.xaml"
+            this.BtnPaymentOFCard.Click += new System.Windows.RoutedEventHandler(this.BtnPaymentOFCard_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 2:
+            this.BtnRefulingOnAll = ((System.Windows.Controls.Button)(target));
+            
+            #line 18 "..\..\NoMoneyWindow.xaml"
+            this.BtnRefulingOnAll.Click += new System.Windows.RoutedEventHandler(this.BtnRefulingOnAll_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 3:
+            this.TxtRefulingOnAll = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 4:
+            this.BtnAddOnCreditCard = ((System.Windows.Controls.Button)(target));
+            
+            #line 21 "..\..\NoMoneyWindow.xaml"
+            this.BtnAddOnCreditCard.Click += new System.Windows.RoutedEventHandler(this.BtnAddOnCreditCard_Click);
+            
+            #line default
+            #line hidden
+            return;
+            case 5:
+            this.TxtAddOnCreditCard = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            }
+            this._contentLoaded = true;
+        }
+    }
+}
+

binární
FillingColumn/obj/Debug/RefuelingPage.baml


+ 17 - 28
FillingColumn/obj/Debug/RefuelingPage.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\RefuelingPage.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "440C15607B9DCCC0765FCE1CD4F6B56127F24E79996BA90E07582221141C64ED"
+#pragma checksum "..\..\RefuelingPage.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "6BF402658857CCF72BC7765A5B6DF1D2210711E460575087ACA9621486D47BD7"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -75,21 +75,13 @@ namespace FillingColumn {
         
         #line 36 "..\..\RefuelingPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.TextBlock TxtCardNumber;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 37 "..\..\RefuelingPage.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button BtnEnterDataOfCard;
         
         #line default
         #line hidden
         
         
-        #line 50 "..\..\RefuelingPage.xaml"
+        #line 49 "..\..\RefuelingPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock TxtErroreMessage;
         
@@ -97,7 +89,7 @@ namespace FillingColumn {
         #line hidden
         
         
-        #line 52 "..\..\RefuelingPage.xaml"
+        #line 51 "..\..\RefuelingPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock TxtAmount;
         
@@ -105,7 +97,7 @@ namespace FillingColumn {
         #line hidden
         
         
-        #line 53 "..\..\RefuelingPage.xaml"
+        #line 52 "..\..\RefuelingPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox TbAmount;
         
@@ -113,7 +105,7 @@ namespace FillingColumn {
         #line hidden
         
         
-        #line 55 "..\..\RefuelingPage.xaml"
+        #line 54 "..\..\RefuelingPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock TxtCost;
         
@@ -121,7 +113,7 @@ namespace FillingColumn {
         #line hidden
         
         
-        #line 56 "..\..\RefuelingPage.xaml"
+        #line 55 "..\..\RefuelingPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox TbCost;
         
@@ -129,7 +121,7 @@ namespace FillingColumn {
         #line hidden
         
         
-        #line 57 "..\..\RefuelingPage.xaml"
+        #line 56 "..\..\RefuelingPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button BtnPayment;
         
@@ -197,48 +189,45 @@ namespace FillingColumn {
             #line hidden
             return;
             case 5:
-            this.TxtCardNumber = ((System.Windows.Controls.TextBlock)(target));
-            return;
-            case 6:
             this.BtnEnterDataOfCard = ((System.Windows.Controls.Button)(target));
             
-            #line 37 "..\..\RefuelingPage.xaml"
+            #line 36 "..\..\RefuelingPage.xaml"
             this.BtnEnterDataOfCard.Click += new System.Windows.RoutedEventHandler(this.BtnEnterDataOfCard_Click);
             
             #line default
             #line hidden
             return;
-            case 7:
+            case 6:
             this.TxtErroreMessage = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 8:
+            case 7:
             this.TxtAmount = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 9:
+            case 8:
             this.TbAmount = ((System.Windows.Controls.TextBox)(target));
             
-            #line 53 "..\..\RefuelingPage.xaml"
+            #line 52 "..\..\RefuelingPage.xaml"
             this.TbAmount.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TbAmount_TextChanged);
             
             #line default
             #line hidden
             return;
-            case 10:
+            case 9:
             this.TxtCost = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 11:
+            case 10:
             this.TbCost = ((System.Windows.Controls.TextBox)(target));
             
-            #line 56 "..\..\RefuelingPage.xaml"
+            #line 55 "..\..\RefuelingPage.xaml"
             this.TbCost.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TbCost_TextChanged);
             
             #line default
             #line hidden
             return;
-            case 12:
+            case 11:
             this.BtnPayment = ((System.Windows.Controls.Button)(target));
             
-            #line 57 "..\..\RefuelingPage.xaml"
+            #line 56 "..\..\RefuelingPage.xaml"
             this.BtnPayment.Click += new System.Windows.RoutedEventHandler(this.BtnPayment_Click);
             
             #line default

+ 17 - 28
FillingColumn/obj/Debug/RefuelingPage.g.i.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\RefuelingPage.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "440C15607B9DCCC0765FCE1CD4F6B56127F24E79996BA90E07582221141C64ED"
+#pragma checksum "..\..\RefuelingPage.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "6BF402658857CCF72BC7765A5B6DF1D2210711E460575087ACA9621486D47BD7"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -75,21 +75,13 @@ namespace FillingColumn {
         
         #line 36 "..\..\RefuelingPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.TextBlock TxtCardNumber;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 37 "..\..\RefuelingPage.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button BtnEnterDataOfCard;
         
         #line default
         #line hidden
         
         
-        #line 50 "..\..\RefuelingPage.xaml"
+        #line 49 "..\..\RefuelingPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock TxtErroreMessage;
         
@@ -97,7 +89,7 @@ namespace FillingColumn {
         #line hidden
         
         
-        #line 52 "..\..\RefuelingPage.xaml"
+        #line 51 "..\..\RefuelingPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock TxtAmount;
         
@@ -105,7 +97,7 @@ namespace FillingColumn {
         #line hidden
         
         
-        #line 53 "..\..\RefuelingPage.xaml"
+        #line 52 "..\..\RefuelingPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox TbAmount;
         
@@ -113,7 +105,7 @@ namespace FillingColumn {
         #line hidden
         
         
-        #line 55 "..\..\RefuelingPage.xaml"
+        #line 54 "..\..\RefuelingPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock TxtCost;
         
@@ -121,7 +113,7 @@ namespace FillingColumn {
         #line hidden
         
         
-        #line 56 "..\..\RefuelingPage.xaml"
+        #line 55 "..\..\RefuelingPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox TbCost;
         
@@ -129,7 +121,7 @@ namespace FillingColumn {
         #line hidden
         
         
-        #line 57 "..\..\RefuelingPage.xaml"
+        #line 56 "..\..\RefuelingPage.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button BtnPayment;
         
@@ -197,48 +189,45 @@ namespace FillingColumn {
             #line hidden
             return;
             case 5:
-            this.TxtCardNumber = ((System.Windows.Controls.TextBlock)(target));
-            return;
-            case 6:
             this.BtnEnterDataOfCard = ((System.Windows.Controls.Button)(target));
             
-            #line 37 "..\..\RefuelingPage.xaml"
+            #line 36 "..\..\RefuelingPage.xaml"
             this.BtnEnterDataOfCard.Click += new System.Windows.RoutedEventHandler(this.BtnEnterDataOfCard_Click);
             
             #line default
             #line hidden
             return;
-            case 7:
+            case 6:
             this.TxtErroreMessage = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 8:
+            case 7:
             this.TxtAmount = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 9:
+            case 8:
             this.TbAmount = ((System.Windows.Controls.TextBox)(target));
             
-            #line 53 "..\..\RefuelingPage.xaml"
+            #line 52 "..\..\RefuelingPage.xaml"
             this.TbAmount.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TbAmount_TextChanged);
             
             #line default
             #line hidden
             return;
-            case 10:
+            case 9:
             this.TxtCost = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 11:
+            case 10:
             this.TbCost = ((System.Windows.Controls.TextBox)(target));
             
-            #line 56 "..\..\RefuelingPage.xaml"
+            #line 55 "..\..\RefuelingPage.xaml"
             this.TbCost.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TbCost_TextChanged);
             
             #line default
             #line hidden
             return;
-            case 12:
+            case 11:
             this.BtnPayment = ((System.Windows.Controls.Button)(target));
             
-            #line 57 "..\..\RefuelingPage.xaml"
+            #line 56 "..\..\RefuelingPage.xaml"
             this.BtnPayment.Click += new System.Windows.RoutedEventHandler(this.BtnPayment_Click);
             
             #line default