CostWindow.xaml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <Window x:Class="mysql_connector2.Windows.CostWindow"
  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:mysql_connector2.Windows"
  7. mc:Ignorable="d"
  8. Title="CostWindow" Height="450" Width="800" Name="root">
  9. <Grid>
  10. <Grid.ColumnDefinitions>
  11. <ColumnDefinition Width="auto"/>
  12. <ColumnDefinition Width="*"/>
  13. <ColumnDefinition Width="auto"/>
  14. </Grid.ColumnDefinitions>
  15. <StackPanel
  16. Grid.Column="1"
  17. Margin="5">
  18. <Label Content="Артикул"/>
  19. <TextBox
  20. Text="{Binding currentProduct.ArticleNumber}"/>
  21. <Label Content="Наименование продукта"/>
  22. <TextBox Text="{Binding currentProduct.Title}"/>
  23. <ComboBox
  24. Name="ProductTypeComboBox"
  25. ItemsSource="{Binding productTypeList}"
  26. SelectedIndex="{Binding selectedProductIndex}"/>
  27. <Label Content="Количество человек для производства"/>
  28. <TextBox
  29. AcceptsReturn="True"
  30. Text="{Binding currentProduct.ProductionPersonCount}"/>
  31. <Label Content="Номер производственного цеха"/>
  32. <TextBox
  33. AcceptsReturn="True"
  34. Text="{Binding currentProduct.ProductionWorkshopNumber}"/>
  35. <Label Content="Минимальная стоимость для агента"/>
  36. <TextBox
  37. AcceptsReturn="True"
  38. Text="{Binding currentProduct.MinCostForAgent}"/>
  39. <Label Content="Описание продукта"/>
  40. <TextBox
  41. AcceptsReturn="True"
  42. Height="100"
  43. Text="{Binding currentProduct.Description}"/>
  44. </StackPanel>
  45. <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" Margin="5">
  46. <Image
  47. Name="CurrentProductImage"
  48. Width="200"
  49. Height="200"
  50. Source="{Binding currentProduct.ImageBitmap}" />
  51. <Button Height="20" Content="Сменить картинку" Click="ChangeImage_Click"/>
  52. <Button Height="20" Content="Удалить" Click="DeleteProductButton_Click"
  53. Visibility="{Binding DeleteProductVisibly}"/>
  54. <Button Height="20" Content="Сохранить" Click="SaveButton_Click"/>
  55. </StackPanel>
  56. </Grid>
  57. </Window>