Алексей Колесов há 2 anos atrás
pai
commit
4aaa285c36

+ 5 - 7
ProbnikDemo/ProbnikDemo.csproj

@@ -64,7 +64,7 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </ApplicationDefinition>
-    <Page Include="AddAgent.xaml">
+    <Page Include="Windows\AddAgent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
@@ -72,7 +72,7 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
-    <Compile Include="AddAgent.xaml.cs">
+    <Compile Include="Windows\AddAgent.xaml.cs">
       <DependentUpon>AddAgent.xaml</DependentUpon>
     </Compile>
     <Compile Include="Agent.cs">
@@ -95,7 +95,7 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="PgChange.xaml">
+    <Page Include="Windows\PgChange.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
@@ -120,7 +120,7 @@
     <Compile Include="Pages\PgListAgent.xaml.cs">
       <DependentUpon>PgListAgent.xaml</DependentUpon>
     </Compile>
-    <Compile Include="PgChange.xaml.cs">
+    <Compile Include="Windows\PgChange.xaml.cs">
       <DependentUpon>PgChange.xaml</DependentUpon>
     </Compile>
     <Compile Include="Product.cs">
@@ -165,9 +165,7 @@
   <ItemGroup>
     <None Include="App.config" />
   </ItemGroup>
-  <ItemGroup>
-    <Folder Include="Windows\" />
-  </ItemGroup>
+  <ItemGroup />
   <ItemGroup>
     <Resource Include="agents\agent_1.png" />
     <Resource Include="agents\agent_10.png" />

+ 0 - 0
ProbnikDemo/AddAgent.xaml → ProbnikDemo/Windows/AddAgent.xaml


+ 1 - 0
ProbnikDemo/AddAgent.xaml.cs → ProbnikDemo/Windows/AddAgent.xaml.cs

@@ -53,6 +53,7 @@ namespace ProbnikDemo
                 Agent agent = new Agent() { Title = TxtTitle.Text, Address = TxtAdress.Text, AgentTypeID = Convert.ToInt32(ComboType.SelectedValue), Email = TxtEmail.Text, INN = TxtINN.Text, KPP = TxtKPP.Text, Priority = Convert.ToInt32(TxtPriority.Text), Logo = ImgPath, Phone = TxtPhone.Text, DirectorName = TxtDirector.Text };
                 BaseConnect.BaseModel.Agent.Add(agent);
                 BaseConnect.BaseModel.SaveChanges();
+                LoadPages.SwitchPages.Navigate(new PgListAgent());
             }
             catch
             {

+ 0 - 0
ProbnikDemo/PgChange.xaml → ProbnikDemo/Windows/PgChange.xaml


+ 2 - 0
ProbnikDemo/PgChange.xaml.cs → ProbnikDemo/Windows/PgChange.xaml.cs

@@ -32,10 +32,12 @@ namespace ProbnikDemo
             {
                 BaseConnect.BaseModel.Agent.Remove(agent1);
                 BaseConnect.BaseModel.SaveChanges();
+                LoadPages.SwitchPages.Navigate(new PgListAgent());
             }
             catch
             {
                 MessageBox.Show("Ошибка");
+
             }
 
         }