Jelajahi Sumber

фикс поиска, список номеров и редактирование/удаление и что-то еще

Smerdova Liza 7 bulan lalu
induk
melakukan
2b91fde68c

+ 1 - 1
PDK_Concert/App.config

@@ -8,7 +8,7 @@
     <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
   </startup>
   <connectionStrings>
-    <add name="sm_RDKEntities" connectionString="metadata=res://*/ModelBD.csdl|res://*/ModelBD.ssdl|res://*/ModelBD.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=sql.ngknn.local;initial catalog=sm_RDK;persist security info=True;user id=21P;password=12357;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
+    <add name="sm_RDKEntities" connectionString="metadata=res://*/ModelBD.csdl|res://*/ModelBD.ssdl|res://*/ModelBD.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=ngknn.ru;initial catalog=sm_RDK;persist security info=True;user id=21P;password=12357;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
   </connectionStrings>
   <entityFramework>
     <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">

+ 2 - 1
PDK_Concert/App.xaml

@@ -29,10 +29,11 @@
 
         <Style TargetType="Button">
             <Setter Property="Width" Value="300"/>
+            <Setter Property="FontWeight" Value="Bold"/>
             <Setter Property="Height" Value="40"/>
             <Setter Property="FontSize" Value="20"/>
             <Setter Property="Background" Value="White"/>
-            <Setter Property="Margin" Value="20"/>
+            <Setter Property="Margin" Value="25"/>
         </Style>
 
         <Style x:Key="Menu" TargetType="TextBlock">

+ 1 - 1
PDK_Concert/ModelBD.Designer.cs

@@ -1,4 +1,4 @@
-// Создание кода T4 для модели "C:\Users\смердоваев\Source\Repos\RDK_Concert\PDK_Concert\ModelBD.edmx" включено. 
+// Создание кода T4 для модели "C:\Users\whiskas\Source\Repos\RDK_Concert\PDK_Concert\ModelBD.edmx" включено. 
 // Чтобы включить формирование кода прежних версий, измените значение свойства "Стратегия создания кода" конструктора
 // на "Legacy ObjectContext". Это свойство доступно в окне "Свойства", если модель
 // открыта в конструкторе.

+ 108 - 106
PDK_Concert/ModelBD.edmx

@@ -4,7 +4,7 @@
   <edmx:Runtime>
     <!-- SSDL content -->
     <edmx:StorageModels>
-      <Schema Namespace="Хранилище sm_RDKModel" 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">
+    <Schema Namespace="Хранилище sm_RDKModel" 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="Concert">
           <Key>
             <PropertyRef Name="IDConcert" />
@@ -41,6 +41,7 @@
           <Property Name="IDNumber" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
           <Property Name="IDUser" Type="int" Nullable="false" />
           <Property Name="Title" Type="nvarchar(max)" Nullable="false" />
+          <Property Name="Description" Type="nvarchar(max)" />
         </EntityType>
         <EntityType Name="Post">
           <Key>
@@ -238,29 +239,71 @@
             <End Role="Users" EntitySet="Users" />
           </AssociationSet>
         </EntityContainer>
-      </Schema>
-    </edmx:StorageModels>
+      </Schema></edmx:StorageModels>
     <!-- CSDL content -->
     <edmx:ConceptualModels>
       <Schema Namespace="sm_RDKModel" 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">
+        <EntityContainer Name="sm_RDKEntities" annotation:LazyLoadingEnabled="true">
+          <EntitySet Name="Concert" EntityType="sm_RDKModel.Concert" />
+          <EntitySet Name="Logined" EntityType="sm_RDKModel.Logined" />
+          <EntitySet Name="Numbers" EntityType="sm_RDKModel.Numbers" />
+          <EntitySet Name="Post" EntityType="sm_RDKModel.Post" />
+          <EntitySet Name="Power" EntityType="sm_RDKModel.Power" />
+          <EntitySet Name="RehearsalDate" EntityType="sm_RDKModel.RehearsalDate" />
+          <EntitySet Name="Users" EntityType="sm_RDKModel.Users" />
+          <EntitySet Name="ConcertProgram" EntityType="sm_RDKModel.ConcertProgram" />
+          <EntitySet Name="RehearsalSchedule" EntityType="sm_RDKModel.RehearsalSchedule" />
+          <AssociationSet Name="FK_ConcertProgram_Concert" Association="sm_RDKModel.FK_ConcertProgram_Concert">
+            <End Role="Concert" EntitySet="Concert" />
+            <End Role="ConcertProgram" EntitySet="ConcertProgram" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Users_Logined" Association="sm_RDKModel.FK_Users_Logined">
+            <End Role="Logined" EntitySet="Logined" />
+            <End Role="Users" EntitySet="Users" />
+          </AssociationSet>
+          <AssociationSet Name="FK_ConcertProgram_Numbers" Association="sm_RDKModel.FK_ConcertProgram_Numbers">
+            <End Role="Numbers" EntitySet="Numbers" />
+            <End Role="ConcertProgram" EntitySet="ConcertProgram" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Numbers_Users" Association="sm_RDKModel.FK_Numbers_Users">
+            <End Role="Users" EntitySet="Users" />
+            <End Role="Numbers" EntitySet="Numbers" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Users_Post" Association="sm_RDKModel.FK_Users_Post">
+            <End Role="Post" EntitySet="Post" />
+            <End Role="Users" EntitySet="Users" />
+          </AssociationSet>
+          <AssociationSet Name="FK_Users_Power" Association="sm_RDKModel.FK_Users_Power">
+            <End Role="Power" EntitySet="Power" />
+            <End Role="Users" EntitySet="Users" />
+          </AssociationSet>
+          <AssociationSet Name="FK_RehearsalSchedule_RehearsalDate" Association="sm_RDKModel.FK_RehearsalSchedule_RehearsalDate">
+            <End Role="RehearsalDate" EntitySet="RehearsalDate" />
+            <End Role="RehearsalSchedule" EntitySet="RehearsalSchedule" />
+          </AssociationSet>
+          <AssociationSet Name="FK_RehearsalSchedule_Users" Association="sm_RDKModel.FK_RehearsalSchedule_Users">
+            <End Role="Users" EntitySet="Users" />
+            <End Role="RehearsalSchedule" EntitySet="RehearsalSchedule" />
+          </AssociationSet>
+        </EntityContainer>
         <EntityType Name="Concert">
           <Key>
             <PropertyRef Name="IDConcert" />
           </Key>
           <Property Name="IDConcert" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
           <Property Name="ConcertDate" Type="DateTime" Nullable="false" Precision="0" />
-          <Property Name="Titlee" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="Titlee" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
           <Property Name="NumderOfRooms" Type="Int32" Nullable="false" />
-          <NavigationProperty Name="ConcertProgram" Relationship="Self.FK_ConcertProgram_Concert" FromRole="Concert" ToRole="ConcertProgram" />
+          <NavigationProperty Name="ConcertProgram" Relationship="sm_RDKModel.FK_ConcertProgram_Concert" FromRole="Concert" ToRole="ConcertProgram" />
         </EntityType>
         <EntityType Name="Logined">
           <Key>
             <PropertyRef Name="ID" />
           </Key>
           <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-          <Property Name="Login" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="Login" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
           <Property Name="Password" Type="Int32" Nullable="false" />
-          <NavigationProperty Name="Users" Relationship="Self.FK_Users_Logined" FromRole="Logined" ToRole="Users" />
+          <NavigationProperty Name="Users" Relationship="sm_RDKModel.FK_Users_Logined" FromRole="Logined" ToRole="Users" />
         </EntityType>
         <EntityType Name="Numbers">
           <Key>
@@ -268,25 +311,26 @@
           </Key>
           <Property Name="IDNumber" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
           <Property Name="IDUser" Type="Int32" Nullable="false" />
-          <Property Name="Title" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
-          <NavigationProperty Name="ConcertProgram" Relationship="Self.FK_ConcertProgram_Numbers" FromRole="Numbers" ToRole="ConcertProgram" />
-          <NavigationProperty Name="Users" Relationship="Self.FK_Numbers_Users" FromRole="Numbers" ToRole="Users" />
+          <Property Name="Title" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
+          <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
+          <NavigationProperty Name="ConcertProgram" Relationship="sm_RDKModel.FK_ConcertProgram_Numbers" FromRole="Numbers" ToRole="ConcertProgram" />
+          <NavigationProperty Name="Users" Relationship="sm_RDKModel.FK_Numbers_Users" FromRole="Numbers" ToRole="Users" />
         </EntityType>
         <EntityType Name="Post">
           <Key>
             <PropertyRef Name="IDPost" />
           </Key>
           <Property Name="IDPost" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-          <Property Name="Title" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
-          <NavigationProperty Name="Users" Relationship="Self.FK_Users_Post" FromRole="Post" ToRole="Users" />
+          <Property Name="Title" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
+          <NavigationProperty Name="Users" Relationship="sm_RDKModel.FK_Users_Post" FromRole="Post" ToRole="Users" />
         </EntityType>
         <EntityType Name="Power">
           <Key>
             <PropertyRef Name="IDPower" />
           </Key>
           <Property Name="IDPower" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-          <Property Name="Title" Type="String" MaxLength="10" FixedLength="true" Unicode="true" Nullable="false" />
-          <NavigationProperty Name="Users" Relationship="Self.FK_Users_Power" FromRole="Power" ToRole="Users" />
+          <Property Name="Title" Type="String" Nullable="false" MaxLength="10" FixedLength="true" Unicode="true" />
+          <NavigationProperty Name="Users" Relationship="sm_RDKModel.FK_Users_Power" FromRole="Power" ToRole="Users" />
         </EntityType>
         <EntityType Name="RehearsalDate">
           <Key>
@@ -294,24 +338,24 @@
           </Key>
           <Property Name="IDData" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
           <Property Name="RehearsalDate1" Type="DateTime" Nullable="false" Precision="0" />
-          <NavigationProperty Name="RehearsalSchedule" Relationship="Self.FK_RehearsalSchedule_RehearsalDate" FromRole="RehearsalDate" ToRole="RehearsalSchedule" />
+          <NavigationProperty Name="RehearsalSchedule" Relationship="sm_RDKModel.FK_RehearsalSchedule_RehearsalDate" FromRole="RehearsalDate" ToRole="RehearsalSchedule" />
         </EntityType>
         <EntityType Name="Users">
           <Key>
             <PropertyRef Name="IDUser" />
           </Key>
           <Property Name="IDUser" Type="Int32" Nullable="false" />
-          <Property Name="Name" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
-          <Property Name="Surname" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
+          <Property Name="Name" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
+          <Property Name="Surname" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" />
           <Property Name="Patronymic" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
           <Property Name="Number" Type="String" MaxLength="11" FixedLength="false" Unicode="true" />
           <Property Name="IDPower" Type="Int32" Nullable="false" />
           <Property Name="IDPost" Type="Int32" Nullable="false" />
-          <NavigationProperty Name="Logined" Relationship="Self.FK_Users_Logined" FromRole="Users" ToRole="Logined" />
-          <NavigationProperty Name="Numbers" Relationship="Self.FK_Numbers_Users" FromRole="Users" ToRole="Numbers" />
-          <NavigationProperty Name="Post" Relationship="Self.FK_Users_Post" FromRole="Users" ToRole="Post" />
-          <NavigationProperty Name="Power" Relationship="Self.FK_Users_Power" FromRole="Users" ToRole="Power" />
-          <NavigationProperty Name="RehearsalSchedule" Relationship="Self.FK_RehearsalSchedule_Users" FromRole="Users" ToRole="RehearsalSchedule" />
+          <NavigationProperty Name="Logined" Relationship="sm_RDKModel.FK_Users_Logined" FromRole="Users" ToRole="Logined" />
+          <NavigationProperty Name="Numbers" Relationship="sm_RDKModel.FK_Numbers_Users" FromRole="Users" ToRole="Numbers" />
+          <NavigationProperty Name="Post" Relationship="sm_RDKModel.FK_Users_Post" FromRole="Users" ToRole="Post" />
+          <NavigationProperty Name="Power" Relationship="sm_RDKModel.FK_Users_Power" FromRole="Users" ToRole="Power" />
+          <NavigationProperty Name="RehearsalSchedule" Relationship="sm_RDKModel.FK_RehearsalSchedule_Users" FromRole="Users" ToRole="RehearsalSchedule" />
         </EntityType>
         <EntityType Name="ConcertProgram">
           <Key>
@@ -322,8 +366,8 @@
           <Property Name="IDConcert" Type="Int32" Nullable="false" />
           <Property Name="IDNumber" Type="Int32" Nullable="false" />
           <Property Name="IndexNumber" Type="Int32" Nullable="false" />
-          <NavigationProperty Name="Concert" Relationship="Self.FK_ConcertProgram_Concert" FromRole="ConcertProgram" ToRole="Concert" />
-          <NavigationProperty Name="Numbers" Relationship="Self.FK_ConcertProgram_Numbers" FromRole="ConcertProgram" ToRole="Numbers" />
+          <NavigationProperty Name="Concert" Relationship="sm_RDKModel.FK_ConcertProgram_Concert" FromRole="ConcertProgram" ToRole="Concert" />
+          <NavigationProperty Name="Numbers" Relationship="sm_RDKModel.FK_ConcertProgram_Numbers" FromRole="ConcertProgram" ToRole="Numbers" />
         </EntityType>
         <EntityType Name="RehearsalSchedule">
           <Key>
@@ -333,13 +377,13 @@
           </Key>
           <Property Name="IDSchedule" Type="Int32" Nullable="false" />
           <Property Name="IDUser" Type="Int32" Nullable="false" />
-          <Property Name="RehearsalTime" Type="String" MaxLength="5" FixedLength="false" Unicode="true" Nullable="false" />
-          <NavigationProperty Name="RehearsalDate" Relationship="Self.FK_RehearsalSchedule_RehearsalDate" FromRole="RehearsalSchedule" ToRole="RehearsalDate" />
-          <NavigationProperty Name="Users" Relationship="Self.FK_RehearsalSchedule_Users" FromRole="RehearsalSchedule" ToRole="Users" />
+          <Property Name="RehearsalTime" Type="String" Nullable="false" MaxLength="5" FixedLength="false" Unicode="true" />
+          <NavigationProperty Name="RehearsalDate" Relationship="sm_RDKModel.FK_RehearsalSchedule_RehearsalDate" FromRole="RehearsalSchedule" ToRole="RehearsalDate" />
+          <NavigationProperty Name="Users" Relationship="sm_RDKModel.FK_RehearsalSchedule_Users" FromRole="RehearsalSchedule" ToRole="Users" />
         </EntityType>
         <Association Name="FK_ConcertProgram_Concert">
-          <End Role="Concert" Type="Self.Concert" Multiplicity="1" />
-          <End Role="ConcertProgram" Type="Self.ConcertProgram" Multiplicity="*" />
+          <End Type="sm_RDKModel.Concert" Role="Concert" Multiplicity="1" />
+          <End Type="sm_RDKModel.ConcertProgram" Role="ConcertProgram" Multiplicity="*" />
           <ReferentialConstraint>
             <Principal Role="Concert">
               <PropertyRef Name="IDConcert" />
@@ -350,8 +394,8 @@
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_Users_Logined">
-          <End Role="Logined" Type="Self.Logined" Multiplicity="1" />
-          <End Role="Users" Type="Self.Users" Multiplicity="0..1" />
+          <End Type="sm_RDKModel.Logined" Role="Logined" Multiplicity="1" />
+          <End Type="sm_RDKModel.Users" Role="Users" Multiplicity="0..1" />
           <ReferentialConstraint>
             <Principal Role="Logined">
               <PropertyRef Name="ID" />
@@ -362,8 +406,8 @@
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_ConcertProgram_Numbers">
-          <End Role="Numbers" Type="Self.Numbers" Multiplicity="1" />
-          <End Role="ConcertProgram" Type="Self.ConcertProgram" Multiplicity="*" />
+          <End Type="sm_RDKModel.Numbers" Role="Numbers" Multiplicity="1" />
+          <End Type="sm_RDKModel.ConcertProgram" Role="ConcertProgram" Multiplicity="*" />
           <ReferentialConstraint>
             <Principal Role="Numbers">
               <PropertyRef Name="IDNumber" />
@@ -374,8 +418,8 @@
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_Numbers_Users">
-          <End Role="Users" Type="Self.Users" Multiplicity="1" />
-          <End Role="Numbers" Type="Self.Numbers" Multiplicity="*" />
+          <End Type="sm_RDKModel.Users" Role="Users" Multiplicity="1" />
+          <End Type="sm_RDKModel.Numbers" Role="Numbers" Multiplicity="*" />
           <ReferentialConstraint>
             <Principal Role="Users">
               <PropertyRef Name="IDUser" />
@@ -386,8 +430,8 @@
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_Users_Post">
-          <End Role="Post" Type="Self.Post" Multiplicity="1" />
-          <End Role="Users" Type="Self.Users" Multiplicity="*" />
+          <End Type="sm_RDKModel.Post" Role="Post" Multiplicity="1" />
+          <End Type="sm_RDKModel.Users" Role="Users" Multiplicity="*" />
           <ReferentialConstraint>
             <Principal Role="Post">
               <PropertyRef Name="IDPost" />
@@ -398,8 +442,8 @@
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_Users_Power">
-          <End Role="Power" Type="Self.Power" Multiplicity="1" />
-          <End Role="Users" Type="Self.Users" Multiplicity="*" />
+          <End Type="sm_RDKModel.Power" Role="Power" Multiplicity="1" />
+          <End Type="sm_RDKModel.Users" Role="Users" Multiplicity="*" />
           <ReferentialConstraint>
             <Principal Role="Power">
               <PropertyRef Name="IDPower" />
@@ -410,8 +454,8 @@
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_RehearsalSchedule_RehearsalDate">
-          <End Role="RehearsalDate" Type="Self.RehearsalDate" Multiplicity="1" />
-          <End Role="RehearsalSchedule" Type="Self.RehearsalSchedule" Multiplicity="*" />
+          <End Type="sm_RDKModel.RehearsalDate" Role="RehearsalDate" Multiplicity="1" />
+          <End Type="sm_RDKModel.RehearsalSchedule" Role="RehearsalSchedule" Multiplicity="*" />
           <ReferentialConstraint>
             <Principal Role="RehearsalDate">
               <PropertyRef Name="IDData" />
@@ -422,8 +466,8 @@
           </ReferentialConstraint>
         </Association>
         <Association Name="FK_RehearsalSchedule_Users">
-          <End Role="Users" Type="Self.Users" Multiplicity="1" />
-          <End Role="RehearsalSchedule" Type="Self.RehearsalSchedule" Multiplicity="*" />
+          <End Type="sm_RDKModel.Users" Role="Users" Multiplicity="1" />
+          <End Type="sm_RDKModel.RehearsalSchedule" Role="RehearsalSchedule" Multiplicity="*" />
           <ReferentialConstraint>
             <Principal Role="Users">
               <PropertyRef Name="IDUser" />
@@ -433,49 +477,6 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
-        <EntityContainer Name="sm_RDKEntities" annotation:LazyLoadingEnabled="true">
-          <EntitySet Name="Concert" EntityType="Self.Concert" />
-          <EntitySet Name="Logined" EntityType="Self.Logined" />
-          <EntitySet Name="Numbers" EntityType="Self.Numbers" />
-          <EntitySet Name="Post" EntityType="Self.Post" />
-          <EntitySet Name="Power" EntityType="Self.Power" />
-          <EntitySet Name="RehearsalDate" EntityType="Self.RehearsalDate" />
-          <EntitySet Name="Users" EntityType="Self.Users" />
-          <EntitySet Name="ConcertProgram" EntityType="Self.ConcertProgram" />
-          <EntitySet Name="RehearsalSchedule" EntityType="Self.RehearsalSchedule" />
-          <AssociationSet Name="FK_ConcertProgram_Concert" Association="Self.FK_ConcertProgram_Concert">
-            <End Role="Concert" EntitySet="Concert" />
-            <End Role="ConcertProgram" EntitySet="ConcertProgram" />
-          </AssociationSet>
-          <AssociationSet Name="FK_Users_Logined" Association="Self.FK_Users_Logined">
-            <End Role="Logined" EntitySet="Logined" />
-            <End Role="Users" EntitySet="Users" />
-          </AssociationSet>
-          <AssociationSet Name="FK_ConcertProgram_Numbers" Association="Self.FK_ConcertProgram_Numbers">
-            <End Role="Numbers" EntitySet="Numbers" />
-            <End Role="ConcertProgram" EntitySet="ConcertProgram" />
-          </AssociationSet>
-          <AssociationSet Name="FK_Numbers_Users" Association="Self.FK_Numbers_Users">
-            <End Role="Users" EntitySet="Users" />
-            <End Role="Numbers" EntitySet="Numbers" />
-          </AssociationSet>
-          <AssociationSet Name="FK_Users_Post" Association="Self.FK_Users_Post">
-            <End Role="Post" EntitySet="Post" />
-            <End Role="Users" EntitySet="Users" />
-          </AssociationSet>
-          <AssociationSet Name="FK_Users_Power" Association="Self.FK_Users_Power">
-            <End Role="Power" EntitySet="Power" />
-            <End Role="Users" EntitySet="Users" />
-          </AssociationSet>
-          <AssociationSet Name="FK_RehearsalSchedule_RehearsalDate" Association="Self.FK_RehearsalSchedule_RehearsalDate">
-            <End Role="RehearsalDate" EntitySet="RehearsalDate" />
-            <End Role="RehearsalSchedule" EntitySet="RehearsalSchedule" />
-          </AssociationSet>
-          <AssociationSet Name="FK_RehearsalSchedule_Users" Association="Self.FK_RehearsalSchedule_Users">
-            <End Role="Users" EntitySet="Users" />
-            <End Role="RehearsalSchedule" EntitySet="RehearsalSchedule" />
-          </AssociationSet>
-        </EntityContainer>
       </Schema>
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
@@ -485,83 +486,84 @@
           <EntitySetMapping Name="Concert">
             <EntityTypeMapping TypeName="sm_RDKModel.Concert">
               <MappingFragment StoreEntitySet="Concert">
-                <ScalarProperty Name="IDConcert" ColumnName="IDConcert" />
-                <ScalarProperty Name="ConcertDate" ColumnName="ConcertDate" />
-                <ScalarProperty Name="Titlee" ColumnName="Titlee" />
                 <ScalarProperty Name="NumderOfRooms" ColumnName="NumderOfRooms" />
+                <ScalarProperty Name="Titlee" ColumnName="Titlee" />
+                <ScalarProperty Name="ConcertDate" ColumnName="ConcertDate" />
+                <ScalarProperty Name="IDConcert" ColumnName="IDConcert" />
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
           <EntitySetMapping Name="Logined">
             <EntityTypeMapping TypeName="sm_RDKModel.Logined">
               <MappingFragment StoreEntitySet="Logined">
-                <ScalarProperty Name="ID" ColumnName="ID" />
-                <ScalarProperty Name="Login" ColumnName="Login" />
                 <ScalarProperty Name="Password" ColumnName="Password" />
+                <ScalarProperty Name="Login" ColumnName="Login" />
+                <ScalarProperty Name="ID" ColumnName="ID" />
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
           <EntitySetMapping Name="Numbers">
             <EntityTypeMapping TypeName="sm_RDKModel.Numbers">
               <MappingFragment StoreEntitySet="Numbers">
-                <ScalarProperty Name="IDNumber" ColumnName="IDNumber" />
-                <ScalarProperty Name="IDUser" ColumnName="IDUser" />
+                <ScalarProperty Name="Description" ColumnName="Description" />
                 <ScalarProperty Name="Title" ColumnName="Title" />
+                <ScalarProperty Name="IDUser" ColumnName="IDUser" />
+                <ScalarProperty Name="IDNumber" ColumnName="IDNumber" />
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
           <EntitySetMapping Name="Post">
             <EntityTypeMapping TypeName="sm_RDKModel.Post">
               <MappingFragment StoreEntitySet="Post">
-                <ScalarProperty Name="IDPost" ColumnName="IDPost" />
                 <ScalarProperty Name="Title" ColumnName="Title" />
+                <ScalarProperty Name="IDPost" ColumnName="IDPost" />
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
           <EntitySetMapping Name="Power">
             <EntityTypeMapping TypeName="sm_RDKModel.Power">
               <MappingFragment StoreEntitySet="Power">
-                <ScalarProperty Name="IDPower" ColumnName="IDPower" />
                 <ScalarProperty Name="Title" ColumnName="Title" />
+                <ScalarProperty Name="IDPower" ColumnName="IDPower" />
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
           <EntitySetMapping Name="RehearsalDate">
             <EntityTypeMapping TypeName="sm_RDKModel.RehearsalDate">
               <MappingFragment StoreEntitySet="RehearsalDate">
-                <ScalarProperty Name="IDData" ColumnName="IDData" />
                 <ScalarProperty Name="RehearsalDate1" ColumnName="RehearsalDate" />
+                <ScalarProperty Name="IDData" ColumnName="IDData" />
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
           <EntitySetMapping Name="Users">
             <EntityTypeMapping TypeName="sm_RDKModel.Users">
               <MappingFragment StoreEntitySet="Users">
-                <ScalarProperty Name="IDUser" ColumnName="IDUser" />
-                <ScalarProperty Name="Name" ColumnName="Name" />
-                <ScalarProperty Name="Surname" ColumnName="Surname" />
-                <ScalarProperty Name="Patronymic" ColumnName="Patronymic" />
-                <ScalarProperty Name="Number" ColumnName="Number" />
-                <ScalarProperty Name="IDPower" ColumnName="IDPower" />
                 <ScalarProperty Name="IDPost" ColumnName="IDPost" />
+                <ScalarProperty Name="IDPower" ColumnName="IDPower" />
+                <ScalarProperty Name="Number" ColumnName="Number" />
+                <ScalarProperty Name="Patronymic" ColumnName="Patronymic" />
+                <ScalarProperty Name="Surname" ColumnName="Surname" />
+                <ScalarProperty Name="Name" ColumnName="Name" />
+                <ScalarProperty Name="IDUser" ColumnName="IDUser" />
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
           <EntitySetMapping Name="ConcertProgram">
             <EntityTypeMapping TypeName="sm_RDKModel.ConcertProgram">
               <MappingFragment StoreEntitySet="ConcertProgram">
-                <ScalarProperty Name="IDConcert" ColumnName="IDConcert" />
-                <ScalarProperty Name="IDNumber" ColumnName="IDNumber" />
                 <ScalarProperty Name="IndexNumber" ColumnName="IndexNumber" />
+                <ScalarProperty Name="IDNumber" ColumnName="IDNumber" />
+                <ScalarProperty Name="IDConcert" ColumnName="IDConcert" />
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
           <EntitySetMapping Name="RehearsalSchedule">
             <EntityTypeMapping TypeName="sm_RDKModel.RehearsalSchedule">
               <MappingFragment StoreEntitySet="RehearsalSchedule">
-                <ScalarProperty Name="IDSchedule" ColumnName="IDSchedule" />
-                <ScalarProperty Name="IDUser" ColumnName="IDUser" />
                 <ScalarProperty Name="RehearsalTime" ColumnName="RehearsalTime" />
+                <ScalarProperty Name="IDUser" ColumnName="IDUser" />
+                <ScalarProperty Name="IDSchedule" ColumnName="IDSchedule" />
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>

+ 17 - 17
PDK_Concert/ModelBD.edmx.diagram

@@ -5,23 +5,23 @@
     <!-- Diagram content (shape and connector positions) -->
     <edmx:Diagrams>
       <Diagram DiagramId="7cff3210b2dc40c680f2c4fd473a00ee" Name="Diagram1">
-        <EntityTypeShape EntityType="sm_RDKModel.Concert" Width="1.5" PointX="5.25" PointY="6.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="sm_RDKModel.Logined" Width="1.5" PointX="0.75" PointY="3.875" IsExpanded="true" />
-        <EntityTypeShape EntityType="sm_RDKModel.Numbers" Width="1.5" PointX="5.25" PointY="3.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="sm_RDKModel.Post" Width="1.5" PointX="0.75" PointY="0.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="sm_RDKModel.Power" Width="1.5" PointX="0.75" PointY="7.125" IsExpanded="true" />
-        <EntityTypeShape EntityType="sm_RDKModel.RehearsalDate" Width="1.5" PointX="3" PointY="9.125" IsExpanded="true" />
-        <EntityTypeShape EntityType="sm_RDKModel.Users" Width="1.5" PointX="3" PointY="3.125" IsExpanded="true" />
-        <EntityTypeShape EntityType="sm_RDKModel.ConcertProgram" Width="1.5" PointX="7.5" PointY="3.75" IsExpanded="true" />
-        <EntityTypeShape EntityType="sm_RDKModel.RehearsalSchedule" Width="1.5" PointX="5.25" PointY="0.75" IsExpanded="true" />
-        <AssociationConnector Association="sm_RDKModel.FK_ConcertProgram_Concert" ManuallyRouted="false" />
-        <AssociationConnector Association="sm_RDKModel.FK_Users_Logined" ManuallyRouted="false" />
-        <AssociationConnector Association="sm_RDKModel.FK_ConcertProgram_Numbers" ManuallyRouted="false" />
-        <AssociationConnector Association="sm_RDKModel.FK_Numbers_Users" ManuallyRouted="false" />
-        <AssociationConnector Association="sm_RDKModel.FK_Users_Post" ManuallyRouted="false" />
-        <AssociationConnector Association="sm_RDKModel.FK_Users_Power" ManuallyRouted="false" />
-        <AssociationConnector Association="sm_RDKModel.FK_RehearsalSchedule_RehearsalDate" ManuallyRouted="false" />
-        <AssociationConnector Association="sm_RDKModel.FK_RehearsalSchedule_Users" ManuallyRouted="false" />
+        <EntityTypeShape EntityType="sm_RDKModel.Concert" Width="1.5" PointX="5.25" PointY="9.5" />
+        <EntityTypeShape EntityType="sm_RDKModel.Logined" Width="1.5" PointX="0.75" PointY="0.75" />
+        <EntityTypeShape EntityType="sm_RDKModel.Numbers" Width="1.5" PointX="5.25" PointY="6.5" />
+        <EntityTypeShape EntityType="sm_RDKModel.Post" Width="1.5" PointX="0.75" PointY="7.25" />
+        <EntityTypeShape EntityType="sm_RDKModel.Power" Width="1.5" PointX="0.75" PointY="4" />
+        <EntityTypeShape EntityType="sm_RDKModel.RehearsalDate" Width="1.5" PointX="3" PointY="8" />
+        <EntityTypeShape EntityType="sm_RDKModel.Users" Width="1.5" PointX="3" PointY="3.125" />
+        <EntityTypeShape EntityType="sm_RDKModel.ConcertProgram" Width="1.5" PointX="7.5" PointY="6.5" />
+        <EntityTypeShape EntityType="sm_RDKModel.RehearsalSchedule" Width="1.5" PointX="5.25" PointY="2.875" />
+        <AssociationConnector Association="sm_RDKModel.FK_ConcertProgram_Concert" />
+        <AssociationConnector Association="sm_RDKModel.FK_Users_Logined" />
+        <AssociationConnector Association="sm_RDKModel.FK_ConcertProgram_Numbers" />
+        <AssociationConnector Association="sm_RDKModel.FK_Numbers_Users" />
+        <AssociationConnector Association="sm_RDKModel.FK_Users_Post" />
+        <AssociationConnector Association="sm_RDKModel.FK_Users_Power" />
+        <AssociationConnector Association="sm_RDKModel.FK_RehearsalSchedule_RehearsalDate" />
+        <AssociationConnector Association="sm_RDKModel.FK_RehearsalSchedule_Users" />
       </Diagram>
     </edmx:Diagrams>
   </edmx:Designer>

+ 1 - 0
PDK_Concert/Numbers.cs

@@ -23,6 +23,7 @@ namespace PDK_Concert
         public int IDNumber { get; set; }
         public int IDUser { get; set; }
         public string Title { get; set; }
+        public string Description { get; set; }
     
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
         public virtual ICollection<ConcertProgram> ConcertProgram { get; set; }

+ 3 - 3
PDK_Concert/Pages/ConcertPage.xaml

@@ -21,17 +21,17 @@
                     <StackPanel>
                         <TextBlock TextWrapping="Wrap" Style="{StaticResource List}">
                                     <Run Text="Дата:" FontWeight="Bold"/>
-                                    <Run Text="{Binding Date, StringFormat={}dd.MM.yyyy}"/>
+                                    <Run Text="{Binding ConcertDate, StringFormat={}dd.MM.yyyy}"/>
                         </TextBlock>
                         <TextBlock TextWrapping="Wrap" Style="{StaticResource List}">
                                     <Run Text="Название: " FontWeight="Bold"/>
-                                    <Run Text="{Binding Title}"/>
+                                    <Run Text="{Binding Titlee}"/>
                         </TextBlock>
                     </StackPanel>
                 </DataTemplate>
             </ListView.ItemTemplate>
         </ListView>
         <TextBlock Name="not" Text="Актуальных концертов нет" Grid.Row="1" Style="{StaticResource Title}" TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed"/>
-        <Button Grid.Column="1" Click="btConcert_Click" Margin="0" Content="Прошлые концерты" Grid.Row="2" Name="btConcert"/>
+        <Button Grid.Column="1" Click="btConcert_Click" Margin="0" Content="Прошедшие концерты" Grid.Row="2" Name="btConcert"/>
     </Grid>
 </Page>

+ 6 - 3
PDK_Concert/Pages/ConcertPage.xaml.cs

@@ -21,12 +21,14 @@ namespace PDK_Concert.Pages
     public partial class CocertPage : Page
     {
         Logined logined;
+        List<Concert> concertList;
         public CocertPage(Logined logined)
         {
             InitializeComponent();
             this.logined = logined;
-            listConcent.ItemsSource = Classes.DataBaseClass.connect.Concert.ToList();
-            if (listConcent == null)
+            concertList = Classes.DataBaseClass.connect.Concert.Where(x=> x.ConcertDate>=DateTime.Today).ToList();
+            listConcent.ItemsSource = concertList;
+            if (concertList.Count==0)
             {
                 not.Visibility = Visibility.Visible;
                 listConcent.Visibility = Visibility.Collapsed;
@@ -35,7 +37,8 @@ namespace PDK_Concert.Pages
 
         private void listConcent_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
-
+            Concert concertProgram = listConcent.SelectedItem as Concert;
+            Classes.FrameClass.menuFrame.Navigate(new ConcertProgramPage(concertProgram.IDConcert));
         }
 
         private void btConcert_Click(object sender, RoutedEventArgs e)

+ 37 - 0
PDK_Concert/Pages/ConcertProgramPage.xaml

@@ -0,0 +1,37 @@
+<Page x:Class="PDK_Concert.Pages.ConcertProgramPage"
+      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+      xmlns:local="clr-namespace:PDK_Concert.Pages"
+      mc:Ignorable="d" 
+      d:DesignHeight="450" d:DesignWidth="800"
+      Title="ConcertProgramPage">
+
+    <Grid>
+        <StackPanel>
+            <TextBlock Text="{Binding Titlee}" Style="{StaticResource Title}" HorizontalAlignment="Center" FontWeight="Bold"/>
+            <ListView Name="listNumber">
+                <ListView.View>
+                    <GridView>
+                        <GridViewColumn Header="Номер">
+                            <GridViewColumn.CellTemplate>
+                                <DataTemplate>
+                                    <TextBox Foreground="Black" FontSize="20" Text="{Binding IndexNumber}"/>
+                                </DataTemplate>
+                            </GridViewColumn.CellTemplate>
+                        </GridViewColumn>
+                        <GridViewColumn Header="Название">
+                            <GridViewColumn.CellTemplate>
+                                <DataTemplate>
+                                    <TextBlock Style="{StaticResource List}" Text="{Binding Numbers.Title}"/>
+                                </DataTemplate>
+                            </GridViewColumn.CellTemplate>
+                        </GridViewColumn>
+                    </GridView>
+                </ListView.View>
+            </ListView>
+            <TextBlock Text="Концертной прораммы нет" Style="{StaticResource Title}" Name="not" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed"/>
+        </StackPanel>
+    </Grid>
+</Page>

+ 39 - 0
PDK_Concert/Pages/ConcertProgramPage.xaml.cs

@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDK_Concert.Pages
+{
+    /// <summary>
+    /// Логика взаимодействия для ConcertProgramPage.xaml
+    /// </summary>
+    public partial class ConcertProgramPage : Page
+    {
+        List<ConcertProgram> concertProgramList;
+        Concert program;
+        public ConcertProgramPage(int IDConcert)
+        {
+            InitializeComponent();
+            concertProgramList = Classes.DataBaseClass.connect.ConcertProgram.Where(x=> x.IDConcert == IDConcert).ToList();
+            listNumber.ItemsSource = concertProgramList;
+            program = Classes.DataBaseClass.connect.Concert.FirstOrDefault(x=> x.IDConcert==IDConcert);
+            DataContext = program;
+            if (concertProgramList.Count == 0)
+            {
+                not.Visibility = Visibility.Visible;
+                listNumber.Visibility = Visibility.Collapsed;
+            }
+        }
+    }
+}

+ 25 - 0
PDK_Concert/Pages/NewNumberPage.xaml

@@ -0,0 +1,25 @@
+<Page x:Class="PDK_Concert.Pages.NewNumberPage"
+      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+      xmlns:local="clr-namespace:PDK_Concert.Pages"
+      mc:Ignorable="d" 
+      d:DesignHeight="450" d:DesignWidth="800"
+      Title="NewNumberPage">
+
+    <Grid>
+        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
+            <GroupBox Header="Название номера">
+                <TextBox Name="tbTitle"/>
+            </GroupBox>
+            <GroupBox Header="Описание номера" Height="300">
+                <TextBox TextWrapping="Wrap" Name="tbDescription"/>
+            </GroupBox>
+            <StackPanel Orientation="Horizontal">
+                <Button Click="save_Click" Content="Добавить" Name="save"/>
+                <Button Click="back_Click" Content="Отмена" Name="back"/>
+            </StackPanel>
+        </StackPanel>
+    </Grid>
+</Page>

+ 49 - 0
PDK_Concert/Pages/NewNumberPage.xaml.cs

@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDK_Concert.Pages
+{
+    /// <summary>
+    /// Логика взаимодействия для NewNumberPage.xaml
+    /// </summary>
+    public partial class NewNumberPage : Page
+    {
+        Logined logined;
+        public NewNumberPage(Logined logined)
+        {
+            InitializeComponent();
+            this.logined = logined;
+        }
+
+        private void save_Click(object sender, RoutedEventArgs e)
+        {
+            Numbers numbers = new Numbers() 
+            { 
+                IDUser = logined.ID,
+                Title = tbTitle.Text,
+                Description = tbDescription.Text
+            };
+            Classes.DataBaseClass.connect.Numbers.Add(numbers);
+            Classes.DataBaseClass.connect.SaveChanges();
+            MessageBox.Show("Номер успешно добавлен","Информация", MessageBoxButton.OK, MessageBoxImage.Information);
+            Classes.FrameClass.menuFrame.Navigate(new NumberPage(logined));
+        }
+
+        private void back_Click(object sender, RoutedEventArgs e)
+        {
+            Classes.FrameClass.menuFrame.Navigate(new NumberPage(logined));
+        }
+    }
+}

+ 9 - 2
PDK_Concert/Pages/NumberPage.xaml

@@ -21,11 +21,18 @@
                 <TextBox TextChanged="poisk_TextChanged" Name="poisk" Width="500"/>
             </StackPanel>
         </StackPanel>
-        <ListView Grid.Row="1" HorizontalContentAlignment="Stretch" Name="listNumbers">
+        <ListView SelectionChanged="listNumbers_SelectionChanged" Grid.Row="1" HorizontalContentAlignment="Stretch" Name="listNumbers">
             <ListView.ItemTemplate>
                 <DataTemplate>
                     <StackPanel>
-                        <TextBlock Text="{Binding Title, StringFormat={}dd.MM.yyyy}" Style="{StaticResource List}"/>
+                        <TextBlock  Style="{StaticResource List}">
+                            <Run Text="Название: " FontWeight="Bold"/>
+                            <Run Text="{Binding Title}"/>
+                        </TextBlock>
+                        <TextBlock  Style="{StaticResource List}" TextWrapping="Wrap">
+                            <Run Text="Описание: " FontWeight="Bold"/>
+                            <Run Text="{Binding Description}"/>
+                        </TextBlock>
                     </StackPanel>
                 </DataTemplate>
             </ListView.ItemTemplate>

+ 18 - 3
PDK_Concert/Pages/NumberPage.xaml.cs

@@ -28,7 +28,7 @@ namespace PDK_Concert.Pages
             this.logined = logined;
             listNumbers.ItemsSource = Classes.DataBaseClass.connect.Numbers.Where(x => x.IDUser == logined.ID).ToList();
             showNumbers = Classes.DataBaseClass.connect.Numbers.Where(x => x.IDUser == logined.ID).ToList();
-            if (listNumbers==null)
+            if (showNumbers.Count==0)
             {
                 not.Visibility = Visibility.Visible;
                 listNumbers.Visibility = Visibility.Collapsed;
@@ -37,7 +37,7 @@ namespace PDK_Concert.Pages
 
         private void btNewNumber_Click(object sender, RoutedEventArgs e)
         {
-
+            Classes.FrameClass.menuFrame.Navigate(new NewNumberPage(logined));
         }
 
         private void poisk_TextChanged(object sender, TextChangedEventArgs e)
@@ -48,7 +48,8 @@ namespace PDK_Concert.Pages
 
         private void UpdateList(string text)
         {
-            if(!string.IsNullOrEmpty(text))
+            showNumbers = Classes.DataBaseClass.connect.Numbers.Where(x => x.IDUser == logined.ID).ToList();
+            if (!string.IsNullOrWhiteSpace(text))
             {
                 showNumbers = showNumbers.Where(x=>x.Title.ToLower().Contains(text.ToLower())).ToList();
                 if(showNumbers.Count>0)
@@ -66,9 +67,23 @@ namespace PDK_Concert.Pages
             }
             if(text=="")
             {
+                listNumbers.ItemsSource = Classes.DataBaseClass.connect.Numbers.Where(x => x.IDUser == logined.ID).ToList();
                 not.Visibility = Visibility.Collapsed;
                 listNumbers.Visibility = Visibility.Visible;
             }
         }
+
+        private void listNumbers_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+            //this.IsEnabled = false;
+            Numbers numbers = listNumbers.SelectedItem as Numbers;
+            UpdateNumberWindow updateNumber = new UpdateNumberWindow(numbers.IDNumber);
+            /*updateNumber.Closed += (sender, e) =>
+            {
+                listNumbers.ItemsSource = Classes.DataBaseClass.connect.Numbers.Where(x => x.IDUser == logined.ID).ToList();
+                this.IsEnabled = true;
+            };*/
+            updateNumber.Show();
+        }
     }
 }

+ 3 - 1
PDK_Concert/Pages/RehearsalSchedulePage.xaml.cs

@@ -21,12 +21,14 @@ namespace PDK_Concert.Pages
     public partial class RehearsalSchedulePage : Page
     {
         Logined logined;
+        List<RehearsalDate> schedules;
         public RehearsalSchedulePage(Logined logined)
         {
             InitializeComponent();
             this.logined = logined;
             listRehearsal.ItemsSource = Classes.DataBaseClass.connect.RehearsalDate.ToList();
-            if (listRehearsal == null)
+            schedules = Classes.DataBaseClass.connect.RehearsalDate.ToList();
+            if (schedules.Count==0)
             {
                 not.Visibility = Visibility.Visible;
                 listRehearsal.Visibility = Visibility.Collapsed;

+ 28 - 0
PDK_Concert/Pages/UpdateNumberWindow.xaml

@@ -0,0 +1,28 @@
+<Window x:Class="PDK_Concert.Pages.UpdateNumberWindow"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:local="clr-namespace:PDK_Concert.Pages"
+        mc:Ignorable="d"
+        Background="#284590"
+        Title="UpdateNumberWindow" Height="450" Width="900">
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="*"/>
+            <ColumnDefinition Width="250"/>
+        </Grid.ColumnDefinitions>
+        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
+            <GroupBox Header="Название номера">
+                <TextBox Text="{Binding Title}"/>
+            </GroupBox>
+            <GroupBox Header="Описание номера" Height="150">
+                <TextBox TextWrapping="Wrap" Text="{Binding Description}"/>
+            </GroupBox>
+        </StackPanel>
+        <StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
+            <Button Click="save_Click" Width="200" Content="Сохранить" Name="save"/>
+            <Button Click="delete_Click" Width="200" Content="Удалить" Name="delete"/>
+        </StackPanel>
+    </Grid>
+</Window>

+ 48 - 0
PDK_Concert/Pages/UpdateNumberWindow.xaml.cs

@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace PDK_Concert.Pages
+{
+    /// <summary>
+    /// Логика взаимодействия для UpdateNumberWindow.xaml
+    /// </summary>
+    public partial class UpdateNumberWindow : Window
+    {
+        Numbers numbers;
+        public UpdateNumberWindow(int number)
+        {
+            InitializeComponent();
+            numbers = Classes.DataBaseClass.connect.Numbers.FirstOrDefault(x=>x.IDNumber == number);
+            DataContext = numbers;
+        }
+
+        private void save_Click(object sender, RoutedEventArgs e)
+        {
+            Classes.DataBaseClass.connect.SaveChanges();
+            this.Close();
+        }
+
+        private void delete_Click(object sender, RoutedEventArgs e)
+        {
+            var result = MessageBox.Show("Действительно хотите удалить номер?","Информация", MessageBoxButton.YesNo, MessageBoxImage.Question);
+            if (result==MessageBoxResult.Yes)
+            {
+                Classes.DataBaseClass.connect.Numbers.Remove(numbers);
+                Classes.DataBaseClass.connect.SaveChanges();
+                this.Close();
+            }
+            
+        }
+    }
+}

+ 22 - 0
PDK_Concert/RDK_Concert.csproj

@@ -46,6 +46,7 @@
     <Reference Include="System.Data" />
     <Reference Include="System.Runtime.Serialization" />
     <Reference Include="System.Security" />
+    <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml" />
     <Reference Include="Microsoft.CSharp" />
     <Reference Include="System.Core" />
@@ -84,6 +85,12 @@
     <Compile Include="Pages\ConcertPage.xaml.cs">
       <DependentUpon>ConcertPage.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Pages\ConcertProgramPage.xaml.cs">
+      <DependentUpon>ConcertProgramPage.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Pages\NewNumberPage.xaml.cs">
+      <DependentUpon>NewNumberPage.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Pages\NumberPage.xaml.cs">
       <DependentUpon>NumberPage.xaml</DependentUpon>
     </Compile>
@@ -93,6 +100,9 @@
     <Compile Include="Pages\RehearsalSchedulePage.xaml.cs">
       <DependentUpon>RehearsalSchedulePage.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Pages\UpdateNumberWindow.xaml.cs">
+      <DependentUpon>UpdateNumberWindow.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Pages\UpdatePasswordPage.xaml.cs">
       <DependentUpon>UpdatePasswordPage.xaml</DependentUpon>
     </Compile>
@@ -133,10 +143,18 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Pages\ConcertProgramPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Pages\MainPage.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Pages\NewNumberPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Pages\NumberPage.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -149,6 +167,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Pages\UpdateNumberWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="Pages\UpdatePasswordPage.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>