Sfoglia il codice sorgente

Добавлены комментарии

polinakulakova114@gmail.com 3 anni fa
parent
commit
7ff8752149

BIN
.vs/mateo/v16/.suo


+ 37 - 40
mateo/MainWindow.xaml

@@ -25,7 +25,6 @@
                 <Image Source="image\gmail.png" Height="40" Width="40"/>
             </Button>
         </Grid>
-
         <Grid Background="#E74C32" Margin="0,0,0,470">
             <Image Source="image/logo.png" Margin="0,0,820,-20"/>
             <Button Content="Профиль" FontSize="16" BorderThickness="0" Background="Transparent" Margin="627,10,223,10" MaxWidth="80" Click="btnProfileClick"/>
@@ -42,7 +41,8 @@
             </Button>
         </Grid>
 
-        <ListView MouseDoubleClick="ViewAttraction" x:Name="listAttraction" Margin="150,80,10,10" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HorizontalContentAlignment="Center" ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="0">
+        <!--вывод всех аттракционов-->
+        <ListView MouseDoubleClick="ViewAllAttraction" x:Name="listAllAttraction" Margin="150,80,10,10" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HorizontalContentAlignment="Center" ScrollViewer.VerticalScrollBarVisibility="Hidden" BorderThickness="0">
             <ListView.ItemsPanel>
                 <ItemsPanelTemplate>
                     <WrapPanel Orientation="Horizontal" HorizontalAlignment="Center"/>
@@ -62,35 +62,32 @@
                             <Image Source="{Binding ImageAttraction}" Width="200" Height="100" 
                                Grid.Row="1" Stretch="Uniform" HorizontalAlignment="Center" Margin="5"/>
                             <TextBlock Grid.Row="0" HorizontalAlignment="Center" FontSize="18" Text="{Binding NameAttraction}"/>
-                            <!--<TextBlock Name="txtPriceOld" Grid.Row="2" FontSize="14" Text="{Binding PriceOld, StringFormat=Цена: 0.00 руб.}"/>
-                            <TextBlock Name="txtPriceBaby" Grid.Row="3" FontSize="14" Text="{Binding PriceBaby, StringFormat=Цена: 0.00 руб.}"/>-->
                             <TextBlock Name="txtTypeAttraction" Grid.Row="2" FontSize="14" Text="{Binding Type.Type1, StringFormat=Тип: {0}}"/>
-
-                            <!--<Button Content="Забронировать" Grid.Row="4" Foreground="White" 
-                                BorderThickness="0" Background="Black" Click="btnBronClick" Height="30" Width="110" HorizontalAlignment="Right" Margin="5,5,5,0"/>-->
                         </Grid>
                     </Border>
                 </DataTemplate>
             </ListView.ItemTemplate>
         </ListView>
 
+        <!--просмотр каждого аттракциона и выбор нужного-->
         <ScrollViewer x:Name="stackAttraction" Margin="136,80,0,0" Background="White" Visibility="Hidden">
             <StackPanel>
                 <TextBlock x:Name="txtNameAttraction" FontSize="18" TextAlignment="Center" HorizontalAlignment="Center"/>
                 <Image x:Name="imgAttraction" Width="300" Height="250"/>
                 <TextBlock x:Name="txtDescriptionAttraction" HorizontalAlignment="Center" FontSize="16" TextWrapping="Wrap" Margin="60,15,60,15"/>
-                    <StackPanel x:Name="stackPriceOld" Orientation="Horizontal" Margin="5">
-                        <TextBlock x:Name="txtPriceOld" Width="150" FontSize="16" Margin="50,0,0,0"/>
-                        <Button Content="+" FontSize="16" Width="30" Height="30" Click="BtnAddOldAttraction"/>
-                    </StackPanel>
-                    <StackPanel x:Name="stackPriceBaby" Orientation="Horizontal" Margin="5">
-                        <TextBlock x:Name="txtPriceBaby" Width="150" FontSize="16" Margin="50,0,0,0"/>
-                        <Button Content="+" FontSize="16" Width="30" Height="30" Click="BtnAddBabyAttraction"/>
-                    </StackPanel>
+                <StackPanel x:Name="stackPriceOld" Orientation="Horizontal" Margin="5">
+                    <TextBlock x:Name="txtPriceOld" Width="150" FontSize="16" Margin="50,0,0,0"/>
+                    <Button Content="+" FontSize="16" Width="30" Height="30" Click="BtnAddOldAttraction"/>
+                </StackPanel>
+                <StackPanel x:Name="stackPriceBaby" Orientation="Horizontal" Margin="5">
+                    <TextBlock x:Name="txtPriceBaby" Width="150" FontSize="16" Margin="50,0,0,0"/>
+                    <Button Content="+" FontSize="16" Width="30" Height="30" Click="BtnAddBabyAttraction"/>
+                </StackPanel>
                 <Button Content="Назад" HorizontalAlignment="Right" FontSize="16" Width="100" Height="40" Click="btnBackAttraction" Margin="0,0,25,25"/>
             </StackPanel>
         </ScrollViewer>
 
+        <!--вывод добавленных билетов-->
         <Grid x:Name="gridTickets" Visibility="Hidden" Background="White" Margin="136,70,0,0">
             <ListView x:Name="listTickets" Margin="0,0,120,0" Background="White" BorderThickness="0"  ScrollViewer.VerticalScrollBarVisibility="Hidden">
                 <ListView.ItemTemplate>
@@ -120,32 +117,32 @@
             </StackPanel>
         </Grid>
 
-        <!--<Grid x:Name="grid_uslugi" Visibility="Visible">
-                    <Image x:Name="img_bron" Source="image/logo.png" Margin="287,10,0,71"/>
-                    <TextBlock x:Name="txt_bron"  FontSize="16" TextWrapping="Wrap" Margin="0,23,284,105" />
-                    <Button x:Name="btn_bron" Content="Забронировать" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Margin="409,236,0,0" Click="btn_bron_Click"/>
-                </Grid>
-                <Grid x:Name="grid_uslugi1" Visibility="Visible">
-                    <Image x:Name="img_bron1" Source="image/logo.png" Margin="0,0,319.6,31"/>
-                    <TextBlock x:Name="txt_bron1" Text="bababababababababbabbababababababbababab BABBABABABABABABbaab babab" FontSize="16" TextWrapping="Wrap" Margin="320,0,-0.4,0" />
-                </Grid>-->
 
-        <Border x:Name="border_bron" BorderBrush="Black" BorderThickness="2" Background="White" Margin="232,124,162,128" Visibility="Hidden">
-            <Grid x:Name="grid_bron" Margin="40.4,44.4,175.8,47.4" >
-                <StackPanel>
-                    <StackPanel Orientation="Horizontal">
-                        <TextBlock Text="Дата:" FontSize="18" Width="140"/>
-                        <TextBox x:Name="txtBron_Date" Width="100"/>
-                    </StackPanel>
-                </StackPanel>
-                <TextBlock Text="Бронирование(название аттракциона)" HorizontalAlignment="Center" Margin="-30,-42,-387,41"/>
-                <TextBlock Text="Количество: " FontSize="18" Margin="0,43,-2,-45"/>
-                <TextBlock Text="Тип билета?: " FontSize="18" Margin="1,77,-3,-79"/>
-                <TextBlock Text="К оплате: " FontSize="18" Margin="58,153,-132,-155"/>
-                <Button x:Name="btn_pay" Content="Оплатить" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Click="btn_pay_Click" Margin="58,187,-58,-191"/>
-                <Button x:Name="btn_cancel" Content="Отмена" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Click="btn_cancel_Click" Margin="394,187,-357,-191"/>
 
-            </Grid>
-        </Border>
+        <!--раздел профиль-->
+        <Grid x:Name="gridProfile" Visibility="Hidden">
+            <Image x:Name="imgProfile" Margin="329,141,535,318"/>
+            <Button x:Name="btnAddPhoto" Content="добавить фото" Background="Transparent" Click="BtnAddPhoto" Margin="329,227,535,287"/>
+            <Button Content="удалить фото" Background="Transparent" Click="BtnDeletePhoto" Margin="329,258,535,256"/>
+            <TextBlock x:Name="txtNameProfile" FontSize="24" Margin="463,141,178,355" />
+            <TextBlock x:Name="txtBalanceProfile" Text="Баланс карты: " FontSize="16" Margin="463,190,178,287"/>
+            <Button Content="Пополнить баланс" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Margin="463,410,275,83" Click="BtbBalance"/>
+        </Grid>
+
+        <!--пополнение баланса-->
+        <Grid x:Name="gridPlusBalance" Visibility="Hidden" Background="White" Margin="136,70,0,0">
+            <Image Source="image\card.png" Width="480" Height="320" VerticalAlignment="Top"/>
+            <TextBox FontSize ="24" Background="Transparent" Margin="292,182,209,257" />
+
+            <StackPanel Orientation="Horizontal" Height="80" VerticalAlignment="Bottom" HorizontalAlignment="Right">
+                <TextBlock Text="Сумма пополнения: " FontSize="20" VerticalAlignment="Center"/>
+                <TextBox x:Name="txtPlusBalabce" FontSize="20" VerticalAlignment="Center" Width="120" />
+                <Button Content="Пополнить" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Click="BtbPlusBalance" Width="120" Height="50" Margin="15"/>
+                <Button Content="Отмена" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Click="BtnCancelBalance" Width="120" Height="50" Margin="15"/>
+            </StackPanel>
+        </Grid>
+
+
+
     </Grid>
 </Window>

+ 205 - 134
mateo/MainWindow.xaml.cs

@@ -1,4 +1,5 @@
-using System;
+using Microsoft.Win32;
+using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
@@ -21,90 +22,47 @@ namespace mateo
         byte[] image; //очищать!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
         int idattraction = 0;
 
+        public void Update() //функция для обновления информации о пользователе
+        {
+            //фио
+            var fio = DB.GetContext().Users.FirstOrDefault(x => x.IDUsers == DB.Iduser);
+            txtNameProfile.Text = fio.LastName + " " + fio.FirstName + " " + fio.MiddleName;
+
+            //выводим баланс карты
+            DB.Idcard = fio.FKCard;
+            txtBalanceProfile.Text = String.Format("{0:0.00}", Convert.ToDecimal(DB.GetContext().Card.FirstOrDefault(x => x.IDCard == fio.FKCard).Balance));
+
+            //выводим картинку из бд
+            if (fio.Image != null)
+            {
+                image = fio.Image;
+                MemoryStream ms = new MemoryStream(image);
+                imgProfile.Source = BitmapFrame.Create(ms);
+            }
+            if (imgProfile.Source != null) btnAddPhoto.Content = "изменить фото";
+        }
 
         public MainWindow()
         {
             InitializeComponent();
-            listAttraction.ItemsSource = DB.GetContext().Attraction.Where(x => x.FKStatusAttraction != 2).ToList();
-
+            listAllAttraction.ItemsSource = DB.GetContext().Attraction.Where(x => x.FKStatusAttraction != 2).ToList();
+            Update();//??здесь?
         }
 
-
+       
         #region раздел Услуги
         private void btnUslugiClick(object sender, RoutedEventArgs e)
         {
+            stackAttraction.Visibility = Visibility.Hidden;
             gridTickets.Visibility = Visibility.Hidden;
+            gridProfile.Visibility = Visibility.Hidden;
+            gridPlusBalance.Visibility = Visibility.Hidden;
+            listAllAttraction.Visibility = Visibility.Visible;
         }
 
-        #endregion
-
-
-
-
-
-        private void btnProfileClick(object sender, RoutedEventArgs e)
-        {
-            gridTickets.Visibility = Visibility.Hidden;
-
-            Profile profile = new Profile();
-            profile.Show();
-            this.Close();
-        }
-
-        private void btnBronClick(object sender, RoutedEventArgs e)
-        {
-            border_bron.Visibility = Visibility.Visible;
-        }
-
-        private void btn_pay_Click(object sender, RoutedEventArgs e)
-        {
-
-        }
-
-        private void btn_first_Click(object sender, RoutedEventArgs e)
-        {
-
-        }
-
-        private void btn_cancel_Click(object sender, RoutedEventArgs e)
-        {
-            border_bron.Visibility = Visibility.Hidden;
-        }
-
-        #region соцсети
-        private void btn_whatsapp(object sender, RoutedEventArgs e)
-        {
-
-        }
-
-        private void btn_gmail(object sender, RoutedEventArgs e)
-        {
-
-        }
-
-        private void btn_vk(object sender, RoutedEventArgs e)
-        {
-
-        }
-        private void btn_insta(object sender, RoutedEventArgs e)
-        {
-
-        }
-        #endregion
-        private void btnLogout(object sender, RoutedEventArgs e)
-        {
-            First first = new First();
-            first.Show();
-            this.Close();
-        }
-        private void btnExit(object sender, RoutedEventArgs e)
-        {
-            Application.Current.Shutdown();
-        }
-
-        private void ViewAttraction(object sender, MouseButtonEventArgs e)
+        private void ViewAllAttraction(object sender, MouseButtonEventArgs e) //просмотр каждого аттракцинона для выбора нужного
         {
-            if (listAttraction.SelectedItem is Attraction attraction)
+            if (listAllAttraction.SelectedItem is Attraction attraction)
             {
                 stackPriceOld.Visibility = Visibility.Visible;
                 stackPriceBaby.Visibility = Visibility.Visible;
@@ -121,43 +79,24 @@ namespace mateo
             }
         }
 
-        private void btnBackAttraction(object sender, RoutedEventArgs e)
+        private void btnBackAttraction(object sender, RoutedEventArgs e) //кнопка Назад после просмотра
         {
             stackAttraction.Visibility = Visibility.Hidden;
         }
 
+        #endregion
 
-        public void Summ(decimal summ)
-        {
-            try
-            {
-                summ = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).Sum(x => x.Quantity * x.Summ);
-            }
-            catch
-            {
-                summ = 0;
-            }
-            if (summ == 0) txtSumm.Text = "Сумма: 0.00";
-
-            else txtSumm.Text = String.Format("Сумма: {0:0,00}", summ);
-        }
 
-        private void btnTickets(object sender, RoutedEventArgs e)
-        {
-            gridTickets.Visibility = Visibility.Visible;
-            listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
-            decimal summ = 0;
-            Summ(summ);
-        }
+        #region Раздел Билеты
 
-        private void BtnAddOldAttraction(object sender, RoutedEventArgs e)
+        private void BtnAddOldAttraction(object sender, RoutedEventArgs e) //+ для добавления билета с типом Взрослый
         {
 
             //записываем id аттракциона по названию
             var attr = DB.GetContext().Attraction.Where(x => x.NameAttraction == txtNameAttraction.Text).FirstOrDefault();
             idattraction = attr.IDAttraction;
 
-            if (DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKAttraction == idattraction && x.FKStatusPuy == 2&&x.FKTypeTickets==1).FirstOrDefault() != null)
+            if (DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKAttraction == idattraction && x.FKStatusPuy == 2 && x.FKTypeTickets == 1).FirstOrDefault() != null)
                 MessageBox.Show("Вы уже добавили такой билет, если хотите изменить количество, перейдите пожалуйста в раздел \"Билеты\"", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
             else
             {
@@ -180,7 +119,7 @@ namespace mateo
             }
         }
 
-        private void BtnAddBabyAttraction(object sender, RoutedEventArgs e)
+        private void BtnAddBabyAttraction(object sender, RoutedEventArgs e) //+ для добавления билета с типом Детский
         {
             var attr = DB.GetContext().Attraction.Where(x => x.NameAttraction == txtNameAttraction.Text).FirstOrDefault();
             //записываем id аттракциона по названию
@@ -203,35 +142,43 @@ namespace mateo
                 DB.GetContext().Tickets.Add(tickets);
                 DB.GetContext().SaveChanges();
                 MessageBox.Show("Билет добавлен в раздел \"Билеты\"", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
-                listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser==DB.Iduser&&x.FKStatusPuy==2).ToList();
+                listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
+
 
-               
             }
         }
 
-        private void BtnDeleteTickets(object sender, RoutedEventArgs e)
+        public decimal Summ(decimal summ) //функция для вывода суммы добавленных билетов
         {
-            if ((sender as Button).DataContext is Tickets tickets)
+            try
             {
-                decimal summ = 0;
-                DB.GetContext().Tickets.Remove(tickets);
-                DB.GetContext().SaveChanges();
-                listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
-                try
-                {
-                    summ = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).Sum(x => x.Quantity * x.Summ);
-                }
-                catch
-                {
-                    summ = 0;                    
-                }
-                if (summ == 0) txtSumm.Text = "Сумма: 0.00";
-
-                else txtSumm.Text = String.Format("Сумма: {0:0,00}", summ);
+                summ = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).Sum(x => x.Quantity * x.Summ);
             }
+            catch
+            {
+                summ = 0;
+            }
+            if (summ == 0) txtSumm.Text = "Сумма: 0.00";
+
+            else txtSumm.Text = String.Format("Сумма: {0:0,00}", summ);
+
+            return summ;
+        }
+
+        private void btnTickets(object sender, RoutedEventArgs e) //вывод добавленных билетов
+        {
+            stackAttraction.Visibility = Visibility.Hidden;
+            listAllAttraction.Visibility = Visibility.Hidden;
+            gridProfile.Visibility = Visibility.Hidden;
+            gridPlusBalance.Visibility = Visibility.Hidden;
+            gridTickets.Visibility = Visibility.Visible;
+
+            listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
+            decimal summ = 0;
+            summ = Summ(summ);
         }
 
-        private void BtnTicketsMinus(object sender, RoutedEventArgs e)
+        private void BtnTicketsMinus(object sender, RoutedEventArgs e) //уменьшение количества билетов
         {
             if ((sender as Button).DataContext is Tickets tickets)
             {
@@ -240,12 +187,11 @@ namespace mateo
                 DB.GetContext().SaveChanges();
                 listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
                 decimal summ = 0;
-                Summ(summ);
-
+                summ = Summ(summ);
             }
         }
 
-        private void BtnTicketsPlus(object sender, RoutedEventArgs e)
+        private void BtnTicketsPlus(object sender, RoutedEventArgs e) //увеличение количества билетов
         {
             if ((sender as Button).DataContext is Tickets tickets)
             {
@@ -254,12 +200,33 @@ namespace mateo
                 DB.GetContext().SaveChanges();
                 listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
                 decimal summ = 0;
-                Summ(summ);
+                summ = Summ(summ);
+            }
+        }
+
+        private void BtnDeleteTickets(object sender, RoutedEventArgs e) //удаление добавленных билетов
+        {
+            if ((sender as Button).DataContext is Tickets tickets)
+            {
+                decimal summ = 0;
+                DB.GetContext().Tickets.Remove(tickets);
+                DB.GetContext().SaveChanges();
+                listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
+                try
+                {
+                    summ = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).Sum(x => x.Quantity * x.Summ);
+                }
+                catch
+                {
+                    summ = 0;
+                }
+                if (summ == 0) txtSumm.Text = "Сумма: 0.00";
 
+                else txtSumm.Text = String.Format("Сумма: {0:0,00}", summ);
             }
         }
 
-        private void BtnPuyAll(object sender, RoutedEventArgs e)
+        private void BtnPuyAll(object sender, RoutedEventArgs e) //покупка всех добавленных билетов и заненсение в таблицу History
         {
             if (DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).FirstOrDefault() == null)
             {
@@ -269,7 +236,7 @@ namespace mateo
             else
             {
                 decimal summ = 0;
-                Summ(summ);
+                summ = Summ(summ);
 
                 var card = DB.GetContext().Users.Where(x => x.IDUsers == DB.Iduser).FirstOrDefault().FKCard;
                 var balance = DB.GetContext().Card.Where(x => x.IDCard == card).FirstOrDefault();
@@ -299,19 +266,123 @@ namespace mateo
 
                     listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
 
-                    try
-                    {
-                        summ = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).Sum(x => x.Quantity * x.Summ);
-                    }
-                    catch
-                    {
-                        summ = 0;
-                    }
-                    if (summ == 0) txtSumm.Text = "Сумма: 0.00";
-
-                    else txtSumm.Text = String.Format("Сумма: {0:0,00}", summ);
+                    summ = Summ(summ);
                 };
             }
         }
+
+        #endregion
+
+
+        #region Раздел Профиль
+        private void btnProfileClick(object sender, RoutedEventArgs e)
+        {
+            stackAttraction.Visibility = Visibility.Hidden;
+            listAllAttraction.Visibility = Visibility.Hidden;
+            gridTickets.Visibility = Visibility.Hidden;
+            gridProfile.Visibility = Visibility.Visible;
+        }
+
+        private void BtnAddPhoto(object sender, RoutedEventArgs e) //добавить/изменить фото пользователя в разделе Профиль и в бд
+        {
+            try
+            {
+                string imageLoc;
+                OpenFileDialog dld = new OpenFileDialog();
+                dld.Filter = "JPG Files (*.jpg)|*.jpg|PNG Files (*.png)|*.png|JPEG Files (*.jpeg)|*.jpeg";
+                dld.Title = "Выберите изображение пользователя";
+                bool? result = dld.ShowDialog();
+                if (result == true)
+                {
+                    imageLoc = dld.FileName;
+                    imgProfile.Source = new BitmapImage(new Uri(imageLoc));
+                    FileStream fs = new FileStream(imageLoc, FileMode.Open, FileAccess.Read);
+                    BinaryReader br = new BinaryReader(fs);
+
+                    image = br.ReadBytes((int)fs.Length);
+                    var img = DB.GetContext().Users.Where(x => x.IDUsers == DB.Iduser).FirstOrDefault();
+                    img.Image = image;
+                    DB.GetContext().SaveChanges();
+                }
+                if (imgProfile.Source != null) btnAddPhoto.Content = "изменить фото";
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.Message);
+            }
+        }
+
+        private void BtnDeletePhoto(object sender, RoutedEventArgs e) //удаление фото в тч из бд
+        {
+            var fio = DB.GetContext().Users.FirstOrDefault(x => x.IDUsers == DB.Iduser);
+            fio.Image = null;
+            DB.GetContext().SaveChanges();
+            imgProfile.Source = null;
+            btnAddPhoto.Content = "добавить фото";
+        }
+
+        private void BtbBalance(object sender, RoutedEventArgs e) //кнопка Пополнить баланс, открываем форму для пополнения баланса
+        {
+            gridPlusBalance.Visibility = Visibility.Visible;
+        }
+
+        private void BtbPlusBalance(object sender, RoutedEventArgs e) //пополняем баланс (незакончено, надо чтобы пользователь вводил номер банковской карты)
+        {
+            //"пополняем баланс" типа
+            if (txtPlusBalabce.Text != "")
+            {
+                var a = DB.GetContext().Card.Where(x => x.IDCard == DB.Idcard).FirstOrDefault();
+                a.Balance += Convert.ToDecimal(txtPlusBalabce.Text);
+                DB.GetContext().SaveChanges();
+                gridPlusBalance.Visibility = Visibility.Hidden;
+            }
+            var fio = DB.GetContext().Users.FirstOrDefault(x => x.IDUsers == DB.Iduser);
+            DB.Idcard = fio.FKCard;
+            txtBalanceProfile.Text = DB.GetContext().Card.FirstOrDefault(x => x.IDCard == fio.FKCard).Balance.ToString();
+            Update();
+        }
+
+        private void BtnCancelBalance(object sender, RoutedEventArgs e)
+        {
+            gridPlusBalance.Visibility = Visibility.Hidden;
+        }
+
+        #endregion
+
+
+        #region Прочее
+        private void btnLogout(object sender, RoutedEventArgs e)
+        {
+            First first = new First();
+            first.Show();
+            this.Close();
+        }
+        private void btnExit(object sender, RoutedEventArgs e)
+        {
+            Application.Current.Shutdown();
+        }
+
+        #region СоцСети
+        private void btn_whatsapp(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+        private void btn_gmail(object sender, RoutedEventArgs e)
+        {
+
+        }
+
+        private void btn_vk(object sender, RoutedEventArgs e)
+        {
+
+        }
+        private void btn_insta(object sender, RoutedEventArgs e)
+        {
+
+        }
+        #endregion
+
+        #endregion
     }
 }

+ 0 - 68
mateo/Profile.xaml

@@ -1,68 +0,0 @@
-<Window x:Class="mateo.Profile"
-        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:mateo"
-        mc:Ignorable="d"
-        Title="Mateo" Height="540" Width="960" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" WindowStyle="None">
-    <Grid>
-        <Grid Margin="0,0,824,0" Background="#E74C32">
-            <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Margin="48,371,48,129" Click="btn_insta">
-                <Image Source="image\insta.png" Height="40" Width="40"/>
-            </Button>
-
-            <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Margin="48,331,48,169" Click="btn_vk">
-                <Image Source="image\vk.png" Height="40" Width="40"/>
-            </Button>
-
-            <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Margin="48,413,48,87" Click="btn_whatsapp">
-                <Image Source="image\whatsapp.png" Height="40" Width="40"/>
-            </Button>
-
-            <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Margin="48,454,48,46" Click="btn_gmail">
-                <Image Source="image\gmail.png" Height="40" Width="40"/>
-            </Button>
-        </Grid>
-
-        <Grid Background="#E74C32" Margin="0,0,0,470">
-            <Image Source="image/logo.png" Margin="0,0,820,-20"/>
-            <Button Content="Профиль" FontSize="16" BorderThickness="0" Background="Transparent" Margin="627,10,223,10" MaxWidth="80" Click="btnProfileClick"/>
-            <Button Content="Услуги" FontSize="16" BorderThickness="0" Background="Transparent" Margin="146,10,674,10" MaxWidth="80" Click="btnUslugiClick"/>
-            <TextBlock Text="Парк развлечений" HorizontalAlignment="Center" FontSize="28" Foreground="#ffff" Margin="282,5,327,0"/>
-            <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Click="btnLogout" Margin="860,14,60,16">
-                <Image Source="image\logout.png" Height="40" Width="40"/>
-            </Button>
-            <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Click="btnExit" Margin="910,14,10,16">
-                <Image Source="image\exit.png" Height="40" Width="40"/>
-            </Button>
-            <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Click="btnTickets" Margin="810,14,105,16">
-                <Image Source="image\tickets.png" Height="40" Width="40"/>
-            </Button>
-        </Grid>
-
-        <Grid>
-            <Image x:Name="photo_profile" Margin="329,141,535,318"/>
-            <Button x:Name="btn_photo" Content="добавить фото" Background="Transparent" Click="btn_photo_click" Margin="329,227,535,287"/>
-            <Button x:Name="btn_dltphoto" Content="удалить фото" Background="Transparent" Click="btn_deletephoto_click" Margin="329,258,535,256"/>
-            <TextBlock x:Name="name_profile" FontSize="24" Margin="463,141,178,355" />
-            <TextBlock x:Name="balance_profile" Text="Баланс карты: " FontSize="16" Margin="463,190,178,287"/>
-            <Button x:Name="btn_balance" Content="Пополнить баланс" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Margin="463,410,275,83" Click="btn_balance_Click"/>
-        </Grid>
-
-
-
-        <Grid x:Name="grid_balance" Visibility="Hidden" Background="White" Margin="136,70,0,0">
-            <Image Source="image\card.png" Width="480" Height="320" VerticalAlignment="Top"/>
-            <TextBox FontSize ="24" Background="Transparent" Margin="292,182,209,257" />
-
-            <StackPanel Orientation="Horizontal" Height="80" VerticalAlignment="Bottom" HorizontalAlignment="Right">
-                <TextBlock Text="Сумма пополнения: " FontSize="20" VerticalAlignment="Center"/>
-                <TextBox x:Name="txt_balanceplus" FontSize="20" VerticalAlignment="Center" Width="120" />
-                <Button x:Name="btn_balanceplus" Content="Пополнить" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Click="btn_balanceplus_Click" Width="120" Height="50" Margin="15"/>
-                <Button x:Name="btn_cancelblnc" Content="Отмена" Foreground="White" FontSize="18" BorderThickness="0" Background="Black" Click="btn_cancelblnc_Click" Width="120" Height="50" Margin="15"/>
-            </StackPanel>
-        </Grid>
-
-    </Grid>
-</Window>

+ 0 - 159
mateo/Profile.xaml.cs

@@ -1,159 +0,0 @@
-using Microsoft.Win32;
-using System;
-using System.Collections.Generic;
-using System.IO;
-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 mateo
-{
-    public partial class Profile : Window
-    {
-        byte[] image;
-        public Profile()
-        {
-            InitializeComponent();
-            Update();
-        }
-
-        public void Update()
-        {
-            //фио
-            var fio = DB.GetContext().Users.FirstOrDefault(x => x.IDUsers == DB.Iduser);
-            name_profile.Text = fio.LastName + " " + fio.FirstName + " " + fio.MiddleName;
-
-            //выводим баланс карты
-            DB.Idcard = fio.FKCard;
-            balance_profile.Text = String.Format("{0:0.00}", Convert.ToDecimal(DB.GetContext().Card.FirstOrDefault(x => x.IDCard == fio.FKCard).Balance));
-
-            //выводим картинку из бд
-            if (fio.Image != null)
-            {
-                image = fio.Image;
-                MemoryStream ms = new MemoryStream(image);
-                photo_profile.Source = BitmapFrame.Create(ms);
-            }
-            if (photo_profile.Source != null) btn_photo.Content = "изменить фото";
-        }
-        private void btnProfileClick(object sender, RoutedEventArgs e)
-        {
-        }
-
-        private void btnUslugiClick(object sender, RoutedEventArgs e)
-        {
-            MainWindow mainWindow = new MainWindow();
-            mainWindow.Show();
-            this.Close();
-        }
-
-        private void btn_balance_Click(object sender, RoutedEventArgs e)
-        {
-            grid_balance.Visibility = Visibility.Visible;
-        }
-
-        private void btn_balanceplus_Click(object sender, RoutedEventArgs e)
-        {
-            //"пополняем баланс" типа
-            if (txt_balanceplus.Text != "")
-            {
-                var a = DB.GetContext().Card.Where(x => x.IDCard == DB.Idcard).FirstOrDefault();
-                a.Balance += Convert.ToDecimal(txt_balanceplus.Text);
-                DB.GetContext().SaveChanges();
-                grid_balance.Visibility = Visibility.Hidden;
-            }
-            var fio = DB.GetContext().Users.FirstOrDefault(x => x.IDUsers == DB.Iduser);
-            DB.Idcard = fio.FKCard;
-            balance_profile.Text = DB.GetContext().Card.FirstOrDefault(x => x.IDCard == fio.FKCard).Balance.ToString();
-            Update();
-        }
-
-        private void btn_cancelblnc_Click(object sender, RoutedEventArgs e)
-        {
-            grid_balance.Visibility = Visibility.Hidden;
-        }
-
-        private void btn_photo_click(object sender, RoutedEventArgs e)
-        {
-            try
-            {
-                string imageLoc;
-                OpenFileDialog dld = new OpenFileDialog();
-                dld.Filter = "JPG Files (*.jpg)|*.jpg|PNG Files (*.png)|*.png|JPEG Files (*.jpeg)|*.jpeg";
-                dld.Title = "Выберите изображение пользователя";
-                bool? result = dld.ShowDialog();
-                if(result == true)
-                {
-                    imageLoc = dld.FileName;
-                    photo_profile.Source = new BitmapImage(new Uri(imageLoc));
-                    FileStream fs = new FileStream(imageLoc, FileMode.Open, FileAccess.Read);
-                    BinaryReader br = new BinaryReader(fs);
-
-                    image = br.ReadBytes((int)fs.Length);
-                    var img = DB.GetContext().Users.Where(x => x.IDUsers == DB.Iduser).FirstOrDefault();
-                    img.Image = image;
-                    DB.GetContext().SaveChanges();
-                }
-                if (photo_profile.Source != null) btn_photo.Content = "изменить фото";
-            }
-            catch (Exception ex)
-            {
-                MessageBox.Show(ex.Message);
-            }
-        }
-
-        private void btn_deletephoto_click(object sender, RoutedEventArgs e)
-        {
-            var fio = DB.GetContext().Users.FirstOrDefault(x => x.IDUsers == DB.Iduser);
-            fio.Image = null;
-            DB.GetContext().SaveChanges();
-            photo_profile.Source = null;
-            btn_photo.Content = "добавить фото";
-        }
-        #region соцсети
-        private void btn_insta(object sender, RoutedEventArgs e)
-        {
-
-        }
-
-        private void btn_vk(object sender, RoutedEventArgs e)
-        {
-
-        }
-
-        private void btn_whatsapp(object sender, RoutedEventArgs e)
-        {
-
-        }
-
-        private void btn_gmail(object sender, RoutedEventArgs e)
-        {
-
-        }
-        #endregion
-        private void btnExit(object sender, RoutedEventArgs e)
-        {
-            Application.Current.Shutdown();
-        }
-
-        private void btnLogout(object sender, RoutedEventArgs e)
-        {
-            First first = new First();
-            first.Show();
-            this.Close();
-        }
-
-        private void btnTickets(object sender, RoutedEventArgs e)
-        {
-
-        }
-    }
-}

BIN
mateo/bin/Debug/mateo.exe


BIN
mateo/bin/Debug/mateo.pdb


+ 0 - 7
mateo/mateo.csproj

@@ -141,19 +141,12 @@
       <DependentUpon>MainWindow.xaml</DependentUpon>
       <SubType>Code</SubType>
     </Compile>
-    <Page Include="Profile.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
     <Page Include="SysAdmin.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Profile.xaml.cs">
-      <DependentUpon>Profile.xaml</DependentUpon>
-    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs">
       <SubType>Code</SubType>
     </Compile>

BIN
mateo/obj/Debug/MainWindow.baml


+ 94 - 46
mateo/obj/Debug/MainWindow.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "BBB109685AC5F20ADAB43D811A480C0A7FBBD9A5F0F6E1E5DB3F9EBC835D54B8"
+#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4274B07DD1B90645C84B80641EFBCC99CB86CFA5D08968906E27058331D9C356"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -43,13 +43,13 @@ namespace mateo {
         
         #line 45 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.ListView listAttraction;
+        internal System.Windows.Controls.ListView listAllAttraction;
         
         #line default
         #line hidden
         
         
-        #line 77 "..\..\MainWindow.xaml"
+        #line 73 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ScrollViewer stackAttraction;
         
@@ -57,7 +57,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 79 "..\..\MainWindow.xaml"
+        #line 75 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtNameAttraction;
         
@@ -65,7 +65,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 80 "..\..\MainWindow.xaml"
+        #line 76 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Image imgAttraction;
         
@@ -73,7 +73,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 81 "..\..\MainWindow.xaml"
+        #line 77 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtDescriptionAttraction;
         
@@ -81,7 +81,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 82 "..\..\MainWindow.xaml"
+        #line 78 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.StackPanel stackPriceOld;
         
@@ -89,7 +89,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 83 "..\..\MainWindow.xaml"
+        #line 79 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtPriceOld;
         
@@ -97,7 +97,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 86 "..\..\MainWindow.xaml"
+        #line 82 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.StackPanel stackPriceBaby;
         
@@ -105,7 +105,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 87 "..\..\MainWindow.xaml"
+        #line 83 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtPriceBaby;
         
@@ -113,7 +113,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 94 "..\..\MainWindow.xaml"
+        #line 91 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid gridTickets;
         
@@ -121,7 +121,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 95 "..\..\MainWindow.xaml"
+        #line 92 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ListView listTickets;
         
@@ -129,7 +129,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 118 "..\..\MainWindow.xaml"
+        #line 115 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtSumm;
         
@@ -137,41 +137,57 @@ namespace mateo {
         #line hidden
         
         
-        #line 133 "..\..\MainWindow.xaml"
+        #line 123 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Border border_bron;
+        internal System.Windows.Controls.Grid gridProfile;
         
         #line default
         #line hidden
         
         
-        #line 134 "..\..\MainWindow.xaml"
+        #line 124 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Grid grid_bron;
+        internal System.Windows.Controls.Image imgProfile;
         
         #line default
         #line hidden
         
         
-        #line 138 "..\..\MainWindow.xaml"
+        #line 125 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.TextBox txtBron_Date;
+        internal System.Windows.Controls.Button btnAddPhoto;
         
         #line default
         #line hidden
         
         
-        #line 145 "..\..\MainWindow.xaml"
+        #line 127 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_pay;
+        internal System.Windows.Controls.TextBlock txtNameProfile;
         
         #line default
         #line hidden
         
         
-        #line 146 "..\..\MainWindow.xaml"
+        #line 128 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_cancel;
+        internal System.Windows.Controls.TextBlock txtBalanceProfile;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 133 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Grid gridPlusBalance;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 139 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtPlusBalabce;
         
         #line default
         #line hidden
@@ -240,7 +256,7 @@ namespace mateo {
             return;
             case 5:
             
-            #line 31 "..\..\MainWindow.xaml"
+            #line 30 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnProfileClick);
             
             #line default
@@ -248,7 +264,7 @@ namespace mateo {
             return;
             case 6:
             
-            #line 32 "..\..\MainWindow.xaml"
+            #line 31 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnUslugiClick);
             
             #line default
@@ -256,7 +272,7 @@ namespace mateo {
             return;
             case 7:
             
-            #line 34 "..\..\MainWindow.xaml"
+            #line 33 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnLogout);
             
             #line default
@@ -264,7 +280,7 @@ namespace mateo {
             return;
             case 8:
             
-            #line 37 "..\..\MainWindow.xaml"
+            #line 36 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnExit);
             
             #line default
@@ -272,17 +288,17 @@ namespace mateo {
             return;
             case 9:
             
-            #line 40 "..\..\MainWindow.xaml"
+            #line 39 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnTickets);
             
             #line default
             #line hidden
             return;
             case 10:
-            this.listAttraction = ((System.Windows.Controls.ListView)(target));
+            this.listAllAttraction = ((System.Windows.Controls.ListView)(target));
             
             #line 45 "..\..\MainWindow.xaml"
-            this.listAttraction.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.ViewAttraction);
+            this.listAllAttraction.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.ViewAllAttraction);
             
             #line default
             #line hidden
@@ -307,7 +323,7 @@ namespace mateo {
             return;
             case 17:
             
-            #line 84 "..\..\MainWindow.xaml"
+            #line 80 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddOldAttraction);
             
             #line default
@@ -321,7 +337,7 @@ namespace mateo {
             return;
             case 20:
             
-            #line 88 "..\..\MainWindow.xaml"
+            #line 84 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddBabyAttraction);
             
             #line default
@@ -329,7 +345,7 @@ namespace mateo {
             return;
             case 21:
             
-            #line 90 "..\..\MainWindow.xaml"
+            #line 86 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnBackAttraction);
             
             #line default
@@ -346,35 +362,67 @@ namespace mateo {
             return;
             case 28:
             
-            #line 119 "..\..\MainWindow.xaml"
+            #line 116 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnPuyAll);
             
             #line default
             #line hidden
             return;
             case 29:
-            this.border_bron = ((System.Windows.Controls.Border)(target));
+            this.gridProfile = ((System.Windows.Controls.Grid)(target));
             return;
             case 30:
-            this.grid_bron = ((System.Windows.Controls.Grid)(target));
+            this.imgProfile = ((System.Windows.Controls.Image)(target));
             return;
             case 31:
-            this.txtBron_Date = ((System.Windows.Controls.TextBox)(target));
+            this.btnAddPhoto = ((System.Windows.Controls.Button)(target));
+            
+            #line 125 "..\..\MainWindow.xaml"
+            this.btnAddPhoto.Click += new System.Windows.RoutedEventHandler(this.BtnAddPhoto);
+            
+            #line default
+            #line hidden
             return;
             case 32:
-            this.btn_pay = ((System.Windows.Controls.Button)(target));
             
-            #line 145 "..\..\MainWindow.xaml"
-            this.btn_pay.Click += new System.Windows.RoutedEventHandler(this.btn_pay_Click);
+            #line 126 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnDeletePhoto);
             
             #line default
             #line hidden
             return;
             case 33:
-            this.btn_cancel = ((System.Windows.Controls.Button)(target));
+            this.txtNameProfile = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 34:
+            this.txtBalanceProfile = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 35:
             
-            #line 146 "..\..\MainWindow.xaml"
-            this.btn_cancel.Click += new System.Windows.RoutedEventHandler(this.btn_cancel_Click);
+            #line 129 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtbBalance);
+            
+            #line default
+            #line hidden
+            return;
+            case 36:
+            this.gridPlusBalance = ((System.Windows.Controls.Grid)(target));
+            return;
+            case 37:
+            this.txtPlusBalabce = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 38:
+            
+            #line 140 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtbPlusBalance);
+            
+            #line default
+            #line hidden
+            return;
+            case 39:
+            
+            #line 141 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnCancelBalance);
             
             #line default
             #line hidden
@@ -394,7 +442,7 @@ namespace mateo {
             {
             case 24:
             
-            #line 106 "..\..\MainWindow.xaml"
+            #line 103 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnTicketsMinus);
             
             #line default
@@ -402,7 +450,7 @@ namespace mateo {
             break;
             case 25:
             
-            #line 108 "..\..\MainWindow.xaml"
+            #line 105 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnTicketsPlus);
             
             #line default
@@ -410,7 +458,7 @@ namespace mateo {
             break;
             case 26:
             
-            #line 109 "..\..\MainWindow.xaml"
+            #line 106 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnDeleteTickets);
             
             #line default

+ 94 - 46
mateo/obj/Debug/MainWindow.g.i.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "BBB109685AC5F20ADAB43D811A480C0A7FBBD9A5F0F6E1E5DB3F9EBC835D54B8"
+#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4274B07DD1B90645C84B80641EFBCC99CB86CFA5D08968906E27058331D9C356"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -43,13 +43,13 @@ namespace mateo {
         
         #line 45 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.ListView listAttraction;
+        internal System.Windows.Controls.ListView listAllAttraction;
         
         #line default
         #line hidden
         
         
-        #line 77 "..\..\MainWindow.xaml"
+        #line 73 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ScrollViewer stackAttraction;
         
@@ -57,7 +57,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 79 "..\..\MainWindow.xaml"
+        #line 75 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtNameAttraction;
         
@@ -65,7 +65,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 80 "..\..\MainWindow.xaml"
+        #line 76 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Image imgAttraction;
         
@@ -73,7 +73,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 81 "..\..\MainWindow.xaml"
+        #line 77 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtDescriptionAttraction;
         
@@ -81,7 +81,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 82 "..\..\MainWindow.xaml"
+        #line 78 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.StackPanel stackPriceOld;
         
@@ -89,7 +89,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 83 "..\..\MainWindow.xaml"
+        #line 79 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtPriceOld;
         
@@ -97,7 +97,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 86 "..\..\MainWindow.xaml"
+        #line 82 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.StackPanel stackPriceBaby;
         
@@ -105,7 +105,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 87 "..\..\MainWindow.xaml"
+        #line 83 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtPriceBaby;
         
@@ -113,7 +113,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 94 "..\..\MainWindow.xaml"
+        #line 91 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid gridTickets;
         
@@ -121,7 +121,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 95 "..\..\MainWindow.xaml"
+        #line 92 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ListView listTickets;
         
@@ -129,7 +129,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 118 "..\..\MainWindow.xaml"
+        #line 115 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtSumm;
         
@@ -137,41 +137,57 @@ namespace mateo {
         #line hidden
         
         
-        #line 133 "..\..\MainWindow.xaml"
+        #line 123 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Border border_bron;
+        internal System.Windows.Controls.Grid gridProfile;
         
         #line default
         #line hidden
         
         
-        #line 134 "..\..\MainWindow.xaml"
+        #line 124 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Grid grid_bron;
+        internal System.Windows.Controls.Image imgProfile;
         
         #line default
         #line hidden
         
         
-        #line 138 "..\..\MainWindow.xaml"
+        #line 125 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.TextBox txtBron_Date;
+        internal System.Windows.Controls.Button btnAddPhoto;
         
         #line default
         #line hidden
         
         
-        #line 145 "..\..\MainWindow.xaml"
+        #line 127 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_pay;
+        internal System.Windows.Controls.TextBlock txtNameProfile;
         
         #line default
         #line hidden
         
         
-        #line 146 "..\..\MainWindow.xaml"
+        #line 128 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_cancel;
+        internal System.Windows.Controls.TextBlock txtBalanceProfile;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 133 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Grid gridPlusBalance;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 139 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtPlusBalabce;
         
         #line default
         #line hidden
@@ -240,7 +256,7 @@ namespace mateo {
             return;
             case 5:
             
-            #line 31 "..\..\MainWindow.xaml"
+            #line 30 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnProfileClick);
             
             #line default
@@ -248,7 +264,7 @@ namespace mateo {
             return;
             case 6:
             
-            #line 32 "..\..\MainWindow.xaml"
+            #line 31 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnUslugiClick);
             
             #line default
@@ -256,7 +272,7 @@ namespace mateo {
             return;
             case 7:
             
-            #line 34 "..\..\MainWindow.xaml"
+            #line 33 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnLogout);
             
             #line default
@@ -264,7 +280,7 @@ namespace mateo {
             return;
             case 8:
             
-            #line 37 "..\..\MainWindow.xaml"
+            #line 36 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnExit);
             
             #line default
@@ -272,17 +288,17 @@ namespace mateo {
             return;
             case 9:
             
-            #line 40 "..\..\MainWindow.xaml"
+            #line 39 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnTickets);
             
             #line default
             #line hidden
             return;
             case 10:
-            this.listAttraction = ((System.Windows.Controls.ListView)(target));
+            this.listAllAttraction = ((System.Windows.Controls.ListView)(target));
             
             #line 45 "..\..\MainWindow.xaml"
-            this.listAttraction.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.ViewAttraction);
+            this.listAllAttraction.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.ViewAllAttraction);
             
             #line default
             #line hidden
@@ -307,7 +323,7 @@ namespace mateo {
             return;
             case 17:
             
-            #line 84 "..\..\MainWindow.xaml"
+            #line 80 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddOldAttraction);
             
             #line default
@@ -321,7 +337,7 @@ namespace mateo {
             return;
             case 20:
             
-            #line 88 "..\..\MainWindow.xaml"
+            #line 84 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddBabyAttraction);
             
             #line default
@@ -329,7 +345,7 @@ namespace mateo {
             return;
             case 21:
             
-            #line 90 "..\..\MainWindow.xaml"
+            #line 86 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnBackAttraction);
             
             #line default
@@ -346,35 +362,67 @@ namespace mateo {
             return;
             case 28:
             
-            #line 119 "..\..\MainWindow.xaml"
+            #line 116 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnPuyAll);
             
             #line default
             #line hidden
             return;
             case 29:
-            this.border_bron = ((System.Windows.Controls.Border)(target));
+            this.gridProfile = ((System.Windows.Controls.Grid)(target));
             return;
             case 30:
-            this.grid_bron = ((System.Windows.Controls.Grid)(target));
+            this.imgProfile = ((System.Windows.Controls.Image)(target));
             return;
             case 31:
-            this.txtBron_Date = ((System.Windows.Controls.TextBox)(target));
+            this.btnAddPhoto = ((System.Windows.Controls.Button)(target));
+            
+            #line 125 "..\..\MainWindow.xaml"
+            this.btnAddPhoto.Click += new System.Windows.RoutedEventHandler(this.BtnAddPhoto);
+            
+            #line default
+            #line hidden
             return;
             case 32:
-            this.btn_pay = ((System.Windows.Controls.Button)(target));
             
-            #line 145 "..\..\MainWindow.xaml"
-            this.btn_pay.Click += new System.Windows.RoutedEventHandler(this.btn_pay_Click);
+            #line 126 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnDeletePhoto);
             
             #line default
             #line hidden
             return;
             case 33:
-            this.btn_cancel = ((System.Windows.Controls.Button)(target));
+            this.txtNameProfile = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 34:
+            this.txtBalanceProfile = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 35:
             
-            #line 146 "..\..\MainWindow.xaml"
-            this.btn_cancel.Click += new System.Windows.RoutedEventHandler(this.btn_cancel_Click);
+            #line 129 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtbBalance);
+            
+            #line default
+            #line hidden
+            return;
+            case 36:
+            this.gridPlusBalance = ((System.Windows.Controls.Grid)(target));
+            return;
+            case 37:
+            this.txtPlusBalabce = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 38:
+            
+            #line 140 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtbPlusBalance);
+            
+            #line default
+            #line hidden
+            return;
+            case 39:
+            
+            #line 141 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnCancelBalance);
             
             #line default
             #line hidden
@@ -394,7 +442,7 @@ namespace mateo {
             {
             case 24:
             
-            #line 106 "..\..\MainWindow.xaml"
+            #line 103 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnTicketsMinus);
             
             #line default
@@ -402,7 +450,7 @@ namespace mateo {
             break;
             case 25:
             
-            #line 108 "..\..\MainWindow.xaml"
+            #line 105 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnTicketsPlus);
             
             #line default
@@ -410,7 +458,7 @@ namespace mateo {
             break;
             case 26:
             
-            #line 109 "..\..\MainWindow.xaml"
+            #line 106 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnDeleteTickets);
             
             #line default

BIN
mateo/obj/Debug/Profile.baml


+ 0 - 290
mateo/obj/Debug/Profile.g.cs

@@ -1,290 +0,0 @@
-#pragma checksum "..\..\Profile.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F2D29E3F7F36151A3ED431675B40ED4FD120A214FC0FB271809EC4E3A42CF9D0"
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     Этот код создан программой.
-//     Исполняемая версия:4.0.30319.42000
-//
-//     Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
-//     повторной генерации кода.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-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;
-using mateo;
-
-
-namespace mateo {
-    
-    
-    /// <summary>
-    /// Profile
-    /// </summary>
-    public partial class Profile : System.Windows.Window, System.Windows.Markup.IComponentConnector {
-        
-        
-        #line 45 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Image photo_profile;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 46 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_photo;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 47 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_dltphoto;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 48 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.TextBlock name_profile;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 49 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.TextBlock balance_profile;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 50 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_balance;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 55 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Grid grid_balance;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 61 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.TextBox txt_balanceplus;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 62 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_balanceplus;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 63 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_cancelblnc;
-        
-        #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("/mateo;component/profile.xaml", System.UriKind.Relative);
-            
-            #line 1 "..\..\Profile.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:
-            
-            #line 11 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_insta);
-            
-            #line default
-            #line hidden
-            return;
-            case 2:
-            
-            #line 15 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_vk);
-            
-            #line default
-            #line hidden
-            return;
-            case 3:
-            
-            #line 19 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_whatsapp);
-            
-            #line default
-            #line hidden
-            return;
-            case 4:
-            
-            #line 23 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_gmail);
-            
-            #line default
-            #line hidden
-            return;
-            case 5:
-            
-            #line 30 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnProfileClick);
-            
-            #line default
-            #line hidden
-            return;
-            case 6:
-            
-            #line 31 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnUslugiClick);
-            
-            #line default
-            #line hidden
-            return;
-            case 7:
-            
-            #line 33 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnLogout);
-            
-            #line default
-            #line hidden
-            return;
-            case 8:
-            
-            #line 36 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnExit);
-            
-            #line default
-            #line hidden
-            return;
-            case 9:
-            
-            #line 39 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnTickets);
-            
-            #line default
-            #line hidden
-            return;
-            case 10:
-            this.photo_profile = ((System.Windows.Controls.Image)(target));
-            return;
-            case 11:
-            this.btn_photo = ((System.Windows.Controls.Button)(target));
-            
-            #line 46 "..\..\Profile.xaml"
-            this.btn_photo.Click += new System.Windows.RoutedEventHandler(this.btn_photo_click);
-            
-            #line default
-            #line hidden
-            return;
-            case 12:
-            this.btn_dltphoto = ((System.Windows.Controls.Button)(target));
-            
-            #line 47 "..\..\Profile.xaml"
-            this.btn_dltphoto.Click += new System.Windows.RoutedEventHandler(this.btn_deletephoto_click);
-            
-            #line default
-            #line hidden
-            return;
-            case 13:
-            this.name_profile = ((System.Windows.Controls.TextBlock)(target));
-            return;
-            case 14:
-            this.balance_profile = ((System.Windows.Controls.TextBlock)(target));
-            return;
-            case 15:
-            this.btn_balance = ((System.Windows.Controls.Button)(target));
-            
-            #line 50 "..\..\Profile.xaml"
-            this.btn_balance.Click += new System.Windows.RoutedEventHandler(this.btn_balance_Click);
-            
-            #line default
-            #line hidden
-            return;
-            case 16:
-            this.grid_balance = ((System.Windows.Controls.Grid)(target));
-            return;
-            case 17:
-            this.txt_balanceplus = ((System.Windows.Controls.TextBox)(target));
-            return;
-            case 18:
-            this.btn_balanceplus = ((System.Windows.Controls.Button)(target));
-            
-            #line 62 "..\..\Profile.xaml"
-            this.btn_balanceplus.Click += new System.Windows.RoutedEventHandler(this.btn_balanceplus_Click);
-            
-            #line default
-            #line hidden
-            return;
-            case 19:
-            this.btn_cancelblnc = ((System.Windows.Controls.Button)(target));
-            
-            #line 63 "..\..\Profile.xaml"
-            this.btn_cancelblnc.Click += new System.Windows.RoutedEventHandler(this.btn_cancelblnc_Click);
-            
-            #line default
-            #line hidden
-            return;
-            }
-            this._contentLoaded = true;
-        }
-    }
-}
-

+ 1 - 216
mateo/obj/Debug/Profile.g.i.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\Profile.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F2D29E3F7F36151A3ED431675B40ED4FD120A214FC0FB271809EC4E3A42CF9D0"
+#pragma checksum "..\..\Profile.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "09D67EB1586BEE4AD24B33686F44DFC6C0444AAC8F9AD91D01E39E901533BAB4"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -40,86 +40,6 @@ namespace mateo {
     /// </summary>
     public partial class Profile : System.Windows.Window, System.Windows.Markup.IComponentConnector {
         
-        
-        #line 45 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Image photo_profile;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 46 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_photo;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 47 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_dltphoto;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 48 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.TextBlock name_profile;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 49 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.TextBlock balance_profile;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 50 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_balance;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 55 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Grid grid_balance;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 61 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.TextBox txt_balanceplus;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 62 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_balanceplus;
-        
-        #line default
-        #line hidden
-        
-        
-        #line 63 "..\..\Profile.xaml"
-        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_cancelblnc;
-        
-        #line default
-        #line hidden
-        
         private bool _contentLoaded;
         
         /// <summary>
@@ -148,141 +68,6 @@ namespace mateo {
         [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:
-            
-            #line 11 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_insta);
-            
-            #line default
-            #line hidden
-            return;
-            case 2:
-            
-            #line 15 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_vk);
-            
-            #line default
-            #line hidden
-            return;
-            case 3:
-            
-            #line 19 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_whatsapp);
-            
-            #line default
-            #line hidden
-            return;
-            case 4:
-            
-            #line 23 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_gmail);
-            
-            #line default
-            #line hidden
-            return;
-            case 5:
-            
-            #line 30 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnProfileClick);
-            
-            #line default
-            #line hidden
-            return;
-            case 6:
-            
-            #line 31 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnUslugiClick);
-            
-            #line default
-            #line hidden
-            return;
-            case 7:
-            
-            #line 33 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnLogout);
-            
-            #line default
-            #line hidden
-            return;
-            case 8:
-            
-            #line 36 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnExit);
-            
-            #line default
-            #line hidden
-            return;
-            case 9:
-            
-            #line 39 "..\..\Profile.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnTickets);
-            
-            #line default
-            #line hidden
-            return;
-            case 10:
-            this.photo_profile = ((System.Windows.Controls.Image)(target));
-            return;
-            case 11:
-            this.btn_photo = ((System.Windows.Controls.Button)(target));
-            
-            #line 46 "..\..\Profile.xaml"
-            this.btn_photo.Click += new System.Windows.RoutedEventHandler(this.btn_photo_click);
-            
-            #line default
-            #line hidden
-            return;
-            case 12:
-            this.btn_dltphoto = ((System.Windows.Controls.Button)(target));
-            
-            #line 47 "..\..\Profile.xaml"
-            this.btn_dltphoto.Click += new System.Windows.RoutedEventHandler(this.btn_deletephoto_click);
-            
-            #line default
-            #line hidden
-            return;
-            case 13:
-            this.name_profile = ((System.Windows.Controls.TextBlock)(target));
-            return;
-            case 14:
-            this.balance_profile = ((System.Windows.Controls.TextBlock)(target));
-            return;
-            case 15:
-            this.btn_balance = ((System.Windows.Controls.Button)(target));
-            
-            #line 50 "..\..\Profile.xaml"
-            this.btn_balance.Click += new System.Windows.RoutedEventHandler(this.btn_balance_Click);
-            
-            #line default
-            #line hidden
-            return;
-            case 16:
-            this.grid_balance = ((System.Windows.Controls.Grid)(target));
-            return;
-            case 17:
-            this.txt_balanceplus = ((System.Windows.Controls.TextBox)(target));
-            return;
-            case 18:
-            this.btn_balanceplus = ((System.Windows.Controls.Button)(target));
-            
-            #line 62 "..\..\Profile.xaml"
-            this.btn_balanceplus.Click += new System.Windows.RoutedEventHandler(this.btn_balanceplus_Click);
-            
-            #line default
-            #line hidden
-            return;
-            case 19:
-            this.btn_cancelblnc = ((System.Windows.Controls.Button)(target));
-            
-            #line 63 "..\..\Profile.xaml"
-            this.btn_cancelblnc.Click += new System.Windows.RoutedEventHandler(this.btn_cancelblnc_Click);
-            
-            #line default
-            #line hidden
-            return;
-            }
             this._contentLoaded = true;
         }
     }

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

@@ -1 +1 @@
-ac816b33c102b47331c70433ffe990c9cb479500
+90747ea71908081bc6f643b38090752ac03b6b11

+ 0 - 2
mateo/obj/Debug/mateo.csproj.FileListAbsolute.txt

@@ -15,8 +15,6 @@ C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\obj\Debug\mateo.exe
 C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\obj\Debug\mateo.pdb
 C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\obj\Debug\First.g.cs
 C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\obj\Debug\First.baml
-C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\obj\Debug\Profile.g.cs
-C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\obj\Debug\Profile.baml
 C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\bin\Debug\EntityFramework.dll
 C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\bin\Debug\EntityFramework.SqlServer.dll
 C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\bin\Debug\EntityFramework.xml

BIN
mateo/obj/Debug/mateo.exe


BIN
mateo/obj/Debug/mateo.g.resources


BIN
mateo/obj/Debug/mateo.pdb


+ 3 - 3
mateo/obj/Debug/mateo_MarkupCompile.cache

@@ -10,11 +10,11 @@ none
 false
 DEBUG;TRACE
 C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\App.xaml
-4-62067497
+3-1430287372
 21750853300
-25-1502062932
+24-2088213926
 18-1046349961
-First.xaml;MainWindow.xaml;Profile.xaml;SysAdmin.xaml;
+First.xaml;MainWindow.xaml;SysAdmin.xaml;
 
 False
 

+ 3 - 3
mateo/obj/Debug/mateo_MarkupCompile.i.cache

@@ -10,11 +10,11 @@ none
 false
 DEBUG;TRACE
 C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\App.xaml
-4-62067497
+3-1430287372
 21750853300
-261950544997
+251364394003
 18-1046349961
-First.xaml;MainWindow.xaml;Profile.xaml;SysAdmin.xaml;
+First.xaml;MainWindow.xaml;SysAdmin.xaml;
 
 True
 

+ 1 - 1
mateo/obj/Debug/mateo_MarkupCompile.i.lref

@@ -1,4 +1,4 @@
 
 
-FC:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\Profile.xaml;;
+FC:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\MainWindow.xaml;;
 

+ 0 - 1
mateo/obj/Debug/mateo_MarkupCompile.lref

@@ -2,6 +2,5 @@
 
 FC:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\First.xaml;;
 FC:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\MainWindow.xaml;;
-FC:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\Profile.xaml;;
 FC:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\SysAdmin.xaml;;