0
0

EditProductWindow.xaml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <Window x:Class="wpf_connection3.Windows.EditProductWindow"
  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:wpf_connection3.Windows"
  7. mc:Ignorable="d"
  8. Title="EditProductWindow" Height="600" Width="800"
  9. Name="root">
  10. <Grid>
  11. <Grid.ColumnDefinitions>
  12. <ColumnDefinition Width="auto"/>
  13. <ColumnDefinition Width="*"/>
  14. <ColumnDefinition Width="auto"/>
  15. </Grid.ColumnDefinitions>
  16. <Image
  17. Name="CurrentProductImage"
  18. Width="200"
  19. Height="200"
  20. Source="{Binding currentProduct.ImageBitmap}" />
  21. <StackPanel
  22. Grid.Column="1"
  23. Margin="5">
  24. <Label Content="Артикул"/>
  25. <TextBox
  26. Name="ArticleNumberTextBox"
  27. Text="{Binding currentProduct.ArticleNumber}"/>
  28. <Label Content="Наименование продукта"/>
  29. <TextBox
  30. Name="TitleTextBox"
  31. Text="{Binding currentProduct.Title}"/>
  32. <Label Content="Тип продукта"/>
  33. <ComboBox
  34. Name="ProductTypeComboBox"
  35. ItemsSource="{Binding productTypeList}"
  36. SelectedIndex="{Binding selectedProductIndex}"/>
  37. <Label Content="Количество человек для производства"/>
  38. <TextBox
  39. Name="ProductionPersonCountTextBox"
  40. Text="{Binding currentProduct.ProductionPersonCount}"/>
  41. <Label Content="Номер производственного цеха"/>
  42. <TextBox
  43. Name="ProductionWorkshopNumberTextBox"
  44. Text="{Binding currentProduct.ProductionWorkshopNumber}"/>
  45. <Label Content="Минимальная стоимость для агента"/>
  46. <TextBox
  47. Name="MinCostForAgentTextBox"
  48. Text="{Binding currentProduct.MinCostForAgent}"/>
  49. <Label Content="Описание продукта"/>
  50. <TextBox
  51. Name="DescriptionTextBox"
  52. AcceptsReturn="True"
  53. Height="200"
  54. Text="{Binding currentProduct.Descrpition}"/>
  55. <Button
  56. Name="ChangeImageButton"
  57. Content="Изменить фото"
  58. Margin="5"
  59. Click="ChangeImageButton_Click"/>
  60. <Button
  61. Name="SaveButton"
  62. Content="Сохранить"
  63. Margin="5"
  64. Click="SaveButton_Click"/>
  65. <Button
  66. Name="deleteButton"
  67. Content="Удалить продукт"
  68. Margin="5"
  69. Click="deleteButton_Click"/>
  70. </StackPanel>
  71. </Grid>
  72. </Window>