AddEditAgent.xaml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <Window x:Class="WpfApp1.Windows.AddEditAgent"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:WpfApp1.Windows"
  7. mc:Ignorable="d"
  8. Title="{Binding Name}" MinHeight="650" Height="650" MinWidth="450" Width="450">
  9. <Grid>
  10. <Grid.ColumnDefinitions>
  11. <ColumnDefinition Width="200"/>
  12. <ColumnDefinition Width="*"/>
  13. <ColumnDefinition Width="auto"/>
  14. </Grid.ColumnDefinitions>
  15. <Image Width="200" Height="200" Source="{Binding CurrentAgent.ImagePres}"/>
  16. <StackPanel Grid.Column="1" Margin="5">
  17. <Label Content="Наименование агента:"/>
  18. <TextBox VerticalAlignment="Center" HorizontalAlignment="Left" Width="200" Text="{Binding CurrentAgent.Title}"/>
  19. <Label Content="Тип агента:"/>
  20. <ComboBox VerticalAlignment="Center" HorizontalAlignment="Left" Width="200"
  21. ItemsSource="{Binding AgentTypeList}"
  22. SelectedItem="{Binding CurrentAgent.AgentType}">
  23. <ComboBox.ItemTemplate>
  24. <DataTemplate>
  25. <Label Content="{Binding Title}"/>
  26. </DataTemplate>
  27. </ComboBox.ItemTemplate>
  28. </ComboBox>
  29. <Label Content="Приоритет:"/>
  30. <TextBox VerticalAlignment="Center" HorizontalAlignment="Left" Width="200"
  31. Text="{Binding CurrentAgent.Priority}"/>
  32. <Label Content="Адрес:" />
  33. <TextBox VerticalAlignment="Center" HorizontalAlignment="Left" Width="200"
  34. Text="{Binding CurrentAgent.Address}"/>
  35. <Label Content="ИНН:"/>
  36. <TextBox VerticalAlignment="Center" HorizontalAlignment="Left" Width="200"
  37. Text="{Binding CurrentAgent.INN}"/>
  38. <Label Content="КПП:"/>
  39. <TextBox VerticalAlignment="Center" HorizontalAlignment="Left" Width="200"
  40. Text="{Binding CurrentAgent.KPP}"/>
  41. <Label Content="Имя директора:"/>
  42. <TextBox VerticalAlignment="Center" HorizontalAlignment="Left" Width="200"
  43. Text="{Binding CurrentAgent.DirectorName}"/>
  44. <Label Content="Телефон:"/>
  45. <TextBox VerticalAlignment="Center" HorizontalAlignment="Left" Width="200"
  46. Text="{Binding CurrentAgent.Phone}"/>
  47. <Label Content="E-mail:"/>
  48. <TextBox VerticalAlignment="Center" HorizontalAlignment="Left" Width="200"
  49. Text="{Binding CurrentAgent.Email}"/>
  50. <Button x:Name="AddImage"
  51. Content="Выбрать картинку"
  52. VerticalAlignment="Center"
  53. HorizontalAlignment="Center"
  54. Click="AddImage_Click"
  55. Margin="0,10"
  56. Background="#46B29D"
  57. Width="150"/>
  58. <Button x:Name="AddButton"
  59. Content="Сохранить"
  60. Background="#46B29D"
  61. Click="AddButton_Click"
  62. VerticalAlignment="Center"
  63. HorizontalAlignment="Center"
  64. Width="150"
  65. />
  66. <Button
  67. x:Name="DeleteButton"
  68. Content="Удалить"
  69. Background="#46B29D"
  70. Click="DeleteButton_Click"
  71. VerticalAlignment="Center"
  72. HorizontalAlignment="Center"
  73. Width="150"
  74. Margin="0,10"/>
  75. </StackPanel>
  76. </Grid>
  77. </Window>