gr672_bda 4 years ago
parent
commit
a9dfafd13b

+ 5 - 6
ProjectAnalogParus/DeleteEncouragementWindow.xaml.cs

@@ -23,9 +23,9 @@ namespace ProjectAnalogParus
         {
             InitializeComponent();
             gr672_bdaEntities db = new gr672_bdaEntities();
-            cmbEncouragement.ItemsSource = db.TypeEncouragement.ToList();
+            cmbEncouragement.ItemsSource = db.Encouragement.ToList();
             cmbEncouragement.DisplayMemberPath = "NameTypeEncouragement";
-            cmbEncouragement.SelectedValuePath = "IdTypeEncouragement"; 
+            cmbEncouragement.SelectedValuePath = "IdEncouragement"; 
         }
 
         private void DeleteClick(object sender, RoutedEventArgs e)
@@ -34,11 +34,10 @@ namespace ProjectAnalogParus
             {
                 gr672_bdaEntities db = new gr672_bdaEntities();
                 int num = Convert.ToInt32(cmbEncouragement.SelectedValue.ToString());
-                var dRow = db.Encouragement.Where(w => w.IdEncouragement == num).FirstOrDefault();
-                var bRow = db.TypeEncouragement.Where(w => w.IdTypeEncouragement == num).FirstOrDefault();
-                db.Encouragement.Remove(dRow);
-                db.TypeEncouragement.Remove(bRow);
+                var dRow = db.Encouragement.Where(w => w.IdEncouragement == num).FirstOrDefault();              
+                db.Encouragement.Remove(dRow);                
                 db.SaveChanges();
+                MessageBox.Show("Данные удалены!");
             }
             else 
             {

+ 1 - 2
ProjectAnalogParus/Encouragement.cs

@@ -21,11 +21,10 @@ namespace ProjectAnalogParus
         }
     
         public int IdEncouragement { get; set; }
-        public int TypeEncouragementId { get; set; }
         public decimal Amount { get; set; }
+        public string NameTypeEncouragement { get; set; }
     
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
         public virtual ICollection<AccrualsScholarship> AccrualsScholarship { get; set; }
-        public virtual TypeEncouragement TypeEncouragement { get; set; }
     }
 }

+ 7 - 7
ProjectAnalogParus/EncouragementPage.xaml

@@ -9,16 +9,16 @@
       Title="EncouragementPage" Loaded="LoadedWindows">
 
     <Grid>
-        <DataGrid Name="Encouragementgrid" HorizontalAlignment="Left" AutoGenerateColumns="False" Height="150" Margin="10,10,0,0" VerticalAlignment="Top" Width="780" >
+        <DataGrid Name="Encouragementgrid" HorizontalAlignment="Left" AutoGenerateColumns="False" Height="226" Margin="10,10,0,0" VerticalAlignment="Top" Width="439" >
 
             <DataGrid.Columns>
-                <DataGridTextColumn Binding="{Binding IdEncouragement}" Header="Id" Width="*"/>
-                <DataGridTextColumn Binding="{Binding TypeEncouragement.NameTypeEncouragement}" Header="Поощрение" Width="3*"/>
-                <DataGridTextColumn Binding="{Binding Amount}" Header="Сумма" Width="3*" />                
+                <DataGridTextColumn Binding="{Binding NameTypeEncouragement}" Header="Поощрение" Width="3*"/>
+                <DataGridTextColumn Binding="{Binding Amount}" Header="Сумма" Width="3*" />
             </DataGrid.Columns>
         </DataGrid>
-        <Button Content="Добавить поощрение" HorizontalAlignment="Left" Margin="73,344,0,0" VerticalAlignment="Top" Width="134" Click="InsertEncouragementClick"/>
-        <Button Content="Изменить поощрение" HorizontalAlignment="Left" Margin="236,344,0,0" VerticalAlignment="Top" Width="137" Click="UpdateEncouragementClick"/>
-        <Button Content="Удалить поощрение" HorizontalAlignment="Left" Margin="403,344,0,0" VerticalAlignment="Top" Width="145" Click="DeleteEncouragementClick"/>
+        <Button Content="Добавить поощрение" HorizontalAlignment="Left" Margin="478,30,0,0" VerticalAlignment="Top" Width="145" Click="InsertEncouragementClick"/>
+        <Button Content="Изменить поощрение" HorizontalAlignment="Left" Margin="478,68,0,0" VerticalAlignment="Top" Width="145" Click="UpdateEncouragementClick"/>
+        <Button Content="Удалить поощрение" HorizontalAlignment="Left" Margin="478,109,0,0" VerticalAlignment="Top" Width="145" Click="DeleteEncouragementClick"/>
+        <Button Content="Обновить данные" HorizontalAlignment="Left" Margin="478,156,0,0" VerticalAlignment="Top" Width="145" Click="UpdateClick"/>
     </Grid>
 </Page>

+ 19 - 5
ProjectAnalogParus/EncouragementPage.xaml.cs

@@ -20,16 +20,15 @@ namespace ProjectAnalogParus
     /// </summary>
     public partial class EncouragementPage : Page
     {
+        gr672_bdaEntities db = new gr672_bdaEntities();
         public EncouragementPage()
         {
             InitializeComponent();
-            gr672_bdaEntities db = new gr672_bdaEntities();
+            
         }
         private void LoadedWindows(object sender, RoutedEventArgs e)
-        {
-            gr672_bdaEntities db = new gr672_bdaEntities();
+        {            
             Encouragementgrid.ItemsSource = db.Encouragement.ToList();
-
         }
 
         private void InsertEncouragementClick(object sender, RoutedEventArgs e)
@@ -41,7 +40,16 @@ namespace ProjectAnalogParus
 
         private void UpdateEncouragementClick(object sender, RoutedEventArgs e)
         {
-
+            Encouragement enc = (Encouragement)Encouragementgrid.SelectedItem;
+            if (enc != null)
+            {
+                db.SaveChanges();
+                MessageBox.Show("Данные изменены");
+            }
+            else
+            {
+                MessageBox.Show("Не выбрана строка");
+            }
         }
 
         private void DeleteEncouragementClick(object sender, RoutedEventArgs e)
@@ -49,5 +57,11 @@ namespace ProjectAnalogParus
             DeleteEncouragementWindow openwin = new DeleteEncouragementWindow();
             openwin.Show();
         }
+
+        private void UpdateClick(object sender, RoutedEventArgs e)
+        {            
+            Encouragementgrid.ItemsSource = db.Encouragement.ToList();
+            this.Encouragementgrid.Items.Refresh();
+        }
     }
 }

+ 0 - 2
ProjectAnalogParus/EncouragementSummaPage.xaml

@@ -33,7 +33,5 @@
         <DatePicker Name="datetime" HorizontalAlignment="Left" Margin="302,143,0,0" VerticalAlignment="Top" Height="29" Width="120"/>
         <Button Content="Начисление стипендии" HorizontalAlignment="Left" Margin="265,355,0,0" VerticalAlignment="Top" Width="147" Height="20" Click="ReqisitesScholarshipsClick"/>
 
-
-
     </Grid>
 </Page>

+ 10 - 5
ProjectAnalogParus/EncouragementSummaPage.xaml.cs

@@ -33,15 +33,16 @@ namespace ProjectAnalogParus
 
             cmbScholarship.ItemsSource = db.Scholarship.ToList();
             cmbScholarship.DisplayMemberPath = "NameScholarship";
-            cmbScholarship.SelectedValuePath = "IdScholarship";
+            cmbScholarship.SelectedValuePath = "Amount";
 
             cmbUser.ItemsSource = db.User.ToList();
             cmbUser.DisplayMemberPath = "FullNameUser";
             cmbUser.SelectedValuePath = "IdUser";
 
-            cmbEncoragement.ItemsSource = db.TypeEncouragement.ToList();
+            cmbEncoragement.ItemsSource = db.Encouragement.ToList();           
+
             cmbEncoragement.DisplayMemberPath = "NameTypeEncouragement";
-            cmbEncoragement.SelectedValuePath = "IdTypeEncouragement";
+            cmbEncoragement.SelectedValuePath = "Amount";
 
            
         }        
@@ -50,9 +51,13 @@ namespace ProjectAnalogParus
         {
 
 
-            if (cmbStudent != null && cmbUser != null && datetime != null || cmbScholarship != null || cmbEncoragement != null)
+            if (/*cmbStudent != null && cmbUser != null && datetime != null ||*/ cmbScholarship != null || cmbEncoragement != null)
             {
-               
+                double ship = Convert.ToDouble(cmbScholarship.SelectedValue);
+                double enco = Convert.ToDouble(cmbEncoragement.SelectedValue);
+
+                double summ = ship + enco;
+                AmoutSumma.Text = Convert.ToString(summ);
             }
             else
             {

+ 6 - 5
ProjectAnalogParus/InsertEncouragementWindow.xaml.cs

@@ -31,18 +31,19 @@ namespace ProjectAnalogParus
             {
                 gr672_bdaEntities db = new gr672_bdaEntities();
                 Encouragement encouragement = new Encouragement();
-                TypeEncouragement NameEncouragement = new TypeEncouragement();
+              
                 encouragement.Amount = Convert.ToDecimal(txtAmount.Text);
-                NameEncouragement.NameTypeEncouragement = txtNameEncouragement.Text;
-                db.TypeEncouragement.Add(NameEncouragement);
+                encouragement.NameTypeEncouragement = txtNameEncouragement.Text;
+               
                 db.Encouragement.Add(encouragement);
                 db.SaveChanges();
             }
             else
             {
                 MessageBox.Show("Не все поля заполнены!");
-            }
-                    
+            }        
+
+
         }
 
         private void CancelClick(object sender, RoutedEventArgs e)

+ 0 - 1
ProjectAnalogParus/Model.Context.cs

@@ -53,7 +53,6 @@ namespace ProjectAnalogParus
         public virtual DbSet<Student> Student { get; set; }
         public virtual DbSet<Subdivision> Subdivision { get; set; }
         public virtual DbSet<TariffGrid> TariffGrid { get; set; }
-        public virtual DbSet<TypeEncouragement> TypeEncouragement { get; set; }
         public virtual DbSet<TypeExperience> TypeExperience { get; set; }
         public virtual DbSet<TypePA> TypePA { get; set; }
         public virtual DbSet<TypeWorked> TypeWorked { get; set; }

+ 11 - 69
ProjectAnalogParus/Model.edmx

@@ -120,7 +120,7 @@
             <PropertyRef Name="IdEncouragement" />
           </Key>
           <Property Name="IdEncouragement" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-          <Property Name="TypeEncouragementId" Type="int" Nullable="false" />
+          <Property Name="NameTypeEncouragement" Type="nvarchar" MaxLength="50" Nullable="false" />
           <Property Name="Amount" Type="money" Nullable="false" />
         </EntityType>
         <EntityType Name="Experience">
@@ -280,13 +280,6 @@
           <Property Name="IdTariffGrid" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
           <Property Name="NameTariffgrid" Type="nvarchar" MaxLength="50" Nullable="false" />
         </EntityType>
-        <EntityType Name="TypeEncouragement">
-          <Key>
-            <PropertyRef Name="IdTypeEncouragement" />
-          </Key>
-          <Property Name="IdTypeEncouragement" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
-          <Property Name="NameTypeEncouragement" Type="nvarchar" MaxLength="50" Nullable="false" />
-        </EntityType>
         <EntityType Name="TypeExperience">
           <Key>
             <PropertyRef Name="IdTypeExperience" />
@@ -332,7 +325,7 @@
           <Property Name="DateStart" Type="datetime" Nullable="false" />
           <Property Name="DateExperation" Type="datetime" />
         </EntityType>
-        <Association Name="FK__AccrualsS__Encou__3F9B6DFF">
+        <Association Name="FK__AccrualsS__Encou__08162EEB">
           <End Role="Encouragement" Type="Self.Encouragement" Multiplicity="0..1" />
           <End Role="AccrualsScholarship" Type="Self.AccrualsScholarship" Multiplicity="*" />
           <ReferentialConstraint>
@@ -344,7 +337,7 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
-        <Association Name="FK__AccrualsS__Schol__3EA749C6">
+        <Association Name="FK__AccrualsS__Schol__07220AB2">
           <End Role="Scholarship" Type="Self.Scholarship" Multiplicity="0..1" />
           <End Role="AccrualsScholarship" Type="Self.AccrualsScholarship" Multiplicity="*" />
           <ReferentialConstraint>
@@ -356,7 +349,7 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
-        <Association Name="FK__AccrualsS__Stude__3CBF0154">
+        <Association Name="FK__AccrualsS__Stude__0539C240">
           <End Role="Student" Type="Self.Student" Multiplicity="1" />
           <End Role="AccrualsScholarship" Type="Self.AccrualsScholarship" Multiplicity="*" />
           <ReferentialConstraint>
@@ -368,7 +361,7 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
-        <Association Name="FK__AccrualsS__UserI__3DB3258D">
+        <Association Name="FK__AccrualsS__UserI__062DE679">
           <End Role="User" Type="Self.User" Multiplicity="1" />
           <End Role="AccrualsScholarship" Type="Self.AccrualsScholarship" Multiplicity="*" />
           <ReferentialConstraint>
@@ -536,18 +529,6 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
-        <Association Name="FK__Encourage__TypeE__39E294A9">
-          <End Role="TypeEncouragement" Type="Self.TypeEncouragement" Multiplicity="1" />
-          <End Role="Encouragement" Type="Self.Encouragement" Multiplicity="*" />
-          <ReferentialConstraint>
-            <Principal Role="TypeEncouragement">
-              <PropertyRef Name="IdTypeEncouragement" />
-            </Principal>
-            <Dependent Role="Encouragement">
-              <PropertyRef Name="TypeEncouragementId" />
-            </Dependent>
-          </ReferentialConstraint>
-        </Association>
         <Association Name="FK__Experienc__Compo__46486B8E">
           <End Role="Employee" Type="Self.Employee" Multiplicity="1" />
           <End Role="Experience" Type="Self.Experience" Multiplicity="*" />
@@ -830,25 +811,24 @@
           <EntitySet Name="Student" EntityType="Self.Student" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="Subdivision" EntityType="Self.Subdivision" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="TariffGrid" EntityType="Self.TariffGrid" Schema="dbo" store:Type="Tables" />
-          <EntitySet Name="TypeEncouragement" EntityType="Self.TypeEncouragement" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="TypeExperience" EntityType="Self.TypeExperience" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="TypePA" EntityType="Self.TypePA" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="TypeWorked" EntityType="Self.TypeWorked" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="User" EntityType="Self.User" Schema="dbo" store:Type="Tables" />
           <EntitySet Name="WageFund" EntityType="Self.WageFund" Schema="dbo" store:Type="Tables" />
-          <AssociationSet Name="FK__AccrualsS__Encou__3F9B6DFF" Association="Self.FK__AccrualsS__Encou__3F9B6DFF">
+          <AssociationSet Name="FK__AccrualsS__Encou__08162EEB" Association="Self.FK__AccrualsS__Encou__08162EEB">
             <End Role="Encouragement" EntitySet="Encouragement" />
             <End Role="AccrualsScholarship" EntitySet="AccrualsScholarship" />
           </AssociationSet>
-          <AssociationSet Name="FK__AccrualsS__Schol__3EA749C6" Association="Self.FK__AccrualsS__Schol__3EA749C6">
+          <AssociationSet Name="FK__AccrualsS__Schol__07220AB2" Association="Self.FK__AccrualsS__Schol__07220AB2">
             <End Role="Scholarship" EntitySet="Scholarship" />
             <End Role="AccrualsScholarship" EntitySet="AccrualsScholarship" />
           </AssociationSet>
-          <AssociationSet Name="FK__AccrualsS__Stude__3CBF0154" Association="Self.FK__AccrualsS__Stude__3CBF0154">
+          <AssociationSet Name="FK__AccrualsS__Stude__0539C240" Association="Self.FK__AccrualsS__Stude__0539C240">
             <End Role="Student" EntitySet="Student" />
             <End Role="AccrualsScholarship" EntitySet="AccrualsScholarship" />
           </AssociationSet>
-          <AssociationSet Name="FK__AccrualsS__UserI__3DB3258D" Association="Self.FK__AccrualsS__UserI__3DB3258D">
+          <AssociationSet Name="FK__AccrualsS__UserI__062DE679" Association="Self.FK__AccrualsS__UserI__062DE679">
             <End Role="User" EntitySet="User" />
             <End Role="AccrualsScholarship" EntitySet="AccrualsScholarship" />
           </AssociationSet>
@@ -904,10 +884,6 @@
             <End Role="Subdivision" EntitySet="Subdivision" />
             <End Role="Employee" EntitySet="Employee" />
           </AssociationSet>
-          <AssociationSet Name="FK__Encourage__TypeE__39E294A9" Association="Self.FK__Encourage__TypeE__39E294A9">
-            <End Role="TypeEncouragement" EntitySet="TypeEncouragement" />
-            <End Role="Encouragement" EntitySet="Encouragement" />
-          </AssociationSet>
           <AssociationSet Name="FK__Experienc__Compo__46486B8E" Association="Self.FK__Experienc__Compo__46486B8E">
             <End Role="Employee" EntitySet="Employee" />
             <End Role="Experience" EntitySet="Experience" />
@@ -1132,10 +1108,9 @@
             <PropertyRef Name="IdEncouragement" />
           </Key>
           <Property Name="IdEncouragement" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-          <Property Name="TypeEncouragementId" Type="Int32" Nullable="false" />
           <Property Name="Amount" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
           <NavigationProperty Name="AccrualsScholarship" Relationship="Self.FK__AccrualsS__Encou__3F9B6DFF" FromRole="Encouragement" ToRole="AccrualsScholarship" />
-          <NavigationProperty Name="TypeEncouragement" Relationship="Self.FK__Encourage__TypeE__39E294A9" FromRole="Encouragement" ToRole="TypeEncouragement" />
+          <Property Name="NameTypeEncouragement" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
         </EntityType>
         <EntityType Name="Experience">
           <Key>
@@ -1332,14 +1307,6 @@
           <Property Name="NameTariffgrid" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
           <NavigationProperty Name="Parametrs" Relationship="Self.FK__Parametrs__Tarif__6A85CC04" FromRole="TariffGrid" ToRole="Parametrs" />
         </EntityType>
-        <EntityType Name="TypeEncouragement">
-          <Key>
-            <PropertyRef Name="IdTypeEncouragement" />
-          </Key>
-          <Property Name="IdTypeEncouragement" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
-          <Property Name="NameTypeEncouragement" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
-          <NavigationProperty Name="Encouragement" Relationship="Self.FK__Encourage__TypeE__39E294A9" FromRole="TypeEncouragement" ToRole="Encouragement" />
-        </EntityType>
         <EntityType Name="TypeExperience">
           <Key>
             <PropertyRef Name="IdTypeExperience" />
@@ -1681,18 +1648,6 @@
             </Dependent>
           </ReferentialConstraint>
         </Association>
-        <Association Name="FK__Encourage__TypeE__39E294A9">
-          <End Role="TypeEncouragement" Type="Self.TypeEncouragement" Multiplicity="1" />
-          <End Role="Encouragement" Type="Self.Encouragement" Multiplicity="*" />
-          <ReferentialConstraint>
-            <Principal Role="TypeEncouragement">
-              <PropertyRef Name="IdTypeEncouragement" />
-            </Principal>
-            <Dependent Role="Encouragement">
-              <PropertyRef Name="TypeEncouragementId" />
-            </Dependent>
-          </ReferentialConstraint>
-        </Association>
         <Association Name="FK__Experienc__Hirer__473C8FC7">
           <End Role="Hirer" Type="Self.Hirer" Multiplicity="1" />
           <End Role="Experience" Type="Self.Experience" Multiplicity="*" />
@@ -1878,7 +1833,6 @@
           <EntitySet Name="Student" EntityType="Self.Student" />
           <EntitySet Name="Subdivision" EntityType="Self.Subdivision" />
           <EntitySet Name="TariffGrid" EntityType="Self.TariffGrid" />
-          <EntitySet Name="TypeEncouragement" EntityType="Self.TypeEncouragement" />
           <EntitySet Name="TypeExperience" EntityType="Self.TypeExperience" />
           <EntitySet Name="TypePA" EntityType="Self.TypePA" />
           <EntitySet Name="TypeWorked" EntityType="Self.TypeWorked" />
@@ -1980,10 +1934,6 @@
             <End Role="Employee" EntitySet="Employee" />
             <End Role="WageFund" EntitySet="WageFund" />
           </AssociationSet>
-          <AssociationSet Name="FK__Encourage__TypeE__39E294A9" Association="Self.FK__Encourage__TypeE__39E294A9">
-            <End Role="TypeEncouragement" EntitySet="TypeEncouragement" />
-            <End Role="Encouragement" EntitySet="Encouragement" />
-          </AssociationSet>
           <AssociationSet Name="FK__Experienc__Hirer__473C8FC7" Association="Self.FK__Experienc__Hirer__473C8FC7">
             <End Role="Hirer" EntitySet="Hirer" />
             <End Role="Experience" EntitySet="Experience" />
@@ -2184,8 +2134,8 @@
           <EntitySetMapping Name="Encouragement">
             <EntityTypeMapping TypeName="gr672_bdaModel.Encouragement">
               <MappingFragment StoreEntitySet="Encouragement">
+                <ScalarProperty Name="NameTypeEncouragement" ColumnName="NameTypeEncouragement" />
                 <ScalarProperty Name="IdEncouragement" ColumnName="IdEncouragement" />
-                <ScalarProperty Name="TypeEncouragementId" ColumnName="TypeEncouragementId" />
                 <ScalarProperty Name="Amount" ColumnName="Amount" />
               </MappingFragment>
             </EntityTypeMapping>
@@ -2364,14 +2314,6 @@
               </MappingFragment>
             </EntityTypeMapping>
           </EntitySetMapping>
-          <EntitySetMapping Name="TypeEncouragement">
-            <EntityTypeMapping TypeName="gr672_bdaModel.TypeEncouragement">
-              <MappingFragment StoreEntitySet="TypeEncouragement">
-                <ScalarProperty Name="IdTypeEncouragement" ColumnName="IdTypeEncouragement" />
-                <ScalarProperty Name="NameTypeEncouragement" ColumnName="NameTypeEncouragement" />
-              </MappingFragment>
-            </EntityTypeMapping>
-          </EntitySetMapping>
           <EntitySetMapping Name="TypeExperience">
             <EntityTypeMapping TypeName="gr672_bdaModel.TypeExperience">
               <MappingFragment StoreEntitySet="TypeExperience">

+ 0 - 2
ProjectAnalogParus/Model.edmx.diagram

@@ -33,7 +33,6 @@
         <EntityTypeShape EntityType="gr672_bdaModel.Student" Width="1.5" PointX="3" PointY="4.375" IsExpanded="true" />
         <EntityTypeShape EntityType="gr672_bdaModel.Subdivision" Width="1.5" PointX="0.75" PointY="19.75" IsExpanded="true" />
         <EntityTypeShape EntityType="gr672_bdaModel.TariffGrid" Width="1.5" PointX="5.25" PointY="19" IsExpanded="true" />
-        <EntityTypeShape EntityType="gr672_bdaModel.TypeEncouragement" Width="1.5" PointX="5.75" PointY="32.75" IsExpanded="true" />
         <EntityTypeShape EntityType="gr672_bdaModel.TypeExperience" Width="1.5" PointX="6" PointY="29.25" IsExpanded="true" />
         <EntityTypeShape EntityType="gr672_bdaModel.TypePA" Width="1.5" PointX="3" PointY="17.25" IsExpanded="true" />
         <EntityTypeShape EntityType="gr672_bdaModel.TypeWorked" Width="1.5" PointX="0.75" PointY="22.875" IsExpanded="true" />
@@ -63,7 +62,6 @@
         <AssociationConnector Association="gr672_bdaModel.FK__Payroll__Employe__5A4F643B" ManuallyRouted="false" />
         <AssociationConnector Association="gr672_bdaModel.FK__Requisite__Emplo__61F08603" ManuallyRouted="false" />
         <AssociationConnector Association="gr672_bdaModel.FK__WageFund__Employ__66B53B20" ManuallyRouted="false" />
-        <AssociationConnector Association="gr672_bdaModel.FK__Encourage__TypeE__39E294A9" ManuallyRouted="false" />
         <AssociationConnector Association="gr672_bdaModel.FK__Experienc__Hirer__473C8FC7" ManuallyRouted="false" />
         <AssociationConnector Association="gr672_bdaModel.FK__Experienc__TypeE__4830B400" ManuallyRouted="false" />
         <AssociationConnector Association="gr672_bdaModel.FK__GeneralCh__Stude__3335971A" ManuallyRouted="false" />

+ 0 - 3
ProjectAnalogParus/ProjectAnalogParus.csproj

@@ -213,9 +213,6 @@
     <Compile Include="TariffGrid.cs">
       <DependentUpon>Model.tt</DependentUpon>
     </Compile>
-    <Compile Include="TypeEncouragement.cs">
-      <DependentUpon>Model.tt</DependentUpon>
-    </Compile>
     <Compile Include="TypeExperience.cs">
       <DependentUpon>Model.tt</DependentUpon>
     </Compile>

+ 2 - 3
ProjectAnalogParus/ReqisitesSholarshipsPage.xaml

@@ -24,9 +24,8 @@
                 </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"/>
+        <ComboBox Name="cmbUser" HorizontalAlignment="Left" Margin="330,141,0,0" VerticalAlignment="Top" Width="120"/>
+        <Button Content="Начислить стипендию" HorizontalAlignment="Left" Margin="128,343,0,0" VerticalAlignment="Top" Width="136" Height="25" Click="ScholarshipSumma_Click"/>
 
     </Grid>
 </Page>

+ 7 - 3
ProjectAnalogParus/ReqisitesSholarshipsPage.xaml.cs

@@ -32,9 +32,13 @@ namespace ProjectAnalogParus
             cmbUser.DisplayMemberPath = "FullNameUser";
             cmbUser.SelectedValuePath = "IdUser";
 
-            cmbDetails.ItemsSource = db.DetailsStudent.ToList();
-            cmbDetails.DisplayMemberPath = "";
-            cmbDetails.SelectedValuePath = "IdDetailsStudent";
+            
+
+        }
+
+        private void ScholarshipSumma_Click(object sender, RoutedEventArgs e)
+        {
+
         }
     }
 }

+ 0 - 29
ProjectAnalogParus/TypeEncouragement.cs

@@ -1,29 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     Этот код создан по шаблону.
-//
-//     Изменения, вносимые в этот файл вручную, могут привести к непредвиденной работе приложения.
-//     Изменения, вносимые в этот файл вручную, будут перезаписаны при повторном создании кода.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace ProjectAnalogParus
-{
-    using System;
-    using System.Collections.Generic;
-    
-    public partial class TypeEncouragement
-    {
-        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
-        public TypeEncouragement()
-        {
-            this.Encouragement = new HashSet<Encouragement>();
-        }
-    
-        public int IdTypeEncouragement { get; set; }
-        public string NameTypeEncouragement { get; set; }
-    
-        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
-        public virtual ICollection<Encouragement> Encouragement { get; set; }
-    }
-}