Алексей Колесов 2 éve
szülő
commit
39920e7d32

+ 9 - 9
ProbnikDemo/Windows/PgChange.xaml

@@ -9,7 +9,7 @@
     <Grid Margin="0,0,-8,-235">
         <StackPanel Orientation="Vertical">
             <GroupBox Header="Наименование">
-                <TextBox x:Name="TxtTitle"></TextBox>
+                <TextBox x:Name="TxtTitle" Text="{Binding Title}"></TextBox>
 
             </GroupBox>
 
@@ -18,33 +18,33 @@
             </GroupBox>
 
             <GroupBox Header="Адрес">
-                <TextBox x:Name="TxtAdress"></TextBox>
+                <TextBox x:Name="TxtAdress" Text="{Binding Address}"></TextBox>
             </GroupBox>
             <GroupBox Header="ИНН">
-                <TextBox x:Name="TxtINN"></TextBox>
+                <TextBox x:Name="TxtINN" Text="{Binding INN}"></TextBox>
             </GroupBox>
             <GroupBox Header="КПП">
-                <TextBox x:Name="TxtKPP"></TextBox>
+                <TextBox x:Name="TxtKPP" Text="{Binding KPP}"></TextBox>
             </GroupBox>
             <GroupBox Header="Имя директора">
-                <TextBox x:Name="TxtDirector"></TextBox>
+                <TextBox x:Name="TxtDirector" Text="{Binding DirectorName}"></TextBox>
             </GroupBox>
             <GroupBox Header="Телефон">
-                <TextBox x:Name="TxtPhone"></TextBox>
+                <TextBox x:Name="TxtPhone" Text="{Binding Phone}"></TextBox>
             </GroupBox>
 
             <GroupBox Header="Email">
-                <TextBox x:Name="TxtEmail"></TextBox>
+                <TextBox x:Name="TxtEmail" Text="{Binding Email}"></TextBox>
             </GroupBox>
 
 
             <GroupBox Header="Приоритет">
-                <TextBox x:Name="TxtPriority"></TextBox>
+                <TextBox x:Name="TxtPriority" Text="{Binding Priority}"></TextBox>
             </GroupBox>
 
 
             <StackPanel Orientation="Vertical" HorizontalAlignment="Left" Width="792">
-                <Image x:Name="IMG" Width="150" Height="150"></Image>
+                <Image x:Name="IMG" Width="150" Height="150" Source="{Binding Logo}"></Image>
                 <Button Content="Добавить фото" x:Name="BtnImg" Click="BtnImg_Click" ></Button>
             </StackPanel>
 

+ 4 - 0
ProbnikDemo/Windows/PgChange.xaml.cs

@@ -24,6 +24,10 @@ namespace ProbnikDemo
         {
             InitializeComponent();
             agent1 = agent;
+            ComboType.ItemsSource = BaseConnect.BaseModel.AgentType.Where(x => x.ID > 0).ToList();
+            ComboType.SelectedValuePath = "ID";
+            ComboType.DisplayMemberPath = "Title";
+            DataContext = agent;
         }
 
         private void BtnDel_Click(object sender, RoutedEventArgs e)