浏览代码

15.03 Insert new

gr672_bda 4 年之前
父节点
当前提交
e847c478df

+ 23 - 0
ProjectAnalogParus/DetailsStudent.cs

@@ -0,0 +1,23 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан по шаблону.
+//
+//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
+//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace ProjectAnalogParus
+{
+    using System;
+    using System.Collections.Generic;
+    
+    public partial class DetailsStudent
+    {
+        public int IdDetailsStudent { get; set; }
+        public int StudentId { get; set; }
+        public string NumberBankCard { get; set; }
+    
+        public virtual Student Student { get; set; }
+    }
+}

+ 24 - 0
ProjectAnalogParus/DetailsStudentPage.xaml

@@ -0,0 +1,24 @@
+<Page x:Class="ProjectAnalogParus.DetailsStudentPage"
+      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:ProjectAnalogParus"
+      mc:Ignorable="d" 
+      d:DesignHeight="450" d:DesignWidth="800"
+      Title="DetailsStudentPage" Loaded="LoadedWindows">
+
+    <Grid>
+        <DataGrid Name="Detailsgrid" HorizontalAlignment="Left" AutoGenerateColumns="False" Height="150" Margin="10,10,0,0" VerticalAlignment="Top" Width="780" >
+
+            <DataGrid.Columns>
+                <DataGridTextColumn Binding="{Binding IdDetailsStudent}" Header="Id" Width="*"/>
+                <DataGridTextColumn Binding="{Binding Student.LastName}" Header="Фамилия" Width="3*"/>
+                <DataGridTextColumn Binding="{Binding Student.FirstName}" Header="Имя" Width="3*"/>
+                <DataGridTextColumn Binding="{Binding Student.Middlename}" Header="Отчество" Width="3*"/>
+                <DataGridTextColumn Binding="{Binding NumberBankCard}" Header="Номер карты" Width="3*" />
+            </DataGrid.Columns>
+        </DataGrid>
+        <Button Content="Добавить" HorizontalAlignment="Left" Margin="156,357,0,0" VerticalAlignment="Top" Width="75" Click="InsertNumberCard"/>
+    </Grid>
+</Page>

+ 41 - 0
ProjectAnalogParus/DetailsStudentPage.xaml.cs

@@ -0,0 +1,41 @@
+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 ProjectAnalogParus
+{
+    /// <summary>
+    /// Логика взаимодействия для DetailsStudentPage.xaml
+    /// </summary>
+    public partial class DetailsStudentPage : Page
+    {
+        public DetailsStudentPage()
+        {
+            InitializeComponent();
+        }
+
+        private void InsertNumberCard(object sender, RoutedEventArgs e)
+        {
+            InsertDetailsStudentWindow open = new InsertDetailsStudentWindow();
+            open.Show();
+        }
+        private void LoadedWindows(object sender, RoutedEventArgs e)
+        {
+            gr672_bdaEntities db = new gr672_bdaEntities();
+            Detailsgrid.ItemsSource = db.DetailsStudent.ToList();
+
+        }
+
+    }
+}

+ 1 - 1
ProjectAnalogParus/EncouragementSummaPage.xaml

@@ -30,7 +30,7 @@
         <ComboBox Name="cmbScholarship" HorizontalAlignment="Left" Margin="304,181,0,0" VerticalAlignment="Top" Width="120"/>
         <ComboBox Name="cmbEncoragement" HorizontalAlignment="Left" Margin="304,221,0,0" VerticalAlignment="Top" Width="120"/>
         <TextBlock Name="AmoutSumma" HorizontalAlignment="Left" Margin="304,254,0,0" TextWrapping="Wrap"  VerticalAlignment="Top" Height="24" Width="120"/>
-        <DatePicker HorizontalAlignment="Left" Margin="302,143,0,0" VerticalAlignment="Top" Height="29" Width="120"/>
+        <DatePicker Name="datetime" HorizontalAlignment="Left" Margin="302,143,0,0" VerticalAlignment="Top" Height="29" Width="120"/>
        
             
 

+ 13 - 1
ProjectAnalogParus/EncouragementSummaPage.xaml.cs

@@ -42,11 +42,23 @@ namespace ProjectAnalogParus
             cmbEncoragement.ItemsSource = db.TypeEncouragement.ToList();
             cmbEncoragement.DisplayMemberPath = "NameTypeEncouragement";
             cmbEncoragement.SelectedValuePath = "IdTypeEncouragement";
+
+           
         }        
 
         private void SummaClick(object sender, RoutedEventArgs e)
         {
-           
+
+
+            if (cmbStudent != null && cmbUser != null && datetime != null || cmbScholarship != null || cmbEncoragement != null)
+            {
+               
+            }
+            else
+            {
+                MessageBox.Show("Не все поля заполнены");
+            }
+          
         }
     }
 }

+ 30 - 0
ProjectAnalogParus/InsertDetailsStudentWindow.xaml

@@ -0,0 +1,30 @@
+<Window x:Class="ProjectAnalogParus.InsertDetailsStudentWindow"
+        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:ProjectAnalogParus"
+        mc:Ignorable="d"
+        Title="InsertDetailsStudentWindow" Height="450" Width="800">
+    <Grid>
+        <ComboBox Name="cmbStudent" HorizontalAlignment="Left" Margin="324,98,0,0" VerticalAlignment="Top" Width="120">
+            <ComboBox.ItemTemplate>
+                <DataTemplate>
+                    <TextBlock DataContext="{Binding}">
+                        <TextBlock.Text>
+                            <MultiBinding StringFormat="{}{0} {1} {2}">
+                                <Binding Path="LastName" />
+                                <Binding Path="FirstName" />
+                                <Binding Path="Middlename" />
+                            </MultiBinding>
+                        </TextBlock.Text>
+                    </TextBlock>
+                </DataTemplate>
+            </ComboBox.ItemTemplate>
+        </ComboBox>
+        <TextBox Name="txtNumberCard" HorizontalAlignment="Left" Height="23" Margin="324,160,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"/>
+        <Button Content="Добавить" HorizontalAlignment="Left" Margin="189,316,0,0" VerticalAlignment="Top" Width="75" Click="InsertDetailsClick"/>
+        <Button Content="Отмена" HorizontalAlignment="Left" Margin="369,316,0,0" VerticalAlignment="Top" Width="75" Click="ClosedClick"/>
+
+    </Grid>
+</Window>

+ 60 - 0
ProjectAnalogParus/InsertDetailsStudentWindow.xaml.cs

@@ -0,0 +1,60 @@
+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 ProjectAnalogParus
+{
+    /// <summary>
+    /// Логика взаимодействия для InsertDetailsStudentWindow.xaml
+    /// </summary>
+    public partial class InsertDetailsStudentWindow : Window
+    {
+        public InsertDetailsStudentWindow()
+        {
+            InitializeComponent();
+            gr672_bdaEntities db = new gr672_bdaEntities();
+
+            cmbStudent.ItemsSource = db.Student.ToList();
+            cmbStudent.SelectedValuePath = "IdStudent";
+        }
+
+        private void InsertDetailsClick(object sender, RoutedEventArgs e)
+        {
+            
+            if (Convert.ToInt32(txtNumberCard.Text) != 16)
+            {
+                MessageBox.Show("Номер карты не соответствует");
+            }
+            else if (cmbStudent != null && txtNumberCard.Text != "")
+            {
+                gr672_bdaEntities db = new gr672_bdaEntities();
+                DetailsStudent detailsStudent = new DetailsStudent();
+                detailsStudent.StudentId = Convert.ToInt32(cmbStudent.SelectedValue.ToString());
+                detailsStudent.NumberBankCard = txtNumberCard.Text;
+                db.DetailsStudent.Add(detailsStudent);
+                db.SaveChanges();
+            }
+            else 
+            {
+                MessageBox.Show("Не все поля заполнены!");            
+            }
+
+            
+        }
+        
+        private void ClosedClick(object sender, RoutedEventArgs e)
+        {
+            this.Close();
+        }
+    }
+}

+ 1 - 0
ProjectAnalogParus/Model.Context.cs

@@ -59,5 +59,6 @@ namespace ProjectAnalogParus
         public virtual DbSet<TypeWorked> TypeWorked { get; set; }
         public virtual DbSet<User> User { get; set; }
         public virtual DbSet<WageFund> WageFund { get; set; }
+        public virtual DbSet<DetailsStudent> DetailsStudent { get; set; }
     }
 }

+ 63 - 3
ProjectAnalogParus/Model.edmx

@@ -4,7 +4,7 @@
   <edmx:Runtime>
     <!-- SSDL content -->
     <edmx:StorageModels>
-      <Schema Namespace="Хранилище gr672_bdaModel" 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="Хранилище gr672_bdaModel" 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="Access">
           <Key>
             <PropertyRef Name="IdAccess" />
@@ -72,6 +72,14 @@
           <Property Name="AdditionalParametr" Type="nvarchar" MaxLength="50" />
           <Property Name="AdditionalInformation" Type="nvarchar" MaxLength="50" />
         </EntityType>
+        <EntityType Name="DetailsStudent">
+          <Key>
+            <PropertyRef Name="IdDetailsStudent" />
+          </Key>
+          <Property Name="IdDetailsStudent" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
+          <Property Name="StudentId" Type="int" Nullable="false" />
+          <Property Name="NumberBankCard" Type="nvarchar" MaxLength="16" Nullable="false" />
+        </EntityType>
         <EntityType Name="DimensionCoefficient">
           <Key>
             <PropertyRef Name="IdDimensionCoefficient" />
@@ -456,6 +464,18 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
+        <Association Name="FK__DetailsSt__Stude__00750D23">
+          <End Role="Student" Type="Self.Student" Multiplicity="1" />
+          <End Role="DetailsStudent" Type="Self.DetailsStudent" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Student">
+              <PropertyRef Name="IdStudent" />
+            </Principal>
+            <Dependent Role="DetailsStudent">
+              <PropertyRef Name="StudentId" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
         <Association Name="FK__Employee__Catego__2C88998B">
           <End Role="CategoryPayer" Type="Self.CategoryPayer" Multiplicity="1" />
           <End Role="Employee" Type="Self.Employee" Multiplicity="*" />
@@ -788,6 +808,7 @@
           <EntitySet Name="Base" EntityType="Self.Base" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="CategoryPayer" EntityType="Self.CategoryPayer" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="CompositionExperience" EntityType="Self.CompositionExperience" Schema="dbo" store:Type="Tables" />
+          <EntitySet Name="DetailsStudent" EntityType="Self.DetailsStudent" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="DimensionCoefficient" EntityType="Self.DimensionCoefficient" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="DocumentBase" EntityType="Self.DocumentBase" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="Employee" EntityType="Self.Employee" Schema="dbo" store:Type="Tables" />
@@ -859,6 +880,10 @@
             <End Role="Requisites" EntitySet="Requisites" />
             <End Role="Base" EntitySet="Base" />
           </AssociationSet>
+          <AssociationSet Name="FK__DetailsSt__Stude__00750D23" Association="Self.FK__DetailsSt__Stude__00750D23">
+            <End Role="Student" EntitySet="Student" />
+            <End Role="DetailsStudent" EntitySet="DetailsStudent" />
+          </AssociationSet>
           <AssociationSet Name="FK__Employee__Catego__2C88998B" Association="Self.FK__Employee__Catego__2C88998B">
             <End Role="CategoryPayer" EntitySet="CategoryPayer" />
             <End Role="Employee" EntitySet="Employee" />
@@ -968,8 +993,7 @@
             <End Role="WageFund" EntitySet="WageFund" />
           </AssociationSet>
         </EntityContainer>
-      </Schema>
-    </edmx:StorageModels>
+      </Schema></edmx:StorageModels>
     <!-- CSDL content -->
     <edmx:ConceptualModels>
       <Schema Namespace="gr672_bdaModel" 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">
@@ -1290,6 +1314,7 @@
           <NavigationProperty Name="AccrualsScholarship" Relationship="Self.FK__AccrualsS__Stude__3CBF0154" FromRole="Student" ToRole="AccrualsScholarship" />
           <NavigationProperty Name="GeneralCharges" Relationship="Self.FK__GeneralCh__Stude__3335971A" FromRole="Student" ToRole="GeneralCharges" />
           <NavigationProperty Name="Group" Relationship="Self.FK__Student__GroupId__1F2E9E6D" FromRole="Student" ToRole="Group" />
+          <NavigationProperty Name="DetailsStudent" Relationship="gr672_bdaModel.FK__DetailsSt__Stude__00750D23" FromRole="Student" ToRole="DetailsStudent" />
         </EntityType>
         <EntityType Name="Subdivision">
           <Key>
@@ -2011,7 +2036,33 @@
             <End Role="TypeWorked" EntitySet="TypeWorked" />
             <End Role="Schedule" EntitySet="Schedule" />
           </AssociationSet>
+          <EntitySet Name="DetailsStudent" EntityType="gr672_bdaModel.DetailsStudent" />
+          <AssociationSet Name="FK__DetailsSt__Stude__00750D23" Association="gr672_bdaModel.FK__DetailsSt__Stude__00750D23">
+            <End Role="Student" EntitySet="Student" />
+            <End Role="DetailsStudent" EntitySet="DetailsStudent" />
+          </AssociationSet>
         </EntityContainer>
+        <EntityType Name="DetailsStudent">
+          <Key>
+            <PropertyRef Name="IdDetailsStudent" />
+          </Key>
+          <Property Name="IdDetailsStudent" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
+          <Property Name="StudentId" Type="Int32" Nullable="false" />
+          <Property Name="NumberBankCard" Type="String" Nullable="false" MaxLength="16" FixedLength="false" Unicode="true" />
+          <NavigationProperty Name="Student" Relationship="gr672_bdaModel.FK__DetailsSt__Stude__00750D23" FromRole="DetailsStudent" ToRole="Student" />
+        </EntityType>
+        <Association Name="FK__DetailsSt__Stude__00750D23">
+          <End Type="gr672_bdaModel.Student" Role="Student" Multiplicity="1" />
+          <End Type="gr672_bdaModel.DetailsStudent" Role="DetailsStudent" Multiplicity="*" />
+          <ReferentialConstraint>
+            <Principal Role="Student">
+              <PropertyRef Name="IdStudent" />
+            </Principal>
+            <Dependent Role="DetailsStudent">
+              <PropertyRef Name="StudentId" />
+            </Dependent>
+          </ReferentialConstraint>
+        </Association>
       </Schema>
     </edmx:ConceptualModels>
     <!-- C-S mapping content -->
@@ -2371,6 +2422,15 @@
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
+          <EntitySetMapping Name="DetailsStudent">
+            <EntityTypeMapping TypeName="gr672_bdaModel.DetailsStudent">
+              <MappingFragment StoreEntitySet="DetailsStudent">
+                <ScalarProperty Name="NumberBankCard" ColumnName="NumberBankCard" />
+                <ScalarProperty Name="StudentId" ColumnName="StudentId" />
+                <ScalarProperty Name="IdDetailsStudent" ColumnName="IdDetailsStudent" />
+              </MappingFragment>
+            </EntityTypeMapping>
+          </EntitySetMapping>
         </EntityContainerMapping>
       </Mapping>
     </edmx:Mappings>

+ 3 - 1
ProjectAnalogParus/Model.edmx.diagram

@@ -13,7 +13,7 @@
         <EntityTypeShape EntityType="gr672_bdaModel.CategoryPayer" Width="1.5" PointX="0.75" PointY="8.125" IsExpanded="true" />
         <EntityTypeShape EntityType="gr672_bdaModel.CompositionExperience" Width="1.5" PointX="6" PointY="1.5" IsExpanded="true" />
         <EntityTypeShape EntityType="gr672_bdaModel.DimensionCoefficient" Width="1.5" PointX="6" PointY="4.875" IsExpanded="true" />
-        <EntityTypeShape EntityType="gr672_bdaModel.DocumentBase" Width="1.5" PointX="7.5" PointY="21.25" IsExpanded="true" />
+        <EntityTypeShape EntityType="gr672_bdaModel.DocumentBase" Width="1.5" PointX="7.5" PointY="20.5" IsExpanded="true" />
         <EntityTypeShape EntityType="gr672_bdaModel.Employee" Width="1.5" PointX="3" PointY="9.75" IsExpanded="true" />
         <EntityTypeShape EntityType="gr672_bdaModel.Encouragement" Width="1.5" PointX="8" PointY="32.5" IsExpanded="true" />
         <EntityTypeShape EntityType="gr672_bdaModel.Experience" Width="1.5" PointX="8.25" PointY="11" IsExpanded="true" />
@@ -77,6 +77,8 @@
         <AssociationConnector Association="gr672_bdaModel.FK__Schedule__Positi__54968AE5" ManuallyRouted="false" />
         <AssociationConnector Association="gr672_bdaModel.FK__User__RoleId__178D7CA5" ManuallyRouted="false" />
         <AssociationConnector Association="gr672_bdaModel.FK__Schedule__TypeWo__53A266AC" ManuallyRouted="false" />
+        <EntityTypeShape EntityType="gr672_bdaModel.DetailsStudent" Width="1.5" PointX="5.25" PointY="21.875" />
+        <AssociationConnector Association="gr672_bdaModel.FK__DetailsSt__Stude__00750D23" />
       </Diagram>
     </edmx:Diagrams>
   </edmx:Designer>

+ 31 - 0
ProjectAnalogParus/ProjectAnalogParus.csproj

@@ -109,6 +109,12 @@
     <Compile Include="DeleteEncouragementWindow.xaml.cs">
       <DependentUpon>DeleteEncouragementWindow.xaml</DependentUpon>
     </Compile>
+    <Compile Include="DetailsStudent.cs">
+      <DependentUpon>Model.tt</DependentUpon>
+    </Compile>
+    <Compile Include="DetailsStudentPage.xaml.cs">
+      <DependentUpon>DetailsStudentPage.xaml</DependentUpon>
+    </Compile>
     <Compile Include="DimensionCoefficient.cs">
       <DependentUpon>Model.tt</DependentUpon>
     </Compile>
@@ -145,6 +151,9 @@
     <Compile Include="Hirer.cs">
       <DependentUpon>Model.tt</DependentUpon>
     </Compile>
+    <Compile Include="InsertDetailsStudentWindow.xaml.cs">
+      <DependentUpon>InsertDetailsStudentWindow.xaml</DependentUpon>
+    </Compile>
     <Compile Include="InsertEncouragementWindow.xaml.cs">
       <DependentUpon>InsertEncouragementWindow.xaml</DependentUpon>
     </Compile>
@@ -168,6 +177,9 @@
     <Compile Include="Position.cs">
       <DependentUpon>Model.tt</DependentUpon>
     </Compile>
+    <Compile Include="ReqisitesSholarshipsPage.xaml.cs">
+      <DependentUpon>ReqisitesSholarshipsPage.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Requisites.cs">
       <DependentUpon>Model.tt</DependentUpon>
     </Compile>
@@ -183,6 +195,9 @@
     <Compile Include="Scholarship.cs">
       <DependentUpon>Model.tt</DependentUpon>
     </Compile>
+    <Compile Include="ScholarshipsPage.xaml.cs">
+      <DependentUpon>ScholarshipsPage.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Specialty.cs">
       <DependentUpon>Model.tt</DependentUpon>
     </Compile>
@@ -232,6 +247,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="DetailsStudentPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="EmployeePage.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -244,6 +263,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="InsertDetailsStudentWindow.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="InsertEncouragementWindow.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -272,6 +295,14 @@
       <DependentUpon>MainWindow.xaml</DependentUpon>
       <SubType>Code</SubType>
     </Compile>
+    <Page Include="ReqisitesSholarshipsPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="ScholarshipsPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="StudentPage.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 32 - 0
ProjectAnalogParus/ReqisitesSholarshipsPage.xaml

@@ -0,0 +1,32 @@
+<Page x:Class="ProjectAnalogParus.ReqisitesSholarshipsPage"
+      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:ProjectAnalogParus"
+      mc:Ignorable="d" 
+      d:DesignHeight="450" d:DesignWidth="800"
+      Title="Начисление стипендии">
+
+    <Grid>
+        <ComboBox Name="cmbStudent" HorizontalAlignment="Left" Margin="330,86,0,0" VerticalAlignment="Top" Width="120">
+            <ComboBox.ItemTemplate>
+                <DataTemplate>
+                    <TextBlock DataContext="{Binding}">
+                        <TextBlock.Text>
+                            <MultiBinding StringFormat="{}{0} {1} {2}">
+                                <Binding Path="LastName" />
+                                <Binding Path="FirstName" />
+                                <Binding Path="Middlename" />
+                            </MultiBinding>
+                        </TextBlock.Text>
+                    </TextBlock>
+                </DataTemplate>
+            </ComboBox.ItemTemplate>
+        </ComboBox>
+        <ComboBox Name="cmbUser" HorizontalAlignment="Left" Margin="330,179,0,0" VerticalAlignment="Top" Width="120"/>
+        <Button Content="Начислить стипендию" HorizontalAlignment="Left" Margin="128,343,0,0" VerticalAlignment="Top" Width="136" Height="25"/>
+        <ComboBox Name="cmbDetails"  HorizontalAlignment="Left" Margin="330,133,0,0" VerticalAlignment="Top" Width="120"/>
+
+    </Grid>
+</Page>

+ 40 - 0
ProjectAnalogParus/ReqisitesSholarshipsPage.xaml.cs

@@ -0,0 +1,40 @@
+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 ProjectAnalogParus
+{
+    /// <summary>
+    /// Логика взаимодействия для ReqisitesSholarshipsPage.xaml
+    /// </summary>
+    public partial class ReqisitesSholarshipsPage : Page
+    {
+        public ReqisitesSholarshipsPage()
+        {
+            InitializeComponent();
+            gr672_bdaEntities db = new gr672_bdaEntities();
+
+            cmbStudent.ItemsSource = db.Student.ToList();
+            cmbStudent.SelectedValuePath = "IdStudent";
+
+            cmbUser.ItemsSource = db.User.ToList();
+            cmbUser.DisplayMemberPath = "FullNameUser";
+            cmbUser.SelectedValuePath = "IdUser";
+
+            cmbDetails.ItemsSource = db.DetailsStudent.ToList();
+            cmbDetails.DisplayMemberPath = "";
+            cmbDetails.SelectedValuePath = "IdDetailsStudent";
+        }
+    }
+}

+ 24 - 0
ProjectAnalogParus/ScholarshipsPage.xaml

@@ -0,0 +1,24 @@
+<Page x:Class="ProjectAnalogParus.ScholarshipsPage"
+      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:ProjectAnalogParus"
+      mc:Ignorable="d" 
+      d:DesignHeight="450" d:DesignWidth="800"
+      Title="ScholarshipsPage">
+
+    <Grid>
+        <DataGrid Name="Sholarshipsgrid" HorizontalAlignment="Left" AutoGenerateColumns="False" Height="150" Margin="10,10,0,0" VerticalAlignment="Top" Width="780" >
+
+            <DataGrid.Columns>
+                <DataGridTextColumn Binding="{Binding IdSholarships}" Header="Id" Width="*"/>
+                <DataGridTextColumn Binding="{Binding NameScholarship}" Header="Стипендия" Width="3*"/>
+                <DataGridTextColumn Binding="{Binding Amount}" Header="Сумма" Width="3*" />
+            </DataGrid.Columns>
+        </DataGrid>
+        <Button Content="Button" HorizontalAlignment="Left" Margin="79,320,0,0" VerticalAlignment="Top" Width="75"/>
+        <Button Content="Button" HorizontalAlignment="Left" Margin="166,320,0,0" VerticalAlignment="Top" Width="75"/>
+        <Button Content="Button" HorizontalAlignment="Left" Margin="273,320,0,0" VerticalAlignment="Top" Width="75"/>
+    </Grid>
+</Page>

+ 28 - 0
ProjectAnalogParus/ScholarshipsPage.xaml.cs

@@ -0,0 +1,28 @@
+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 ProjectAnalogParus
+{
+    /// <summary>
+    /// Логика взаимодействия для ScholarshipsPage.xaml
+    /// </summary>
+    public partial class ScholarshipsPage : Page
+    {
+        public ScholarshipsPage()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 3 - 0
ProjectAnalogParus/Student.cs

@@ -19,6 +19,7 @@ namespace ProjectAnalogParus
         {
             this.AccrualsScholarship = new HashSet<AccrualsScholarship>();
             this.GeneralCharges = new HashSet<GeneralCharges>();
+            this.DetailsStudent = new HashSet<DetailsStudent>();
         }
     
         public int IdStudent { get; set; }
@@ -32,5 +33,7 @@ namespace ProjectAnalogParus
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
         public virtual ICollection<GeneralCharges> GeneralCharges { get; set; }
         public virtual Group Group { get; set; }
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+        public virtual ICollection<DetailsStudent> DetailsStudent { get; set; }
     }
 }

+ 1 - 0
ProjectAnalogParus/StudentPage.xaml

@@ -13,6 +13,7 @@
         <Button Content="Расчет стипендии" HorizontalAlignment="Left" Margin="212,44,0,0" VerticalAlignment="Top" Width="128" Height="22" Click="SummEncoragementClick"/>
         <Button Content="Начисление стипендии" HorizontalAlignment="Left" Margin="381,44,0,0" VerticalAlignment="Top" Width="147" Height="22" Click="ReqisitesEncoragementClick"/>
         <Button Content="Поощрения" HorizontalAlignment="Left" Margin="55,117,0,0" VerticalAlignment="Top" Width="75" Click="OpenEncouragementPage"/>
+        <Button Content="Детали" HorizontalAlignment="Left" Margin="587,44,0,0" VerticalAlignment="Top" Width="75" Click="OpenDetailsStudent"/>
 
     </Grid>
 </Page>

+ 6 - 1
ProjectAnalogParus/StudentPage.xaml.cs

@@ -40,9 +40,14 @@ namespace ProjectAnalogParus
             FramePage.MainFrame.Navigate(new EncouragementSummaPage());
         }
 
-        private void ReqisitesEncoragementClick(object sender, RoutedEventArgs e)
+        private void ReqisitesScholarshipsClick(object sender, RoutedEventArgs e)
         {
+            FramePage.MainFrame.Navigate(new ReqisitesSholarshipsPage());
+        }
 
+        private void OpenDetailsStudent(object sender, RoutedEventArgs e)
+        {
+            FramePage.MainFrame.Navigate(new DetailsStudentPage());
         }
     }
 }