瀏覽代碼

Исправлено

polinakulakova114@gmail.com 2 年之前
父節點
當前提交
0c89eb05cd
共有 100 個文件被更改,包括 65150 次插入1084 次删除
  1. 二進制
      .vs/mateo/v16/.suo
  2. 二進制
      .vs/mateo/v16/TestStore/0/000.testlog
  3. 二進制
      .vs/mateo/v16/TestStore/0/testlog.manifest
  4. 二進制
      .vs/mateo/v16/TestStore/1/007.testlog
  5. 二進制
      .vs/mateo/v16/TestStore/1/testlog.manifest
  6. 二進制
      .vs/mateo/v17/.suo
  7. 16 0
      UnitTestmateo/App.Config
  8. 20 0
      UnitTestmateo/Properties/AssemblyInfo.cs
  9. 128 0
      UnitTestmateo/UnitTest.cs
  10. 92 0
      UnitTestmateo/UnitTestmateo.csproj
  11. 二進制
      UnitTestmateo/bin/Debug/EntityFramework.SqlServer.dll
  12. 2093 0
      UnitTestmateo/bin/Debug/EntityFramework.SqlServer.xml
  13. 二進制
      UnitTestmateo/bin/Debug/EntityFramework.dll
  14. 53236 0
      UnitTestmateo/bin/Debug/EntityFramework.xml
  15. 二進制
      UnitTestmateo/bin/Debug/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll
  16. 二進制
      UnitTestmateo/bin/Debug/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll
  17. 二進制
      UnitTestmateo/bin/Debug/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll
  18. 二進制
      UnitTestmateo/bin/Debug/Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
  19. 1115 0
      UnitTestmateo/bin/Debug/Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
  20. 二進制
      UnitTestmateo/bin/Debug/Microsoft.VisualStudio.TestPlatform.TestFramework.dll
  21. 4483 0
      UnitTestmateo/bin/Debug/Microsoft.VisualStudio.TestPlatform.TestFramework.xml
  22. 二進制
      UnitTestmateo/bin/Debug/UnitTestmateo.dll
  23. 16 0
      UnitTestmateo/bin/Debug/UnitTestmateo.dll.config
  24. 二進制
      UnitTestmateo/bin/Debug/UnitTestmateo.pdb
  25. 二進制
      UnitTestmateo/bin/Debug/mateo.exe
  26. 13 0
      UnitTestmateo/bin/Debug/mateo.exe.config
  27. 二進制
      UnitTestmateo/bin/Debug/mateo.pdb
  28. 二進制
      UnitTestmateo/bin/Debug/ru/EntityFramework.resources.dll
  29. 二進制
      UnitTestmateo/bin/Debug/ru/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll
  30. 二進制
      UnitTestmateo/bin/Debug/ru/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll
  31. 二進制
      UnitTestmateo/bin/Debug/ru/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll
  32. 4 0
      UnitTestmateo/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
  33. 二進制
      UnitTestmateo/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  34. 0 0
      UnitTestmateo/obj/Debug/TempPE/Model1.Context.cs.dll
  35. 二進制
      UnitTestmateo/obj/Debug/TempPE/Model1.Designer.cs.dll
  36. 二進制
      UnitTestmateo/obj/Debug/TempPE/Model1.cs.dll
  37. 二進制
      UnitTestmateo/obj/Debug/UnitTestmateo.csproj.AssemblyReference.cache
  38. 0 0
      UnitTestmateo/obj/Debug/UnitTestmateo.csproj.CopyComplete
  39. 1 0
      UnitTestmateo/obj/Debug/UnitTestmateo.csproj.CoreCompileInputs.cache
  40. 26 0
      UnitTestmateo/obj/Debug/UnitTestmateo.csproj.FileListAbsolute.txt
  41. 二進制
      UnitTestmateo/obj/Debug/UnitTestmateo.dll
  42. 二進制
      UnitTestmateo/obj/Debug/UnitTestmateo.pdb
  43. 339 0
      UnitTestmateo/obj/Debug/edmxResourcesToEmbed/Model1.csdl
  44. 141 0
      UnitTestmateo/obj/Debug/edmxResourcesToEmbed/Model1.msl
  45. 317 0
      UnitTestmateo/obj/Debug/edmxResourcesToEmbed/Model1.ssdl
  46. 4 0
      UnitTestmateo/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
  47. 二進制
      UnitTestmateo/obj/Release/UnitTestmateo.csproj.AssemblyReference.cache
  48. 7 0
      UnitTestmateo/packages.config
  49. 6 0
      mateo.sln
  50. 39 21
      mateo/First.xaml
  51. 151 59
      mateo/First.xaml.cs
  52. 47 38
      mateo/MainWindow.xaml
  53. 485 333
      mateo/MainWindow.xaml.cs
  54. 44 58
      mateo/SysAdmin.xaml
  55. 355 140
      mateo/SysAdmin.xaml.cs
  56. 二進制
      mateo/bin/Debug/mateo.exe
  57. 二進制
      mateo/bin/Debug/mateo.pdb
  58. 二進制
      mateo/obj/Debug/DesignTimeResolveAssemblyReferences.cache
  59. 二進制
      mateo/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  60. 二進制
      mateo/obj/Debug/First.baml
  61. 205 27
      mateo/obj/Debug/First.g.cs
  62. 205 27
      mateo/obj/Debug/First.g.i.cs
  63. 二進制
      mateo/obj/Debug/MainWindow.baml
  64. 143 96
      mateo/obj/Debug/MainWindow.g.cs
  65. 143 96
      mateo/obj/Debug/MainWindow.g.i.cs
  66. 二進制
      mateo/obj/Debug/SysAdmin.baml
  67. 67 37
      mateo/obj/Debug/SysAdmin.g.cs
  68. 67 37
      mateo/obj/Debug/SysAdmin.g.i.cs
  69. 二進制
      mateo/obj/Debug/mateo.csproj.AssemblyReference.cache
  70. 1 1
      mateo/obj/Debug/mateo.csproj.CoreCompileInputs.cache
  71. 27 0
      mateo/obj/Debug/mateo.csproj.FileListAbsolute.txt
  72. 二進制
      mateo/obj/Debug/mateo.csproj.ResolveComReference.cache
  73. 二進制
      mateo/obj/Debug/mateo.exe
  74. 二進制
      mateo/obj/Debug/mateo.g.resources
  75. 二進制
      mateo/obj/Debug/mateo.pdb
  76. 3 3
      mateo/obj/Debug/mateo_MarkupCompile.cache
  77. 4 4
      mateo/obj/Debug/mateo_MarkupCompile.i.cache
  78. 4 0
      mateo/obj/Debug/mateo_MarkupCompile.i.lref
  79. 3 3
      mateo/obj/Debug/mateo_MarkupCompile.lref
  80. 205 27
      mateo/obj/Release/First.g.cs
  81. 311 62
      mateo/obj/Release/MainWindow.g.cs
  82. 549 2
      mateo/obj/Release/SysAdmin.g.cs
  83. 二進制
      mateo/obj/Release/mateo.csproj.AssemblyReference.cache
  84. 二進制
      mateo/obj/Release/mateo.csproj.ResolveComReference.cache
  85. 2 2
      mateo/obj/Release/mateo_Content.g.cs
  86. 7 7
      mateo/obj/Release/mateo_MarkupCompile.cache
  87. 3 4
      mateo/obj/Release/mateo_MarkupCompile.lref
  88. 二進制
      packages/MSTest.TestAdapter.2.1.2/.signature.p7s
  89. 23 0
      packages/MSTest.TestAdapter.2.1.2/LICENSE.txt
  90. 二進制
      packages/MSTest.TestAdapter.2.1.2/MSTest.TestAdapter.2.1.2.nupkg
  91. 二進制
      packages/MSTest.TestAdapter.2.1.2/build/_common/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll
  92. 二進制
      packages/MSTest.TestAdapter.2.1.2/build/_common/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll
  93. 二進制
      packages/MSTest.TestAdapter.2.1.2/build/_common/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll
  94. 二進制
      packages/MSTest.TestAdapter.2.1.2/build/_common/Microsoft.VisualStudio.TestPlatform.TestFramework.dll
  95. 二進制
      packages/MSTest.TestAdapter.2.1.2/build/_common/cs/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll
  96. 二進制
      packages/MSTest.TestAdapter.2.1.2/build/_common/cs/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll
  97. 二進制
      packages/MSTest.TestAdapter.2.1.2/build/_common/cs/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll
  98. 二進制
      packages/MSTest.TestAdapter.2.1.2/build/_common/de/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll
  99. 二進制
      packages/MSTest.TestAdapter.2.1.2/build/_common/de/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll
  100. 0 0
      packages/MSTest.TestAdapter.2.1.2/build/_common/de/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll

二進制
.vs/mateo/v16/.suo


二進制
.vs/mateo/v16/TestStore/0/000.testlog


二進制
.vs/mateo/v16/TestStore/0/testlog.manifest


二進制
.vs/mateo/v16/TestStore/1/007.testlog


二進制
.vs/mateo/v16/TestStore/1/testlog.manifest


二進制
.vs/mateo/v17/.suo


+ 16 - 0
UnitTestmateo/App.Config

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <configSections>
+    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+  </configSections>
+  <connectionStrings>
+    <add name="mateoEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=LAPTOP-1F5OKQJV\SQLEXPRESS;initial catalog=mateo;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
+  </connectionStrings>
+  <entityFramework>
+    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
+    <providers>
+      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+    </providers>
+  </entityFramework>
+</configuration>

+ 20 - 0
UnitTestmateo/Properties/AssemblyInfo.cs

@@ -0,0 +1,20 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("UnitTestmateo")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HP Inc.")]
+[assembly: AssemblyProduct("UnitTestmateo")]
+[assembly: AssemblyCopyright("Copyright © HP Inc. 2021")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+[assembly: ComVisible(false)]
+
+[assembly: Guid("82c2a709-ac70-4118-8ad3-fb87926e8d99")]
+
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 128 - 0
UnitTestmateo/UnitTest.cs

@@ -0,0 +1,128 @@
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using mateo;
+
+namespace UnitTestmateo
+{
+    [TestClass]
+    public class UnitTest
+    {
+        #region Окно авторизации/регистрации
+        First first = new First();
+
+        [TestMethod]
+        public void Vhod()
+        {
+            Assert.IsTrue(first.Vhod("plnklkv", "plnklkv"));
+            Assert.IsTrue(first.Vhod("admin", "admin"));
+            Assert.IsFalse(first.Vhod("plnklkv", "12345"));
+            Assert.IsTrue(first.Vhod("aa", "aa"));
+        }
+
+        [TestMethod]
+        public void Registr()
+        {
+            Assert.IsTrue(first.Registr("Комаров", "Валентин", "Дмитриевич", "komarov", "valyakomar"));
+            Assert.IsTrue(first.Registr("Русакова", "Ольга", "", "rusakova", "12345"));
+            Assert.IsFalse(first.Registr("Кулакова", "Полина", "Андреевна", "plnklkv", "polina"));
+            Assert.IsFalse(first.Registr("", "Валерий", "Олегович", "valera", "olegoVich"));
+        }
+
+        #endregion
+
+        #region Главное окно
+        MainWindow mainWindow = new MainWindow();
+
+        #region Профиль
+        [TestMethod]
+        public void AddChangePhoto_ShowDialog_ReturnTrue()
+        {
+            Assert.IsTrue(mainWindow.AddChangePhoto(2));
+        }
+
+        [TestMethod]
+        public void PlusBalance()
+        {
+            Assert.IsTrue(mainWindow.PlusBalance("1234", "5678", "9045", "4567", "1000", 1));
+            Assert.IsFalse(mainWindow.PlusBalance("1234", "5678", "9045", "4567", "", 1));
+            Assert.IsFalse(mainWindow.PlusBalance("45", "5678", "45", "4567", "500", 1));
+            Assert.IsFalse(mainWindow.PlusBalance("", "5678", "", "4567", "1000", 1));
+            Assert.IsFalse(mainWindow.PlusBalance("45", "567845", "45", "445567", "500", 1));
+        }
+        #endregion
+
+        #region Билеты
+        [TestMethod]
+        public void AddTickets_ReturnSumm()
+        {
+            Assert.AreEqual(mainWindow.AddOldAttractionSumm(6, 1), 100);
+
+            decimal summ = mainWindow.AddBabyAttractionSumm(1,1) + mainWindow.AddBabyAttractionSumm(4,1);
+            Assert.AreEqual(summ, 500);
+
+            Assert.AreNotEqual(mainWindow.AddBabyAttractionSumm(7, 1), 400);
+        }
+
+        [TestMethod]
+        public void TicketsMinus_1_ReturnTrueFalse()
+        {
+            Assert.IsFalse(mainWindow.TicketsMinus(1));
+            Assert.IsTrue(mainWindow.TicketsMinus(2));
+        }
+
+        [TestMethod]
+        public void TicketsPlus_30_ReturnTrueFalse()
+        {
+            Assert.IsFalse(mainWindow.TicketsPlus(30));
+            Assert.IsTrue(mainWindow.TicketsPlus(4));
+        }
+
+        [TestMethod]
+        public void TicketsMinus_ReturnQuantity()
+        {
+            Assert.AreEqual(mainWindow.TicketsMinusInt(30),29);
+            Assert.AreEqual(mainWindow.TicketsPlusInt(21), 22);
+        }
+
+        #endregion
+        #endregion
+
+
+        #region окно Админ
+
+        SysAdmin sys = new SysAdmin();
+
+        [TestMethod]
+        public void AddAttraction()
+        {
+            Assert.IsTrue(sys.AddAttraction(1, "Колесо", "*описание*", "10", "200", "150", sys.AddImage(), "Работает", "Взрослый/Детский"));
+            Assert.IsFalse(sys.AddAttraction(1, "Колесо", "*описание*", "", "200", "150", sys.AddImage(), "Работает", "Взрослый/Детский"));
+            Assert.IsFalse(sys.AddAttraction(1, "Колесо", "*описание*", "10", "", "150", sys.AddImage(), "Работает", "Взрослый/Детский"));
+            Assert.IsFalse(sys.AddAttraction(1, "Колесо", "*описание*", "10", "200", "", sys.AddImage(), "", "Взрослый/Детский"));
+            Assert.IsFalse(sys.AddAttraction(1, "Колесо", "", "10", "200", "150", sys.AddImage(), "Работает", "Взрослый/Детский"));
+            Assert.IsFalse(sys.AddAttraction(1, "", "*описание*", "10", "200", "150", sys.AddImage(), "Работает", "Взрослый/Детский"));
+        }
+
+        [TestMethod]
+        public void AddEmployees()
+        {
+            Assert.IsTrue(sys.AddEmployees(1, "Котов", "Феликс", "Федотович", "Администратор", "Работает"));
+            Assert.IsTrue(sys.AddEmployees(1, "Котов", "Феликс", "", "Администратор", "Работает"));
+            Assert.IsFalse(sys.AddEmployees(1, "", "Феликс", "Федотович", "Администратор", "Работает"));
+            Assert.IsFalse(sys.AddEmployees(1, "Котов", "", "Федотович", "Администратор", "Работает"));
+            Assert.IsFalse(sys.AddEmployees(1, "Котов", "Феликс", "Федотович", " ", "Работает"));
+            Assert.IsFalse(sys.AddEmployees(1, "Котов", "Феликс", "Федотович", "Администратор", " "));
+        }
+
+        [TestMethod]
+        public void Report_ResultTrue()
+        {
+            Assert.IsTrue(sys.Report1("", ""));
+            Assert.IsTrue(sys.Report1("16.12.2021 00:00:00", ""));
+            Assert.IsTrue(sys.Report1("", "Место раскопок"));
+            Assert.IsFalse(sys.Report1("23.12.2021 00:00:00", "Место раскопок"));
+            Assert.IsFalse(sys.Report1("", " ")); 
+        }
+
+        #endregion
+    }
+}

+ 92 - 0
UnitTestmateo/UnitTestmateo.csproj

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props')" />
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{82C2A709-AC70-4118-8AD3-FB87926E8D99}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>UnitTestmateo</RootNamespace>
+    <AssemblyName>UnitTestmateo</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
+    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+    <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
+    <IsCodedUITest>False</IsCodedUITest>
+    <TestProjectType>UnitTest</TestProjectType>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+      <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
+    </Reference>
+    <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
+      <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\MSTest.TestFramework.2.1.2\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
+    </Reference>
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+    <Reference Include="System" />
+    <Reference Include="System.ComponentModel.DataAnnotations" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.Security" />
+    <Reference Include="System.Xml" />
+    <Reference Include="WindowsBase" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="UnitTest.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.Config" />
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\mateo\mateo.csproj">
+      <Project>{de2aa9d8-3bad-41a3-907a-9a5f01444f08}</Project>
+      <Name>mateo</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
+  </ItemGroup>
+  <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>Данный проект ссылается на пакеты NuGet, отсутствующие на этом компьютере. Используйте восстановление пакетов NuGet, чтобы скачать их.  Дополнительную информацию см. по адресу: http://go.microsoft.com/fwlink/?LinkID=322105. Отсутствует следующий файл: {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.props'))" />
+    <Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets'))" />
+  </Target>
+  <Import Project="..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.2.1.2\build\net45\MSTest.TestAdapter.targets')" />
+</Project>

二進制
UnitTestmateo/bin/Debug/EntityFramework.SqlServer.dll


文件差異過大導致無法顯示
+ 2093 - 0
UnitTestmateo/bin/Debug/EntityFramework.SqlServer.xml


二進制
UnitTestmateo/bin/Debug/EntityFramework.dll


文件差異過大導致無法顯示
+ 53236 - 0
UnitTestmateo/bin/Debug/EntityFramework.xml


二進制
UnitTestmateo/bin/Debug/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll


二進制
UnitTestmateo/bin/Debug/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll


二進制
UnitTestmateo/bin/Debug/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll


二進制
UnitTestmateo/bin/Debug/Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll


文件差異過大導致無法顯示
+ 1115 - 0
UnitTestmateo/bin/Debug/Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml


二進制
UnitTestmateo/bin/Debug/Microsoft.VisualStudio.TestPlatform.TestFramework.dll


文件差異過大導致無法顯示
+ 4483 - 0
UnitTestmateo/bin/Debug/Microsoft.VisualStudio.TestPlatform.TestFramework.xml


二進制
UnitTestmateo/bin/Debug/UnitTestmateo.dll


+ 16 - 0
UnitTestmateo/bin/Debug/UnitTestmateo.dll.config

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <configSections>
+    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+  </configSections>
+  <connectionStrings>
+    <add name="mateoEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=LAPTOP-1F5OKQJV\SQLEXPRESS;initial catalog=mateo;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
+  </connectionStrings>
+  <entityFramework>
+    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
+    <providers>
+      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+    </providers>
+  </entityFramework>
+</configuration>

二進制
UnitTestmateo/bin/Debug/UnitTestmateo.pdb


二進制
UnitTestmateo/bin/Debug/mateo.exe


+ 13 - 0
UnitTestmateo/bin/Debug/mateo.exe.config

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <startup>
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
+  </startup>
+  <appSettings>
+    <!-- Поставщик -->
+    <add key="provider" value="System.Data.SqlClient" />
+    <!-- Строка подключения -->
+    <add key="conStr" value="Data Source=LAPTOP-1F5OKQJV\SQLEXPRESS;          Initial Catalog=mateo;          Integrated Security=True;          Connect Timeout=30;          Encrypt=False;          TrustServerCertificate=False;          ApplicationIntent=ReadWrite;          MultiSubnetFailover=False" />
+  </appSettings>
+ 
+<connectionStrings><add name="mateoEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=LAPTOP-1F5OKQJV\SQLEXPRESS;initial catalog=mateo;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" /></connectionStrings></configuration>

二進制
UnitTestmateo/bin/Debug/mateo.pdb


二進制
UnitTestmateo/bin/Debug/ru/EntityFramework.resources.dll


二進制
UnitTestmateo/bin/Debug/ru/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll


二進制
UnitTestmateo/bin/Debug/ru/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll


二進制
UnitTestmateo/bin/Debug/ru/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll


+ 4 - 0
UnitTestmateo/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs

@@ -0,0 +1,4 @@
+// <autogenerated />
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]

二進制
UnitTestmateo/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


+ 0 - 0
UnitTestmateo/obj/Debug/TempPE/Model1.Context.cs.dll


二進制
UnitTestmateo/obj/Debug/TempPE/Model1.Designer.cs.dll


二進制
UnitTestmateo/obj/Debug/TempPE/Model1.cs.dll


二進制
UnitTestmateo/obj/Debug/UnitTestmateo.csproj.AssemblyReference.cache


+ 0 - 0
UnitTestmateo/obj/Debug/UnitTestmateo.csproj.CopyComplete


+ 1 - 0
UnitTestmateo/obj/Debug/UnitTestmateo.csproj.CoreCompileInputs.cache

@@ -0,0 +1 @@
+7aaafc6b43e012b126b308afd538175abf184f14

+ 26 - 0
UnitTestmateo/obj/Debug/UnitTestmateo.csproj.FileListAbsolute.txt

@@ -0,0 +1,26 @@
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\ru\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\ru\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\ru\Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\UnitTestmateo.dll
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\UnitTestmateo.pdb
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\mateo.exe
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\Microsoft.VisualStudio.TestPlatform.TestFramework.dll
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\EntityFramework.dll
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\mateo.pdb
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\mateo.exe.config
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\Microsoft.VisualStudio.TestPlatform.TestFramework.xml
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.xml
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\EntityFramework.xml
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\ru\EntityFramework.resources.dll
+C:\Users\polin\Desktop\mateo\UnitTestmateo\obj\Debug\UnitTestmateo.csproj.AssemblyReference.cache
+C:\Users\polin\Desktop\mateo\UnitTestmateo\obj\Debug\UnitTestmateo.csproj.CoreCompileInputs.cache
+C:\Users\polin\Desktop\mateo\UnitTestmateo\obj\Debug\UnitTestmateo.csproj.CopyComplete
+C:\Users\polin\Desktop\mateo\UnitTestmateo\obj\Debug\UnitTestmateo.dll
+C:\Users\polin\Desktop\mateo\UnitTestmateo\obj\Debug\UnitTestmateo.pdb
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\UnitTestmateo.dll.config
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\EntityFramework.SqlServer.dll
+C:\Users\polin\Desktop\mateo\UnitTestmateo\bin\Debug\EntityFramework.SqlServer.xml

二進制
UnitTestmateo/obj/Debug/UnitTestmateo.dll


二進制
UnitTestmateo/obj/Debug/UnitTestmateo.pdb


+ 339 - 0
UnitTestmateo/obj/Debug/edmxResourcesToEmbed/Model1.csdl

@@ -0,0 +1,339 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Schema Namespace="mateoModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
+  <EntityType Name="Attraction">
+    <Key>
+      <PropertyRef Name="IDAttraction" />
+    </Key>
+    <Property Name="IDAttraction" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="NameAttraction" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="Description" Type="String" MaxLength="400" FixedLength="false" Unicode="true" />
+    <Property Name="PriceOld" Type="Decimal" Precision="19" Scale="4" />
+    <Property Name="PriceBaby" Type="Decimal" Precision="19" Scale="4" />
+    <Property Name="QuantityAttraction" Type="Int32" Nullable="false" />
+    <Property Name="ImageAttraction" Type="Binary" MaxLength="Max" FixedLength="false" Nullable="false" />
+    <Property Name="FKEmployees" Type="Int32" Nullable="false" />
+    <Property Name="FKStatusAttraction" Type="Int32" Nullable="false" />
+    <Property Name="FKType" Type="Int32" Nullable="false" />
+    <NavigationProperty Name="Employees" Relationship="Self.FK_Attraction_Employees" FromRole="Attraction" ToRole="Employees" />
+    <NavigationProperty Name="StatusAttraction" Relationship="Self.FK_Attraction_StatusAttraction" FromRole="Attraction" ToRole="StatusAttraction" />
+    <NavigationProperty Name="Type" Relationship="Self.FK_Attraction_Type" FromRole="Attraction" ToRole="Type" />
+    <NavigationProperty Name="Tickets" Relationship="Self.FK_Tickets_Attraction" FromRole="Attraction" ToRole="Tickets" />
+  </EntityType>
+  <EntityType Name="Card">
+    <Key>
+      <PropertyRef Name="IDCard" />
+    </Key>
+    <Property Name="IDCard" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="NumberCard" Type="String" MaxLength="19" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="Balance" Type="Decimal" Precision="19" Scale="4" />
+    <NavigationProperty Name="Users" Relationship="Self.FK_Users_Card" FromRole="Card" ToRole="Users" />
+  </EntityType>
+  <EntityType Name="Employees">
+    <Key>
+      <PropertyRef Name="IDEmployees" />
+    </Key>
+    <Property Name="IDEmployees" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="LastName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="FirstName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="MiddleName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" />
+    <Property Name="Login" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="Password" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="FKRole" Type="Int32" Nullable="false" />
+    <Property Name="FKStatusEmployees" Type="Int32" Nullable="false" />
+    <NavigationProperty Name="Attraction" Relationship="Self.FK_Attraction_Employees" FromRole="Employees" ToRole="Attraction" />
+    <NavigationProperty Name="Role" Relationship="Self.FK_Employees_Role" FromRole="Employees" ToRole="Role" />
+    <NavigationProperty Name="StatusEmployees" Relationship="Self.FK_Employees_StatusEmployees" FromRole="Employees" ToRole="StatusEmployees" />
+  </EntityType>
+  <EntityType Name="History">
+    <Key>
+      <PropertyRef Name="IDHistory" />
+    </Key>
+    <Property Name="IDHistory" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="FKUser" Type="Int32" Nullable="false" />
+    <Property Name="DateTime" Type="DateTime" Nullable="false" Precision="3" />
+    <Property Name="Summ" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
+    <NavigationProperty Name="Users" Relationship="Self.FK_History_Users" FromRole="History" ToRole="Users" />
+  </EntityType>
+  <EntityType Name="Role">
+    <Key>
+      <PropertyRef Name="IDRole" />
+    </Key>
+    <Property Name="IDRole" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="Role1" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
+    <NavigationProperty Name="Employees" Relationship="Self.FK_Employees_Role" FromRole="Role" ToRole="Employees" />
+  </EntityType>
+  <EntityType Name="StatusAttraction">
+    <Key>
+      <PropertyRef Name="IDStatusAttraction" />
+    </Key>
+    <Property Name="IDStatusAttraction" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="StatusAttraction1" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
+    <NavigationProperty Name="Attraction" Relationship="Self.FK_Attraction_StatusAttraction" FromRole="StatusAttraction" ToRole="Attraction" />
+  </EntityType>
+  <EntityType Name="StatusEmployees">
+    <Key>
+      <PropertyRef Name="IDStatusEmployees" />
+    </Key>
+    <Property Name="IDStatusEmployees" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="StatusEmployees1" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
+    <NavigationProperty Name="Employees" Relationship="Self.FK_Employees_StatusEmployees" FromRole="StatusEmployees" ToRole="Employees" />
+  </EntityType>
+  <EntityType Name="StatusPay">
+    <Key>
+      <PropertyRef Name="IDStatusPay" />
+    </Key>
+    <Property Name="IDStatusPay" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="StatusPay1" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
+    <NavigationProperty Name="Tickets" Relationship="Self.FK_Tickets_StatusPay" FromRole="StatusPay" ToRole="Tickets" />
+  </EntityType>
+  <EntityType Name="sysdiagrams">
+    <Key>
+      <PropertyRef Name="diagram_id" />
+    </Key>
+    <Property Name="name" Type="String" MaxLength="128" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="principal_id" Type="Int32" Nullable="false" />
+    <Property Name="diagram_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="version" Type="Int32" />
+    <Property Name="definition" Type="Binary" MaxLength="Max" FixedLength="false" />
+  </EntityType>
+  <EntityType Name="Tickets">
+    <Key>
+      <PropertyRef Name="IDTickets" />
+    </Key>
+    <Property Name="IDTickets" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="FKUser" Type="Int32" Nullable="false" />
+    <Property Name="FKAttraction" Type="Int32" Nullable="false" />
+    <Property Name="FKTypeTickets" Type="Int32" Nullable="false" />
+    <Property Name="FKStatusPuy" Type="Int32" Nullable="false" />
+    <Property Name="Quantity" Type="Int32" Nullable="false" />
+    <Property Name="Summ" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
+    <Property Name="Date" Type="DateTime" Nullable="false" Precision="0" />
+    <NavigationProperty Name="Attraction" Relationship="Self.FK_Tickets_Attraction" FromRole="Tickets" ToRole="Attraction" />
+    <NavigationProperty Name="StatusPay" Relationship="Self.FK_Tickets_StatusPay" FromRole="Tickets" ToRole="StatusPay" />
+    <NavigationProperty Name="TypeTickets" Relationship="Self.FK_Tickets_TypeTickets" FromRole="Tickets" ToRole="TypeTickets" />
+    <NavigationProperty Name="Users" Relationship="Self.FK_Tickets_Users" FromRole="Tickets" ToRole="Users" />
+  </EntityType>
+  <EntityType Name="Type">
+    <Key>
+      <PropertyRef Name="IDType" />
+    </Key>
+    <Property Name="IDType" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="Type1" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
+    <NavigationProperty Name="Attraction" Relationship="Self.FK_Attraction_Type" FromRole="Type" ToRole="Attraction" />
+  </EntityType>
+  <EntityType Name="TypeTickets">
+    <Key>
+      <PropertyRef Name="IDTypeTickets" />
+    </Key>
+    <Property Name="IDTypeTickets" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="TypeTickets1" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
+    <NavigationProperty Name="Tickets" Relationship="Self.FK_Tickets_TypeTickets" FromRole="TypeTickets" ToRole="Tickets" />
+  </EntityType>
+  <EntityType Name="Users">
+    <Key>
+      <PropertyRef Name="IDUsers" />
+    </Key>
+    <Property Name="IDUsers" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+    <Property Name="LastName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="FirstName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="MiddleName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" />
+    <Property Name="Image" Type="Binary" MaxLength="Max" FixedLength="false" />
+    <Property Name="Login" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="Password" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
+    <Property Name="FKCard" Type="Int32" Nullable="false" />
+    <NavigationProperty Name="Card" Relationship="Self.FK_Users_Card" FromRole="Users" ToRole="Card" />
+    <NavigationProperty Name="History" Relationship="Self.FK_History_Users" FromRole="Users" ToRole="History" />
+    <NavigationProperty Name="Tickets" Relationship="Self.FK_Tickets_Users" FromRole="Users" ToRole="Tickets" />
+  </EntityType>
+  <Association Name="FK_Attraction_Employees">
+    <End Role="Employees" Type="Self.Employees" Multiplicity="1" />
+    <End Role="Attraction" Type="Self.Attraction" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Employees">
+        <PropertyRef Name="IDEmployees" />
+      </Principal>
+      <Dependent Role="Attraction">
+        <PropertyRef Name="FKEmployees" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Attraction_StatusAttraction">
+    <End Role="StatusAttraction" Type="Self.StatusAttraction" Multiplicity="1" />
+    <End Role="Attraction" Type="Self.Attraction" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="StatusAttraction">
+        <PropertyRef Name="IDStatusAttraction" />
+      </Principal>
+      <Dependent Role="Attraction">
+        <PropertyRef Name="FKStatusAttraction" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Attraction_Type">
+    <End Role="Type" Type="Self.Type" Multiplicity="1" />
+    <End Role="Attraction" Type="Self.Attraction" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Type">
+        <PropertyRef Name="IDType" />
+      </Principal>
+      <Dependent Role="Attraction">
+        <PropertyRef Name="FKType" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Tickets_Attraction">
+    <End Role="Attraction" Type="Self.Attraction" Multiplicity="1" />
+    <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Attraction">
+        <PropertyRef Name="IDAttraction" />
+      </Principal>
+      <Dependent Role="Tickets">
+        <PropertyRef Name="FKAttraction" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Users_Card">
+    <End Role="Card" Type="Self.Card" Multiplicity="1" />
+    <End Role="Users" Type="Self.Users" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Card">
+        <PropertyRef Name="IDCard" />
+      </Principal>
+      <Dependent Role="Users">
+        <PropertyRef Name="FKCard" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Employees_Role">
+    <End Role="Role" Type="Self.Role" Multiplicity="1" />
+    <End Role="Employees" Type="Self.Employees" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Role">
+        <PropertyRef Name="IDRole" />
+      </Principal>
+      <Dependent Role="Employees">
+        <PropertyRef Name="FKRole" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Employees_StatusEmployees">
+    <End Role="StatusEmployees" Type="Self.StatusEmployees" Multiplicity="1" />
+    <End Role="Employees" Type="Self.Employees" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="StatusEmployees">
+        <PropertyRef Name="IDStatusEmployees" />
+      </Principal>
+      <Dependent Role="Employees">
+        <PropertyRef Name="FKStatusEmployees" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_History_Users">
+    <End Role="Users" Type="Self.Users" Multiplicity="1" />
+    <End Role="History" Type="Self.History" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Users">
+        <PropertyRef Name="IDUsers" />
+      </Principal>
+      <Dependent Role="History">
+        <PropertyRef Name="FKUser" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Tickets_StatusPay">
+    <End Role="StatusPay" Type="Self.StatusPay" Multiplicity="1" />
+    <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="StatusPay">
+        <PropertyRef Name="IDStatusPay" />
+      </Principal>
+      <Dependent Role="Tickets">
+        <PropertyRef Name="FKStatusPuy" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Tickets_TypeTickets">
+    <End Role="TypeTickets" Type="Self.TypeTickets" Multiplicity="1" />
+    <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="TypeTickets">
+        <PropertyRef Name="IDTypeTickets" />
+      </Principal>
+      <Dependent Role="Tickets">
+        <PropertyRef Name="FKTypeTickets" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Tickets_Users">
+    <End Role="Users" Type="Self.Users" Multiplicity="1" />
+    <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Users">
+        <PropertyRef Name="IDUsers" />
+      </Principal>
+      <Dependent Role="Tickets">
+        <PropertyRef Name="FKUser" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <EntityContainer Name="mateoEntities" annotation:LazyLoadingEnabled="true">
+    <EntitySet Name="Attraction" EntityType="Self.Attraction" />
+    <EntitySet Name="Card" EntityType="Self.Card" />
+    <EntitySet Name="Employees" EntityType="Self.Employees" />
+    <EntitySet Name="History" EntityType="Self.History" />
+    <EntitySet Name="Role" EntityType="Self.Role" />
+    <EntitySet Name="StatusAttraction" EntityType="Self.StatusAttraction" />
+    <EntitySet Name="StatusEmployees" EntityType="Self.StatusEmployees" />
+    <EntitySet Name="StatusPay" EntityType="Self.StatusPay" />
+    <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" />
+    <EntitySet Name="Tickets" EntityType="Self.Tickets" />
+    <EntitySet Name="Type" EntityType="Self.Type" />
+    <EntitySet Name="TypeTickets" EntityType="Self.TypeTickets" />
+    <EntitySet Name="Users" EntityType="Self.Users" />
+    <AssociationSet Name="FK_Attraction_Employees" Association="Self.FK_Attraction_Employees">
+      <End Role="Employees" EntitySet="Employees" />
+      <End Role="Attraction" EntitySet="Attraction" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Attraction_StatusAttraction" Association="Self.FK_Attraction_StatusAttraction">
+      <End Role="StatusAttraction" EntitySet="StatusAttraction" />
+      <End Role="Attraction" EntitySet="Attraction" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Attraction_Type" Association="Self.FK_Attraction_Type">
+      <End Role="Type" EntitySet="Type" />
+      <End Role="Attraction" EntitySet="Attraction" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Tickets_Attraction" Association="Self.FK_Tickets_Attraction">
+      <End Role="Attraction" EntitySet="Attraction" />
+      <End Role="Tickets" EntitySet="Tickets" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Users_Card" Association="Self.FK_Users_Card">
+      <End Role="Card" EntitySet="Card" />
+      <End Role="Users" EntitySet="Users" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Employees_Role" Association="Self.FK_Employees_Role">
+      <End Role="Role" EntitySet="Role" />
+      <End Role="Employees" EntitySet="Employees" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Employees_StatusEmployees" Association="Self.FK_Employees_StatusEmployees">
+      <End Role="StatusEmployees" EntitySet="StatusEmployees" />
+      <End Role="Employees" EntitySet="Employees" />
+    </AssociationSet>
+    <AssociationSet Name="FK_History_Users" Association="Self.FK_History_Users">
+      <End Role="Users" EntitySet="Users" />
+      <End Role="History" EntitySet="History" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Tickets_StatusPay" Association="Self.FK_Tickets_StatusPay">
+      <End Role="StatusPay" EntitySet="StatusPay" />
+      <End Role="Tickets" EntitySet="Tickets" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Tickets_TypeTickets" Association="Self.FK_Tickets_TypeTickets">
+      <End Role="TypeTickets" EntitySet="TypeTickets" />
+      <End Role="Tickets" EntitySet="Tickets" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Tickets_Users" Association="Self.FK_Tickets_Users">
+      <End Role="Users" EntitySet="Users" />
+      <End Role="Tickets" EntitySet="Tickets" />
+    </AssociationSet>
+  </EntityContainer>
+</Schema>

+ 141 - 0
UnitTestmateo/obj/Debug/edmxResourcesToEmbed/Model1.msl

@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
+  <EntityContainerMapping StorageEntityContainer="Хранилище mateoModelContainer" CdmEntityContainer="mateoEntities">
+    <EntitySetMapping Name="Attraction">
+      <EntityTypeMapping TypeName="mateoModel.Attraction">
+        <MappingFragment StoreEntitySet="Attraction">
+          <ScalarProperty Name="IDAttraction" ColumnName="IDAttraction" />
+          <ScalarProperty Name="NameAttraction" ColumnName="NameAttraction" />
+          <ScalarProperty Name="Description" ColumnName="Description" />
+          <ScalarProperty Name="PriceOld" ColumnName="PriceOld" />
+          <ScalarProperty Name="PriceBaby" ColumnName="PriceBaby" />
+          <ScalarProperty Name="QuantityAttraction" ColumnName="QuantityAttraction" />
+          <ScalarProperty Name="ImageAttraction" ColumnName="ImageAttraction" />
+          <ScalarProperty Name="FKEmployees" ColumnName="FKEmployees" />
+          <ScalarProperty Name="FKStatusAttraction" ColumnName="FKStatusAttraction" />
+          <ScalarProperty Name="FKType" ColumnName="FKType" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Card">
+      <EntityTypeMapping TypeName="mateoModel.Card">
+        <MappingFragment StoreEntitySet="Card">
+          <ScalarProperty Name="IDCard" ColumnName="IDCard" />
+          <ScalarProperty Name="NumberCard" ColumnName="NumberCard" />
+          <ScalarProperty Name="Balance" ColumnName="Balance" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Employees">
+      <EntityTypeMapping TypeName="mateoModel.Employees">
+        <MappingFragment StoreEntitySet="Employees">
+          <ScalarProperty Name="IDEmployees" ColumnName="IDEmployees" />
+          <ScalarProperty Name="LastName" ColumnName="LastName" />
+          <ScalarProperty Name="FirstName" ColumnName="FirstName" />
+          <ScalarProperty Name="MiddleName" ColumnName="MiddleName" />
+          <ScalarProperty Name="Login" ColumnName="Login" />
+          <ScalarProperty Name="Password" ColumnName="Password" />
+          <ScalarProperty Name="FKRole" ColumnName="FKRole" />
+          <ScalarProperty Name="FKStatusEmployees" ColumnName="FKStatusEmployees" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="History">
+      <EntityTypeMapping TypeName="mateoModel.History">
+        <MappingFragment StoreEntitySet="History">
+          <ScalarProperty Name="IDHistory" ColumnName="IDHistory" />
+          <ScalarProperty Name="FKUser" ColumnName="FKUser" />
+          <ScalarProperty Name="DateTime" ColumnName="DateTime" />
+          <ScalarProperty Name="Summ" ColumnName="Summ" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Role">
+      <EntityTypeMapping TypeName="mateoModel.Role">
+        <MappingFragment StoreEntitySet="Role">
+          <ScalarProperty Name="IDRole" ColumnName="IDRole" />
+          <ScalarProperty Name="Role1" ColumnName="Role" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="StatusAttraction">
+      <EntityTypeMapping TypeName="mateoModel.StatusAttraction">
+        <MappingFragment StoreEntitySet="StatusAttraction">
+          <ScalarProperty Name="IDStatusAttraction" ColumnName="IDStatusAttraction" />
+          <ScalarProperty Name="StatusAttraction1" ColumnName="StatusAttraction" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="StatusEmployees">
+      <EntityTypeMapping TypeName="mateoModel.StatusEmployees">
+        <MappingFragment StoreEntitySet="StatusEmployees">
+          <ScalarProperty Name="IDStatusEmployees" ColumnName="IDStatusEmployees" />
+          <ScalarProperty Name="StatusEmployees1" ColumnName="StatusEmployees" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="StatusPay">
+      <EntityTypeMapping TypeName="mateoModel.StatusPay">
+        <MappingFragment StoreEntitySet="StatusPay">
+          <ScalarProperty Name="IDStatusPay" ColumnName="IDStatusPay" />
+          <ScalarProperty Name="StatusPay1" ColumnName="StatusPay" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="sysdiagrams">
+      <EntityTypeMapping TypeName="mateoModel.sysdiagrams">
+        <MappingFragment StoreEntitySet="sysdiagrams">
+          <ScalarProperty Name="name" ColumnName="name" />
+          <ScalarProperty Name="principal_id" ColumnName="principal_id" />
+          <ScalarProperty Name="diagram_id" ColumnName="diagram_id" />
+          <ScalarProperty Name="version" ColumnName="version" />
+          <ScalarProperty Name="definition" ColumnName="definition" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Tickets">
+      <EntityTypeMapping TypeName="mateoModel.Tickets">
+        <MappingFragment StoreEntitySet="Tickets">
+          <ScalarProperty Name="IDTickets" ColumnName="IDTickets" />
+          <ScalarProperty Name="FKUser" ColumnName="FKUser" />
+          <ScalarProperty Name="FKAttraction" ColumnName="FKAttraction" />
+          <ScalarProperty Name="FKTypeTickets" ColumnName="FKTypeTickets" />
+          <ScalarProperty Name="FKStatusPuy" ColumnName="FKStatusPuy" />
+          <ScalarProperty Name="Quantity" ColumnName="Quantity" />
+          <ScalarProperty Name="Summ" ColumnName="Summ" />
+          <ScalarProperty Name="Date" ColumnName="Date" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Type">
+      <EntityTypeMapping TypeName="mateoModel.Type">
+        <MappingFragment StoreEntitySet="Type">
+          <ScalarProperty Name="IDType" ColumnName="IDType" />
+          <ScalarProperty Name="Type1" ColumnName="Type" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="TypeTickets">
+      <EntityTypeMapping TypeName="mateoModel.TypeTickets">
+        <MappingFragment StoreEntitySet="TypeTickets">
+          <ScalarProperty Name="IDTypeTickets" ColumnName="IDTypeTickets" />
+          <ScalarProperty Name="TypeTickets1" ColumnName="TypeTickets" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+    <EntitySetMapping Name="Users">
+      <EntityTypeMapping TypeName="mateoModel.Users">
+        <MappingFragment StoreEntitySet="Users">
+          <ScalarProperty Name="IDUsers" ColumnName="IDUsers" />
+          <ScalarProperty Name="LastName" ColumnName="LastName" />
+          <ScalarProperty Name="FirstName" ColumnName="FirstName" />
+          <ScalarProperty Name="MiddleName" ColumnName="MiddleName" />
+          <ScalarProperty Name="Image" ColumnName="Image" />
+          <ScalarProperty Name="Login" ColumnName="Login" />
+          <ScalarProperty Name="Password" ColumnName="Password" />
+          <ScalarProperty Name="FKCard" ColumnName="FKCard" />
+        </MappingFragment>
+      </EntityTypeMapping>
+    </EntitySetMapping>
+  </EntityContainerMapping>
+</Mapping>

+ 317 - 0
UnitTestmateo/obj/Debug/edmxResourcesToEmbed/Model1.ssdl

@@ -0,0 +1,317 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Schema Namespace="Хранилище mateoModel" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
+  <EntityType Name="Attraction">
+    <Key>
+      <PropertyRef Name="IDAttraction" />
+    </Key>
+    <Property Name="IDAttraction" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="NameAttraction" Type="nvarchar" MaxLength="100" Nullable="false" />
+    <Property Name="Description" Type="nvarchar" MaxLength="400" />
+    <Property Name="PriceOld" Type="money" />
+    <Property Name="PriceBaby" Type="money" />
+    <Property Name="QuantityAttraction" Type="int" Nullable="false" />
+    <Property Name="ImageAttraction" Type="varbinary(max)" Nullable="false" />
+    <Property Name="FKEmployees" Type="int" Nullable="false" />
+    <Property Name="FKStatusAttraction" Type="int" Nullable="false" />
+    <Property Name="FKType" Type="int" Nullable="false" />
+  </EntityType>
+  <EntityType Name="Card">
+    <Key>
+      <PropertyRef Name="IDCard" />
+    </Key>
+    <Property Name="IDCard" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="NumberCard" Type="nvarchar" MaxLength="19" Nullable="false" />
+    <Property Name="Balance" Type="money" />
+  </EntityType>
+  <EntityType Name="Employees">
+    <Key>
+      <PropertyRef Name="IDEmployees" />
+    </Key>
+    <Property Name="IDEmployees" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="LastName" Type="nvarchar" MaxLength="25" Nullable="false" />
+    <Property Name="FirstName" Type="nvarchar" MaxLength="25" Nullable="false" />
+    <Property Name="MiddleName" Type="nvarchar" MaxLength="25" />
+    <Property Name="Login" Type="nvarchar" MaxLength="20" Nullable="false" />
+    <Property Name="Password" Type="nvarchar" MaxLength="20" Nullable="false" />
+    <Property Name="FKRole" Type="int" Nullable="false" />
+    <Property Name="FKStatusEmployees" Type="int" Nullable="false" />
+  </EntityType>
+  <EntityType Name="History">
+    <Key>
+      <PropertyRef Name="IDHistory" />
+    </Key>
+    <Property Name="IDHistory" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="FKUser" Type="int" Nullable="false" />
+    <Property Name="DateTime" Type="datetime" Nullable="false" />
+    <Property Name="Summ" Type="money" Nullable="false" />
+  </EntityType>
+  <EntityType Name="Role">
+    <Key>
+      <PropertyRef Name="IDRole" />
+    </Key>
+    <Property Name="IDRole" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="Role" Type="nvarchar" MaxLength="25" Nullable="false" />
+  </EntityType>
+  <EntityType Name="StatusAttraction">
+    <Key>
+      <PropertyRef Name="IDStatusAttraction" />
+    </Key>
+    <Property Name="IDStatusAttraction" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="StatusAttraction" Type="nvarchar" MaxLength="25" Nullable="false" />
+  </EntityType>
+  <EntityType Name="StatusEmployees">
+    <Key>
+      <PropertyRef Name="IDStatusEmployees" />
+    </Key>
+    <Property Name="IDStatusEmployees" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="StatusEmployees" Type="nvarchar" MaxLength="25" Nullable="false" />
+  </EntityType>
+  <EntityType Name="StatusPay">
+    <Key>
+      <PropertyRef Name="IDStatusPay" />
+    </Key>
+    <Property Name="IDStatusPay" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="StatusPay" Type="nvarchar" MaxLength="20" Nullable="false" />
+  </EntityType>
+  <EntityType Name="sysdiagrams">
+    <Key>
+      <PropertyRef Name="diagram_id" />
+    </Key>
+    <Property Name="name" Type="nvarchar" MaxLength="128" Nullable="false" />
+    <Property Name="principal_id" Type="int" Nullable="false" />
+    <Property Name="diagram_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="version" Type="int" />
+    <Property Name="definition" Type="varbinary(max)" />
+  </EntityType>
+  <EntityType Name="Tickets">
+    <Key>
+      <PropertyRef Name="IDTickets" />
+    </Key>
+    <Property Name="IDTickets" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="FKUser" Type="int" Nullable="false" />
+    <Property Name="FKAttraction" Type="int" Nullable="false" />
+    <Property Name="FKTypeTickets" Type="int" Nullable="false" />
+    <Property Name="FKStatusPuy" Type="int" Nullable="false" />
+    <Property Name="Quantity" Type="int" Nullable="false" />
+    <Property Name="Summ" Type="money" Nullable="false" />
+    <Property Name="Date" Type="date" Nullable="false" />
+  </EntityType>
+  <EntityType Name="Type">
+    <Key>
+      <PropertyRef Name="IDType" />
+    </Key>
+    <Property Name="IDType" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="Type" Type="nvarchar" MaxLength="20" Nullable="false" />
+  </EntityType>
+  <EntityType Name="TypeTickets">
+    <Key>
+      <PropertyRef Name="IDTypeTickets" />
+    </Key>
+    <Property Name="IDTypeTickets" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="TypeTickets" Type="nvarchar" MaxLength="20" Nullable="false" />
+  </EntityType>
+  <EntityType Name="Users">
+    <Key>
+      <PropertyRef Name="IDUsers" />
+    </Key>
+    <Property Name="IDUsers" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+    <Property Name="LastName" Type="nvarchar" MaxLength="25" Nullable="false" />
+    <Property Name="FirstName" Type="nvarchar" MaxLength="25" Nullable="false" />
+    <Property Name="MiddleName" Type="nvarchar" MaxLength="25" />
+    <Property Name="Image" Type="varbinary(max)" />
+    <Property Name="Login" Type="nvarchar" MaxLength="20" Nullable="false" />
+    <Property Name="Password" Type="nvarchar" MaxLength="20" Nullable="false" />
+    <Property Name="FKCard" Type="int" Nullable="false" />
+  </EntityType>
+  <Association Name="FK_Attraction_Employees">
+    <End Role="Employees" Type="Self.Employees" Multiplicity="1" />
+    <End Role="Attraction" Type="Self.Attraction" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Employees">
+        <PropertyRef Name="IDEmployees" />
+      </Principal>
+      <Dependent Role="Attraction">
+        <PropertyRef Name="FKEmployees" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Attraction_StatusAttraction">
+    <End Role="StatusAttraction" Type="Self.StatusAttraction" Multiplicity="1" />
+    <End Role="Attraction" Type="Self.Attraction" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="StatusAttraction">
+        <PropertyRef Name="IDStatusAttraction" />
+      </Principal>
+      <Dependent Role="Attraction">
+        <PropertyRef Name="FKStatusAttraction" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Attraction_Type">
+    <End Role="Type" Type="Self.Type" Multiplicity="1" />
+    <End Role="Attraction" Type="Self.Attraction" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Type">
+        <PropertyRef Name="IDType" />
+      </Principal>
+      <Dependent Role="Attraction">
+        <PropertyRef Name="FKType" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Employees_Role">
+    <End Role="Role" Type="Self.Role" Multiplicity="1" />
+    <End Role="Employees" Type="Self.Employees" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Role">
+        <PropertyRef Name="IDRole" />
+      </Principal>
+      <Dependent Role="Employees">
+        <PropertyRef Name="FKRole" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Employees_StatusEmployees">
+    <End Role="StatusEmployees" Type="Self.StatusEmployees" Multiplicity="1" />
+    <End Role="Employees" Type="Self.Employees" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="StatusEmployees">
+        <PropertyRef Name="IDStatusEmployees" />
+      </Principal>
+      <Dependent Role="Employees">
+        <PropertyRef Name="FKStatusEmployees" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_History_Users">
+    <End Role="Users" Type="Self.Users" Multiplicity="1" />
+    <End Role="History" Type="Self.History" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Users">
+        <PropertyRef Name="IDUsers" />
+      </Principal>
+      <Dependent Role="History">
+        <PropertyRef Name="FKUser" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Tickets_Attraction">
+    <End Role="Attraction" Type="Self.Attraction" Multiplicity="1" />
+    <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Attraction">
+        <PropertyRef Name="IDAttraction" />
+      </Principal>
+      <Dependent Role="Tickets">
+        <PropertyRef Name="FKAttraction" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Tickets_StatusPay">
+    <End Role="StatusPay" Type="Self.StatusPay" Multiplicity="1" />
+    <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="StatusPay">
+        <PropertyRef Name="IDStatusPay" />
+      </Principal>
+      <Dependent Role="Tickets">
+        <PropertyRef Name="FKStatusPuy" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Tickets_TypeTickets">
+    <End Role="TypeTickets" Type="Self.TypeTickets" Multiplicity="1" />
+    <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="TypeTickets">
+        <PropertyRef Name="IDTypeTickets" />
+      </Principal>
+      <Dependent Role="Tickets">
+        <PropertyRef Name="FKTypeTickets" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Tickets_Users">
+    <End Role="Users" Type="Self.Users" Multiplicity="1" />
+    <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Users">
+        <PropertyRef Name="IDUsers" />
+      </Principal>
+      <Dependent Role="Tickets">
+        <PropertyRef Name="FKUser" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <Association Name="FK_Users_Card">
+    <End Role="Card" Type="Self.Card" Multiplicity="1" />
+    <End Role="Users" Type="Self.Users" Multiplicity="*" />
+    <ReferentialConstraint>
+      <Principal Role="Card">
+        <PropertyRef Name="IDCard" />
+      </Principal>
+      <Dependent Role="Users">
+        <PropertyRef Name="FKCard" />
+      </Dependent>
+    </ReferentialConstraint>
+  </Association>
+  <EntityContainer Name="Хранилище mateoModelContainer">
+    <EntitySet Name="Attraction" EntityType="Self.Attraction" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Card" EntityType="Self.Card" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Employees" EntityType="Self.Employees" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="History" EntityType="Self.History" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Role" EntityType="Self.Role" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="StatusAttraction" EntityType="Self.StatusAttraction" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="StatusEmployees" EntityType="Self.StatusEmployees" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="StatusPay" EntityType="Self.StatusPay" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Tickets" EntityType="Self.Tickets" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Type" EntityType="Self.Type" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="TypeTickets" EntityType="Self.TypeTickets" Schema="dbo" store:Type="Tables" />
+    <EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
+    <AssociationSet Name="FK_Attraction_Employees" Association="Self.FK_Attraction_Employees">
+      <End Role="Employees" EntitySet="Employees" />
+      <End Role="Attraction" EntitySet="Attraction" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Attraction_StatusAttraction" Association="Self.FK_Attraction_StatusAttraction">
+      <End Role="StatusAttraction" EntitySet="StatusAttraction" />
+      <End Role="Attraction" EntitySet="Attraction" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Attraction_Type" Association="Self.FK_Attraction_Type">
+      <End Role="Type" EntitySet="Type" />
+      <End Role="Attraction" EntitySet="Attraction" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Employees_Role" Association="Self.FK_Employees_Role">
+      <End Role="Role" EntitySet="Role" />
+      <End Role="Employees" EntitySet="Employees" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Employees_StatusEmployees" Association="Self.FK_Employees_StatusEmployees">
+      <End Role="StatusEmployees" EntitySet="StatusEmployees" />
+      <End Role="Employees" EntitySet="Employees" />
+    </AssociationSet>
+    <AssociationSet Name="FK_History_Users" Association="Self.FK_History_Users">
+      <End Role="Users" EntitySet="Users" />
+      <End Role="History" EntitySet="History" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Tickets_Attraction" Association="Self.FK_Tickets_Attraction">
+      <End Role="Attraction" EntitySet="Attraction" />
+      <End Role="Tickets" EntitySet="Tickets" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Tickets_StatusPay" Association="Self.FK_Tickets_StatusPay">
+      <End Role="StatusPay" EntitySet="StatusPay" />
+      <End Role="Tickets" EntitySet="Tickets" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Tickets_TypeTickets" Association="Self.FK_Tickets_TypeTickets">
+      <End Role="TypeTickets" EntitySet="TypeTickets" />
+      <End Role="Tickets" EntitySet="Tickets" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Tickets_Users" Association="Self.FK_Tickets_Users">
+      <End Role="Users" EntitySet="Users" />
+      <End Role="Tickets" EntitySet="Tickets" />
+    </AssociationSet>
+    <AssociationSet Name="FK_Users_Card" Association="Self.FK_Users_Card">
+      <End Role="Card" EntitySet="Card" />
+      <End Role="Users" EntitySet="Users" />
+    </AssociationSet>
+  </EntityContainer>
+</Schema>

+ 4 - 0
UnitTestmateo/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs

@@ -0,0 +1,4 @@
+// <autogenerated />
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]

二進制
UnitTestmateo/obj/Release/UnitTestmateo.csproj.AssemblyReference.cache


+ 7 - 0
UnitTestmateo/packages.config

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="EntityFramework" version="6.2.0" targetFramework="net472" />
+  <package id="EntityFramework.ru" version="6.2.0" targetFramework="net472" />
+  <package id="MSTest.TestAdapter" version="2.1.2" targetFramework="net472" />
+  <package id="MSTest.TestFramework" version="2.1.2" targetFramework="net472" />
+</packages>

+ 6 - 0
mateo.sln

@@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.31624.102
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mateo", "mateo\mateo.csproj", "{DE2AA9D8-3BAD-41A3-907A-9A5F01444F08}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTestmateo", "UnitTestmateo\UnitTestmateo.csproj", "{82C2A709-AC70-4118-8AD3-FB87926E8D99}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -15,6 +17,10 @@ Global
 		{DE2AA9D8-3BAD-41A3-907A-9A5F01444F08}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{DE2AA9D8-3BAD-41A3-907A-9A5F01444F08}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{DE2AA9D8-3BAD-41A3-907A-9A5F01444F08}.Release|Any CPU.Build.0 = Release|Any CPU
+		{82C2A709-AC70-4118-8AD3-FB87926E8D99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{82C2A709-AC70-4118-8AD3-FB87926E8D99}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{82C2A709-AC70-4118-8AD3-FB87926E8D99}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{82C2A709-AC70-4118-8AD3-FB87926E8D99}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 39 - 21
mateo/First.xaml

@@ -7,41 +7,59 @@
         mc:Ignorable="d"
         Title="First" Height="450" Width="800" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent">
     <Grid Background="White">
-        <!--<Border Background="White" CornerRadius="20"/>-->
         <Button x:Name="exit" Height="40" Width="40" Background="Transparent" BorderThickness="0" Click="btn_exit" Margin="750,10,10,400">
             <Image Source="image\exit.png" Height="40" Width="40"/>
         </Button>
 
-
         <Grid  Background="#E74C32" Margin="0,0,405,-0.4">
             <Image Source="image/logo.png" Margin="44,247,77,0"/>
         </Grid>
 
         <Grid x:Name="grid_vhod" Margin="400,0,0,-0.4" Visibility="Visible">
-            <TextBox x:Name="vvod_login" FontSize="18"
-                 BorderThickness="0 0 0 2" BorderBrush="Black" MaxLength="20" Margin="64,162,63,259"/>
-            <PasswordBox x:Name="vvod_pass" FontSize="18"
-                     BorderThickness="0 0 0 2" BorderBrush="Black" MaxLength="20" Margin="64,226,63,198"/>
-            <Button x:Name="vhod" Content="Войти" Background="Black" Foreground="White" FontSize="18" Click="btn_vhod" Margin="123,293,123,104" IsDefault="True"/>
-            <Button x:Name="registr" Content="Нет аккаунта? Зарегистрироваться" Background="Transparent" FontSize="18" BorderThickness="0" Click="btn_registr" Margin="48,351,48,70"/>
+            <TextBlock Text="Авторизация" FontSize="24" FontFamily="Century Gothic" HorizontalAlignment="Center" Margin="114,66,110,345"/>
+
+            <TextBlock x:Name="txtlogin" Text="Логин" FontFamily="Century Gothic" FontSize="18" Foreground="Gray" Margin="64,162,63,259"/>
+            <TextBox TextChanged="txtchangedLogin" Background="Transparent" x:Name="vvod_login" FontSize="18" FontFamily="Century Gothic"
+                 BorderThickness="0 0 0 2" BorderBrush="Black" MaxLength="20" Margin="64,162,63,259" PreviewTextInput="txtPasswordLogin_PreviewTextInput"/>
+
+            <TextBlock x:Name="txtpass" Text="Пароль" FontSize="18" FontFamily="Century Gothic" Foreground="Gray" Margin="64,226,63,198"/>
+            <PasswordBox PasswordChanged="passchangedPass" x:Name="vvod_pass" FontSize="18" Background="Transparent"
+                     BorderThickness="0 0 0 2" BorderBrush="Black" MaxLength="20" Margin="64,226,63,198" PreviewTextInput="txtPasswordLogin_PreviewTextInput"/>
+
+            <Button x:Name="vhod" Content="Войти" Background="Black" Foreground="White" FontSize="18" FontFamily="Century Gothic" Click="btn_vhod" Margin="123,293,123,104" IsDefault="True"/>
+            <Button x:Name="registr" Content="Нет аккаунта? Зарегистрироваться" Background="Transparent" FontSize="18" FontFamily="Century Gothic" BorderThickness="0" Click="btn_registr" Margin="40,351,40,70"/>
         </Grid>
 
         <Grid x:Name="grid_registr" Margin="400,0,0,-0.4" Visibility="Hidden">
-            <Grid.ColumnDefinitions>
+            <!--<Grid.ColumnDefinitions>
                 <ColumnDefinition Width="0*"/>
                 <ColumnDefinition/>
-            </Grid.ColumnDefinitions>
-            <TextBox  x:Name="vvod_LNAME" Text="ФАМИЛИЯ" FontSize="18"
-                 BorderThickness="0 0 0 2" BorderBrush="Black" MaxLength="20" Margin="64,90,63,330" Grid.ColumnSpan="2"/>
-            <TextBox  x:Name="vvod_FNAME" Text="ИМЯ" FontSize="18"
-                 BorderThickness="0 0 0 2" BorderBrush="Black" MaxLength="20" Margin="64,134,63,286" Grid.ColumnSpan="2"/>
-            <TextBox  x:Name="vvod_MNAME" Text="ОТЧЕСТВО" FontSize="18"
-                 BorderThickness="0 0 0 2" BorderBrush="Black" MaxLength="20" Margin="64,178,63,242" Grid.ColumnSpan="2"/>
-            <TextBox x:Name="vvod_login_reg" Text="login" FontSize="18"
-                 BorderThickness="0 0 0 2" BorderBrush="Black" MaxLength="20" Margin="64,222,63,198" Grid.ColumnSpan="2"/>
-            <PasswordBox x:Name="vvod_pass_reg" FontSize="18"
-                     BorderThickness="0 0 0 2" BorderBrush="Black" MaxLength="20" Margin="64,266,63,154" Grid.ColumnSpan="2"/>
-            <Button x:Name="registr2" Content="Зарегистрироваться" Background="Black" Foreground="White" FontSize="18" Click="btn_regist2" Margin="101,333,102,64" Grid.ColumnSpan="2"/>
+            </Grid.ColumnDefinitions>-->
+
+            <Button x:Name="cancel" Content="←" FontSize="40" FontFamily="Century Gothic" Width="40" Background="Transparent" BorderThickness="0" Click="btnCancel" Margin="0,0,360,396"/>
+            <TextBlock Text="Регистрация" FontSize="24" FontFamily="Century Gothic" HorizontalAlignment="Center" Margin="101,10,102,396"/>
+            
+            <TextBlock x:Name="txtlastreg" Text="Фамилия" FontSize="18" FontFamily="Century Gothic" Foreground="Gray" Margin="64,90,63,330" Grid.ColumnSpan="2" />
+            <TextBox TextChanged="txtchangedLogin" x:Name="vvod_LNAME" FontSize="18" FontFamily="Century Gothic" Background="Transparent"
+                 BorderThickness="0 0 0 2" BorderBrush="Black" MaxLength="20" Margin="64,90,63,330" Grid.ColumnSpan="2" PreviewTextInput="txtFIO_PreviewTextInput"/>
+
+            <TextBlock x:Name="txtfirstreg" Text="Имя" FontSize="18" FontFamily="Century Gothic" Foreground="Gray" Margin="64,134,63,286" Grid.ColumnSpan="2" />
+            <TextBox TextChanged="txtchangedLogin" x:Name="vvod_FNAME" FontSize="18" FontFamily="Century Gothic" Background="Transparent"
+                 BorderThickness="0 0 0 2" BorderBrush="Black" MaxLength="20" Margin="64,134,63,286" Grid.ColumnSpan="2" PreviewTextInput="txtFIO_PreviewTextInput"/>
+
+            <TextBlock x:Name="txtmiddlereg" Text="Отчество" FontSize="18" FontFamily="Century Gothic" Foreground="Gray" Margin="64,178,63,242" Grid.ColumnSpan="2" />
+            <TextBox TextChanged="txtchangedLogin" x:Name="vvod_MNAME" FontFamily="Century Gothic" FontSize="18" Background="Transparent"
+                 BorderThickness="0 0 0 2" BorderBrush="Black" MaxLength="20" Margin="64,178,63,242" Grid.ColumnSpan="2" PreviewTextInput="txtFIO_PreviewTextInput"/>
+
+            <TextBlock x:Name="txtloginreg" Text="Логин" FontSize="18" FontFamily="Century Gothic" Foreground="Gray" Margin="64,222,63,198" Grid.ColumnSpan="2" />
+            <TextBox TextChanged="txtchangedLogin" x:Name="vvod_login_reg" FontFamily="Century Gothic" Background="Transparent" FontSize="18"
+                 BorderThickness="0 0 0 2" BorderBrush="Black" MaxLength="20" Margin="64,222,63,198" Grid.ColumnSpan="2" PreviewTextInput="txtPasswordLogin_PreviewTextInput"/>
+
+            <TextBlock x:Name="txtpassreg" Text="Пароль" FontSize="18" FontFamily="Century Gothic" Foreground="Gray" Margin="64,266,63,154" Grid.ColumnSpan="2" />
+            <PasswordBox PasswordChanged="passchangedPass" x:Name="vvod_pass_reg" Background="Transparent" FontSize="18"
+                     BorderThickness="0 0 0 2" BorderBrush="Black" MaxLength="20" Margin="64,266,63,154" Grid.ColumnSpan="2" PreviewTextInput="txtPasswordLogin_PreviewTextInput"/>
+
+            <Button x:Name="registr2" Content="Зарегистрироваться" FontFamily="Century Gothic" Background="Black" Foreground="White" FontSize="18" Click="btn_regist2" Margin="101,333,102,64" Grid.ColumnSpan="2"/>
         </Grid>
     </Grid>
 </Window>

+ 151 - 59
mateo/First.xaml.cs

@@ -13,6 +13,7 @@ using System.Windows.Media.Imaging;
 using System.Windows.Shapes;
 using System.Data;
 using System.Data.SqlClient;
+using System.Text.RegularExpressions;
 
 namespace mateo
 {
@@ -24,71 +25,87 @@ namespace mateo
             vvod_login.Focus();
         }
 
-        private void btn_exit(object sender, RoutedEventArgs e)
+        #region Функции для тестов
+        public bool Vhod(string login, string password)
         {
-            Application.Current.Shutdown();
-        }
+            bool tf = false;
 
-        private void btn_vhod(object sender, RoutedEventArgs e)
-        {
-            if (vvod_login.Text == "" || vvod_pass.Password == "") MessageBox.Show("Пустые поля");
+            vvod_login.Text = login;
+            vvod_pass.Password = password;
+            if (vvod_login.Text == "" || vvod_pass.Password == "") MessageBox.Show("Пустые поля", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
             else
             {
-                //пользователь
-                if (DB.GetContext().Users.FirstOrDefault(x => x.Login == vvod_login.Text && x.Password == vvod_pass.Password) != null) //?&&||???
+                try
                 {
-                    DB.Iduser = DB.GetContext().Users.FirstOrDefault(x => x.Login == vvod_login.Text && x.Password == vvod_pass.Password).IDUsers;
+                    //пользователь
+                    if (DB.GetContext().Users.FirstOrDefault(x => x.Login == vvod_login.Text && x.Password == vvod_pass.Password) != null)
+                    {
+                        DB.Iduser = DB.GetContext().Users.FirstOrDefault(x => x.Login == vvod_login.Text && x.Password == vvod_pass.Password).IDUsers;
 
-                    MessageBox.Show("Добро пожаловать");
+                        MainWindow mainWindow = new MainWindow();
+                        mainWindow.Show();
+                        this.Close();
 
-                    MainWindow mainWindow = new MainWindow();
-                    mainWindow.Show();
-                    this.Close();
-                }
+                        tf = true;
+                    }
 
-                //администратор
-                else if (DB.GetContext().Employees.FirstOrDefault(x => x.Login == vvod_login.Text && x.Password == vvod_pass.Password) != null) //?&&||???
-                {
-                    DB.Idemployees = DB.GetContext().Employees.FirstOrDefault(x => x.Login == vvod_login.Text && x.Password == vvod_pass.Password).IDEmployees;
-                    if (DB.GetContext().Employees.Where(x => x.IDEmployees == DB.Idemployees).FirstOrDefault().FKStatusEmployees != 2)
+                    //администратор
+                    else if (DB.GetContext().Employees.FirstOrDefault(x => x.Login == vvod_login.Text && x.Password == vvod_pass.Password) != null)
                     {
-                        MessageBox.Show("Вы вощли как администратор");
+                        DB.Idemployees = DB.GetContext().Employees.FirstOrDefault(x => x.Login == vvod_login.Text && x.Password == vvod_pass.Password).IDEmployees;
+                        if (DB.GetContext().Employees.Where(x => x.IDEmployees == DB.Idemployees).FirstOrDefault().FKStatusEmployees != 2)
+                        {
+                            SysAdmin sysAdmin = new SysAdmin();
+                            sysAdmin.Show();
+                            this.Close();
+                            tf = true;
+                        }
+                        else
+                        {
+                            MessageBox.Show("Вы были уволены", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+                            vvod_login.Text = "";
+                            vvod_pass.Password = "";
+                        }
+                    }
 
-                        SysAdmin sysAdmin = new SysAdmin();
-                        sysAdmin.Show();
-                        this.Close();
+                    else
+                    {
+                        MessageBox.Show("Такого пользователя не сущ-ет", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+                        vvod_login.Text = "";
+                        vvod_pass.Password = "";
+                        vvod_login.Focus();
                     }
-                    else MessageBox.Show("Вы были уволены");
                 }
-                else
+
+                catch (Exception ex)
                 {
-                    MessageBox.Show("Такого пользователя не сущ-ет");
-                    vvod_login.Text = "";
-                    vvod_pass.Password = "";
+                    MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
                 }
             }
-        }
 
-        private void btn_registr(object sender, RoutedEventArgs e)
-        {
-            grid_registr.Visibility = Visibility.Visible;
-            grid_vhod.Visibility = Visibility.Hidden;
+            return tf;
         }
 
-        private void btn_regist2(object sender, RoutedEventArgs e)
+        public bool Registr(string lastname, string firstname, string middlename, string login, string password)
         {
-            if (vvod_login_reg.Text == "" || vvod_pass_reg.Password == "") MessageBox.Show("Пустые поля!");
+            bool tf = false;
+
+            vvod_LNAME.Text = lastname;
+            vvod_FNAME.Text = firstname;
+            vvod_MNAME.Text = middlename;
+            vvod_login_reg.Text = login;
+            vvod_pass_reg.Password = password;
+
+            if (vvod_LNAME.Text == "" || vvod_FNAME.Text == "" || vvod_login_reg.Text == "" || vvod_pass_reg.Password == "") MessageBox.Show("Пустые поля!", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
             else
             {
                 try
                 {
                     //проверяем есть ли пользователь с указанным логином в системе //проверяем в пользователях и админах
-                    if (DB.GetContext().Users.FirstOrDefault(x => x.Login == vvod_login_reg.Text) == null && DB.GetContext().Employees.FirstOrDefault(x => x.Login == vvod_login_reg.Text) == null) //||&&????????    || x.Password == vvod_pass_reg.Password
+                    if (DB.GetContext().Users.FirstOrDefault(x => x.Login == vvod_login_reg.Text) == null && DB.GetContext().Employees.FirstOrDefault(x => x.Login == vvod_login_reg.Text) == null)
                     {
 
-                        //string numberCard = "0000 0000 0000 0000";
-                        //проверяем есть ли карта с таким номером
-
+                        //подбираем номер карты которого нет в бд
                         string numberCard;
                         do
                         {
@@ -101,17 +118,12 @@ namespace mateo
                         } while (DB.GetContext().Card.FirstOrDefault(x => x.NumberCard == numberCard) != null);
 
 
-                        //записать номер карты в табл Card
-                        DB.GetContext().Card.Add(new Card { NumberCard = numberCard });
+                        DB.GetContext().Card.Add(new Card
+                        {
+                            NumberCard = numberCard
+                        });
                         DB.GetContext().SaveChanges();
 
-                        //ЗАПИСАТЬ НОМЕР КАРТЫ ДЛЯ ИСПОЛЬЗОВАНИЯ В PROFILE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-                        /*Profile profile = new Profile();
-                        profile.idcard.Text = DB.GetContext().Card.OrderByDescending(x => x.IDCard).FirstOrDefault().ToString(); //DB.GetContext().Card.Add(new Card { NumberCard = numberCard}).ToString(); //эээ???
-                        */
-                        //aa = DB.GetContext().Card.OrderByDescending(x => x.IDCard).FirstOrDefault().IDCard;
-
-
                         DB.Idcard = DB.GetContext().Card.OrderByDescending(x => x.IDCard).FirstOrDefault().IDCard;
 
                         if (vvod_MNAME.Text == "")
@@ -119,7 +131,6 @@ namespace mateo
                             vvod_MNAME.Text = null;
                         }
 
-                        //записать пользователя и привязать id в табл Users
                         var card = DB.GetContext().Card.OrderByDescending(x => x.IDCard).FirstOrDefault();
                         DB.GetContext().Users.Add(new Users
                         {
@@ -130,33 +141,114 @@ namespace mateo
                             Password = vvod_pass_reg.Password,
                             FKCard = card.IDCard
                         });
-
-                        //ЗАПИСАТЬ id ПОЛЬЗОВАТЕЛЯ ДЛЯ ИСПОЛЬЗОВАНИЯ В PROFILE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-                        // profile.iduser.Text = DB.GetContext().Users.OrderByDescending(x => x.IDUsers).FirstOrDefault().ToString();
                         DB.GetContext().SaveChanges();
+                        DB.Iduser = DB.GetContext().Users.OrderByDescending(x => x.IDUsers).FirstOrDefault().IDUsers;
 
-                        MessageBox.Show("Пользователь " + vvod_LNAME.Text + " " + vvod_FNAME.Text + " " + " был добавлен\nДобро пожаловать! " + numberCard);
+                        MessageBox.Show("Пользователь " + vvod_LNAME.Text + " " + vvod_FNAME.Text + " " + " был добавлен\nДобро пожаловать! ", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
                         MainWindow mainWindow = new MainWindow();
                         mainWindow.Show();
                         this.Close();
-
+                        tf = true;
                     }
                     else
                     {
-                        MessageBox.Show("Пользователь с таким логином уже есть!");
+                        MessageBox.Show("Пользователь с таким логином уже есть!", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
                         vvod_login_reg.Text = "";
                     }
-                } 
-                catch(Exception ex)
+                }
+                catch (Exception ex)
                 {
-                    MessageBox.Show(ex.ToString());
+                    MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
                 }
             }
 
+            return tf;
+        }
+        #endregion
+
 
+        private void btn_vhod(object sender, RoutedEventArgs e)
+        {
+            Vhod(vvod_login.Text, vvod_pass.Password);
+        }
+
+        private void btn_registr(object sender, RoutedEventArgs e)
+        {
+            grid_registr.Visibility = Visibility.Visible;
+            grid_vhod.Visibility = Visibility.Hidden;
+            vvod_login_reg.Focus();
+        }
+
+        private void btn_regist2(object sender, RoutedEventArgs e)
+        {
+            Registr(vvod_LNAME.Text, vvod_FNAME.Text, vvod_MNAME.Text, vvod_login_reg.Text, vvod_pass_reg.Password);
+        }
+
+        #region логинпароль
+        private void txtchangedLogin(object sender, TextChangedEventArgs e)
+        {
+            if (vvod_login.Text != "") txtlogin.Visibility = Visibility.Hidden;
+            else if(vvod_login.Text == "") txtlogin.Visibility = Visibility.Visible;
+
+
+            if(vvod_LNAME.Text!="") txtlastreg.Visibility = Visibility.Hidden;
+            else if (vvod_LNAME.Text == "") txtlastreg.Visibility = Visibility.Visible;
+            
+            if(vvod_FNAME.Text!="") txtfirstreg.Visibility = Visibility.Hidden;
+            else if (vvod_FNAME.Text == "") txtfirstreg.Visibility = Visibility.Visible;
             
+            if(vvod_MNAME.Text!="") txtmiddlereg.Visibility = Visibility.Hidden;
+            else if (vvod_MNAME.Text == "") txtmiddlereg.Visibility = Visibility.Visible;
 
-           
+            if(vvod_login_reg.Text!="") txtloginreg.Visibility = Visibility.Hidden;
+            else if (vvod_login_reg.Text == "") txtloginreg.Visibility = Visibility.Visible;
         }
+
+        private void passchangedPass(object sender, RoutedEventArgs e)
+        {
+            if (vvod_pass.Password != "") txtpass.Visibility = Visibility.Hidden;
+            else if(vvod_pass.Password == "") txtpass.Visibility = Visibility.Visible;
+
+            if (vvod_pass_reg.Password != "") txtpassreg.Visibility = Visibility.Hidden;
+            else if (vvod_pass_reg.Password == "") txtpassreg.Visibility = Visibility.Visible;
+        }
+
+        private void txtPasswordLogin_PreviewTextInput(object sender, TextCompositionEventArgs e)//опред символы в пароле и логине
+        {
+            bool a = new Regex("[^A-Z]+").IsMatch(e.Text);
+            bool b = new Regex("[^a-z]+").IsMatch(e.Text);
+            bool c = new Regex("[^0-9]+").IsMatch(e.Text);
+            bool d = new Regex("[^.]").IsMatch(e.Text);
+
+            e.Handled = a && b && c && d;
+
+        }
+
+        private void txtFIO_PreviewTextInput(object sender, TextCompositionEventArgs r)
+        {
+            bool a = new Regex("[^А-Я]+").IsMatch(r.Text);
+            bool b = new Regex("[^а-я]+").IsMatch(r.Text);
+            r.Handled = a && b;
+        }
+        #endregion
+
+        private void btnCancel(object sender, RoutedEventArgs e)
+        {
+            grid_registr.Visibility = Visibility.Hidden;
+            vvod_login.Text = "";
+            vvod_pass.Password = "";
+            vvod_LNAME.Text = "";
+            vvod_FNAME.Text = "";
+            vvod_MNAME.Text = "";
+            vvod_login_reg.Text = "";
+            vvod_pass_reg.Password = "";
+            grid_vhod.Visibility = Visibility.Visible;
+        }
+
+        private void btn_exit(object sender, RoutedEventArgs e)
+        {
+            Application.Current.Shutdown();
+        }
+
     }
 }

+ 47 - 38
mateo/MainWindow.xaml

@@ -9,7 +9,7 @@
 
     <Grid Background="#ffff">
         <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">
+            <!--<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>
 
@@ -23,13 +23,13 @@
 
             <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>
+            </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 Content="Профиль" FontSize="16" FontFamily="Century Gothic" BorderThickness="0" Background="Transparent" Margin="627,10,223,10" MaxWidth="80" Click="btnProfileClick"/>
+            <Button Content="Услуги" FontSize="16" FontFamily="Century Gothic" BorderThickness="0" Background="Transparent" Margin="146,10,674,10" MaxWidth="80" Click="btnUslugiClick"/>
+            <TextBlock Text="Парк развлечений" HorizontalAlignment="Center" FontSize="28" FontFamily="Century Gothic" Foreground="#ffff" Margin="328,14,373,0" Height="40" VerticalAlignment="Top"/>
             <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>
@@ -45,7 +45,6 @@
         <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"/>
                 </ItemsPanelTemplate>
             </ListView.ItemsPanel>
             <ListView.ItemTemplate>
@@ -61,8 +60,8 @@
                             </Grid.RowDefinitions>
                             <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="txtTypeAttraction" Grid.Row="2" FontSize="14" Text="{Binding Type.Type1, StringFormat=Тип: {0}}"/>
+                            <TextBlock Grid.Row="0" HorizontalAlignment="Center" FontSize="18" FontFamily="Century Gothic" Text="{Binding NameAttraction}"/>
+                            <TextBlock Name="txtTypeAttraction" Grid.Row="2" FontSize="14" FontFamily="Century Gothic" Text="{Binding Type.Type1, StringFormat=Тип: {0}}"/>
                         </Grid>
                     </Border>
                 </DataTemplate>
@@ -70,20 +69,20 @@
         </ListView>
 
         <!--просмотр каждого аттракциона и выбор нужного-->
-        <ScrollViewer x:Name="stackAttraction" Margin="136,80,0,0" Background="White" Visibility="Hidden">
+        <ScrollViewer x:Name="stackAttraction" Margin="136,80,0,0" Background="White" Visibility="Hidden" VerticalScrollBarVisibility="Hidden">
             <StackPanel>
-                <TextBlock x:Name="txtNameAttraction" FontSize="18" TextAlignment="Center" HorizontalAlignment="Center"/>
+                <TextBlock x:Name="txtNameAttraction" FontSize="18" FontFamily="Century Gothic" 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"/>
+                <TextBlock x:Name="txtDescriptionAttraction" HorizontalAlignment="Center" FontSize="16" FontFamily="Century Gothic" 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"/>
+                    <TextBlock x:Name="txtPriceOld" Width="150" FontSize="16" FontFamily="Century Gothic" Margin="50,0,0,0"/>
+                    <Button Content="+" FontSize="16" Width="30" BorderThickness="0" Background="Black" Foreground="White" 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"/>
+                    <TextBlock x:Name="txtPriceBaby" Width="150" FontSize="16" FontFamily="Century Gothic" Margin="50,0,0,0"/>
+                    <Button Content="+" BorderThickness="0" Background="Black" Foreground="White" 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"/>
+                <Button Content="Назад" HorizontalAlignment="Right" FontSize="16" FontFamily="Century Gothic" Foreground="White" BorderThickness="0" Background="Black" Width="100" Height="40" Click="btnBackAttraction" Margin="0,0,25,25"/>
             </StackPanel>
         </ScrollViewer>
 
@@ -97,11 +96,11 @@
                                 <StackPanel.Background>
                                     <ImageBrush ImageSource="image\tickets2.png"/>
                                 </StackPanel.Background>
-                                <TextBlock x:Name="txtNameTickets" Text="{Binding Attraction.NameAttraction}" VerticalAlignment="Center"  Width="200" FontSize="20" TextTrimming="WordEllipsis" Margin="20"/>
-                                <TextBlock x:Name="txtTypeTickets" Text="{Binding TypeTickets.TypeTickets1}" VerticalAlignment="Center" Width="80" FontSize="16"/>
-                                <TextBlock x:Name="txtPriceAttraction" VerticalAlignment="Center" Text="{Binding Summ, StringFormat=0.00 руб.}" Width="100" FontSize="16"/>
+                                <TextBlock x:Name="txtNameTickets" Text="{Binding Attraction.NameAttraction}"  FontFamily="Century Gothic" VerticalAlignment="Center"  Width="200" FontSize="20" TextTrimming="WordEllipsis" Margin="20"/>
+                                <TextBlock x:Name="txtTypeTickets" Text="{Binding TypeTickets.TypeTickets1}" VerticalAlignment="Center" Width="80" FontSize="16"  FontFamily="Century Gothic"/>
+                                <TextBlock x:Name="txtPriceAttraction" VerticalAlignment="Center" Text="{Binding Summ, StringFormat=0.00 руб.}" Width="100" FontSize="16"  FontFamily="Century Gothic"/>
                                 <Button Content="-" Height="30" Width="30" FontSize="24" Background="Transparent" Margin="5" Click="BtnTicketsMinus"/>
-                                <TextBlock x:Name="txtQuantityTickets" VerticalAlignment="Center" TextAlignment="Center" Text="{Binding Quantity}" Width="30" FontSize="16"/>
+                                <TextBlock x:Name="txtQuantityTickets" VerticalAlignment="Center" TextAlignment="Center" Text="{Binding Quantity}" Width="30" FontSize="16" FontFamily="Century Gothic"/>
                                 <Button Content="+" Height="30" Width="30" FontSize="24" Background="Transparent"  Margin="5" Click="BtnTicketsPlus"/>
                                 <Button Height="40" Width="40" Background="Transparent" BorderThickness="0" Margin="50,0,40,0" Click="BtnDeleteTickets">
                                     <Image Source="image\delete.png"/>
@@ -112,8 +111,8 @@
                 </ListView.ItemTemplate>
             </ListView>
             <StackPanel HorizontalAlignment="Right">
-                <TextBlock x:Name="txtSumm" Text="Сумма: " FontSize="18" HorizontalAlignment="Center"/>
-                <Button Content="Оплатить всё" Height="50" Width="120" Margin="5" FontSize="16" Background="Transparent" Click="BtnPuyAll"/>
+                <TextBlock x:Name="txtSumm" Text="Сумма: " FontSize="18" FontFamily="Century Gothic" HorizontalAlignment="Center"/>
+                <Button Content="Оплатить всё" Height="50" Width="120" Margin="5" FontSize="16"  FontFamily="Century Gothic" Background="Transparent" Click="BtnPuyAll"/>
             </StackPanel>
         </Grid>
 
@@ -121,28 +120,38 @@
 
         <!--раздел профиль-->
         <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"/>
+            <Image x:Name="imgProfile" Margin="150,144,616,234"/>
+            <Button x:Name="btnAddPhoto" Content="Добавить фото" FontFamily="Century Gothic" Background="Transparent" Click="BtnAddPhoto" Margin="179,325,652,180"/>
+            <Button Content="Удалить фото" FontFamily="Century Gothic" Background="Transparent" Click="BtnDeletePhoto" Margin="179,368,652,134"/>
+            <TextBlock x:Name="txtNameProfile" FontSize="24" FontFamily="Century Gothic" HorizontalAlignment="Center" Margin="195,87,49,423" />
+            <TextBlock x:Name="txtBalanceProfile" Text="Баланс карты: " FontSize="20" FontFamily="Century Gothic" Margin="355,176,301,326"/>
+            <Button Content="Пополнить баланс" Foreground="White" FontSize="20" FontFamily="Century Gothic" BorderThickness="0" Background="Black" Margin="399,258,363,228" Click="BtbBalance"/>
+
+            <TextBlock Text="История платежей:" FontSize="18" FontFamily="Century Gothic" Margin="739,133,49,373"/>
+            <DataGrid x:Name="datagridHistoryProfile" AutoGenerateColumns="False" IsReadOnly="True" ColumnWidth="*" Margin="664,168,10,10">
+                <DataGrid.Columns >
+                    <DataGridTextColumn Header="Дата" Binding="{Binding DateTime, StringFormat=dd.MM.yyyy HH:mm}" FontFamily="Century Gothic"/>
+                    <DataGridTextColumn Header="Сумма" Binding="{Binding Summ, StringFormat=0.00}" FontFamily="Century Gothic"/>
+                </DataGrid.Columns>
+
+            </DataGrid>
         </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" />
+            <Image Source="image\card.png" Width="480" Height="320" VerticalAlignment="Top" Margin="40"/>
+            <TextBlock Text="Введите номер карты" FontSize="24"  FontFamily="Century Gothic" Background="Transparent" Margin="367,178,188,261"/>
+            <TextBox x:Name="card1" TextChanged="txtchangedCard" FontSize ="24" FontFamily="Century Gothic" Background="Transparent" BorderThickness="0" MaxLength="4" Margin="291,224,476,215" />
+            <TextBox x:Name="card2" TextChanged="txtchangedCard" FontSize ="24" FontFamily="Century Gothic" Background="Transparent" BorderThickness="0" MaxLength="4" Margin="380,224,387,215" />
+            <TextBox x:Name="card3" TextChanged="txtchangedCard" FontSize ="24" FontFamily="Century Gothic" Background="Transparent" BorderThickness="0" MaxLength="4" Margin="469,224,298,215" />
+            <TextBox x:Name="card4" TextChanged="txtchangedCard" FontSize ="24" FontFamily="Century Gothic" Background="Transparent" BorderThickness="0" MaxLength="4" Margin="558,224,209,215" />
 
-            <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 Orientation="Horizontal" Height="80" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="15">
+                <TextBlock Text="Сумма пополнения: " FontSize="22" FontFamily="Century Gothic" VerticalAlignment="Center" Margin="0,27,0,26"/>
+                <TextBox x:Name="txtPlusBalabce" FontSize="20" FontFamily="Century Gothic" VerticalAlignment="Center" Width="120" Margin="0,26,0,25" />
+                <Button Content="Пополнить" Foreground="White" FontFamily="Century Gothic" FontSize="18" BorderThickness="0" Background="Black" Click="BtbPlusBalance" Width="120" Height="50" Margin="15"/>
+                <Button Content="Отмена" Foreground="White" FontSize="18" FontFamily="Century Gothic" BorderThickness="0" Background="Black" Click="BtnCancelBalance" Width="120" Height="50" Margin="15"/>
             </StackPanel>
         </Grid>
-
-
-
     </Grid>
 </Window>

+ 485 - 333
mateo/MainWindow.xaml.cs

@@ -22,34 +22,256 @@ namespace mateo
     {
         byte[] image; //очищать!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
         int idattraction = 0;
+        decimal summ = 0;
+
+
+        #region Для тестов
+        public bool AddChangePhoto(int a)
+        {
+            bool tf = false;
+            DB.Iduser = a;
+
+            string imageLoc;
+            OpenFileDialog dld = new OpenFileDialog();
+            dld.Filter = "JPG Files (*.jpg)|*.jpg|PNG Files (*.png)|*.png|JPEG Files (*.jpeg)|*.jpeg";
+            if (dld.ShowDialog()==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();
+
+                tf = true;
+            }
+            if (imgProfile.Source != null) btnAddPhoto.Content = "Изменить фото";
+
+            return tf;
+        }
+
+        public bool PlusBalance(string a, string b, string c, string d, string balance, int idcard)
+        {
+            card1.Text = a;
+            card2.Text = b;
+            card3.Text = c;
+            card4.Text = d;
+            txtPlusBalabce.Text = balance;
+            bool tf = false;
+
+            var bal = DB.GetContext().Card.Where(x => x.IDCard == idcard).FirstOrDefault();
+            if (txtPlusBalabce.Text != "" && card1.Text.Length == 4 && card2.Text.Length == 4 && card3.Text.Length == 4 && card4.Text.Length == 4)
+            {
+                try //типа проверка на введенные значения
+                {
+                    if (bal.Balance == null) bal.Balance = 0;
+                    bal.Balance += Convert.ToDecimal(txtPlusBalabce.Text);
+                    DB.GetContext().SaveChanges();
+                    gridPlusBalance.Visibility = Visibility.Hidden;
+                    MessageBox.Show("Успешно", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+                    tf = true;
+                }
+                catch
+                {
+                    MessageBox.Show("Ошибка, проверьте введенные данные", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+                }
+            }
+            else MessageBox.Show("Проверьте заполнение полей", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+
+            return tf;
+        }
+
+
+        public decimal AddOldAttractionSumm(int idattraction, int iduser)
+        {
+            try
+            {
+                if (DB.GetContext().Attraction.Where(x => x.IDAttraction == idattraction && x.FKStatusAttraction == 2).FirstOrDefault() != null) return 0;
+
+                if (DB.GetContext().Tickets.Where(x => x.FKUser == iduser && x.FKAttraction == idattraction && x.FKStatusPuy == 2 && x.FKTypeTickets == 1).FirstOrDefault() != null)
+                    MessageBox.Show("Вы уже добавили такой билет, если хотите изменить количество, перейдите в раздел \"Билеты\"", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+
+                else
+                {
+                    var attr = DB.GetContext().Attraction.Where(x => x.IDAttraction == idattraction).FirstOrDefault();
+
+                    Tickets tickets = new Tickets
+                    {
+                        FKUser = iduser,
+                        FKAttraction = idattraction,
+                        FKTypeTickets = 1,
+                        FKStatusPuy = 2,
+                        Quantity = 1,
+                        Summ = Convert.ToDecimal(attr.PriceOld),
+                        Date = DateTime.Now
+                    };
+
+                    DB.GetContext().Tickets.Add(tickets);
+                    DB.GetContext().SaveChanges();
+                    MessageBox.Show("Билет(Взрослый) добавлен в раздел \"Билеты\"", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+                    listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == iduser && x.FKStatusPuy == 2).ToList();
+
+                    return Convert.ToDecimal(attr.PriceOld);
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+            }                
+            return 0;
+        }
+
+
+        public decimal AddBabyAttractionSumm(int idattraction, int iduser)
+        {
+
+            try
+            {
+                if (DB.GetContext().Attraction.Where(x => x.IDAttraction == idattraction && x.FKStatusAttraction == 2).FirstOrDefault() != null) return 0;
+
+                if (DB.GetContext().Tickets.Where(x => x.FKUser == iduser && x.FKAttraction == idattraction && x.FKStatusPuy == 2 && x.FKTypeTickets == 2).FirstOrDefault() != null)
+                    MessageBox.Show("Вы уже добавили такой билет, если хотите изменить количество, перейдите в раздел \"Билеты\"", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+
+                else
+                {
+                    var attr = DB.GetContext().Attraction.Where(x => x.IDAttraction == idattraction).FirstOrDefault();
+
+                    Tickets tickets = new Tickets
+                    {
+                        FKUser = iduser,
+                        FKAttraction = idattraction,
+                        FKTypeTickets = 2,
+                        FKStatusPuy = 2,
+                        Quantity = 1,
+                        Summ = Convert.ToDecimal(attr.PriceBaby),
+                        Date = DateTime.Now
+                    };
+                    DB.GetContext().Tickets.Add(tickets);
+                    DB.GetContext().SaveChanges();
+                    MessageBox.Show("Билет(Детский) добавлен в раздел \"Билеты\"", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+                    listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == iduser && x.FKStatusPuy == 2).ToList();
+
+                    return Convert.ToDecimal(attr.PriceBaby);
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+            }
+            return 0;
+        }
+
+        public bool TicketsMinus(int quantity)
+        {
+            bool tf = false;
+
+            if (quantity == 1) MessageBox.Show("Количество не может быть меньше 1", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+            else
+            {
+                quantity -= 1;
+                tf = true;
+            }
+            DB.GetContext().SaveChanges();
+            listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
+            decimal summ = 0;
+            summ = Summ(summ);
+
+            return tf;
+        } 
+        public bool TicketsPlus(int quantity)
+        {
+            bool tf = false;
+
+            if (quantity == 30) MessageBox.Show("Превышено количество билетов", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+            else
+            {
+                quantity += 1;
+                tf = true;
+            }
+            DB.GetContext().SaveChanges();
+            listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
+            decimal summ = 0;
+            summ = Summ(summ);
+
+            return tf;
+        }
+
+        public int TicketsMinusInt(int quantity)
+        {
+            if (quantity == 1) MessageBox.Show("Количество не может быть меньше 1", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+            else quantity -= 1;
+            DB.GetContext().SaveChanges();
+            listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
+            decimal summ = 0;
+            summ = Summ(summ);
+
+            return quantity;
+        }
+        
+        public int TicketsPlusInt(int quantity)
+        {
+            if (quantity == 30) MessageBox.Show("Превышено количество билетов", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+            else quantity += 1;
+            DB.GetContext().SaveChanges();
+            listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
+            decimal summ = 0;
+            summ = Summ(summ);
+
+            return quantity;
+        }
+
+
+        #endregion
+
+
 
         public void Update() //функция для обновления информации о пользователе
         {
-            //фио
-            var fio = DB.GetContext().Users.FirstOrDefault(x => x.IDUsers == DB.Iduser);
-            txtNameProfile.Text = fio.LastName + " " + fio.FirstName + " " + fio.MiddleName;
+            try {
+                //фио
+                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));
+                //выводим баланс карты
+                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)
+                //выводим картинку из бд
+                if (fio.Image != null)
+                {
+                    image = fio.Image;
+                    MemoryStream ms = new MemoryStream(image);
+                    imgProfile.Source = BitmapFrame.Create(ms);
+                }
+                if (imgProfile.Source != null) btnAddPhoto.Content = "Изменить фото";
+
+                //История платежей
+                datagridHistoryProfile.ItemsSource = DB.GetContext().History.Where(x => x.FKUser == DB.Iduser).ToList();
+            }
+            catch(Exception ex)
             {
-                image = fio.Image;
-                MemoryStream ms = new MemoryStream(image);
-                imgProfile.Source = BitmapFrame.Create(ms);
+                MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
             }
-            if (imgProfile.Source != null) btnAddPhoto.Content = "изменить фото";
         }
 
         public MainWindow()
         {
             InitializeComponent();
-            listAllAttraction.ItemsSource = DB.GetContext().Attraction.Where(x => x.FKStatusAttraction != 2).ToList();
-            Update();//??здесь?
-        }
 
+            try
+            {
+                listAllAttraction.ItemsSource = DB.GetContext().Attraction.Where(x => x.FKStatusAttraction != 2).ToList();
+            }
+            catch(Exception ex)
+            {
+                MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+            }
+
+            //Update();
+        }
        
         #region раздел Услуги
         private void btnUslugiClick(object sender, RoutedEventArgs e)
@@ -63,20 +285,27 @@ namespace mateo
 
         private void ViewAllAttraction(object sender, MouseButtonEventArgs e) //просмотр каждого аттракцинона для выбора нужного
         {
-            if (listAllAttraction.SelectedItem is Attraction attraction)
+            try
             {
-                stackPriceOld.Visibility = Visibility.Visible;
-                stackPriceBaby.Visibility = Visibility.Visible;
-                stackAttraction.Visibility = Visibility.Visible;
-                txtNameAttraction.Text = attraction.NameAttraction;
-                image = attraction.ImageAttraction;
-                MemoryStream ms = new MemoryStream(image);
-                imgAttraction.Source = BitmapFrame.Create(ms);
-                txtDescriptionAttraction.Text = attraction.Description;
-                txtPriceOld.Text = String.Format("Взрослый: {0:0.00}", attraction.PriceOld);
-                txtPriceBaby.Text = String.Format("Детский: {0:0.00}", attraction.PriceBaby);
-                if (attraction.PriceOld == 0 || attraction.PriceOld == null) stackPriceOld.Visibility = Visibility.Hidden;
-                if (attraction.PriceBaby == 0 || attraction.PriceBaby == null) stackPriceBaby.Visibility = Visibility.Hidden;
+                if (listAllAttraction.SelectedItem is Attraction attraction)
+                {
+                    stackPriceOld.Visibility = Visibility.Visible;
+                    stackPriceBaby.Visibility = Visibility.Visible;
+                    stackAttraction.Visibility = Visibility.Visible;
+                    txtNameAttraction.Text = attraction.NameAttraction;
+                    image = attraction.ImageAttraction;
+                    MemoryStream ms = new MemoryStream(image);
+                    imgAttraction.Source = BitmapFrame.Create(ms);
+                    txtDescriptionAttraction.Text = attraction.Description;
+                    txtPriceOld.Text = String.Format("Взрослый: {0:0.00}", attraction.PriceOld);
+                    txtPriceBaby.Text = String.Format("Детский: {0:0.00}", attraction.PriceBaby);
+                    if (attraction.PriceOld == 0 || attraction.PriceOld == null) stackPriceOld.Visibility = Visibility.Hidden;
+                    if (attraction.PriceBaby == 0 || attraction.PriceBaby == null) stackPriceBaby.Visibility = Visibility.Hidden;
+                }
+            }
+            catch(Exception ex)
+            {
+                MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
             }
         }
 
@@ -87,37 +316,15 @@ namespace mateo
 
         #endregion
 
-
         #region Раздел Билеты
 
         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)
-                MessageBox.Show("Вы уже добавили такой билет, если хотите изменить количество, перейдите пожалуйста в раздел \"Билеты\"", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
-            else
-            {
-
-                Tickets tickets = new Tickets
-                {
-                    FKUser = DB.Iduser,
-                    FKAttraction = idattraction,
-                    FKTypeTickets = 1,
-                    FKStatusPuy = 2,
-                    Quantity = 1,
-                    Summ = Convert.ToDecimal(attr.PriceOld),
-                    Date = DateTime.Now
-                };
-                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();
-
-            }
+            AddOldAttractionSumm(idattraction, DB.Iduser);
         }
 
         private void BtnAddBabyAttraction(object sender, RoutedEventArgs e) //+ для добавления билета с типом Детский
@@ -125,31 +332,12 @@ namespace mateo
             var attr = DB.GetContext().Attraction.Where(x => x.NameAttraction == txtNameAttraction.Text).FirstOrDefault();
             //записываем id аттракциона по названию
             idattraction = attr.IDAttraction;
-
-            if (DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKAttraction == idattraction && x.FKStatusPuy == 2 && x.FKTypeTickets == 2).FirstOrDefault() != null)
-                MessageBox.Show("Вы уже добавили такой билет, если хотите изменить количество, перейдите пожалуйста в раздел \"Билеты\"", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
-            else
-            {
-                Tickets tickets = new Tickets
-                {
-                    FKUser = DB.Iduser,
-                    FKAttraction = idattraction,
-                    FKTypeTickets = 2,
-                    FKStatusPuy = 2,
-                    Quantity = 1,
-                    Summ = Convert.ToDecimal(attr.PriceBaby),
-                    Date = DateTime.Now
-                };
-                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();
-            }
+            AddBabyAttractionSumm(idattraction, DB.Iduser);
         }
 
         public decimal Summ(decimal summ) //функция для вывода суммы добавленных билетов
         {
-            try //hmm...
+            try
             {
                 summ = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).Sum(x => x.Quantity * x.Summ);
             }
@@ -166,251 +354,232 @@ namespace mateo
 
         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) //уменьшение количества билетов
-        {
-            if ((sender as Button).DataContext is Tickets tickets)
+                stackAttraction.Visibility = Visibility.Hidden;
+                listAllAttraction.Visibility = Visibility.Hidden;
+                gridProfile.Visibility = Visibility.Hidden;
+                gridPlusBalance.Visibility = Visibility.Hidden;
+                gridTickets.Visibility = Visibility.Visible;
+            try
             {
-                if (tickets.Quantity == 1) MessageBox.Show("Количество не может быть меньше 1", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
-                else tickets.Quantity -= 1;
-                DB.GetContext().SaveChanges();
                 listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
                 decimal summ = 0;
                 summ = Summ(summ);
             }
+            catch(Exception ex)
+            {
+                MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+            }
         }
 
-        private void BtnTicketsPlus(object sender, RoutedEventArgs e) //увеличение количества билетов
+        private void BtnTicketsMinus(object sender, RoutedEventArgs e) //уменьшение количества билетов
         {
-            if ((sender as Button).DataContext is Tickets tickets)
+            try
             {
-                if (tickets.Quantity == 30) MessageBox.Show("Превышено количество билетов", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
-                else tickets.Quantity += 1;
-                DB.GetContext().SaveChanges();
-                listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
-                decimal summ = 0;
-                summ = Summ(summ);
+                if ((sender as Button).DataContext is Tickets tickets)
+                {
+                    TicketsMinus(tickets.Quantity);
+                }
+            }
+            catch(Exception ex)
+            {
+                MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
             }
         }
 
-        private void BtnDeleteTickets(object sender, RoutedEventArgs e) //удаление добавленных билетов
+        private void BtnTicketsPlus(object sender, RoutedEventArgs e) //увеличение количества билетов
         {
-            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
+                if ((sender as Button).DataContext is Tickets tickets)
                 {
-                    summ = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).Sum(x => x.Quantity * x.Summ);
+                    TicketsPlus(tickets.Quantity);
                 }
-                catch
-                {
-                    summ = 0;
-                }
-                if (summ == 0) txtSumm.Text = "Сумма: 0.00";
-
-                else txtSumm.Text = String.Format("Сумма: {0:0,00}", summ);
+            }
+            catch(Exception ex)
+            {
+                MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
             }
         }
 
-        private void BtnPuyAll(object sender, RoutedEventArgs e) //покупка всех добавленных билетов и заненсение в таблицу History
+        private void BtnDeleteTickets(object sender, RoutedEventArgs e) //удаление добавленных билетов
         {
-            if (DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).FirstOrDefault() == null)
+            try
             {
-                MessageBox.Show("Вы не выбрали билет, перейдите в раздел \"Услуги\", чтобы выбрать", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
-            }
+                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
+                    else txtSumm.Text = String.Format("Сумма: {0:0,00}", summ);
+                }
+            }
+            catch(Exception ex)
             {
-                decimal summ = 0;
-                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();
+                MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+            }
+        }
 
-                if (balance.Balance < summ)
+        private void BtnPuyAll(object sender, RoutedEventArgs e) //покупка всех добавленных билетов и заненсение в таблицу History /и выдача чека
+        {
+            try
+            {
+                if (DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).FirstOrDefault() == null)
                 {
-                    MessageBox.Show("У Вас недостаточно средств, пополните баланс и повторите попытку", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+                    MessageBox.Show("Вы не выбрали билет, перейдите в раздел \"Услуги\", чтобы выбрать", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
                 }
+
                 else
                 {
+                    summ = Summ(summ);
 
-                    #region ЧЕК
-                    SaveFileDialog saveFileDialog = new SaveFileDialog();
-                    saveFileDialog.Title = "Выберите место для сохранения чека";
-                    saveFileDialog.FileName = "Чек за " + DateTime.Now.ToShortDateString() + " - PDF";
-                    saveFileDialog.Filter = "PDF Files |*.pdf";
-                    if (saveFileDialog.ShowDialog() == true)
-                    {
-                        var application = new Word.Application();
-                        Word.Document document = application.Documents.Add();
-
-                        Word.Paragraph paragraph = document.Paragraphs.Add();
-                        Word.Range cellrange = paragraph.Range;
-                        Word.InlineShape inlineShape = cellrange.InlineShapes.AddPicture(@"C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\image\logocheck.png");
-                        inlineShape.Width = 400;
-                        inlineShape.Height = 100;
-                        paragraph.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
-                        cellrange.InsertParagraphAfter();
-
-                        Word.Paragraph paragraph2 = document.Paragraphs.Add();
-                        Word.Range range2 = paragraph2.Range;
-                        range2.Text = "Чек №1";
-                        paragraph2.set_Style("Заголовок");
-                        paragraph2.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
-                        range2.Font.Size = 18;
-                        range2.InsertParagraphAfter();
-
-                        //Word.Paragraph paragraph3 = document.Paragraphs.Add();
-                        //Word.Range range3 = paragraph3.Range;
-                        //range3.Text = "Дата: "+ DateTime.Now;
-                        //paragraph3.set_Style("Заголовок");
-                        //paragraph3.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight;
-                        //range3.Font.Size = 16;
-                        //range3.InsertParagraphAfter();
-
-
-
-
-
-                        var report = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
-
-                        Word.Paragraph tableparagraph = document.Paragraphs.Add();
-                        Word.Range tablerange = tableparagraph.Range;
-                        Word.Table paymentstable = document.Tables.Add(tablerange, report.Count() + 2, 2);
-                        paymentstable.Borders.InsideLineStyle = paymentstable.Borders.OutsideLineStyle = Word.WdLineStyle.wdLineStyleSingle;
-                        //paymentstable.Range.Cells.VerticalAlignment = Word.WdCellVerticalAlignment.wdCellAlignVerticalCenter;
-
-                        paymentstable.PreferredWidth = 400;
-
-                        paymentstable.Rows.Alignment = Word.WdRowAlignment.wdAlignRowCenter;
-                        paymentstable.Borders.OutsideColor = Word.WdColor.wdColorWhite;
-                        paymentstable.Borders.InsideColor = Word.WdColor.wdColorWhite;
-
-                        
-
-                        Word.Range cellRange;
-
-
-                        //paymentstable.Rows[1].Range.Bold = 1;
-                        //paymentstable.Rows[1].Range.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
-
-                        cellRange = paymentstable.Cell(1, 2).Range;
-                        cellRange.Text = "Дата: " + DateTime.Now;
-                        paymentstable.Cell(1, 2).Range.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight;
-                        range2.Font.Size = 16;
+                    var card = DB.GetContext().Users.Where(x => x.IDUsers == DB.Iduser).FirstOrDefault().FKCard;
+                    var balance = DB.GetContext().Card.Where(x => x.IDCard == card).FirstOrDefault();
 
-                        for (int i = 0; i < report.Count(); i++)
+                    if (balance.Balance < summ)
+                    {
+                        MessageBox.Show("У Вас недостаточно средств, пополните баланс и повторите попытку", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+                    }
+                    else
+                    {
+                        #region ЧЕК
+                        SaveFileDialog saveFileDialog = new SaveFileDialog();
+                        saveFileDialog.Title = "Выберите место для сохранения чека";
+                        saveFileDialog.FileName = "Чек за " + DateTime.Now.ToShortDateString() + " - PDF";
+                        saveFileDialog.Filter = "PDF Files |*.pdf";
+                        if (saveFileDialog.ShowDialog() == true)
                         {
-                            var orders = report[i];
-                            var type = DB.GetContext().TypeTickets.Where(x => x.IDTypeTickets == orders.FKTypeTickets).FirstOrDefault();
-
-                            cellRange = paymentstable.Cell(i + 2, 1).Range;
-                            cellRange.Text = orders.Attraction.NameAttraction + " (" + type.TypeTickets1 + ")" + " x" + orders.Quantity;
-                            cellRange.Font.Size = 14;
-
-                            paymentstable.Cell(i + 2, 2).Range.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight;
-                            cellRange.Font.Size = 14;
-                            cellRange = paymentstable.Cell(i + 2, 2).Range;
-                            decimal price = orders.Summ * orders.Quantity;
-                            cellRange.Text = String.Format("{0:0.00}",price).ToString() + " руб.";
+                            var application = new Word.Application();
+                            Word.Document document = application.Documents.Add();
+
+                            Word.Paragraph paragraph = document.Paragraphs.Add();
+                            Word.Range cellrange = paragraph.Range;
+                            Word.InlineShape inlineShape = cellrange.InlineShapes.AddPicture(@"C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\image\logocheck.png");
+                            inlineShape.Width = 400;
+                            inlineShape.Height = 100;
+                            paragraph.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
+                            cellrange.InsertParagraphAfter();
+
+                            Word.Paragraph paragraph2 = document.Paragraphs.Add();
+                            Word.Range range2 = paragraph2.Range;
+                            range2.Text = "Чек №" + (DB.GetContext().History.OrderByDescending(x => x.IDHistory).FirstOrDefault().IDHistory + 1).ToString();
+                            paragraph2.set_Style("Заголовок");
+                            paragraph2.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
+                            range2.Font.Size = 18;
+                            range2.InsertParagraphAfter();
+
+                            var report = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
+
+                            Word.Paragraph tableparagraph = document.Paragraphs.Add();
+                            Word.Range tablerange = tableparagraph.Range;
+                            Word.Table paymentstable = document.Tables.Add(tablerange, report.Count() + 2, 2);
+                            paymentstable.Borders.InsideLineStyle = paymentstable.Borders.OutsideLineStyle = Word.WdLineStyle.wdLineStyleSingle;
+
+                            paymentstable.PreferredWidth = 400;
+
+                            paymentstable.Rows.Alignment = Word.WdRowAlignment.wdAlignRowCenter;
+                            paymentstable.Borders.OutsideColor = Word.WdColor.wdColorWhite;
+                            paymentstable.Borders.InsideColor = Word.WdColor.wdColorWhite;
+
+                            Word.Range cellRange;
+
+                            cellRange = paymentstable.Cell(1, 1).Range;
+                            cellRange.Columns.SetWidth(application.CentimetersToPoints(10f), Word.WdRulerStyle.wdAdjustNone);
+
+                            cellRange = paymentstable.Cell(1, 2).Range;
+                            cellRange.Columns.SetWidth(application.CentimetersToPoints(5f), Word.WdRulerStyle.wdAdjustNone);
+                            cellRange.Text = "Дата: " + DateTime.Now;
+                            paymentstable.Cell(1, 2).Range.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight;
+                            range2.Font.Size = 16;
+
+                            for (int i = 0; i < report.Count(); i++)
+                            {
+                                var orders = report[i];
+                                var type = DB.GetContext().TypeTickets.Where(x => x.IDTypeTickets == orders.FKTypeTickets).FirstOrDefault();
+
+                                cellRange = paymentstable.Cell(i + 2, 1).Range;
+                                cellRange.Text = orders.Attraction.NameAttraction + " (" + type.TypeTickets1 + ")" + " x" + orders.Quantity;
+                                cellRange.Font.Size = 12;
+
+                                cellRange = paymentstable.Cell(i + 2, 2).Range;
+                                paymentstable.Cell(i + 2, 2).Range.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight;
+                                cellRange.Font.Size = 12;
+                                decimal price = orders.Summ * orders.Quantity;
+                                cellRange.Text = String.Format("{0:0.00}", price).ToString() + " руб.";
+                            }
+
+
+                            cellRange = paymentstable.Cell(report.Count() + 3, 1).Range;
+                            cellRange.Text = "Итого: " + String.Format("{0:0.00}", summ).ToString() + " руб.";
+                            cellRange.set_Style("Заголовок");
+                            cellRange.Bold = 1;
+                            paymentstable.Cell(report.Count() + 3, 1).Range.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphLeft;
+                            cellRange.Font.Size = 20;
+
+                            //№ карты
+                            cellRange.InsertParagraphAfter();
+                            tablerange.InsertParagraphAfter();
+
+
+                            Word.Paragraph paragraph3 = document.Paragraphs.Add();
+                            Word.Range range3 = paragraph3.Range;
+                            range3.Text = "-------------------------------------------------------------";
+                            paragraph3.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
+                            range3.Font.Size = 18;
+                            range3.InsertParagraphAfter();
+
+
+                            Word.Paragraph paragraph4 = document.Paragraphs.Add();
+                            Word.Range range4 = paragraph4.Range;
+                            range4.Text = "№ карты лояльности: " + balance.NumberCard;
+                            paragraph4.set_Style("Заголовок");
+                            paragraph4.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
+                            range4.Font.Size = 14;
+                            range4.InsertParagraphAfter();
+
+                            document.SaveAs2(saveFileDialog.FileName, Word.WdExportFormat.wdExportFormatPDF);
                         }
+                        #endregion
 
+                        balance.Balance -= Convert.ToDecimal(summ);
 
-                        cellRange = paymentstable.Cell(report.Count() + 3, 1).Range;
-                        cellRange.Text = "Итого: " + String.Format("{0:0.00}", summ).ToString() + " руб.";
-                        cellRange.set_Style("Заголовок");
-                        cellRange.Bold = 1;
-                        paymentstable.Cell(report.Count() + 3, 1).Range.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphLeft;
-                        cellRange.Font.Size = 20;
-
-                        //№ карты
-                        cellRange.InsertParagraphAfter();
-                        tablerange.InsertParagraphAfter();
-
-
-                        Word.Paragraph paragraph3 = document.Paragraphs.Add();
-                        Word.Range range3 = paragraph3.Range;
-                        range3.Text = "-------------------------------------------------------------";
-                        paragraph3.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
-                        range3.Font.Size = 18;
-                        range3.InsertParagraphAfter();
-
-
-                        Word.Paragraph paragraph4 = document.Paragraphs.Add();
-                        Word.Range range4 = paragraph4.Range;
-                        range4.Text = "№ карты лояльности: " + balance.NumberCard;
-                        paragraph4.set_Style("Заголовок");
-                        paragraph4.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
-                        range4.Font.Size = 14;
-                        range4.InsertParagraphAfter();
-
-
-
-                        //a+=2;
-                        //paymentstable.Cell(a + 2, 2).Range.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight;
-                        //cellRange = paymentstable.Cell(a + 2, 2).Range;
-                        //cellRange.Text = "Итого: " + String.Format("{0:0.00}", summ).ToString() + " руб.";
-                        //cellrange.set_Style("Заголовок");
-                        //cellrange.Bold = 1;
-                        //cellrange.Font.Size = 20;
-
+                        var tickets = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
+                        tickets.ForEach(x => x.FKStatusPuy = 1);
 
+                        History history = new History()
+                        {
+                            FKUser = DB.Iduser,
+                            DateTime = DateTime.Now,
+                            Summ = summ
+                        };
 
-                        //Word.Paragraph paragraph4 = document.Paragraphs.Add();
-                        //Word.Range range4 = paragraph4.Range;
-                        //range4.Text = "\nИтого: " + String.Format("{0:0.00}", summ).ToString() + " руб.";
-                        //paragraph4.set_Style("Заголовок");
-                        //range4.Bold = 1;
-                        //paragraph4.Alignment = Word.WdParagraphAlignment.wdAlignParagraphLeft;
-                        //range4.Font.Size = 20;
-                        //range4.InsertParagraphAfter();
-
+                        DB.GetContext().History.Add(history);
+                        DB.GetContext().SaveChanges();
+                        MessageBox.Show("Оплата прошла успешно", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+                        listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
 
-                        document.SaveAs2(saveFileDialog.FileName, Word.WdExportFormat.wdExportFormatPDF);
+                        summ = Summ(summ);
                     }
-                    #endregion
-
-
-                    balance.Balance -= Convert.ToDecimal(summ);
-
-                    var tickets = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
-                    tickets.ForEach(x => x.FKStatusPuy = 1);
-
-
-                    History history = new History()
-                    {
-                        FKUser = DB.Iduser,
-                        DateTime = DateTime.Now,
-                        Summ = summ
-                    };
-
-                    DB.GetContext().History.Add(history);
-                    DB.GetContext().SaveChanges();
-                    MessageBox.Show("Оплата прошла успешно", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
-
-                    listTickets.ItemsSource = DB.GetContext().Tickets.Where(x => x.FKUser == DB.Iduser && x.FKStatusPuy == 2).ToList();
-
-                    summ = Summ(summ);
-                } //была ; зачем-то :/
+                }
+            }
+            catch(Exception ex)
+            {
+                MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
             }
         }
 
         #endregion
 
-
         #region Раздел Профиль
         private void btnProfileClick(object sender, RoutedEventArgs e)
         {
@@ -425,69 +594,53 @@ namespace mateo
         {
             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 = "изменить фото";
+                AddChangePhoto(DB.Iduser);
             }
             catch (Exception ex)
             {
-                MessageBox.Show(ex.Message);
+                MessageBox.Show(ex.Message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
             }
             Update();
         }
 
         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 = "добавить фото";
-            Update();
+            try {
+                var fio = DB.GetContext().Users.FirstOrDefault(x => x.IDUsers == DB.Iduser);
+                fio.Image = null;
+                DB.GetContext().SaveChanges();
+                imgProfile.Source = null;
+                btnAddPhoto.Content = "добавить фото";
+                Update();
+            }
+            catch(Exception ex)
+            {
+                MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+            }
         }
-
         private void BtbBalance(object sender, RoutedEventArgs e) //кнопка Пополнить баланс, открываем форму для пополнения баланса
         {
             txtPlusBalabce.Text = "";
             gridPlusBalance.Visibility = Visibility.Visible;
         }
 
-        private void BtbPlusBalance(object sender, RoutedEventArgs e) //пополняем баланс (незакончено, надо чтобы пользователь вводил номер банковской карты)
+        private void BtbPlusBalance(object sender, RoutedEventArgs e) //пополняем баланс
         {
-            if (txtPlusBalabce.Text != "")
+            PlusBalance(card1.Text, card2.Text, card3.Text, card4.Text, txtPlusBalabce.Text, DB.Idcard);
+            Update();
+        }
+
+        private void txtchangedCard(object sender, TextChangedEventArgs e)
+        {
+            if (card1.Text.Length == 4) card2.Focus();
+            if (card2.Text.Length == 4) card3.Focus();
+            if (card3.Text.Length == 4) card4.Focus();
+
+            if (sender is TextBox textBox)
             {
-                try //типа проверка на введенные значения
-                {
-                    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;
-                    MessageBox.Show("Успешно", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
-                }
-                catch
-                {
-                    MessageBox.Show("Ошибка, проерьте введенные данные", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
-                }
+                textBox.Text = new string
+               (textBox.Text.Where(ch => (ch >= '0' && ch <= '9')).ToArray());
             }
-            //var fio = DB.GetContext().Users.FirstOrDefault(x => x.IDUsers == DB.Iduser); //типа зачем, видимо в тот раз не удалила когда функцию update седлала
-            //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)
@@ -498,7 +651,6 @@ namespace mateo
 
         #endregion
 
-
         #region Прочее
         private void btnLogout(object sender, RoutedEventArgs e)
         {
@@ -511,26 +663,26 @@ namespace mateo
             Application.Current.Shutdown();
         }
 
-        #region СоцСети
-        private void btn_whatsapp(object sender, RoutedEventArgs e)
-        {
+        //#region СоцСети
+        //private void btn_whatsapp(object sender, RoutedEventArgs e)
+        //{
 
-        }
+        //}
 
-        private void btn_gmail(object sender, RoutedEventArgs e)
-        {
+        //private void btn_gmail(object sender, RoutedEventArgs e)
+        //{
 
-        }
+        //}
 
-        private void btn_vk(object sender, RoutedEventArgs e)
-        {
+        //private void btn_vk(object sender, RoutedEventArgs e)
+        //{
 
-        }
-        private void btn_insta(object sender, RoutedEventArgs e)
-        {
+        //}
+        //private void btn_insta(object sender, RoutedEventArgs e)
+        //{
 
-        }
-        #endregion
+        //}
+        //#endregion
 
         #endregion
     }

+ 44 - 58
mateo/SysAdmin.xaml

@@ -12,7 +12,7 @@
         </Grid>
         <Grid Background="#30DB92" Margin="0,0,0,470">
             <Image Source="image/logosys.png" Margin="0,0,825,-17"/>
-            <TextBlock Name="txtFio_Admin" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" Margin="140,0,50,0"/>
+            <TextBlock Name="txtFio_Admin" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" FontFamily="Century Gothic" Margin="140,0,50,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>
@@ -24,7 +24,7 @@
 
         <TabControl BorderThickness="0" TabStripPlacement="Left" Margin="0,80,0,0">
 
-            <TabItem Header="Аттракционы" FontSize="16" Background="Transparent" Width="134" Height="48">
+            <TabItem Header="Аттракционы" FontSize="16" FontFamily="Century Gothic" Background="Transparent" Width="134" Height="48">
                 <Grid>
                     <DataGrid Name="datagridAttraction" AutoGenerateColumns="False" IsReadOnly="True" ColumnWidth="*" FontSize="12" Margin="0,0,0,60">
                         <DataGrid.Columns>
@@ -65,39 +65,38 @@
                         </DataGrid.Columns>
                     </DataGrid>
 
-                    <Button Content="Добавить аттракцион" FontSize="16" Background="Transparent" Click="BtnAddNewAttractionClick" Margin="638,404,10,10" />
+                    <Button Content="Добавить аттракцион" FontSize="16" FontFamily="Century Gothic" Background="Transparent" Click="BtnAddNewAttractionClick" Margin="620,404,10,10" />
 
                     <Grid x:Name="gridAddAttraction" Visibility="Hidden" Background="White">
                         <StackPanel Margin="20,82,448,73">
                             <StackPanel  Orientation="Horizontal" Height="43">
-                                <TextBlock Text="Наименование:" Width="140"/>
+                                <TextBlock Text="Наименование:" Width="150"/>
                                 <TextBox x:Name="txtName_Attraction" MaxLength="50" TextWrapping="Wrap" Width="200"/>
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Height="85">
-                                <TextBlock Text="Описание:" Width="140"/>
+                                <TextBlock Text="Описание:" Width="150"/>
                                 <TextBox x:Name="txtDescription_Attraction" MaxLength="200" TextWrapping="Wrap" Width="200"/>
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Height="30">
-                                <TextBlock Text="Количество мест:" Width="140"/>
+                                <TextBlock Text="Количество мест:" Width="150"/>
                                 <TextBox x:Name="txtQuantity_Attraction" Width="200"/>
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Height="30">
-                                <TextBlock Text="Цена old:" Width="140"/>
+                                <TextBlock Text="Цена (В):" Width="150"/>
                                 <TextBox x:Name="txtPriceOld_Attraction" Width="200"/>
-                            </StackPanel> 
+                            </StackPanel>
                             <StackPanel Orientation="Horizontal" Height="30">
-                                <TextBlock Text="Цена:" Width="140"/>
+                                <TextBlock Text="Цена (Д):" Width="150"/>
                                 <TextBox x:Name="txtPriceBaby_Attraction" Width="200"/>
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Height="30">
-                                <TextBlock Text="Статус:" Width="140"/>
+                                <TextBlock Text="Статус:" Width="150"/>
                                 <ComboBox Name="comboboxStatus_Attraction" DisplayMemberPath="StatusAttraction1" Background="Transparent" Width="200"/>
 
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Height="30">
-                                <TextBlock Text="Тип билета:" Width="140"/>
+                                <TextBlock Text="Тип билета:" Width="150"/>
                                 <ComboBox Name="comboboxType_Attraction" DisplayMemberPath="Type1" Background="Transparent" Width="200"/>
-
                             </StackPanel>
                         </StackPanel>
                         <Image x:Name="imageAdd_Attraction" Margin="402,82,151,187"/>
@@ -107,36 +106,35 @@
                     </Grid>
 
                     <Grid x:Name="gridChangeAttraction" Visibility="Hidden" Background="White">
-                        <StackPanel Margin="20,82,492,73">
+                        <StackPanel Margin="20,82,446,73">
                             <StackPanel  Orientation="Horizontal" Height="43">
-                                <TextBlock Text="Наименование:" Width="100"/>
+                                <TextBlock Text="Наименование:" Width="150"/>
                                 <TextBox x:Name="txtChange_NameAttraction" MaxLength="50" TextWrapping="Wrap" Width="200"/>
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Height="85">
-                                <TextBlock Text="Описание:" Width="100"/>
+                                <TextBlock Text="Описание:" Width="150"/>
                                 <TextBox x:Name="txtChange_Description" MaxLength="200" TextWrapping="Wrap" Width="200"/>
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Height="30">
-                                <TextBlock Text="Количество мест:" Width="100"/>
+                                <TextBlock Text="Количество мест:" Width="150"/>
                                 <TextBox x:Name="txtChange_Quantity" Width="200"/>
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Height="30">
-                                <TextBlock Text="Цена old:" Width="100"/>
+                                <TextBlock Text="Цена (В):" Width="150"/>
                                 <TextBox x:Name="txtChange_PriceOldAttraction" Width="200"/>
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Height="30">
-                                <TextBlock Text="Цена:" Width="100"/>
+                                <TextBlock Text="Цена (Д):" Width="150"/>
                                 <TextBox x:Name="txtChange_PriceBabyAttraction" Width="200"/>
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Height="30">
-                                <TextBlock Text="Статус:" Width="100"/>
+                                <TextBlock Text="Статус:" Width="150"/>
                                 <ComboBox Name="comboboxChange_StatusAttraction" DisplayMemberPath="StatusAttraction1" Background="Transparent" Width="200"/>
 
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Height="30">
-                                <TextBlock Text="Тип билета:" Width="100"/>
+                                <TextBlock Text="Тип билета:" Width="150"/>
                                 <ComboBox Name="comboboxChange_TypeAttraction" DisplayMemberPath="Type1" Background="Transparent" Width="200"/>
-
                             </StackPanel>
                         </StackPanel>
                         <Image x:Name="imageChange_Attraction" Margin="402,82,151,187"/>
@@ -148,7 +146,7 @@
             </TabItem>
 
 
-            <TabItem Header="Сотрудники" x:Name="tabEmployees" FontSize="16" Background="Transparent" Width="134" Height="48">
+            <TabItem Header="Сотрудники" x:Name="tabEmployees" FontSize="16" FontFamily="Century Gothic" Background="Transparent" Width="134" Height="48">
                 <Grid>
                     <DataGrid Name="datagridEmployees" AutoGenerateColumns="False" IsReadOnly="True" ColumnWidth="*" FontSize="12" Margin="0,0,0,60">
                         <DataGrid.Columns>
@@ -167,62 +165,38 @@
                         </DataGrid.Columns>
                     </DataGrid>
 
-                    <Button Content="Добавить сотрудника" FontSize="16" Background="Transparent" Click="BtnAddNewEmployeesClick" Margin="638,404,10,10" />
+                    <Button Content="Добавить сотрудника" FontSize="16" Background="Transparent" Click="BtnAddNewEmployeesClick" Margin="620,404,10,10" />
 
                     <Grid x:Name="gridAddEmployees" Visibility="Hidden" Background="White">
                         <StackPanel Margin="20,82,450,166">
                             <StackPanel  Orientation="Horizontal" Height="43">
-                                <TextBlock Text="Фамилия:" Width="140"/>
-                                <TextBox x:Name="txtLastName_Employyes" TextWrapping="Wrap" Width="200"/>
+                                <TextBlock Text="Фамилия:" FontFamily="Century Gothic" Width="140"/>
+                                <TextBox x:Name="txtLastName_Employyes" FontFamily="Century Gothic" TextWrapping="Wrap" Width="200"/>
                             </StackPanel>
                             <StackPanel  Orientation="Horizontal" Height="43">
-                                <TextBlock Text="Имя:" Width="140"/>
-                                <TextBox x:Name="txtFirstName_Employyes" TextWrapping="Wrap" Width="200"/>
+                                <TextBlock Text="Имя:" FontFamily="Century Gothic" Width="140"/>
+                                <TextBox x:Name="txtFirstName_Employyes" FontFamily="Century Gothic" TextWrapping="Wrap" Width="200"/>
                             </StackPanel>
                             <StackPanel  Orientation="Horizontal" Height="43">
-                                <TextBlock Text="Отчество:" Width="140"/>
-                                <TextBox x:Name="txtMiddleName_Employees" TextWrapping="Wrap" Width="200"/>
+                                <TextBlock Text="Отчество:" FontFamily="Century Gothic" Width="140"/>
+                                <TextBox x:Name="txtMiddleName_Employees" FontFamily="Century Gothic" TextWrapping="Wrap" Width="200"/>
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Height="30">
-                                <TextBlock Text="Роль:" Width="140"/>
-                                <ComboBox Name="comboboxRole_Employees" Background="Transparent" Width="200">
+                                <TextBlock Text="Роль:" FontFamily="Century Gothic" Width="140"/>
+                                <ComboBox Name="comboboxRole_Employees" FontFamily="Century Gothic" Background="Transparent" Width="200">
                                     <TextBlock Text="Системный администратор"/>
                                     <TextBlock Text="Администратор"/>
                                 </ComboBox>
                             </StackPanel>
                             <StackPanel Orientation="Horizontal" Height="30">
-                                <TextBlock Text="Статус:" Width="140"/>
+                                <TextBlock Text="Статус:" FontFamily="Century Gothic" Width="140"/>
                                 <ComboBox Name="comboboxStatus_Employees" Background="Transparent" Width="200">
                                     <TextBlock Text="Работает"/>
                                     <TextBlock Text="Уволен"/>
                                 </ComboBox>
                             </StackPanel>
                         </StackPanel>
-                        <!--<StackPanel Margin="440,82,62,267">
-                            --><!--<StackPanel Orientation="Horizontal" Height="30">
-                                <TextBlock Text="Логин" Width="140"/>
-                                <TextBox x:Name="txtLogin" MaxLength="8" Width="140"/>
-                            </StackPanel>--><!--
-                            <StackPanel Orientation="Horizontal" Height="30">
-                                <TextBlock Text="Пароль" Width="140"/>
-                                <Grid Width="110">
-                                    <TextBox x:Name="txtPassword" Visibility="Hidden"  TextChanged="txtPassword_TextChanged"/>
-                                    <PasswordBox x:Name="passPassword" MaxLength="8" Width="140"/>
-                                </Grid>
-                                <Grid>
-                                    <Button x:Name="imgVisible" Click="PasswordBoxInVisible" Width="30">
-                                        <Button.Background>
-                                            <ImageBrush ImageSource="image\visible.png" />
-                                        </Button.Background>
-                                    </Button>
-                                    <Button x:Name="imgInVisible" Visibility="Hidden" Click="PasswordBoxVisible" Width="30">
-                                        <Button.Background>
-                                            <ImageBrush ImageSource="image\invisible.png"/>
-                                        </Button.Background>
-                                    </Button>
-                                </Grid>
-                            </StackPanel>
-                        </StackPanel>-->
+
                         <Button Content="Добавить" FontSize="16" Background="Transparent" Click="BtnAddEmployeesClick" Margin="463,405,185,9" />
                         <Button Content="Отмена" FontSize="16" Background="Transparent" Click="BtnBackEmployeesClick" Margin="663,405,41,9" />
                     </Grid>
@@ -256,13 +230,25 @@
                                 </ComboBox>
                             </StackPanel>
                         </StackPanel>
-                       
+
                         <Button Content="Изменить" FontSize="16" Background="Transparent" Click="BtnSaveChangeEmployeesClick" Margin="463,405,185,9" />
                         <Button Content="Отмена" FontSize="16" Background="Transparent" Click="BtnBackEmployeesClick" Margin="663,405,41,9" />
                     </Grid>
 
                 </Grid>
             </TabItem>
+
+
+            <TabItem  Header="Отчёты" FontFamily="Century Gothic" FontSize="16" Background="Transparent" Width="134" Height="48">
+                <Grid>
+                    <DatePicker Name="datepicker" Width="200" HorizontalAlignment="Left" Margin="116,123,0,306"/>
+                    <TextBlock Text="Истории покупок" FontSize="18" HorizontalAlignment="Center" Margin="330,60,335,368"/>
+                    <ComboBox Name="comboboxNameAttraction" DisplayMemberPath="NameAttraction" Background="Transparent" Width="200" Margin="330,169,290,261"/>
+                    <Button Content="Сформировать отчёт" Click="BtnReport1" Margin="548,371,42,32"/>
+                    <TextBlock Text="Аттракцион" FontSize="18" HorizontalAlignment="Center" Margin="116,167,504,261" Width="200"/>
+
+                </Grid>
+            </TabItem>
         </TabControl>
     </Grid>
 </Window>

+ 355 - 140
mateo/SysAdmin.xaml.cs

@@ -13,6 +13,7 @@ using System.Windows.Input;
 using System.Windows.Media;
 using System.Windows.Media.Imaging;
 using System.Windows.Shapes;
+using Word = Microsoft.Office.Interop.Word;
 
 namespace mateo
 {
@@ -25,21 +26,29 @@ namespace mateo
         {
             InitializeComponent();
             var fio = DB.GetContext().Employees.FirstOrDefault(x => x.IDEmployees == DB.Idemployees);
-            txtFio_Admin.Text = DB.GetContext().Role.FirstOrDefault(x => x.IDRole == fio.FKRole).Role1 + "\n" + fio.LastName + " " + fio.FirstName + " " + fio.MiddleName;
+
+            if (DB.Idemployees != 0)
+            {
+                txtFio_Admin.Text = DB.GetContext().Role.FirstOrDefault(x => x.IDRole == fio.FKRole).Role1 + "\n" + fio.LastName + " " + fio.FirstName + " " + fio.MiddleName;
+                if (fio.FKRole == 2) //если простто админ скрываем доб сотрудников
+                    tabEmployees.Visibility = Visibility.Collapsed;
+            }
 
             datagridAttraction.ItemsSource = DB.GetContext().Attraction.ToList();
             datagridEmployees.ItemsSource = DB.GetContext().Employees.Where(x => x.IDEmployees != DB.Idemployees).ToList();
             comboboxChange_StatusAttraction.ItemsSource = comboboxStatus_Attraction.ItemsSource = DB.GetContext().StatusAttraction.ToList();
             comboboxChange_TypeAttraction.ItemsSource = comboboxType_Attraction.ItemsSource = DB.GetContext().Type.ToList();
 
-            if(fio.FKRole == 2) //если простто админ скрываем доб сотрудников/ может проверять не по id
-            tabEmployees.Visibility = Visibility.Hidden;
+            comboboxNameAttraction.ItemsSource = DB.GetContext().Attraction.ToList();//для отчета
+
+
+            
         }
 
-        #region attraction
-        private void BtnAddImage(object sender, RoutedEventArgs e)
+        #region Для тестов
+
+        public byte[] AddImage()
         {
-            //выбираем и выводим изображение в image_add_attraction
             string imageLoc;
             OpenFileDialog dld = new OpenFileDialog();
             dld.Filter = "JPG Files (*.jpg)|*.jpg|PNG Files (*.png)|*.png|JPEG Files (*.jpeg)|*.jpeg";
@@ -53,41 +62,285 @@ namespace mateo
                 BinaryReader br = new BinaryReader(fs);
                 image = br.ReadBytes((int)fs.Length);
             }
+            return image;
         }
 
-        private void BtnAddAttractionClick(object sender, RoutedEventArgs e)
+        public bool AddAttraction(int idemp, string name, string description, string quantity, string priceold, string pricebaby, byte[] image, string statusa, string typea)
         {
-            //добавляем новый аттракцион в бд
-            if (txtName_Attraction.Text != "" && txtDescription_Attraction.Text != "" && txtQuantity_Attraction.Text != "" && txtPriceOld_Attraction.Text != "" && txtPriceBaby_Attraction.Text != ""
-                && imageAdd_Attraction.Source != null && comboboxStatus_Attraction.Text != "" && comboboxType_Attraction.Text != "")
+            bool tf = false;
+            try
             {
-                var status = DB.GetContext().StatusAttraction.Where(x => x.StatusAttraction1 == comboboxStatus_Attraction.Text).FirstOrDefault();
-                var type = DB.GetContext().Type.Where(x => x.Type1 == comboboxType_Attraction.Text).FirstOrDefault();
-                Attraction attraction = new Attraction
+                if (name != "" && description != "" && quantity != "" && priceold != "" &&
+                    pricebaby != "" && image != null && statusa != "" && typea != "")
                 {
-                    NameAttraction = txtName_Attraction.Text,
-                    Description = txtDescription_Attraction.Text,
-                    QuantityAttraction = Convert.ToInt32(txtQuantity_Attraction.Text),
-                    PriceOld = Convert.ToDecimal(txtPriceOld_Attraction.Text),
-                    PriceBaby = Convert.ToDecimal(txtPriceBaby_Attraction.Text),
-                    ImageAttraction = image,
-                    FKEmployees = DB.Idemployees,
-                    FKStatusAttraction = status.IDStatusAttraction,
-                    FKType = type.IDType
-                };
-                DB.GetContext().Attraction.Add(attraction);
-                DB.GetContext().SaveChanges();
+                    var status = DB.GetContext().StatusAttraction.Where(x => x.StatusAttraction1 == statusa).FirstOrDefault();
+                    var type = DB.GetContext().Type.Where(x => x.Type1 == typea).FirstOrDefault();
+                    Attraction attraction = new Attraction
+                    {
+                        NameAttraction = name,
+                        Description = description,
+                        QuantityAttraction = Convert.ToInt32(quantity),
+                        PriceOld = Convert.ToDecimal(priceold),
+                        PriceBaby = Convert.ToDecimal(pricebaby),
+                        ImageAttraction = image,
+                        FKEmployees = idemp,
+                        FKStatusAttraction = status.IDStatusAttraction,
+                        FKType = type.IDType
+                    };
+                    DB.GetContext().Attraction.Add(attraction);
+                    DB.GetContext().SaveChanges();
+
+                    MessageBox.Show("Аттракцион добавлен", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+                    datagridAttraction.ItemsSource = DB.GetContext().Attraction.ToList();
+                    gridAddAttraction.Visibility = Visibility.Hidden;
+
+                    tf = true;
+                }
+                else MessageBox.Show("Пустые поля!", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+                return tf;
+            }
+            catch(Exception ex)
+            {
+                MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+                return false;
+            }
+        }
 
-                MessageBox.Show("dcscsd");
-                datagridAttraction.ItemsSource = DB.GetContext().Attraction.ToList();
-                gridAddAttraction.Visibility = Visibility.Hidden;
+        public bool AddEmployees(int idemp, string lname, string fname, string mname, string rolea, string statusa)
+        {
+            bool tf = false;
+            try
+            {
+                if (lname != "" && fname != "" && rolea != "" && statusa != "")
+                {
+                    var idemployees = DB.GetContext().Employees.OrderByDescending(x => x.IDEmployees).FirstOrDefault();
+                    string login = "admin" + (idemployees.IDEmployees + 1).ToString();
+
+                    Random random = new Random();
+                    int pass1 = random.Next(100, 999);
+                    var list = new List<string> { "a", "b", "c", "d", "e" };
+                    int index = random.Next(list.Count);
+                    int index1 = random.Next(list.Count);
+                    int index2 = random.Next(list.Count);
+                    int index3 = random.Next(list.Count);
+
+                    string password = list[index] + list[index1] + pass1 + list[index2] + list[index3];
+                    var status = DB.GetContext().StatusEmployees.Where(x => x.StatusEmployees1 == statusa).FirstOrDefault();
+                    var role = DB.GetContext().Role.Where(x => x.Role1 == rolea).FirstOrDefault();
+                    Employees employees = new Employees
+                    {
+                        LastName = lname,
+                        FirstName = fname,
+                        MiddleName = mname,
+                        Login = login,
+                        Password = password,
+                        FKRole = role.IDRole,
+                        FKStatusEmployees = status.IDStatusEmployees
+                    };
+                    DB.GetContext().Employees.Add(employees);
+                    DB.GetContext().SaveChanges();
+                    MessageBox.Show("Сотрудник добавлен", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+
+                    datagridEmployees.ItemsSource = DB.GetContext().Employees.Where(x => x.IDEmployees != idemp).ToList();
+                    gridAddEmployees.Visibility = Visibility.Hidden;
+
+                    tf = true;
+                }
+                else MessageBox.Show("Пустые поля!", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+
+                return tf;
             }
-            else MessageBox.Show("Пустые поля!");
+            catch(Exception ex)
+            {
+                MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+                return false;
+            }
+        }
+
+        public bool Report1(string dateP, string nameA)
+        {
+            DateTime datetime = DateTime.Now; 
+            if (dateP !="") datetime = Convert.ToDateTime(dateP);
+
+
+            bool tf = false;
+            var ticket = DB.GetContext().Tickets.ToList();
+
+            if (dateP == "" && nameA != "")
+                ticket = DB.GetContext().Tickets.Where(x => x.Attraction.NameAttraction == nameA).ToList();
+
+
+            if (nameA == "" && dateP != "")
+                ticket = DB.GetContext().Tickets.Where(x => x.Date == datetime).ToList();
+
+            if (nameA != "" && dateP != "")
+                ticket = DB.GetContext().Tickets.Where(x => x.Date == datetime && x.Attraction.NameAttraction == nameA).ToList();
+
+            if (nameA == "" && dateP == "") ticket = DB.GetContext().Tickets.ToList();
+
+            if (ticket.Count() <= 0)
+                MessageBox.Show("Невозможно сформировать отчёт, проверьте дату и аттракцион");
+
+            else
+            {
+                SaveFileDialog saveFileDialog = new SaveFileDialog();
+                saveFileDialog.Title = "Выберите место для сохранения отчёта";
+                saveFileDialog.FileName = "Отчет по истории за " + DateTime.Now.ToShortDateString() + " - PDF";
+                saveFileDialog.Filter = "PDF Files |*.pdf";
+
+                if (saveFileDialog.ShowDialog() == true)
+                {
+                    var application = new Word.Application();
+                    Word.Document document = application.Documents.Add();
+
+                    Word.Paragraph paragraph = document.Paragraphs.Add();
+                    Word.Range cellrange = paragraph.Range;
+                    Word.InlineShape inlineShape = cellrange.InlineShapes.AddPicture(@"C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\image\logocheck.png");
+                    inlineShape.Width = 400;
+                    inlineShape.Height = 100;
+                    paragraph.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
+                    cellrange.InsertParagraphAfter();
+
+                    Word.Paragraph paragraph2 = document.Paragraphs.Add();
+                    Word.Range range2 = paragraph2.Range;
+                    range2.Text = "Отчёт по истории";
+                    paragraph2.set_Style("Заголовок");
+                    paragraph2.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
+                    range2.Font.Size = 18;
+                    range2.InsertParagraphAfter();
+
+
+                    var group = DB.GetContext().Tickets.GroupBy(x => new { x.Attraction.NameAttraction, x.TypeTickets.TypeTickets1 }).
+                                                     Select(x => new
+                                                     {
+                                                         x.Key,
+                                                         Sum = x.Sum(y => y.Summ * y.Quantity),
+                                                         NameA = x.Select(y => y.Attraction.NameAttraction),
+                                                         TypeA = x.Select(y => y.TypeTickets.TypeTickets1),
+                                                         Quantity = x.Sum(y => y.Quantity)
+                                                     }).ToList();
+
+                    decimal sum = DB.GetContext().Tickets.Where(x => x.FKStatusPuy == 1).Sum(x => x.Quantity * x.Summ);
+
+                    if (dateP != "" && nameA == "")
+                    {
+                        group = DB.GetContext().Tickets.Where(x => x.Date == datetime).
+                                                          GroupBy(x => new { x.Attraction.NameAttraction, x.TypeTickets.TypeTickets1 }).
+                                                          Select(x => new
+                                                          {
+                                                              x.Key,
+                                                              Sum = x.Sum(y => y.Summ * y.Quantity),
+                                                              NameA = x.Select(y => y.Attraction.NameAttraction),
+                                                              TypeA = x.Select(y => y.TypeTickets.TypeTickets1),
+                                                              Quantity = x.Sum(y => y.Quantity)
+                                                          }).ToList();
+                        sum = DB.GetContext().Tickets.Where(x => x.FKStatusPuy == 1 && x.Date == datetime).Sum(x => x.Quantity * x.Summ);
+
+
+                    }
+
+                    else if (dateP == "" && nameA != "")
+                    {
+                        group = DB.GetContext().Tickets.Where(x => x.Attraction.NameAttraction == nameA).
+                                                         GroupBy(x => new { x.Attraction.NameAttraction, x.TypeTickets.TypeTickets1 }).
+                                                         Select(x => new
+                                                         {
+                                                             x.Key,
+                                                             Sum = x.Sum(y => y.Summ * y.Quantity),
+                                                             NameA = x.Select(y => y.Attraction.NameAttraction),
+                                                             TypeA = x.Select(y => y.TypeTickets.TypeTickets1),
+                                                             Quantity = x.Sum(y => y.Quantity)
+                                                         }).ToList();
+
+                        sum = DB.GetContext().Tickets.Where(x => x.FKStatusPuy == 1 && x.Attraction.NameAttraction == nameA).Sum(x => x.Quantity * x.Summ);
+                    }
+
+                    else if (dateP != "" && nameA != "")
+                    {
+                        group = DB.GetContext().Tickets.Where(x => x.Date == datetime && x.Attraction.NameAttraction == nameA).
+                                                         GroupBy(x => new { x.Attraction.NameAttraction, x.TypeTickets.TypeTickets1 }).
+                                                         Select(x => new
+                                                         {
+                                                             x.Key,
+                                                             Sum = x.Sum(y => y.Summ * y.Quantity),
+                                                             NameA = x.Select(y => y.Attraction.NameAttraction),
+                                                             TypeA = x.Select(y => y.TypeTickets.TypeTickets1),
+                                                             Quantity = x.Sum(y => y.Quantity)
+                                                         }).ToList();
+
+                        sum = DB.GetContext().Tickets.Where(x => x.FKStatusPuy == 1 && x.Date == datetime && x.Attraction.NameAttraction == nameA).Sum(x => x.Quantity * x.Summ);
+                    }
+
+                    Word.Paragraph tableparagraph = document.Paragraphs.Add();
+                    Word.Range tablerange = tableparagraph.Range;
+                    Word.Table paymentstable = document.Tables.Add(tablerange, group.Count() + 2, 2);
+                    paymentstable.Borders.InsideLineStyle = paymentstable.Borders.OutsideLineStyle = Word.WdLineStyle.wdLineStyleSingle;
+
+                    paymentstable.PreferredWidth = 500;
+                    paymentstable.Rows.Alignment = Word.WdRowAlignment.wdAlignRowCenter;
+
+                    Word.Range cellRange;
+
+                    cellRange = paymentstable.Cell(1, 2).Range;
+                    cellRange.Text = "Дата формирования: " + DateTime.Now;
+                    paymentstable.Cell(1, 2).Range.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight;
+                    range2.Font.Size = 18;
+
+                    for (int i = 0; i < group.Count(); i++)
+                    {
+                        var orders = group[i];
+
+                        cellRange = paymentstable.Cell(i + 2, 1).Range;
+                        cellRange.Text = orders.NameA.FirstOrDefault() + " (" + orders.TypeA.FirstOrDefault() + ")" + " x" + orders.Quantity;
+                        cellRange.Font.Size = 12;
+
+                        cellRange = paymentstable.Cell(i + 2, 2).Range;
+                        cellRange.Text = String.Format("{0:0.00}", orders.Sum).ToString() + " руб.";
+                    }
+
+                    cellRange = paymentstable.Cell(group.Count() + 3, 1).Range;
+                    cellRange.Text = "Итого: " + String.Format("{0:0.00}", sum) + " руб.";
+                    cellRange.set_Style("Заголовок");
+                    cellRange.Bold = 1;
+                    paymentstable.Cell(group.Count() + 3, 1).Range.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphLeft;
+                    cellRange.Font.Size = 18;
+
+                    document.SaveAs2(saveFileDialog.FileName, Word.WdExportFormat.wdExportFormatPDF);
+                    MessageBox.Show("Отчёт сформирован", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+
+                    tf = true;
+
+                }
+            }
+            
+            return tf;
+        }
+        #endregion
+
+
+        #region Аттракционы
+
+        #region Добавление
+        private void BtnAddNewAttractionClick(object sender, RoutedEventArgs e)
+        {
+            gridAddAttraction.Visibility = Visibility.Visible;
+        }
+
+        private void BtnAddImage(object sender, RoutedEventArgs e) //выбираем и выводим изображение в imageAdd_Attraction
+        {
+            AddImage();
         }
-        private void BtnChangeAttractionClick(object sender, RoutedEventArgs e)
+
+        private void BtnAddAttractionClick(object sender, RoutedEventArgs e) //добавляем новый аттракцион в бд
         {
-            //выводим данные из datagrid в grid чтобы потом изменить
-            if(datagridAttraction.SelectedItem is Attraction attraction)
+            AddAttraction(DB.Idemployees,txtName_Attraction.Text,txtDescription_Attraction.Text,txtQuantity_Attraction.Text,txtPriceOld_Attraction.Text,txtPriceBaby_Attraction.Text,image,comboboxStatus_Attraction.Text,comboboxType_Attraction.Text);
+        }
+        #endregion
+
+        #region Изменение
+        private void BtnChangeAttractionClick(object sender, RoutedEventArgs e) //выводим данные из datagrid в grid чтобы потом изменить
+        {
+            if (datagridAttraction.SelectedItem is Attraction attraction)
             {
                 idattraction = attraction.IDAttraction;
                 txtChange_NameAttraction.Text = attraction.NameAttraction;
@@ -110,12 +363,29 @@ namespace mateo
                 gridChangeAttraction.Visibility = Visibility.Visible;
             }
         }
-        private void BtnSaveChangeClick(object sender, RoutedEventArgs e)
+
+        private void BtnChangeImageClick(object sender, RoutedEventArgs e) //выбираем и выводим изображение в imageChange_Attraction
         {
-            if (txtChange_NameAttraction.Text != "" && txtChange_Description.Text != "" && txtChange_Quantity.Text != "" && txtChange_PriceOldAttraction.Text != "" && txtChange_PriceBabyAttraction.Text != ""
-               && imageChange_Attraction.Source != null && comboboxChange_StatusAttraction.Text != "" && comboboxChange_TypeAttraction.Text != "")
+            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;
+                imageChange_Attraction.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);
+            }
+        }
+
+        private void BtnSaveChangeClick(object sender, RoutedEventArgs e) //вносим изменения из gridChangeAttraction в бд
+        {
+            if (txtChange_NameAttraction.Text != "" && txtChange_Description.Text != "" && txtChange_Quantity.Text != "" && txtChange_PriceOldAttraction.Text != "" && 
+                txtChange_PriceBabyAttraction.Text != "" && imageChange_Attraction.Source != null && comboboxChange_StatusAttraction.Text != "" && comboboxChange_TypeAttraction.Text != "")
             {
-                //вносим изменения из change_attraction_grid в бд
                 var attr = DB.GetContext().Attraction.Where(x => x.IDAttraction == idattraction).FirstOrDefault();
                 var type = DB.GetContext().Type.Where(x => x.Type1 == comboboxChange_TypeAttraction.Text).FirstOrDefault();
 
@@ -129,19 +399,19 @@ namespace mateo
                 var status = DB.GetContext().StatusAttraction.Where(x => x.StatusAttraction1 == comboboxChange_StatusAttraction.Text).FirstOrDefault();
                 attr.FKStatusAttraction = status.IDStatusAttraction;
 
-                attr.FKType = type.IDType; 
+                attr.FKType = type.IDType;
 
                 attr.ImageAttraction = image;
                 DB.GetContext().SaveChanges();
-                MessageBox.Show("4444444444444444");
+                MessageBox.Show("Изменения сохранены", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
 
                 gridChangeAttraction.Visibility = Visibility.Hidden;
                 datagridAttraction.Visibility = Visibility.Visible;
                 datagridAttraction.ItemsSource = DB.GetContext().Attraction.ToList();
             }
-            else MessageBox.Show("Пустые поля!");
+            else MessageBox.Show("Пустые поля!", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
         }
-
+        #endregion
         private void BtnBackAttractionClick(object sender, RoutedEventArgs e)
         {
             gridAddAttraction.Visibility = Visibility.Hidden;
@@ -149,39 +419,25 @@ namespace mateo
             datagridAttraction.Visibility = Visibility.Visible;
         }
 
-        private void BtnChangeImageClick(object sender, RoutedEventArgs e)
-        {
-            //выбираем и выводим изображение в image_change_attraction
-            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;
-                imageChange_Attraction.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);
-            }
-        }
+        #endregion
 
-        private void BtnAddNewAttractionClick(object sender, RoutedEventArgs e)
+        #region Сотрудники
+
+        #region Добавление
+        private void BtnAddEmployeesClick(object sender, RoutedEventArgs e) //добавляем нового администратора в бд
         {
-            gridAddAttraction.Visibility = Visibility.Visible;
+            AddEmployees(DB.Idemployees, txtLastName_Employyes.Text, txtFirstName_Employyes.Text, txtMiddleName_Employees.Text, comboboxRole_Employees.Text, comboboxStatus_Employees.Text);
         }
-        #endregion
 
-        private void BtnExit(object sender, RoutedEventArgs e)
+        private void BtnAddNewEmployeesClick(object sender, RoutedEventArgs e)
         {
-            Application.Current.Shutdown();
-
+            gridAddEmployees.Visibility = Visibility.Visible;
         }
+        #endregion
 
-        private void BtnChangeEmployeesClick(object sender, RoutedEventArgs e)
+        #region Изменение
+        private void BtnChangeEmployeesClick(object sender, RoutedEventArgs e) //выводим данные из datagrid в grid чтобы потом изменить
         {
-            //выводим данные из datagrid в grid чтобы потом изменить
             if (datagridEmployees.SelectedItem is Employees employees)
             {
                 idemployees = employees.IDEmployees;
@@ -194,58 +450,6 @@ namespace mateo
                 comboboxStatus_ChangeEmployees.Text = employees.StatusEmployees.StatusEmployees1;
             }
         }
-
-        private void BtnAddEmployeesClick(object sender, RoutedEventArgs e)
-        {
-            //добавляем нового администратора в бд
-            if (txtLastName_Employyes.Text != "" && txtFirstName_Employyes.Text != "" && 
-                comboboxRole_Employees.Text != "" && comboboxStatus_Employees.Text != "")
-            {
-                var idemployees = DB.GetContext().Employees.OrderByDescending(x => x.IDEmployees).FirstOrDefault();
-                string login = "admin" + (idemployees.IDEmployees + 1).ToString();
-
-                Random random = new Random();
-                int pass1 = random.Next(100,999);
-                var list = new List<string> { "a", "b", "c", "d", "e" };
-                int index = random.Next(list.Count);
-                int index1 = random.Next(list.Count);
-                int index2 = random.Next(list.Count);
-                int index3 = random.Next(list.Count);
-
-                string password = list[index] + list[index1] + pass1 + list[index2] + list[index3];
-                var status = DB.GetContext().StatusEmployees.Where(x => x.StatusEmployees1 == comboboxStatus_Employees.Text).FirstOrDefault();
-                var role = DB.GetContext().Role.Where(x => x.Role1 == comboboxRole_Employees.Text).FirstOrDefault();
-                Employees employees = new Employees
-                {
-                    LastName = txtLastName_Employyes.Text,
-                    FirstName = txtFirstName_Employyes.Text,
-                    MiddleName = txtMiddleName_Employees.Text,
-                    Login = login,
-                    Password = password,
-                    FKRole = role.IDRole,
-                    FKStatusEmployees = status.IDStatusEmployees
-                };
-                DB.GetContext().Employees.Add(employees);
-                DB.GetContext().SaveChanges();
-                MessageBox.Show("Сотрудник добавлен", "Информация", MessageBoxButton.OK, MessageBoxImage.Information);
-
-                datagridEmployees.ItemsSource = DB.GetContext().Employees.Where(x => x.IDEmployees != DB.Idemployees).ToList();
-                gridAddEmployees.Visibility = Visibility.Hidden;
-            }
-            else MessageBox.Show("Пустые поля!");
-        }
-        private void BtnBackEmployeesClick(object sender, RoutedEventArgs e)
-        {
-            gridAddEmployees.Visibility = Visibility.Hidden;
-            datagridEmployees.Visibility = Visibility.Visible;
-            gridChangeEmployees.Visibility = Visibility.Hidden;
-        }
-
-        private void BtnAddNewEmployeesClick(object sender, RoutedEventArgs e)
-        {
-            gridAddEmployees.Visibility = Visibility.Visible;
-        }
-
         private void BtnSaveChangeEmployeesClick(object sender, RoutedEventArgs e)
         {
             if (txtLastName_ChangeEmployyes.Text != "" && txtFirstName_ChangeEmployyes.Text != "" &&
@@ -275,35 +479,46 @@ namespace mateo
             }
             else MessageBox.Show("Пустые поля!");
         }
+        #endregion        
+        private void BtnBackEmployeesClick(object sender, RoutedEventArgs e)
+        {
+            gridAddEmployees.Visibility = Visibility.Hidden;
+            datagridEmployees.Visibility = Visibility.Visible;
+            gridChangeEmployees.Visibility = Visibility.Hidden;
+        }
+        #endregion
+
+        private void BtnReport1(object sender, RoutedEventArgs e) //отчёт по истории
+        {
+            try
+            {
+                string dateP = "";
+                string nameA = "";
+
+                if (datepicker.SelectedDate == null) dateP = "";
+                else dateP = datepicker.SelectedDate.ToString();
+
+                if (comboboxNameAttraction.SelectedItem == null) nameA = "";
+                else nameA = comboboxNameAttraction.SelectedItem.ToString();
+                Report1(dateP, nameA);
+                
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show(ex.ToString(), "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
+            }
+        }
 
         private void btnLogout(object sender, RoutedEventArgs e)
-        { 
+        {
             First first = new First();
             first.Show();
             this.Close();
         }
 
-        //private void txtPassword_TextChanged(object sender, TextChangedEventArgs e)
-        //{
-        //    passPassword.Password = txtPassword.Text;
-        //}
-
-        //private void PasswordBoxInVisible(object sender, RoutedEventArgs e)
-        //{
-        //    imgInVisible.Visibility = Visibility.Visible;
-        //    imgVisible.Visibility = Visibility.Hidden;
-        //    txtPassword.Visibility = Visibility.Visible;
-        //    txtPassword.Text = passPassword.Password;
-        //    passPassword.Visibility = Visibility.Hidden;
-        //}
-
-        //private void PasswordBoxVisible(object sender, RoutedEventArgs e)
-        //{
-        //    //показать
-        //    imgVisible.Visibility = Visibility.Visible;
-        //    imgInVisible.Visibility = Visibility.Hidden;
-        //    txtPassword.Visibility = Visibility.Hidden;
-        //    passPassword.Visibility = Visibility.Visible;
-        //}
+        private void BtnExit(object sender, RoutedEventArgs e)
+        {
+            Application.Current.Shutdown();
+        }
     }
 }

二進制
mateo/bin/Debug/mateo.exe


二進制
mateo/bin/Debug/mateo.pdb


二進制
mateo/obj/Debug/DesignTimeResolveAssemblyReferences.cache


二進制
mateo/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


二進制
mateo/obj/Debug/First.baml


+ 205 - 27
mateo/obj/Debug/First.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\First.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1A1B11D91A679844FA832CF4C351344E8D90CABF6597AADFB047B3568CEAC085"
+#pragma checksum "..\..\First.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "943768E241201A5A45F19099A170C3CCBE15F9BE9B3EABCA8918ECB69B4FBDF5"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -41,7 +41,7 @@ namespace mateo {
     public partial class First : System.Windows.Window, System.Windows.Markup.IComponentConnector {
         
         
-        #line 11 "..\..\First.xaml"
+        #line 10 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button exit;
         
@@ -49,7 +49,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 20 "..\..\First.xaml"
+        #line 18 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid grid_vhod;
         
@@ -59,13 +59,29 @@ namespace mateo {
         
         #line 21 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtlogin;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 22 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_login;
         
         #line default
         #line hidden
         
         
-        #line 23 "..\..\First.xaml"
+        #line 25 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtpass;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 26 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.PasswordBox vvod_pass;
         
@@ -73,7 +89,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 25 "..\..\First.xaml"
+        #line 29 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button vhod;
         
@@ -81,7 +97,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 26 "..\..\First.xaml"
+        #line 30 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button registr;
         
@@ -89,7 +105,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 29 "..\..\First.xaml"
+        #line 33 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid grid_registr;
         
@@ -97,7 +113,23 @@ namespace mateo {
         #line hidden
         
         
-        #line 34 "..\..\First.xaml"
+        #line 39 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button cancel;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 42 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtlastreg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 43 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_LNAME;
         
@@ -105,7 +137,15 @@ namespace mateo {
         #line hidden
         
         
-        #line 36 "..\..\First.xaml"
+        #line 46 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtfirstreg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 47 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_FNAME;
         
@@ -113,7 +153,15 @@ namespace mateo {
         #line hidden
         
         
-        #line 38 "..\..\First.xaml"
+        #line 50 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtmiddlereg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 51 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_MNAME;
         
@@ -121,7 +169,15 @@ namespace mateo {
         #line hidden
         
         
-        #line 40 "..\..\First.xaml"
+        #line 54 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtloginreg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 55 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_login_reg;
         
@@ -129,7 +185,15 @@ namespace mateo {
         #line hidden
         
         
-        #line 42 "..\..\First.xaml"
+        #line 58 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtpassreg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 59 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.PasswordBox vvod_pass_reg;
         
@@ -137,7 +201,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 44 "..\..\First.xaml"
+        #line 62 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button registr2;
         
@@ -177,7 +241,7 @@ namespace mateo {
             case 1:
             this.exit = ((System.Windows.Controls.Button)(target));
             
-            #line 11 "..\..\First.xaml"
+            #line 10 "..\..\First.xaml"
             this.exit.Click += new System.Windows.RoutedEventHandler(this.btn_exit);
             
             #line default
@@ -187,51 +251,165 @@ namespace mateo {
             this.grid_vhod = ((System.Windows.Controls.Grid)(target));
             return;
             case 3:
-            this.vvod_login = ((System.Windows.Controls.TextBox)(target));
+            this.txtlogin = ((System.Windows.Controls.TextBlock)(target));
             return;
             case 4:
-            this.vvod_pass = ((System.Windows.Controls.PasswordBox)(target));
+            this.vvod_login = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 22 "..\..\First.xaml"
+            this.vvod_login.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 23 "..\..\First.xaml"
+            this.vvod_login.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtPasswordLogin_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
             case 5:
+            this.txtpass = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 6:
+            this.vvod_pass = ((System.Windows.Controls.PasswordBox)(target));
+            
+            #line 26 "..\..\First.xaml"
+            this.vvod_pass.PasswordChanged += new System.Windows.RoutedEventHandler(this.passchangedPass);
+            
+            #line default
+            #line hidden
+            
+            #line 27 "..\..\First.xaml"
+            this.vvod_pass.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtPasswordLogin_PreviewTextInput);
+            
+            #line default
+            #line hidden
+            return;
+            case 7:
             this.vhod = ((System.Windows.Controls.Button)(target));
             
-            #line 25 "..\..\First.xaml"
+            #line 29 "..\..\First.xaml"
             this.vhod.Click += new System.Windows.RoutedEventHandler(this.btn_vhod);
             
             #line default
             #line hidden
             return;
-            case 6:
+            case 8:
             this.registr = ((System.Windows.Controls.Button)(target));
             
-            #line 26 "..\..\First.xaml"
+            #line 30 "..\..\First.xaml"
             this.registr.Click += new System.Windows.RoutedEventHandler(this.btn_registr);
             
             #line default
             #line hidden
             return;
-            case 7:
+            case 9:
             this.grid_registr = ((System.Windows.Controls.Grid)(target));
             return;
-            case 8:
+            case 10:
+            this.cancel = ((System.Windows.Controls.Button)(target));
+            
+            #line 39 "..\..\First.xaml"
+            this.cancel.Click += new System.Windows.RoutedEventHandler(this.btnCancel);
+            
+            #line default
+            #line hidden
+            return;
+            case 11:
+            this.txtlastreg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 12:
             this.vvod_LNAME = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 43 "..\..\First.xaml"
+            this.vvod_LNAME.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 44 "..\..\First.xaml"
+            this.vvod_LNAME.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtFIO_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 9:
+            case 13:
+            this.txtfirstreg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 14:
             this.vvod_FNAME = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 47 "..\..\First.xaml"
+            this.vvod_FNAME.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 48 "..\..\First.xaml"
+            this.vvod_FNAME.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtFIO_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 10:
+            case 15:
+            this.txtmiddlereg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 16:
             this.vvod_MNAME = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 51 "..\..\First.xaml"
+            this.vvod_MNAME.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 52 "..\..\First.xaml"
+            this.vvod_MNAME.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtFIO_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 11:
+            case 17:
+            this.txtloginreg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 18:
             this.vvod_login_reg = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 55 "..\..\First.xaml"
+            this.vvod_login_reg.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 56 "..\..\First.xaml"
+            this.vvod_login_reg.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtPasswordLogin_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 12:
+            case 19:
+            this.txtpassreg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 20:
             this.vvod_pass_reg = ((System.Windows.Controls.PasswordBox)(target));
+            
+            #line 59 "..\..\First.xaml"
+            this.vvod_pass_reg.PasswordChanged += new System.Windows.RoutedEventHandler(this.passchangedPass);
+            
+            #line default
+            #line hidden
+            
+            #line 60 "..\..\First.xaml"
+            this.vvod_pass_reg.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtPasswordLogin_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 13:
+            case 21:
             this.registr2 = ((System.Windows.Controls.Button)(target));
             
-            #line 44 "..\..\First.xaml"
+            #line 62 "..\..\First.xaml"
             this.registr2.Click += new System.Windows.RoutedEventHandler(this.btn_regist2);
             
             #line default

+ 205 - 27
mateo/obj/Debug/First.g.i.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\First.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "1A1B11D91A679844FA832CF4C351344E8D90CABF6597AADFB047B3568CEAC085"
+#pragma checksum "..\..\First.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "943768E241201A5A45F19099A170C3CCBE15F9BE9B3EABCA8918ECB69B4FBDF5"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -41,7 +41,7 @@ namespace mateo {
     public partial class First : System.Windows.Window, System.Windows.Markup.IComponentConnector {
         
         
-        #line 11 "..\..\First.xaml"
+        #line 10 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button exit;
         
@@ -49,7 +49,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 20 "..\..\First.xaml"
+        #line 18 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid grid_vhod;
         
@@ -59,13 +59,29 @@ namespace mateo {
         
         #line 21 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtlogin;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 22 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_login;
         
         #line default
         #line hidden
         
         
-        #line 23 "..\..\First.xaml"
+        #line 25 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtpass;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 26 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.PasswordBox vvod_pass;
         
@@ -73,7 +89,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 25 "..\..\First.xaml"
+        #line 29 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button vhod;
         
@@ -81,7 +97,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 26 "..\..\First.xaml"
+        #line 30 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button registr;
         
@@ -89,7 +105,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 29 "..\..\First.xaml"
+        #line 33 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid grid_registr;
         
@@ -97,7 +113,23 @@ namespace mateo {
         #line hidden
         
         
-        #line 34 "..\..\First.xaml"
+        #line 39 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button cancel;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 42 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtlastreg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 43 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_LNAME;
         
@@ -105,7 +137,15 @@ namespace mateo {
         #line hidden
         
         
-        #line 36 "..\..\First.xaml"
+        #line 46 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtfirstreg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 47 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_FNAME;
         
@@ -113,7 +153,15 @@ namespace mateo {
         #line hidden
         
         
-        #line 38 "..\..\First.xaml"
+        #line 50 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtmiddlereg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 51 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_MNAME;
         
@@ -121,7 +169,15 @@ namespace mateo {
         #line hidden
         
         
-        #line 40 "..\..\First.xaml"
+        #line 54 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtloginreg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 55 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_login_reg;
         
@@ -129,7 +185,15 @@ namespace mateo {
         #line hidden
         
         
-        #line 42 "..\..\First.xaml"
+        #line 58 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtpassreg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 59 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.PasswordBox vvod_pass_reg;
         
@@ -137,7 +201,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 44 "..\..\First.xaml"
+        #line 62 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button registr2;
         
@@ -177,7 +241,7 @@ namespace mateo {
             case 1:
             this.exit = ((System.Windows.Controls.Button)(target));
             
-            #line 11 "..\..\First.xaml"
+            #line 10 "..\..\First.xaml"
             this.exit.Click += new System.Windows.RoutedEventHandler(this.btn_exit);
             
             #line default
@@ -187,51 +251,165 @@ namespace mateo {
             this.grid_vhod = ((System.Windows.Controls.Grid)(target));
             return;
             case 3:
-            this.vvod_login = ((System.Windows.Controls.TextBox)(target));
+            this.txtlogin = ((System.Windows.Controls.TextBlock)(target));
             return;
             case 4:
-            this.vvod_pass = ((System.Windows.Controls.PasswordBox)(target));
+            this.vvod_login = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 22 "..\..\First.xaml"
+            this.vvod_login.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 23 "..\..\First.xaml"
+            this.vvod_login.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtPasswordLogin_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
             case 5:
+            this.txtpass = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 6:
+            this.vvod_pass = ((System.Windows.Controls.PasswordBox)(target));
+            
+            #line 26 "..\..\First.xaml"
+            this.vvod_pass.PasswordChanged += new System.Windows.RoutedEventHandler(this.passchangedPass);
+            
+            #line default
+            #line hidden
+            
+            #line 27 "..\..\First.xaml"
+            this.vvod_pass.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtPasswordLogin_PreviewTextInput);
+            
+            #line default
+            #line hidden
+            return;
+            case 7:
             this.vhod = ((System.Windows.Controls.Button)(target));
             
-            #line 25 "..\..\First.xaml"
+            #line 29 "..\..\First.xaml"
             this.vhod.Click += new System.Windows.RoutedEventHandler(this.btn_vhod);
             
             #line default
             #line hidden
             return;
-            case 6:
+            case 8:
             this.registr = ((System.Windows.Controls.Button)(target));
             
-            #line 26 "..\..\First.xaml"
+            #line 30 "..\..\First.xaml"
             this.registr.Click += new System.Windows.RoutedEventHandler(this.btn_registr);
             
             #line default
             #line hidden
             return;
-            case 7:
+            case 9:
             this.grid_registr = ((System.Windows.Controls.Grid)(target));
             return;
-            case 8:
+            case 10:
+            this.cancel = ((System.Windows.Controls.Button)(target));
+            
+            #line 39 "..\..\First.xaml"
+            this.cancel.Click += new System.Windows.RoutedEventHandler(this.btnCancel);
+            
+            #line default
+            #line hidden
+            return;
+            case 11:
+            this.txtlastreg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 12:
             this.vvod_LNAME = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 43 "..\..\First.xaml"
+            this.vvod_LNAME.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 44 "..\..\First.xaml"
+            this.vvod_LNAME.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtFIO_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 9:
+            case 13:
+            this.txtfirstreg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 14:
             this.vvod_FNAME = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 47 "..\..\First.xaml"
+            this.vvod_FNAME.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 48 "..\..\First.xaml"
+            this.vvod_FNAME.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtFIO_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 10:
+            case 15:
+            this.txtmiddlereg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 16:
             this.vvod_MNAME = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 51 "..\..\First.xaml"
+            this.vvod_MNAME.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 52 "..\..\First.xaml"
+            this.vvod_MNAME.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtFIO_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 11:
+            case 17:
+            this.txtloginreg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 18:
             this.vvod_login_reg = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 55 "..\..\First.xaml"
+            this.vvod_login_reg.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 56 "..\..\First.xaml"
+            this.vvod_login_reg.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtPasswordLogin_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 12:
+            case 19:
+            this.txtpassreg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 20:
             this.vvod_pass_reg = ((System.Windows.Controls.PasswordBox)(target));
+            
+            #line 59 "..\..\First.xaml"
+            this.vvod_pass_reg.PasswordChanged += new System.Windows.RoutedEventHandler(this.passchangedPass);
+            
+            #line default
+            #line hidden
+            
+            #line 60 "..\..\First.xaml"
+            this.vvod_pass_reg.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtPasswordLogin_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 13:
+            case 21:
             this.registr2 = ((System.Windows.Controls.Button)(target));
             
-            #line 44 "..\..\First.xaml"
+            #line 62 "..\..\First.xaml"
             this.registr2.Click += new System.Windows.RoutedEventHandler(this.btn_regist2);
             
             #line default

二進制
mateo/obj/Debug/MainWindow.baml


+ 143 - 96
mateo/obj/Debug/MainWindow.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4274B07DD1B90645C84B80641EFBCC99CB86CFA5D08968906E27058331D9C356"
+#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0DE9641A5D096A0287D6C6210283671BC4B1FD870B31BE5B1D2BD22DB32F0E1C"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -49,7 +49,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 73 "..\..\MainWindow.xaml"
+        #line 72 "..\..\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 75 "..\..\MainWindow.xaml"
+        #line 74 "..\..\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 76 "..\..\MainWindow.xaml"
+        #line 75 "..\..\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 77 "..\..\MainWindow.xaml"
+        #line 76 "..\..\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 78 "..\..\MainWindow.xaml"
+        #line 77 "..\..\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 79 "..\..\MainWindow.xaml"
+        #line 78 "..\..\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 82 "..\..\MainWindow.xaml"
+        #line 81 "..\..\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 83 "..\..\MainWindow.xaml"
+        #line 82 "..\..\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 91 "..\..\MainWindow.xaml"
+        #line 90 "..\..\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 92 "..\..\MainWindow.xaml"
+        #line 91 "..\..\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 115 "..\..\MainWindow.xaml"
+        #line 114 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtSumm;
         
@@ -137,7 +137,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 123 "..\..\MainWindow.xaml"
+        #line 122 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid gridProfile;
         
@@ -145,7 +145,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 124 "..\..\MainWindow.xaml"
+        #line 123 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Image imgProfile;
         
@@ -153,7 +153,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 125 "..\..\MainWindow.xaml"
+        #line 124 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button btnAddPhoto;
         
@@ -161,7 +161,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 127 "..\..\MainWindow.xaml"
+        #line 126 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtNameProfile;
         
@@ -169,7 +169,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 128 "..\..\MainWindow.xaml"
+        #line 127 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtBalanceProfile;
         
@@ -177,7 +177,15 @@ namespace mateo {
         #line hidden
         
         
-        #line 133 "..\..\MainWindow.xaml"
+        #line 131 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.DataGrid datagridHistoryProfile;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 141 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid gridPlusBalance;
         
@@ -185,7 +193,39 @@ namespace mateo {
         #line hidden
         
         
-        #line 139 "..\..\MainWindow.xaml"
+        #line 144 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox card1;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 145 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox card2;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 146 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox card3;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 147 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox card4;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 151 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtPlusBalabce;
         
@@ -224,45 +264,13 @@ namespace mateo {
             {
             case 1:
             
-            #line 12 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_insta);
-            
-            #line default
-            #line hidden
-            return;
-            case 2:
-            
-            #line 16 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_vk);
-            
-            #line default
-            #line hidden
-            return;
-            case 3:
-            
-            #line 20 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_whatsapp);
-            
-            #line default
-            #line hidden
-            return;
-            case 4:
-            
-            #line 24 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_gmail);
-            
-            #line default
-            #line hidden
-            return;
-            case 5:
-            
             #line 30 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnProfileClick);
             
             #line default
             #line hidden
             return;
-            case 6:
+            case 2:
             
             #line 31 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnUslugiClick);
@@ -270,7 +278,7 @@ namespace mateo {
             #line default
             #line hidden
             return;
-            case 7:
+            case 3:
             
             #line 33 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnLogout);
@@ -278,7 +286,7 @@ namespace mateo {
             #line default
             #line hidden
             return;
-            case 8:
+            case 4:
             
             #line 36 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnExit);
@@ -286,7 +294,7 @@ namespace mateo {
             #line default
             #line hidden
             return;
-            case 9:
+            case 5:
             
             #line 39 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnTickets);
@@ -294,7 +302,7 @@ namespace mateo {
             #line default
             #line hidden
             return;
-            case 10:
+            case 6:
             this.listAllAttraction = ((System.Windows.Controls.ListView)(target));
             
             #line 45 "..\..\MainWindow.xaml"
@@ -303,125 +311,164 @@ namespace mateo {
             #line default
             #line hidden
             return;
-            case 11:
+            case 7:
             this.stackAttraction = ((System.Windows.Controls.ScrollViewer)(target));
             return;
-            case 12:
+            case 8:
             this.txtNameAttraction = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 13:
+            case 9:
             this.imgAttraction = ((System.Windows.Controls.Image)(target));
             return;
-            case 14:
+            case 10:
             this.txtDescriptionAttraction = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 15:
+            case 11:
             this.stackPriceOld = ((System.Windows.Controls.StackPanel)(target));
             return;
-            case 16:
+            case 12:
             this.txtPriceOld = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 17:
+            case 13:
             
-            #line 80 "..\..\MainWindow.xaml"
+            #line 79 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddOldAttraction);
             
             #line default
             #line hidden
             return;
-            case 18:
+            case 14:
             this.stackPriceBaby = ((System.Windows.Controls.StackPanel)(target));
             return;
-            case 19:
+            case 15:
             this.txtPriceBaby = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 20:
+            case 16:
             
-            #line 84 "..\..\MainWindow.xaml"
+            #line 83 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddBabyAttraction);
             
             #line default
             #line hidden
             return;
-            case 21:
+            case 17:
             
-            #line 86 "..\..\MainWindow.xaml"
+            #line 85 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnBackAttraction);
             
             #line default
             #line hidden
             return;
-            case 22:
+            case 18:
             this.gridTickets = ((System.Windows.Controls.Grid)(target));
             return;
-            case 23:
+            case 19:
             this.listTickets = ((System.Windows.Controls.ListView)(target));
             return;
-            case 27:
+            case 23:
             this.txtSumm = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 28:
+            case 24:
             
-            #line 116 "..\..\MainWindow.xaml"
+            #line 115 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnPuyAll);
             
             #line default
             #line hidden
             return;
-            case 29:
+            case 25:
             this.gridProfile = ((System.Windows.Controls.Grid)(target));
             return;
-            case 30:
+            case 26:
             this.imgProfile = ((System.Windows.Controls.Image)(target));
             return;
-            case 31:
+            case 27:
             this.btnAddPhoto = ((System.Windows.Controls.Button)(target));
             
-            #line 125 "..\..\MainWindow.xaml"
+            #line 124 "..\..\MainWindow.xaml"
             this.btnAddPhoto.Click += new System.Windows.RoutedEventHandler(this.BtnAddPhoto);
             
             #line default
             #line hidden
             return;
-            case 32:
+            case 28:
             
-            #line 126 "..\..\MainWindow.xaml"
+            #line 125 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnDeletePhoto);
             
             #line default
             #line hidden
             return;
-            case 33:
+            case 29:
             this.txtNameProfile = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 34:
+            case 30:
             this.txtBalanceProfile = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 35:
+            case 31:
             
-            #line 129 "..\..\MainWindow.xaml"
+            #line 128 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtbBalance);
             
             #line default
             #line hidden
             return;
-            case 36:
+            case 32:
+            this.datagridHistoryProfile = ((System.Windows.Controls.DataGrid)(target));
+            return;
+            case 33:
             this.gridPlusBalance = ((System.Windows.Controls.Grid)(target));
             return;
+            case 34:
+            this.card1 = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 144 "..\..\MainWindow.xaml"
+            this.card1.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedCard);
+            
+            #line default
+            #line hidden
+            return;
+            case 35:
+            this.card2 = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 145 "..\..\MainWindow.xaml"
+            this.card2.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedCard);
+            
+            #line default
+            #line hidden
+            return;
+            case 36:
+            this.card3 = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 146 "..\..\MainWindow.xaml"
+            this.card3.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedCard);
+            
+            #line default
+            #line hidden
+            return;
             case 37:
-            this.txtPlusBalabce = ((System.Windows.Controls.TextBox)(target));
+            this.card4 = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 147 "..\..\MainWindow.xaml"
+            this.card4.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedCard);
+            
+            #line default
+            #line hidden
             return;
             case 38:
+            this.txtPlusBalabce = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 39:
             
-            #line 140 "..\..\MainWindow.xaml"
+            #line 152 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtbPlusBalance);
             
             #line default
             #line hidden
             return;
-            case 39:
+            case 40:
             
-            #line 141 "..\..\MainWindow.xaml"
+            #line 153 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnCancelBalance);
             
             #line default
@@ -440,25 +487,25 @@ namespace mateo {
         void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
             switch (connectionId)
             {
-            case 24:
+            case 20:
             
-            #line 103 "..\..\MainWindow.xaml"
+            #line 102 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnTicketsMinus);
             
             #line default
             #line hidden
             break;
-            case 25:
+            case 21:
             
-            #line 105 "..\..\MainWindow.xaml"
+            #line 104 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnTicketsPlus);
             
             #line default
             #line hidden
             break;
-            case 26:
+            case 22:
             
-            #line 106 "..\..\MainWindow.xaml"
+            #line 105 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnDeleteTickets);
             
             #line default

+ 143 - 96
mateo/obj/Debug/MainWindow.g.i.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "4274B07DD1B90645C84B80641EFBCC99CB86CFA5D08968906E27058331D9C356"
+#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0DE9641A5D096A0287D6C6210283671BC4B1FD870B31BE5B1D2BD22DB32F0E1C"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -49,7 +49,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 73 "..\..\MainWindow.xaml"
+        #line 72 "..\..\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 75 "..\..\MainWindow.xaml"
+        #line 74 "..\..\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 76 "..\..\MainWindow.xaml"
+        #line 75 "..\..\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 77 "..\..\MainWindow.xaml"
+        #line 76 "..\..\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 78 "..\..\MainWindow.xaml"
+        #line 77 "..\..\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 79 "..\..\MainWindow.xaml"
+        #line 78 "..\..\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 82 "..\..\MainWindow.xaml"
+        #line 81 "..\..\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 83 "..\..\MainWindow.xaml"
+        #line 82 "..\..\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 91 "..\..\MainWindow.xaml"
+        #line 90 "..\..\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 92 "..\..\MainWindow.xaml"
+        #line 91 "..\..\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 115 "..\..\MainWindow.xaml"
+        #line 114 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtSumm;
         
@@ -137,7 +137,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 123 "..\..\MainWindow.xaml"
+        #line 122 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid gridProfile;
         
@@ -145,7 +145,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 124 "..\..\MainWindow.xaml"
+        #line 123 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Image imgProfile;
         
@@ -153,7 +153,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 125 "..\..\MainWindow.xaml"
+        #line 124 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button btnAddPhoto;
         
@@ -161,7 +161,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 127 "..\..\MainWindow.xaml"
+        #line 126 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtNameProfile;
         
@@ -169,7 +169,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 128 "..\..\MainWindow.xaml"
+        #line 127 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBlock txtBalanceProfile;
         
@@ -177,7 +177,15 @@ namespace mateo {
         #line hidden
         
         
-        #line 133 "..\..\MainWindow.xaml"
+        #line 131 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.DataGrid datagridHistoryProfile;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 141 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid gridPlusBalance;
         
@@ -185,7 +193,39 @@ namespace mateo {
         #line hidden
         
         
-        #line 139 "..\..\MainWindow.xaml"
+        #line 144 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox card1;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 145 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox card2;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 146 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox card3;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 147 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox card4;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 151 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtPlusBalabce;
         
@@ -224,45 +264,13 @@ namespace mateo {
             {
             case 1:
             
-            #line 12 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_insta);
-            
-            #line default
-            #line hidden
-            return;
-            case 2:
-            
-            #line 16 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_vk);
-            
-            #line default
-            #line hidden
-            return;
-            case 3:
-            
-            #line 20 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_whatsapp);
-            
-            #line default
-            #line hidden
-            return;
-            case 4:
-            
-            #line 24 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_gmail);
-            
-            #line default
-            #line hidden
-            return;
-            case 5:
-            
             #line 30 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnProfileClick);
             
             #line default
             #line hidden
             return;
-            case 6:
+            case 2:
             
             #line 31 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnUslugiClick);
@@ -270,7 +278,7 @@ namespace mateo {
             #line default
             #line hidden
             return;
-            case 7:
+            case 3:
             
             #line 33 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnLogout);
@@ -278,7 +286,7 @@ namespace mateo {
             #line default
             #line hidden
             return;
-            case 8:
+            case 4:
             
             #line 36 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnExit);
@@ -286,7 +294,7 @@ namespace mateo {
             #line default
             #line hidden
             return;
-            case 9:
+            case 5:
             
             #line 39 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnTickets);
@@ -294,7 +302,7 @@ namespace mateo {
             #line default
             #line hidden
             return;
-            case 10:
+            case 6:
             this.listAllAttraction = ((System.Windows.Controls.ListView)(target));
             
             #line 45 "..\..\MainWindow.xaml"
@@ -303,125 +311,164 @@ namespace mateo {
             #line default
             #line hidden
             return;
-            case 11:
+            case 7:
             this.stackAttraction = ((System.Windows.Controls.ScrollViewer)(target));
             return;
-            case 12:
+            case 8:
             this.txtNameAttraction = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 13:
+            case 9:
             this.imgAttraction = ((System.Windows.Controls.Image)(target));
             return;
-            case 14:
+            case 10:
             this.txtDescriptionAttraction = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 15:
+            case 11:
             this.stackPriceOld = ((System.Windows.Controls.StackPanel)(target));
             return;
-            case 16:
+            case 12:
             this.txtPriceOld = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 17:
+            case 13:
             
-            #line 80 "..\..\MainWindow.xaml"
+            #line 79 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddOldAttraction);
             
             #line default
             #line hidden
             return;
-            case 18:
+            case 14:
             this.stackPriceBaby = ((System.Windows.Controls.StackPanel)(target));
             return;
-            case 19:
+            case 15:
             this.txtPriceBaby = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 20:
+            case 16:
             
-            #line 84 "..\..\MainWindow.xaml"
+            #line 83 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddBabyAttraction);
             
             #line default
             #line hidden
             return;
-            case 21:
+            case 17:
             
-            #line 86 "..\..\MainWindow.xaml"
+            #line 85 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnBackAttraction);
             
             #line default
             #line hidden
             return;
-            case 22:
+            case 18:
             this.gridTickets = ((System.Windows.Controls.Grid)(target));
             return;
-            case 23:
+            case 19:
             this.listTickets = ((System.Windows.Controls.ListView)(target));
             return;
-            case 27:
+            case 23:
             this.txtSumm = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 28:
+            case 24:
             
-            #line 116 "..\..\MainWindow.xaml"
+            #line 115 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnPuyAll);
             
             #line default
             #line hidden
             return;
-            case 29:
+            case 25:
             this.gridProfile = ((System.Windows.Controls.Grid)(target));
             return;
-            case 30:
+            case 26:
             this.imgProfile = ((System.Windows.Controls.Image)(target));
             return;
-            case 31:
+            case 27:
             this.btnAddPhoto = ((System.Windows.Controls.Button)(target));
             
-            #line 125 "..\..\MainWindow.xaml"
+            #line 124 "..\..\MainWindow.xaml"
             this.btnAddPhoto.Click += new System.Windows.RoutedEventHandler(this.BtnAddPhoto);
             
             #line default
             #line hidden
             return;
-            case 32:
+            case 28:
             
-            #line 126 "..\..\MainWindow.xaml"
+            #line 125 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnDeletePhoto);
             
             #line default
             #line hidden
             return;
-            case 33:
+            case 29:
             this.txtNameProfile = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 34:
+            case 30:
             this.txtBalanceProfile = ((System.Windows.Controls.TextBlock)(target));
             return;
-            case 35:
+            case 31:
             
-            #line 129 "..\..\MainWindow.xaml"
+            #line 128 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtbBalance);
             
             #line default
             #line hidden
             return;
-            case 36:
+            case 32:
+            this.datagridHistoryProfile = ((System.Windows.Controls.DataGrid)(target));
+            return;
+            case 33:
             this.gridPlusBalance = ((System.Windows.Controls.Grid)(target));
             return;
+            case 34:
+            this.card1 = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 144 "..\..\MainWindow.xaml"
+            this.card1.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedCard);
+            
+            #line default
+            #line hidden
+            return;
+            case 35:
+            this.card2 = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 145 "..\..\MainWindow.xaml"
+            this.card2.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedCard);
+            
+            #line default
+            #line hidden
+            return;
+            case 36:
+            this.card3 = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 146 "..\..\MainWindow.xaml"
+            this.card3.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedCard);
+            
+            #line default
+            #line hidden
+            return;
             case 37:
-            this.txtPlusBalabce = ((System.Windows.Controls.TextBox)(target));
+            this.card4 = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 147 "..\..\MainWindow.xaml"
+            this.card4.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedCard);
+            
+            #line default
+            #line hidden
             return;
             case 38:
+            this.txtPlusBalabce = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 39:
             
-            #line 140 "..\..\MainWindow.xaml"
+            #line 152 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtbPlusBalance);
             
             #line default
             #line hidden
             return;
-            case 39:
+            case 40:
             
-            #line 141 "..\..\MainWindow.xaml"
+            #line 153 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnCancelBalance);
             
             #line default
@@ -440,25 +487,25 @@ namespace mateo {
         void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
             switch (connectionId)
             {
-            case 24:
+            case 20:
             
-            #line 103 "..\..\MainWindow.xaml"
+            #line 102 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnTicketsMinus);
             
             #line default
             #line hidden
             break;
-            case 25:
+            case 21:
             
-            #line 105 "..\..\MainWindow.xaml"
+            #line 104 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnTicketsPlus);
             
             #line default
             #line hidden
             break;
-            case 26:
+            case 22:
             
-            #line 106 "..\..\MainWindow.xaml"
+            #line 105 "..\..\MainWindow.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnDeleteTickets);
             
             #line default

二進制
mateo/obj/Debug/SysAdmin.baml


+ 67 - 37
mateo/obj/Debug/SysAdmin.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\SysAdmin.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "94AE40D13B4293F721BEE1959CDB7219244555DA5C7D3501F0A5365C25A13ACE"
+#pragma checksum "..\..\SysAdmin.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "81F674DA05A542D2393721B529FF43BFB518DB8FC1CBFF03B1EEF5A6D3CE4DE2"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -121,7 +121,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 103 "..\..\SysAdmin.xaml"
+        #line 102 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Image imageAdd_Attraction;
         
@@ -129,7 +129,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 109 "..\..\SysAdmin.xaml"
+        #line 108 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid gridChangeAttraction;
         
@@ -137,7 +137,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 113 "..\..\SysAdmin.xaml"
+        #line 112 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtChange_NameAttraction;
         
@@ -145,7 +145,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 117 "..\..\SysAdmin.xaml"
+        #line 116 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtChange_Description;
         
@@ -153,7 +153,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 121 "..\..\SysAdmin.xaml"
+        #line 120 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtChange_Quantity;
         
@@ -161,7 +161,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 125 "..\..\SysAdmin.xaml"
+        #line 124 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtChange_PriceOldAttraction;
         
@@ -169,7 +169,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 129 "..\..\SysAdmin.xaml"
+        #line 128 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtChange_PriceBabyAttraction;
         
@@ -177,7 +177,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 133 "..\..\SysAdmin.xaml"
+        #line 132 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ComboBox comboboxChange_StatusAttraction;
         
@@ -185,7 +185,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 138 "..\..\SysAdmin.xaml"
+        #line 137 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ComboBox comboboxChange_TypeAttraction;
         
@@ -193,7 +193,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 142 "..\..\SysAdmin.xaml"
+        #line 140 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Image imageChange_Attraction;
         
@@ -201,7 +201,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 151 "..\..\SysAdmin.xaml"
+        #line 149 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TabItem tabEmployees;
         
@@ -209,7 +209,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 153 "..\..\SysAdmin.xaml"
+        #line 151 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.DataGrid datagridEmployees;
         
@@ -217,7 +217,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 172 "..\..\SysAdmin.xaml"
+        #line 170 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid gridAddEmployees;
         
@@ -225,7 +225,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 176 "..\..\SysAdmin.xaml"
+        #line 174 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtLastName_Employyes;
         
@@ -233,7 +233,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 180 "..\..\SysAdmin.xaml"
+        #line 178 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtFirstName_Employyes;
         
@@ -241,7 +241,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 184 "..\..\SysAdmin.xaml"
+        #line 182 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtMiddleName_Employees;
         
@@ -249,7 +249,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 188 "..\..\SysAdmin.xaml"
+        #line 186 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ComboBox comboboxRole_Employees;
         
@@ -257,7 +257,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 195 "..\..\SysAdmin.xaml"
+        #line 193 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ComboBox comboboxStatus_Employees;
         
@@ -265,7 +265,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 230 "..\..\SysAdmin.xaml"
+        #line 204 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid gridChangeEmployees;
         
@@ -273,7 +273,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 234 "..\..\SysAdmin.xaml"
+        #line 208 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtLastName_ChangeEmployyes;
         
@@ -281,7 +281,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 238 "..\..\SysAdmin.xaml"
+        #line 212 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtFirstName_ChangeEmployyes;
         
@@ -289,7 +289,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 242 "..\..\SysAdmin.xaml"
+        #line 216 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtMiddleName_ChangeEmployees;
         
@@ -297,7 +297,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 246 "..\..\SysAdmin.xaml"
+        #line 220 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ComboBox comboboxRole_ChangeEmployees;
         
@@ -305,13 +305,29 @@ namespace mateo {
         #line hidden
         
         
-        #line 253 "..\..\SysAdmin.xaml"
+        #line 227 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ComboBox comboboxStatus_ChangeEmployees;
         
         #line default
         #line hidden
         
+        
+        #line 244 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.DatePicker datepicker;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 246 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ComboBox comboboxNameAttraction;
+        
+        #line default
+        #line hidden
+        
         private bool _contentLoaded;
         
         /// <summary>
@@ -401,7 +417,7 @@ namespace mateo {
             return;
             case 16:
             
-            #line 104 "..\..\SysAdmin.xaml"
+            #line 103 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddImage);
             
             #line default
@@ -409,7 +425,7 @@ namespace mateo {
             return;
             case 17:
             
-            #line 105 "..\..\SysAdmin.xaml"
+            #line 104 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddAttractionClick);
             
             #line default
@@ -417,7 +433,7 @@ namespace mateo {
             return;
             case 18:
             
-            #line 106 "..\..\SysAdmin.xaml"
+            #line 105 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnBackAttractionClick);
             
             #line default
@@ -452,7 +468,7 @@ namespace mateo {
             return;
             case 28:
             
-            #line 143 "..\..\SysAdmin.xaml"
+            #line 141 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnChangeImageClick);
             
             #line default
@@ -460,7 +476,7 @@ namespace mateo {
             return;
             case 29:
             
-            #line 144 "..\..\SysAdmin.xaml"
+            #line 142 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnSaveChangeClick);
             
             #line default
@@ -468,7 +484,7 @@ namespace mateo {
             return;
             case 30:
             
-            #line 145 "..\..\SysAdmin.xaml"
+            #line 143 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnBackAttractionClick);
             
             #line default
@@ -482,7 +498,7 @@ namespace mateo {
             return;
             case 34:
             
-            #line 170 "..\..\SysAdmin.xaml"
+            #line 168 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddNewEmployeesClick);
             
             #line default
@@ -508,7 +524,7 @@ namespace mateo {
             return;
             case 41:
             
-            #line 226 "..\..\SysAdmin.xaml"
+            #line 200 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddEmployeesClick);
             
             #line default
@@ -516,7 +532,7 @@ namespace mateo {
             return;
             case 42:
             
-            #line 227 "..\..\SysAdmin.xaml"
+            #line 201 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnBackEmployeesClick);
             
             #line default
@@ -542,7 +558,7 @@ namespace mateo {
             return;
             case 49:
             
-            #line 260 "..\..\SysAdmin.xaml"
+            #line 234 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnSaveChangeEmployeesClick);
             
             #line default
@@ -550,12 +566,26 @@ namespace mateo {
             return;
             case 50:
             
-            #line 261 "..\..\SysAdmin.xaml"
+            #line 235 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnBackEmployeesClick);
             
             #line default
             #line hidden
             return;
+            case 51:
+            this.datepicker = ((System.Windows.Controls.DatePicker)(target));
+            return;
+            case 52:
+            this.comboboxNameAttraction = ((System.Windows.Controls.ComboBox)(target));
+            return;
+            case 53:
+            
+            #line 247 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnReport1);
+            
+            #line default
+            #line hidden
+            return;
             }
             this._contentLoaded = true;
         }
@@ -579,7 +609,7 @@ namespace mateo {
             break;
             case 33:
             
-            #line 163 "..\..\SysAdmin.xaml"
+            #line 161 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnChangeEmployeesClick);
             
             #line default

+ 67 - 37
mateo/obj/Debug/SysAdmin.g.i.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\SysAdmin.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "94AE40D13B4293F721BEE1959CDB7219244555DA5C7D3501F0A5365C25A13ACE"
+#pragma checksum "..\..\SysAdmin.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "81F674DA05A542D2393721B529FF43BFB518DB8FC1CBFF03B1EEF5A6D3CE4DE2"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -121,7 +121,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 103 "..\..\SysAdmin.xaml"
+        #line 102 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Image imageAdd_Attraction;
         
@@ -129,7 +129,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 109 "..\..\SysAdmin.xaml"
+        #line 108 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid gridChangeAttraction;
         
@@ -137,7 +137,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 113 "..\..\SysAdmin.xaml"
+        #line 112 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtChange_NameAttraction;
         
@@ -145,7 +145,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 117 "..\..\SysAdmin.xaml"
+        #line 116 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtChange_Description;
         
@@ -153,7 +153,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 121 "..\..\SysAdmin.xaml"
+        #line 120 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtChange_Quantity;
         
@@ -161,7 +161,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 125 "..\..\SysAdmin.xaml"
+        #line 124 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtChange_PriceOldAttraction;
         
@@ -169,7 +169,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 129 "..\..\SysAdmin.xaml"
+        #line 128 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtChange_PriceBabyAttraction;
         
@@ -177,7 +177,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 133 "..\..\SysAdmin.xaml"
+        #line 132 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ComboBox comboboxChange_StatusAttraction;
         
@@ -185,7 +185,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 138 "..\..\SysAdmin.xaml"
+        #line 137 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ComboBox comboboxChange_TypeAttraction;
         
@@ -193,7 +193,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 142 "..\..\SysAdmin.xaml"
+        #line 140 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Image imageChange_Attraction;
         
@@ -201,7 +201,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 151 "..\..\SysAdmin.xaml"
+        #line 149 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TabItem tabEmployees;
         
@@ -209,7 +209,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 153 "..\..\SysAdmin.xaml"
+        #line 151 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.DataGrid datagridEmployees;
         
@@ -217,7 +217,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 172 "..\..\SysAdmin.xaml"
+        #line 170 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid gridAddEmployees;
         
@@ -225,7 +225,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 176 "..\..\SysAdmin.xaml"
+        #line 174 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtLastName_Employyes;
         
@@ -233,7 +233,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 180 "..\..\SysAdmin.xaml"
+        #line 178 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtFirstName_Employyes;
         
@@ -241,7 +241,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 184 "..\..\SysAdmin.xaml"
+        #line 182 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtMiddleName_Employees;
         
@@ -249,7 +249,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 188 "..\..\SysAdmin.xaml"
+        #line 186 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ComboBox comboboxRole_Employees;
         
@@ -257,7 +257,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 195 "..\..\SysAdmin.xaml"
+        #line 193 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ComboBox comboboxStatus_Employees;
         
@@ -265,7 +265,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 230 "..\..\SysAdmin.xaml"
+        #line 204 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid gridChangeEmployees;
         
@@ -273,7 +273,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 234 "..\..\SysAdmin.xaml"
+        #line 208 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtLastName_ChangeEmployyes;
         
@@ -281,7 +281,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 238 "..\..\SysAdmin.xaml"
+        #line 212 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtFirstName_ChangeEmployyes;
         
@@ -289,7 +289,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 242 "..\..\SysAdmin.xaml"
+        #line 216 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox txtMiddleName_ChangeEmployees;
         
@@ -297,7 +297,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 246 "..\..\SysAdmin.xaml"
+        #line 220 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ComboBox comboboxRole_ChangeEmployees;
         
@@ -305,13 +305,29 @@ namespace mateo {
         #line hidden
         
         
-        #line 253 "..\..\SysAdmin.xaml"
+        #line 227 "..\..\SysAdmin.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.ComboBox comboboxStatus_ChangeEmployees;
         
         #line default
         #line hidden
         
+        
+        #line 244 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.DatePicker datepicker;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 246 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ComboBox comboboxNameAttraction;
+        
+        #line default
+        #line hidden
+        
         private bool _contentLoaded;
         
         /// <summary>
@@ -401,7 +417,7 @@ namespace mateo {
             return;
             case 16:
             
-            #line 104 "..\..\SysAdmin.xaml"
+            #line 103 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddImage);
             
             #line default
@@ -409,7 +425,7 @@ namespace mateo {
             return;
             case 17:
             
-            #line 105 "..\..\SysAdmin.xaml"
+            #line 104 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddAttractionClick);
             
             #line default
@@ -417,7 +433,7 @@ namespace mateo {
             return;
             case 18:
             
-            #line 106 "..\..\SysAdmin.xaml"
+            #line 105 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnBackAttractionClick);
             
             #line default
@@ -452,7 +468,7 @@ namespace mateo {
             return;
             case 28:
             
-            #line 143 "..\..\SysAdmin.xaml"
+            #line 141 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnChangeImageClick);
             
             #line default
@@ -460,7 +476,7 @@ namespace mateo {
             return;
             case 29:
             
-            #line 144 "..\..\SysAdmin.xaml"
+            #line 142 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnSaveChangeClick);
             
             #line default
@@ -468,7 +484,7 @@ namespace mateo {
             return;
             case 30:
             
-            #line 145 "..\..\SysAdmin.xaml"
+            #line 143 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnBackAttractionClick);
             
             #line default
@@ -482,7 +498,7 @@ namespace mateo {
             return;
             case 34:
             
-            #line 170 "..\..\SysAdmin.xaml"
+            #line 168 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddNewEmployeesClick);
             
             #line default
@@ -508,7 +524,7 @@ namespace mateo {
             return;
             case 41:
             
-            #line 226 "..\..\SysAdmin.xaml"
+            #line 200 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddEmployeesClick);
             
             #line default
@@ -516,7 +532,7 @@ namespace mateo {
             return;
             case 42:
             
-            #line 227 "..\..\SysAdmin.xaml"
+            #line 201 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnBackEmployeesClick);
             
             #line default
@@ -542,7 +558,7 @@ namespace mateo {
             return;
             case 49:
             
-            #line 260 "..\..\SysAdmin.xaml"
+            #line 234 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnSaveChangeEmployeesClick);
             
             #line default
@@ -550,12 +566,26 @@ namespace mateo {
             return;
             case 50:
             
-            #line 261 "..\..\SysAdmin.xaml"
+            #line 235 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnBackEmployeesClick);
             
             #line default
             #line hidden
             return;
+            case 51:
+            this.datepicker = ((System.Windows.Controls.DatePicker)(target));
+            return;
+            case 52:
+            this.comboboxNameAttraction = ((System.Windows.Controls.ComboBox)(target));
+            return;
+            case 53:
+            
+            #line 247 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnReport1);
+            
+            #line default
+            #line hidden
+            return;
             }
             this._contentLoaded = true;
         }
@@ -579,7 +609,7 @@ namespace mateo {
             break;
             case 33:
             
-            #line 163 "..\..\SysAdmin.xaml"
+            #line 161 "..\..\SysAdmin.xaml"
             ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnChangeEmployeesClick);
             
             #line default

二進制
mateo/obj/Debug/mateo.csproj.AssemblyReference.cache


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

@@ -1 +1 @@
-ed6a69a3665ce10cb33d4ec9232972603e820c02
+9eb1f911f0d69d4b5f60d083c6816bb267680a3d

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

@@ -50,3 +50,30 @@ C:\Users\polin\OneDrive\Рабочий стол\mm\mateo\obj\Debug\mateo.pdb
 C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\obj\Debug\SysAdmin.g.cs
 C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\obj\Debug\SysAdmin.baml
 C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\obj\Debug\mateo.csproj.ResolveComReference.cache
+C:\Users\polin\Desktop\mateo\mateo\bin\Debug\mateo.exe.config
+C:\Users\polin\Desktop\mateo\mateo\bin\Debug\mateo.exe
+C:\Users\polin\Desktop\mateo\mateo\bin\Debug\mateo.pdb
+C:\Users\polin\Desktop\mateo\mateo\bin\Debug\EntityFramework.dll
+C:\Users\polin\Desktop\mateo\mateo\bin\Debug\EntityFramework.SqlServer.dll
+C:\Users\polin\Desktop\mateo\mateo\bin\Debug\EntityFramework.xml
+C:\Users\polin\Desktop\mateo\mateo\bin\Debug\EntityFramework.SqlServer.xml
+C:\Users\polin\Desktop\mateo\mateo\bin\Debug\ru\EntityFramework.resources.dll
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\mateo.csproj.AssemblyReference.cache
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\mateo.csproj.ResolveComReference.cache
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\First.g.cs
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\MainWindow.g.cs
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\SysAdmin.g.cs
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\App.g.cs
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\mateo_Content.g.cs
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\mateo_MarkupCompile.cache
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\mateo_MarkupCompile.lref
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\First.baml
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\MainWindow.baml
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\SysAdmin.baml
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\mateo.g.resources
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\mateo.Properties.Resources.resources
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\mateo.csproj.GenerateResource.cache
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\mateo.csproj.CoreCompileInputs.cache
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\mateo.csproj.CopyComplete
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\mateo.exe
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\mateo.pdb

二進制
mateo/obj/Debug/mateo.csproj.ResolveComReference.cache


二進制
mateo/obj/Debug/mateo.exe


二進制
mateo/obj/Debug/mateo.g.resources


二進制
mateo/obj/Debug/mateo.pdb


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

@@ -4,16 +4,16 @@
 winexe
 C#
 .cs
-C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\obj\Debug\
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\
 mateo
 none
 false
 DEBUG;TRACE
-C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\App.xaml
+C:\Users\polin\Desktop\mateo\mateo\App.xaml
 3-1430287372
 21750853300
 24-2088213926
-21-297209307
+21-1669257196
 First.xaml;MainWindow.xaml;SysAdmin.xaml;
 
 False

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

@@ -4,17 +4,17 @@
 winexe
 C#
 .cs
-C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\obj\Debug\
+C:\Users\polin\Desktop\mateo\mateo\obj\Debug\
 mateo
 none
 false
 DEBUG;TRACE
-C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\App.xaml
+C:\Users\polin\Desktop\mateo\mateo\App.xaml
 3-1430287372
 21750853300
 251364394003
-21-297209307
+21-1669257196
 First.xaml;MainWindow.xaml;SysAdmin.xaml;
 
-False
+True
 

+ 4 - 0
mateo/obj/Debug/mateo_MarkupCompile.i.lref

@@ -0,0 +1,4 @@
+
+
+FC:\Users\polin\Desktop\mateo\mateo\SysAdmin.xaml;;
+

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

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

+ 205 - 27
mateo/obj/Release/First.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\First.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "2AA10C381E7F22ACA6D69899C511258428FE6CB3E97C96CA32266EFFE4CE3A04"
+#pragma checksum "..\..\First.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "943768E241201A5A45F19099A170C3CCBE15F9BE9B3EABCA8918ECB69B4FBDF5"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -41,7 +41,7 @@ namespace mateo {
     public partial class First : System.Windows.Window, System.Windows.Markup.IComponentConnector {
         
         
-        #line 11 "..\..\First.xaml"
+        #line 10 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button exit;
         
@@ -49,7 +49,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 20 "..\..\First.xaml"
+        #line 18 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid grid_vhod;
         
@@ -59,13 +59,29 @@ namespace mateo {
         
         #line 21 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtlogin;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 22 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_login;
         
         #line default
         #line hidden
         
         
-        #line 23 "..\..\First.xaml"
+        #line 25 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtpass;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 26 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.PasswordBox vvod_pass;
         
@@ -73,7 +89,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 25 "..\..\First.xaml"
+        #line 29 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button vhod;
         
@@ -81,7 +97,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 26 "..\..\First.xaml"
+        #line 30 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button registr;
         
@@ -89,7 +105,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 29 "..\..\First.xaml"
+        #line 33 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Grid grid_registr;
         
@@ -97,7 +113,23 @@ namespace mateo {
         #line hidden
         
         
-        #line 34 "..\..\First.xaml"
+        #line 39 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Button cancel;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 42 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtlastreg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 43 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_LNAME;
         
@@ -105,7 +137,15 @@ namespace mateo {
         #line hidden
         
         
-        #line 36 "..\..\First.xaml"
+        #line 46 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtfirstreg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 47 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_FNAME;
         
@@ -113,7 +153,15 @@ namespace mateo {
         #line hidden
         
         
-        #line 38 "..\..\First.xaml"
+        #line 50 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtmiddlereg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 51 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_MNAME;
         
@@ -121,7 +169,15 @@ namespace mateo {
         #line hidden
         
         
-        #line 40 "..\..\First.xaml"
+        #line 54 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtloginreg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 55 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.TextBox vvod_login_reg;
         
@@ -129,7 +185,15 @@ namespace mateo {
         #line hidden
         
         
-        #line 42 "..\..\First.xaml"
+        #line 58 "..\..\First.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtpassreg;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 59 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.PasswordBox vvod_pass_reg;
         
@@ -137,7 +201,7 @@ namespace mateo {
         #line hidden
         
         
-        #line 44 "..\..\First.xaml"
+        #line 62 "..\..\First.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
         internal System.Windows.Controls.Button registr2;
         
@@ -177,7 +241,7 @@ namespace mateo {
             case 1:
             this.exit = ((System.Windows.Controls.Button)(target));
             
-            #line 11 "..\..\First.xaml"
+            #line 10 "..\..\First.xaml"
             this.exit.Click += new System.Windows.RoutedEventHandler(this.btn_exit);
             
             #line default
@@ -187,51 +251,165 @@ namespace mateo {
             this.grid_vhod = ((System.Windows.Controls.Grid)(target));
             return;
             case 3:
-            this.vvod_login = ((System.Windows.Controls.TextBox)(target));
+            this.txtlogin = ((System.Windows.Controls.TextBlock)(target));
             return;
             case 4:
-            this.vvod_pass = ((System.Windows.Controls.PasswordBox)(target));
+            this.vvod_login = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 22 "..\..\First.xaml"
+            this.vvod_login.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 23 "..\..\First.xaml"
+            this.vvod_login.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtPasswordLogin_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
             case 5:
+            this.txtpass = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 6:
+            this.vvod_pass = ((System.Windows.Controls.PasswordBox)(target));
+            
+            #line 26 "..\..\First.xaml"
+            this.vvod_pass.PasswordChanged += new System.Windows.RoutedEventHandler(this.passchangedPass);
+            
+            #line default
+            #line hidden
+            
+            #line 27 "..\..\First.xaml"
+            this.vvod_pass.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtPasswordLogin_PreviewTextInput);
+            
+            #line default
+            #line hidden
+            return;
+            case 7:
             this.vhod = ((System.Windows.Controls.Button)(target));
             
-            #line 25 "..\..\First.xaml"
+            #line 29 "..\..\First.xaml"
             this.vhod.Click += new System.Windows.RoutedEventHandler(this.btn_vhod);
             
             #line default
             #line hidden
             return;
-            case 6:
+            case 8:
             this.registr = ((System.Windows.Controls.Button)(target));
             
-            #line 26 "..\..\First.xaml"
+            #line 30 "..\..\First.xaml"
             this.registr.Click += new System.Windows.RoutedEventHandler(this.btn_registr);
             
             #line default
             #line hidden
             return;
-            case 7:
+            case 9:
             this.grid_registr = ((System.Windows.Controls.Grid)(target));
             return;
-            case 8:
+            case 10:
+            this.cancel = ((System.Windows.Controls.Button)(target));
+            
+            #line 39 "..\..\First.xaml"
+            this.cancel.Click += new System.Windows.RoutedEventHandler(this.btnCancel);
+            
+            #line default
+            #line hidden
+            return;
+            case 11:
+            this.txtlastreg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 12:
             this.vvod_LNAME = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 43 "..\..\First.xaml"
+            this.vvod_LNAME.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 44 "..\..\First.xaml"
+            this.vvod_LNAME.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtFIO_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 9:
+            case 13:
+            this.txtfirstreg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 14:
             this.vvod_FNAME = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 47 "..\..\First.xaml"
+            this.vvod_FNAME.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 48 "..\..\First.xaml"
+            this.vvod_FNAME.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtFIO_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 10:
+            case 15:
+            this.txtmiddlereg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 16:
             this.vvod_MNAME = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 51 "..\..\First.xaml"
+            this.vvod_MNAME.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 52 "..\..\First.xaml"
+            this.vvod_MNAME.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtFIO_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 11:
+            case 17:
+            this.txtloginreg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 18:
             this.vvod_login_reg = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 55 "..\..\First.xaml"
+            this.vvod_login_reg.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedLogin);
+            
+            #line default
+            #line hidden
+            
+            #line 56 "..\..\First.xaml"
+            this.vvod_login_reg.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtPasswordLogin_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 12:
+            case 19:
+            this.txtpassreg = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 20:
             this.vvod_pass_reg = ((System.Windows.Controls.PasswordBox)(target));
+            
+            #line 59 "..\..\First.xaml"
+            this.vvod_pass_reg.PasswordChanged += new System.Windows.RoutedEventHandler(this.passchangedPass);
+            
+            #line default
+            #line hidden
+            
+            #line 60 "..\..\First.xaml"
+            this.vvod_pass_reg.PreviewTextInput += new System.Windows.Input.TextCompositionEventHandler(this.txtPasswordLogin_PreviewTextInput);
+            
+            #line default
+            #line hidden
             return;
-            case 13:
+            case 21:
             this.registr2 = ((System.Windows.Controls.Button)(target));
             
-            #line 44 "..\..\First.xaml"
+            #line 62 "..\..\First.xaml"
             this.registr2.Click += new System.Windows.RoutedEventHandler(this.btn_regist2);
             
             #line default

+ 311 - 62
mateo/obj/Release/MainWindow.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "A3D4B3B60F943F9B73E3BF9E66AF57ABCBEA566692D01D31D376720D925FA70F"
+#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0DE9641A5D096A0287D6C6210283671BC4B1FD870B31BE5B1D2BD22DB32F0E1C"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -38,92 +38,196 @@ namespace mateo {
     /// <summary>
     /// MainWindow
     /// </summary>
-    public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+    public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
         
         
-        #line 31 "..\..\MainWindow.xaml"
+        #line 45 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_user;
+        internal System.Windows.Controls.ListView listAllAttraction;
         
         #line default
         #line hidden
         
         
-        #line 32 "..\..\MainWindow.xaml"
+        #line 72 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_uslugi;
+        internal System.Windows.Controls.ScrollViewer stackAttraction;
         
         #line default
         #line hidden
         
         
-        #line 33 "..\..\MainWindow.xaml"
+        #line 74 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.TextBlock name;
+        internal System.Windows.Controls.TextBlock txtNameAttraction;
         
         #line default
         #line hidden
         
         
-        #line 43 "..\..\MainWindow.xaml"
+        #line 75 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Grid grid_uslugi;
+        internal System.Windows.Controls.Image imgAttraction;
         
         #line default
         #line hidden
         
         
-        #line 44 "..\..\MainWindow.xaml"
+        #line 76 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Image img_bron;
+        internal System.Windows.Controls.TextBlock txtDescriptionAttraction;
         
         #line default
         #line hidden
         
         
-        #line 45 "..\..\MainWindow.xaml"
+        #line 77 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.StackPanel stackPriceOld;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 78 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtPriceOld;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 81 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.StackPanel stackPriceBaby;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 82 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtPriceBaby;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 90 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Grid gridTickets;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 91 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ListView listTickets;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 114 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtSumm;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 122 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.TextBlock txt_bron;
+        internal System.Windows.Controls.Grid gridProfile;
         
         #line default
         #line hidden
         
         
-        #line 46 "..\..\MainWindow.xaml"
+        #line 123 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_bron;
+        internal System.Windows.Controls.Image imgProfile;
         
         #line default
         #line hidden
         
         
-        #line 49 "..\..\MainWindow.xaml"
+        #line 124 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Border border_bron;
+        internal System.Windows.Controls.Button btnAddPhoto;
         
         #line default
         #line hidden
         
         
-        #line 50 "..\..\MainWindow.xaml"
+        #line 126 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Grid grid_bron;
+        internal System.Windows.Controls.TextBlock txtNameProfile;
         
         #line default
         #line hidden
         
         
-        #line 56 "..\..\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 txtBalanceProfile;
         
         #line default
         #line hidden
         
         
-        #line 57 "..\..\MainWindow.xaml"
+        #line 131 "..\..\MainWindow.xaml"
         [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
-        internal System.Windows.Controls.Button btn_cancel;
+        internal System.Windows.Controls.DataGrid datagridHistoryProfile;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 141 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Grid gridPlusBalance;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 144 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox card1;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 145 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox card2;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 146 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox card3;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 147 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox card4;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 151 "..\..\MainWindow.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtPlusBalabce;
         
         #line default
         #line hidden
@@ -160,103 +264,212 @@ namespace mateo {
             {
             case 1:
             
-            #line 12 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_insta);
+            #line 30 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnProfileClick);
             
             #line default
             #line hidden
             return;
             case 2:
             
-            #line 16 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_vk);
+            #line 31 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnUslugiClick);
             
             #line default
             #line hidden
             return;
             case 3:
             
-            #line 20 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_whatsapp);
+            #line 33 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnLogout);
             
             #line default
             #line hidden
             return;
             case 4:
             
-            #line 24 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_gmail);
+            #line 36 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnExit);
             
             #line default
             #line hidden
             return;
             case 5:
-            this.btn_user = ((System.Windows.Controls.Button)(target));
             
-            #line 31 "..\..\MainWindow.xaml"
-            this.btn_user.Click += new System.Windows.RoutedEventHandler(this.btn_profile_Click);
+            #line 39 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnTickets);
             
             #line default
             #line hidden
             return;
             case 6:
-            this.btn_uslugi = ((System.Windows.Controls.Button)(target));
+            this.listAllAttraction = ((System.Windows.Controls.ListView)(target));
             
-            #line 32 "..\..\MainWindow.xaml"
-            this.btn_uslugi.Click += new System.Windows.RoutedEventHandler(this.btn_uslugi_Click);
+            #line 45 "..\..\MainWindow.xaml"
+            this.listAllAttraction.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.ViewAllAttraction);
             
             #line default
             #line hidden
             return;
             case 7:
-            this.name = ((System.Windows.Controls.TextBlock)(target));
+            this.stackAttraction = ((System.Windows.Controls.ScrollViewer)(target));
             return;
             case 8:
-            
-            #line 34 "..\..\MainWindow.xaml"
-            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_exit);
-            
-            #line default
-            #line hidden
+            this.txtNameAttraction = ((System.Windows.Controls.TextBlock)(target));
             return;
             case 9:
-            this.grid_uslugi = ((System.Windows.Controls.Grid)(target));
+            this.imgAttraction = ((System.Windows.Controls.Image)(target));
             return;
             case 10:
-            this.img_bron = ((System.Windows.Controls.Image)(target));
+            this.txtDescriptionAttraction = ((System.Windows.Controls.TextBlock)(target));
             return;
             case 11:
-            this.txt_bron = ((System.Windows.Controls.TextBlock)(target));
+            this.stackPriceOld = ((System.Windows.Controls.StackPanel)(target));
             return;
             case 12:
-            this.btn_bron = ((System.Windows.Controls.Button)(target));
+            this.txtPriceOld = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 13:
             
-            #line 46 "..\..\MainWindow.xaml"
-            this.btn_bron.Click += new System.Windows.RoutedEventHandler(this.btn_bron_Click);
+            #line 79 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddOldAttraction);
             
             #line default
             #line hidden
             return;
-            case 13:
-            this.border_bron = ((System.Windows.Controls.Border)(target));
-            return;
             case 14:
-            this.grid_bron = ((System.Windows.Controls.Grid)(target));
+            this.stackPriceBaby = ((System.Windows.Controls.StackPanel)(target));
             return;
             case 15:
-            this.btn_pay = ((System.Windows.Controls.Button)(target));
+            this.txtPriceBaby = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 16:
             
-            #line 56 "..\..\MainWindow.xaml"
-            this.btn_pay.Click += new System.Windows.RoutedEventHandler(this.btn_pay_Click);
+            #line 83 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddBabyAttraction);
             
             #line default
             #line hidden
             return;
-            case 16:
-            this.btn_cancel = ((System.Windows.Controls.Button)(target));
+            case 17:
+            
+            #line 85 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnBackAttraction);
+            
+            #line default
+            #line hidden
+            return;
+            case 18:
+            this.gridTickets = ((System.Windows.Controls.Grid)(target));
+            return;
+            case 19:
+            this.listTickets = ((System.Windows.Controls.ListView)(target));
+            return;
+            case 23:
+            this.txtSumm = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 24:
+            
+            #line 115 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnPuyAll);
+            
+            #line default
+            #line hidden
+            return;
+            case 25:
+            this.gridProfile = ((System.Windows.Controls.Grid)(target));
+            return;
+            case 26:
+            this.imgProfile = ((System.Windows.Controls.Image)(target));
+            return;
+            case 27:
+            this.btnAddPhoto = ((System.Windows.Controls.Button)(target));
+            
+            #line 124 "..\..\MainWindow.xaml"
+            this.btnAddPhoto.Click += new System.Windows.RoutedEventHandler(this.BtnAddPhoto);
+            
+            #line default
+            #line hidden
+            return;
+            case 28:
+            
+            #line 125 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnDeletePhoto);
+            
+            #line default
+            #line hidden
+            return;
+            case 29:
+            this.txtNameProfile = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 30:
+            this.txtBalanceProfile = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 31:
+            
+            #line 128 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtbBalance);
+            
+            #line default
+            #line hidden
+            return;
+            case 32:
+            this.datagridHistoryProfile = ((System.Windows.Controls.DataGrid)(target));
+            return;
+            case 33:
+            this.gridPlusBalance = ((System.Windows.Controls.Grid)(target));
+            return;
+            case 34:
+            this.card1 = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 144 "..\..\MainWindow.xaml"
+            this.card1.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedCard);
+            
+            #line default
+            #line hidden
+            return;
+            case 35:
+            this.card2 = ((System.Windows.Controls.TextBox)(target));
             
-            #line 57 "..\..\MainWindow.xaml"
-            this.btn_cancel.Click += new System.Windows.RoutedEventHandler(this.btn_cancel_Click);
+            #line 145 "..\..\MainWindow.xaml"
+            this.card2.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedCard);
+            
+            #line default
+            #line hidden
+            return;
+            case 36:
+            this.card3 = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 146 "..\..\MainWindow.xaml"
+            this.card3.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedCard);
+            
+            #line default
+            #line hidden
+            return;
+            case 37:
+            this.card4 = ((System.Windows.Controls.TextBox)(target));
+            
+            #line 147 "..\..\MainWindow.xaml"
+            this.card4.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtchangedCard);
+            
+            #line default
+            #line hidden
+            return;
+            case 38:
+            this.txtPlusBalabce = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 39:
+            
+            #line 152 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtbPlusBalance);
+            
+            #line default
+            #line hidden
+            return;
+            case 40:
+            
+            #line 153 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnCancelBalance);
             
             #line default
             #line hidden
@@ -264,6 +477,42 @@ namespace mateo {
             }
             this._contentLoaded = true;
         }
+        
+        [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.Performance", "CA1800:DoNotCastUnnecessarily")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
+            switch (connectionId)
+            {
+            case 20:
+            
+            #line 102 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnTicketsMinus);
+            
+            #line default
+            #line hidden
+            break;
+            case 21:
+            
+            #line 104 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnTicketsPlus);
+            
+            #line default
+            #line hidden
+            break;
+            case 22:
+            
+            #line 105 "..\..\MainWindow.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnDeleteTickets);
+            
+            #line default
+            #line hidden
+            break;
+            }
+        }
     }
 }
 

+ 549 - 2
mateo/obj/Release/SysAdmin.g.cs

@@ -1,4 +1,4 @@
-#pragma checksum "..\..\SysAdmin.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "20B0A2EF5D75435BAA6356902E79D11544F36D79B37219C601F52560D81F213D"
+#pragma checksum "..\..\SysAdmin.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "81F674DA05A542D2393721B529FF43BFB518DB8FC1CBFF03B1EEF5A6D3CE4DE2"
 //------------------------------------------------------------------------------
 // <auto-generated>
 //     Этот код создан программой.
@@ -38,7 +38,295 @@ namespace mateo {
     /// <summary>
     /// SysAdmin
     /// </summary>
-    public partial class SysAdmin : System.Windows.Window, System.Windows.Markup.IComponentConnector {
+    public partial class SysAdmin : System.Windows.Window, System.Windows.Markup.IComponentConnector, System.Windows.Markup.IStyleConnector {
+        
+        
+        #line 15 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBlock txtFio_Admin;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 29 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.DataGrid datagridAttraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 70 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Grid gridAddAttraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 74 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtName_Attraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 78 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtDescription_Attraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 82 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtQuantity_Attraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 86 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtPriceOld_Attraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 90 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtPriceBaby_Attraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 94 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ComboBox comboboxStatus_Attraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 99 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ComboBox comboboxType_Attraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 102 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Image imageAdd_Attraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 108 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Grid gridChangeAttraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 112 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtChange_NameAttraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 116 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtChange_Description;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 120 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtChange_Quantity;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 124 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtChange_PriceOldAttraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 128 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtChange_PriceBabyAttraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 132 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ComboBox comboboxChange_StatusAttraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 137 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ComboBox comboboxChange_TypeAttraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 140 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Image imageChange_Attraction;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 149 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TabItem tabEmployees;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 151 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.DataGrid datagridEmployees;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 170 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Grid gridAddEmployees;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 174 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtLastName_Employyes;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 178 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtFirstName_Employyes;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 182 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtMiddleName_Employees;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 186 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ComboBox comboboxRole_Employees;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 193 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ComboBox comboboxStatus_Employees;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 204 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.Grid gridChangeEmployees;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 208 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtLastName_ChangeEmployyes;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 212 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtFirstName_ChangeEmployyes;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 216 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.TextBox txtMiddleName_ChangeEmployees;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 220 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ComboBox comboboxRole_ChangeEmployees;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 227 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ComboBox comboboxStatus_ChangeEmployees;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 244 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.DatePicker datepicker;
+        
+        #line default
+        #line hidden
+        
+        
+        #line 246 "..\..\SysAdmin.xaml"
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
+        internal System.Windows.Controls.ComboBox comboboxNameAttraction;
+        
+        #line default
+        #line hidden
         
         private bool _contentLoaded;
         
@@ -68,8 +356,267 @@ 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:
+            this.txtFio_Admin = ((System.Windows.Controls.TextBlock)(target));
+            return;
+            case 2:
+            
+            #line 16 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnLogout);
+            
+            #line default
+            #line hidden
+            return;
+            case 3:
+            
+            #line 19 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnExit);
+            
+            #line default
+            #line hidden
+            return;
+            case 4:
+            this.datagridAttraction = ((System.Windows.Controls.DataGrid)(target));
+            return;
+            case 6:
+            
+            #line 68 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddNewAttractionClick);
+            
+            #line default
+            #line hidden
+            return;
+            case 7:
+            this.gridAddAttraction = ((System.Windows.Controls.Grid)(target));
+            return;
+            case 8:
+            this.txtName_Attraction = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 9:
+            this.txtDescription_Attraction = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 10:
+            this.txtQuantity_Attraction = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 11:
+            this.txtPriceOld_Attraction = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 12:
+            this.txtPriceBaby_Attraction = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 13:
+            this.comboboxStatus_Attraction = ((System.Windows.Controls.ComboBox)(target));
+            return;
+            case 14:
+            this.comboboxType_Attraction = ((System.Windows.Controls.ComboBox)(target));
+            return;
+            case 15:
+            this.imageAdd_Attraction = ((System.Windows.Controls.Image)(target));
+            return;
+            case 16:
+            
+            #line 103 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddImage);
+            
+            #line default
+            #line hidden
+            return;
+            case 17:
+            
+            #line 104 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddAttractionClick);
+            
+            #line default
+            #line hidden
+            return;
+            case 18:
+            
+            #line 105 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnBackAttractionClick);
+            
+            #line default
+            #line hidden
+            return;
+            case 19:
+            this.gridChangeAttraction = ((System.Windows.Controls.Grid)(target));
+            return;
+            case 20:
+            this.txtChange_NameAttraction = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 21:
+            this.txtChange_Description = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 22:
+            this.txtChange_Quantity = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 23:
+            this.txtChange_PriceOldAttraction = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 24:
+            this.txtChange_PriceBabyAttraction = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 25:
+            this.comboboxChange_StatusAttraction = ((System.Windows.Controls.ComboBox)(target));
+            return;
+            case 26:
+            this.comboboxChange_TypeAttraction = ((System.Windows.Controls.ComboBox)(target));
+            return;
+            case 27:
+            this.imageChange_Attraction = ((System.Windows.Controls.Image)(target));
+            return;
+            case 28:
+            
+            #line 141 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnChangeImageClick);
+            
+            #line default
+            #line hidden
+            return;
+            case 29:
+            
+            #line 142 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnSaveChangeClick);
+            
+            #line default
+            #line hidden
+            return;
+            case 30:
+            
+            #line 143 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnBackAttractionClick);
+            
+            #line default
+            #line hidden
+            return;
+            case 31:
+            this.tabEmployees = ((System.Windows.Controls.TabItem)(target));
+            return;
+            case 32:
+            this.datagridEmployees = ((System.Windows.Controls.DataGrid)(target));
+            return;
+            case 34:
+            
+            #line 168 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddNewEmployeesClick);
+            
+            #line default
+            #line hidden
+            return;
+            case 35:
+            this.gridAddEmployees = ((System.Windows.Controls.Grid)(target));
+            return;
+            case 36:
+            this.txtLastName_Employyes = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 37:
+            this.txtFirstName_Employyes = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 38:
+            this.txtMiddleName_Employees = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 39:
+            this.comboboxRole_Employees = ((System.Windows.Controls.ComboBox)(target));
+            return;
+            case 40:
+            this.comboboxStatus_Employees = ((System.Windows.Controls.ComboBox)(target));
+            return;
+            case 41:
+            
+            #line 200 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnAddEmployeesClick);
+            
+            #line default
+            #line hidden
+            return;
+            case 42:
+            
+            #line 201 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnBackEmployeesClick);
+            
+            #line default
+            #line hidden
+            return;
+            case 43:
+            this.gridChangeEmployees = ((System.Windows.Controls.Grid)(target));
+            return;
+            case 44:
+            this.txtLastName_ChangeEmployyes = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 45:
+            this.txtFirstName_ChangeEmployyes = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 46:
+            this.txtMiddleName_ChangeEmployees = ((System.Windows.Controls.TextBox)(target));
+            return;
+            case 47:
+            this.comboboxRole_ChangeEmployees = ((System.Windows.Controls.ComboBox)(target));
+            return;
+            case 48:
+            this.comboboxStatus_ChangeEmployees = ((System.Windows.Controls.ComboBox)(target));
+            return;
+            case 49:
+            
+            #line 234 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnSaveChangeEmployeesClick);
+            
+            #line default
+            #line hidden
+            return;
+            case 50:
+            
+            #line 235 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnBackEmployeesClick);
+            
+            #line default
+            #line hidden
+            return;
+            case 51:
+            this.datepicker = ((System.Windows.Controls.DatePicker)(target));
+            return;
+            case 52:
+            this.comboboxNameAttraction = ((System.Windows.Controls.ComboBox)(target));
+            return;
+            case 53:
+            
+            #line 247 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnReport1);
+            
+            #line default
+            #line hidden
+            return;
+            }
             this._contentLoaded = true;
         }
+        
+        [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.Performance", "CA1800:DoNotCastUnnecessarily")]
+        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
+        void System.Windows.Markup.IStyleConnector.Connect(int connectionId, object target) {
+            switch (connectionId)
+            {
+            case 5:
+            
+            #line 61 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnChangeAttractionClick);
+            
+            #line default
+            #line hidden
+            break;
+            case 33:
+            
+            #line 161 "..\..\SysAdmin.xaml"
+            ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.BtnChangeEmployeesClick);
+            
+            #line default
+            #line hidden
+            break;
+            }
+        }
     }
 }
 

二進制
mateo/obj/Release/mateo.csproj.AssemblyReference.cache


二進制
mateo/obj/Release/mateo.csproj.ResolveComReference.cache


+ 2 - 2
mateo/obj/Release/mateo_Content.g.cs

@@ -8,7 +8,7 @@
 // </auto-generated>
 //------------------------------------------------------------------------------
 
-[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("model.context.tt")]
-[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("model.tt")]
+[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("model1.context.tt")]
+[assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("model1.tt")]
 
 

+ 7 - 7
mateo/obj/Release/mateo_MarkupCompile.cache

@@ -4,17 +4,17 @@
 winexe
 C#
 .cs
-C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\obj\Release\
+C:\Users\polin\Desktop\mateo\mateo\obj\Release\
 mateo
 none
 false
 TRACE
-C:\Users\polin\OneDrive\Рабочий стол\mateo\mateo\App.xaml
-4-62067497
-2-1881755278
-211164416673
-18-1046349961
-First.xaml;MainWindow.xaml;Profile.xaml;SysAdmin.xaml;
+C:\Users\polin\Desktop\mateo\mateo\App.xaml
+31652185483
+2-1957146511
+24557518138
+21-1953097901
+First.xaml;MainWindow.xaml;SysAdmin.xaml;
 
 True
 

+ 3 - 4
mateo/obj/Release/mateo_MarkupCompile.lref

@@ -1,7 +1,6 @@
 
 
-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;;
+FC:\Users\polin\Desktop\mateo\mateo\First.xaml;;
+FC:\Users\polin\Desktop\mateo\mateo\MainWindow.xaml;;
+FC:\Users\polin\Desktop\mateo\mateo\SysAdmin.xaml;;
 

二進制
packages/MSTest.TestAdapter.2.1.2/.signature.p7s


+ 23 - 0
packages/MSTest.TestAdapter.2.1.2/LICENSE.txt

@@ -0,0 +1,23 @@
+MSTest Framework
+
+Copyright (c) Microsoft Corporation. All rights reserved.
+
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

二進制
packages/MSTest.TestAdapter.2.1.2/MSTest.TestAdapter.2.1.2.nupkg


二進制
packages/MSTest.TestAdapter.2.1.2/build/_common/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll


二進制
packages/MSTest.TestAdapter.2.1.2/build/_common/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll


二進制
packages/MSTest.TestAdapter.2.1.2/build/_common/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll


二進制
packages/MSTest.TestAdapter.2.1.2/build/_common/Microsoft.VisualStudio.TestPlatform.TestFramework.dll


二進制
packages/MSTest.TestAdapter.2.1.2/build/_common/cs/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll


二進制
packages/MSTest.TestAdapter.2.1.2/build/_common/cs/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll


二進制
packages/MSTest.TestAdapter.2.1.2/build/_common/cs/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll


二進制
packages/MSTest.TestAdapter.2.1.2/build/_common/de/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.resources.dll


二進制
packages/MSTest.TestAdapter.2.1.2/build/_common/de/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.resources.dll


+ 0 - 0
packages/MSTest.TestAdapter.2.1.2/build/_common/de/Microsoft.VisualStudio.TestPlatform.TestFramework.resources.dll


部分文件因文件數量過多而無法顯示