EmployeesView.axaml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. mc:Ignorable="d" d:DesignWidth="1550" d:DesignHeight="800.5"
  6. xmlns:vm="using:Acosta.ViewModels"
  7. x:DataType="vm:MainWindowViewModel"
  8. x:Class="Acosta.Views.EmployeesView">
  9. <Grid>
  10. <StackPanel Height="50" Background="#E40714" VerticalAlignment="Top">
  11. <StackPanel.Styles>
  12. <Style Selector="TextBlock.headerLogo">
  13. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  14. <Setter Property="FontFamily" Value="Roboto"></Setter>
  15. <Setter Property="FontWeight" Value="Regular"></Setter>
  16. <Setter Property="FontSize" Value="35"></Setter>
  17. <Setter Property="Margin" Value="30 0 0 0"></Setter>
  18. </Style>
  19. <Style Selector="TextBlock.greeting">
  20. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  21. <Setter Property="FontFamily" Value="Roboto"></Setter>
  22. <Setter Property="FontWeight" Value="Medium"></Setter>
  23. <Setter Property="FontSize" Value="16"></Setter>
  24. </Style>
  25. <Style Selector="Button.headerBt">
  26. <Setter Property="Background" Value="Transparent"></Setter>
  27. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  28. <Setter Property="FontFamily" Value="Roboto"></Setter>
  29. <Setter Property="FontSize" Value="16"></Setter>
  30. <Setter Property="FontWeight" Value="Medium"></Setter>
  31. </Style>
  32. <Style Selector="Button.headerBt:pointerover /template/ ContentPresenter">
  33. <Setter Property="Background" Value="Transparent"></Setter>
  34. <Setter Property="Foreground" Value="#D5AFAF"></Setter>
  35. <Setter Property="FontWeight" Value="Medium"></Setter>
  36. <Setter Property="FontSize" Value="16"></Setter>
  37. </Style>
  38. <Style Selector="Button.headerBt:pressed">
  39. <Setter Property="RenderTransform" Value="none"/>
  40. </Style>
  41. </StackPanel.Styles>
  42. <StackPanel Orientation="Horizontal">
  43. <TextBlock Classes="headerLogo">Acosta</TextBlock>
  44. <TextBlock Classes="greeting" Margin="770 12 0 0">Добро пожаловать, оператор</TextBlock>
  45. <TextBlock Classes="greeting" Margin="7 12 0 0" FontWeight="Bold" Name="FIO">Фамилия И.О.</TextBlock>
  46. <TextBlock Classes="greeting" Margin="10 10 0 0">/</TextBlock>
  47. <Button Classes="headerBt" Command="{Binding ChangePasswordView}">Изменить пароль</Button>
  48. <TextBlock Classes="greeting" Margin="0 10 0 0">/</TextBlock>
  49. <Button Classes="headerBt" Command="{Binding ExitFromProfile}">Выйти</Button>
  50. </StackPanel>
  51. </StackPanel>
  52. <StackPanel>
  53. <StackPanel.Styles>
  54. <Style Selector="TextBlock.TextBtBack">
  55. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  56. <Setter Property="FontFamily" Value="Roboto"></Setter>
  57. <Setter Property="FontWeight" Value="Medium"></Setter>
  58. <Setter Property="FontSize" Value="20"></Setter>
  59. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  60. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  61. </Style>
  62. <Style Selector="TextBlock.Chapter">
  63. <Setter Property="Foreground" Value="Black"></Setter>
  64. <Setter Property="FontFamily" Value="Roboto"></Setter>
  65. <Setter Property="FontWeight" Value="Medium"></Setter>
  66. <Setter Property="FontSize" Value="20"></Setter>
  67. <Setter Property="Margin" Value="30 85 0 0"></Setter>
  68. </Style>
  69. <Style Selector="Button.BtBack">
  70. <Setter Property="Width" Value="140"></Setter>
  71. <Setter Property="Height" Value="40"></Setter>
  72. <Setter Property="Margin" Value="30 80 0 0"></Setter>
  73. <Setter Property="Background" Value="#E40714"></Setter>
  74. <Setter Property="CornerRadius" Value="13"></Setter>
  75. </Style>
  76. <Style Selector="Button.BtBack:pointerover /template/ ContentPresenter">
  77. <Setter Property="Background" Value="#A10009"></Setter>
  78. </Style>
  79. <Style Selector="Button.BtBack:pressed">
  80. <Setter Property="RenderTransform" Value="none"/>
  81. </Style>
  82. <Style Selector="Button.BtAdd">
  83. <Setter Property="Height" Value="40"></Setter>
  84. <Setter Property="Margin" Value="670 80 0 0"></Setter>
  85. <Setter Property="Background" Value="#E40714"></Setter>
  86. <Setter Property="CornerRadius" Value="13"></Setter>
  87. </Style>
  88. <Style Selector="Button.BtAdd:pointerover /template/ ContentPresenter">
  89. <Setter Property="Background" Value="#A10009"></Setter>
  90. </Style>
  91. <Style Selector="TextBlock.TextBtAdd">
  92. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  93. <Setter Property="FontFamily" Value="Roboto"></Setter>
  94. <Setter Property="FontWeight" Value="Medium"></Setter>
  95. <Setter Property="FontSize" Value="18"></Setter>
  96. <Setter Property="Margin" Value="20 0 0 0"></Setter>
  97. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  98. </Style>
  99. <Style Selector="Button.BtAdd:pressed">
  100. <Setter Property="RenderTransform" Value="none"/>
  101. </Style>
  102. </StackPanel.Styles>
  103. <StackPanel Orientation="Horizontal">
  104. <Button Classes="BtBack" Command="{Binding BackPersonalAccountView}">
  105. <TextBlock Classes="TextBtBack">Назад</TextBlock>
  106. </Button>
  107. <TextBlock Classes="Chapter">Выберите Сотрудника для изменения</TextBlock>
  108. <StackPanel Orientation="Horizontal">
  109. <Button Classes="BtAdd" Width="290" Command="{Binding AddEmployeesView}">
  110. <TextBlock Classes="TextBtAdd">Добавить сотрудника</TextBlock>
  111. </Button>
  112. <Image Source="avares://Acosta/Assets/plus.png" Width="25" Margin="-70 80 0 0"></Image>
  113. </StackPanel>
  114. </StackPanel>
  115. </StackPanel>
  116. <StackPanel Background="Transparent" Margin="0 150 0 0" HorizontalAlignment="Center">
  117. <StackPanel.Styles>
  118. <Style Selector="TextBox.EditTextBox">
  119. <Setter Property="Foreground" Value="Black"></Setter>
  120. <Setter Property="FontFamily" Value="Roboto"></Setter>
  121. <Setter Property="FontWeight" Value="Medium"></Setter>
  122. <Setter Property="FontSize" Value="15"></Setter>
  123. <Setter Property="Background" Value="#FFF8F8"></Setter>
  124. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  125. <Setter Property="CornerRadius" Value="13"></Setter>
  126. <Setter Property="BorderThickness" Value="2"></Setter>
  127. <Setter Property="Padding" Value="20 8 0 0"></Setter>
  128. </Style>
  129. <Style Selector="TextBlock.TextColumns">
  130. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  131. <Setter Property="FontFamily" Value="Roboto"></Setter>
  132. <Setter Property="FontWeight" Value="Medium"></Setter>
  133. <Setter Property="FontSize" Value="20"></Setter>
  134. <!--<Setter Property="Margin" Value="40 0 185 0"></Setter>-->
  135. <Setter Property="Margin" Value="40 0 100 0"></Setter>
  136. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  137. </Style>
  138. <Style Selector="Border.TextColumns">
  139. <Setter Property="Margin" Value="0 0 0 20"></Setter>
  140. </Style>
  141. <Style Selector="Border.Data">
  142. <Setter Property="Background" Value="#FFF8F8"></Setter>
  143. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  144. <Setter Property="CornerRadius" Value="13"></Setter>
  145. <Setter Property="BorderThickness" Value="2"></Setter>
  146. </Style>
  147. <Style Selector="TextBlock.Data">
  148. <Setter Property="Background" Value="#FFF8F8"></Setter>
  149. <Setter Property="FontSize" Value="15"></Setter>
  150. <Setter Property="FontFamily" Value="Roboto"></Setter>
  151. <Setter Property="FontWeight" Value="Medium"></Setter>
  152. <Setter Property="Margin" Value="20 0 0 0"></Setter>
  153. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  154. </Style>
  155. <Style Selector="TextBlock.TextBtEdit">
  156. <Setter Property="Foreground" Value="Black"></Setter>
  157. <Setter Property="FontFamily" Value="Roboto"></Setter>
  158. <Setter Property="FontWeight" Value="Medium"></Setter>
  159. <Setter Property="FontSize" Value="15"></Setter>
  160. <Setter Property="Padding" Value="20 4 0 0"></Setter>
  161. </Style>
  162. <Style Selector="Button.BtEdit">
  163. <Setter Property="BorderThickness" Value="2"></Setter>
  164. <Setter Property="Width" Value="180"></Setter>
  165. <Setter Property="Height" Value="38"></Setter>
  166. <Setter Property="Background" Value="#FFF8F8"></Setter>
  167. <Setter Property="CornerRadius" Value="13"></Setter>
  168. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  169. </Style>
  170. <Style Selector="Button.BtEdit:pointerover /template/ ContentPresenter">
  171. <Setter Property="Background" Value="#FFF8F8"></Setter>
  172. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  173. </Style>
  174. <Style Selector="Button.BtEdit:pressed">
  175. <Setter Property="RenderTransform" Value="none"/>
  176. </Style>
  177. </StackPanel.Styles>
  178. <Border Classes="TextColumns" Background="#80E40714" CornerRadius="13" Width="1490" Height="40">
  179. <StackPanel Orientation="Horizontal">
  180. <TextBlock Classes="TextColumns">ID</TextBlock>
  181. <!--<TextBlock Classes="TextColumns">СОТРУДНИКИ</TextBlock>-->
  182. <TextBlock Classes="TextColumns">ФАМИЛИЯ</TextBlock>
  183. <TextBlock Classes="TextColumns">ИМЯ</TextBlock>
  184. <TextBlock Classes="TextColumns">ОТЧЕСТВО</TextBlock>
  185. <TextBlock Classes="TextColumns">РОЛЬ</TextBlock>
  186. <TextBlock Classes="TextColumns">ПОЧТА</TextBlock>
  187. <TextBlock Classes="TextColumns">ТЕЛЕФОН</TextBlock>
  188. </StackPanel>
  189. </Border>
  190. <ScrollViewer Height="500">
  191. <StackPanel Orientation="Vertical">
  192. <!--СЛИТНОЕ ФИО-->
  193. <!--<StackPanel Orientation="Horizontal" Margin="40 0 0 0">
  194. <Button Classes="BtEdit" Width="180" Height="40" Margin="0 0 65 0" Command="{Binding EditEmployeesView}">
  195. <TextBlock Classes="TextBtEdit">Типа ID</TextBlock>
  196. </Button>
  197. --><!--<Border Classes="Data" CornerRadius="13" Width="180" Height="40" Margin="0 0 140 0">
  198. <TextBlock Classes="Data">Типа ID</TextBlock>
  199. </Border>--><!--
  200. <TextBox Classes="EditTextBox" Width="230" Margin="0 0 125 0">Типа сотрудник</TextBox>
  201. --><!--<Border Classes="Data" CornerRadius="13" Width="310" Height="40" Margin="0 0 140 0">
  202. <TextBlock Classes="Data">Типа название торговой сети</TextBlock>
  203. </Border>--><!--
  204. <Border Classes="Data" CornerRadius="13" Width="170" Height="40" Margin="0 0 105 0">
  205. <TextBlock Classes="Data">Типа роль</TextBlock>
  206. </Border>
  207. <Border Classes="Data" CornerRadius="13" Width="190" Height="40" Margin="0 0 100 0">
  208. <TextBlock Classes="Data">Типа почта</TextBlock>
  209. </Border>
  210. <Border Classes="Data" CornerRadius="13" Width="255" Height="40">
  211. <TextBlock Classes="Data">Типа телефон</TextBlock>
  212. </Border>
  213. </StackPanel>-->
  214. <!--<StackPanel Orientation="Horizontal" Margin="40 20 0 0">
  215. <Button Classes="BtEdit" Width="180" Height="40" Margin="0 0 65 0" Command="{Binding EditEmployeesView}">
  216. <TextBlock Classes="TextBtEdit">Типа ID</TextBlock>
  217. </Button>
  218. -->
  219. <!--<Border Classes="Data" CornerRadius="13" Width="180" Height="40" Margin="0 0 140 0">
  220. <TextBlock Classes="Data">Типа ID</TextBlock>
  221. </Border>-->
  222. <!--
  223. <TextBox Classes="EditTextBox" Width="230" Margin="0 0 125 0">Типа сотрудник</TextBox>
  224. -->
  225. <!--<Border Classes="Data" CornerRadius="13" Width="310" Height="40" Margin="0 0 140 0">
  226. <TextBlock Classes="Data">Типа название торговой сети</TextBlock>
  227. </Border>-->
  228. <!--
  229. <Border Classes="Data" CornerRadius="13" Width="170" Height="40" Margin="0 0 105 0">
  230. <TextBlock Classes="Data">Типа роль</TextBlock>
  231. </Border>
  232. <Border Classes="Data" CornerRadius="13" Width="190" Height="40" Margin="0 0 100 0">
  233. <TextBlock Classes="Data">Типа почта</TextBlock>
  234. </Border>
  235. <Border Classes="Data" CornerRadius="13" Width="255" Height="40">
  236. <TextBlock Classes="Data">Типа телефон</TextBlock>
  237. </Border>
  238. </StackPanel>-->
  239. <!--РАЗДЕЛЬНОЕ ФИО-->
  240. <ListBox ItemsSource="{Binding ListEmployees}">
  241. <ListBox.ItemTemplate>
  242. <DataTemplate>
  243. <StackPanel Orientation="Horizontal" Margin="40 0 0 0">
  244. <!--Margin="40 0 0 0"-->
  245. <!--<Border Classes="Data" CornerRadius="13" Width="180" Height="40" Margin="0 0 140 0">
  246. <TextBlock Classes="Data">Типа ID</TextBlock>
  247. </Border>-->
  248. <!--<TextBox Classes="EditTextBox" Width="230" Margin="0 0 125 0">Типа сотрудник</TextBox>-->
  249. <TextBox Text="{Binding Employeesid}" Classes="EditTextBox" Width="70" Margin="0 0 70 0">Типа id</TextBox>
  250. <TextBox Text="{Binding Surname}" Classes="EditTextBox" Width="170" Margin="0 0 70 0">Типа фамилия</TextBox>
  251. <TextBox Text="{Binding Name}" Classes="EditTextBox" Width="130" Margin="0 0 55 0">Типа имя</TextBox>
  252. <TextBox Text="{Binding Patronymic}" Classes="EditTextBox" Width="170" Margin="0 0 70 0">Типа отчество</TextBox>
  253. <!--<Border Classes="Data" CornerRadius="13" Width="310" Height="40" Margin="0 0 140 0">
  254. <TextBlock Classes="Data">Типа название торговой сети</TextBlock>
  255. </Border>-->
  256. <Border Classes="Data" CornerRadius="13" Width="130" Height="40" Margin="0 0 63 0">
  257. <TextBlock Text="{Binding Role}" Classes="Data">Типа роль</TextBlock>
  258. </Border>
  259. <Border Classes="Data" CornerRadius="13" Width="150" Height="40" Margin="0 0 55 0">
  260. <TextBlock Text="{Binding Email}" Classes="Data">Типа почта</TextBlock>
  261. </Border>
  262. <Border Classes="Data" CornerRadius="13" Width="170" Height="40">
  263. <TextBlock Text="{Binding Phonenumber}" Classes="Data">Типа телефон</TextBlock>
  264. </Border>
  265. </StackPanel>
  266. </DataTemplate>
  267. </ListBox.ItemTemplate>
  268. </ListBox>
  269. </StackPanel>
  270. </ScrollViewer>
  271. </StackPanel>
  272. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  273. <StackPanel.Styles>
  274. <Style Selector="TextBlock.TextBtSave">
  275. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  276. <Setter Property="FontFamily" Value="Roboto"></Setter>
  277. <Setter Property="FontWeight" Value="Medium"></Setter>
  278. <Setter Property="FontSize" Value="20"></Setter>
  279. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  280. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  281. </Style>
  282. <Style Selector="Button.BtSave">
  283. <Setter Property="Width" Value="180"></Setter>
  284. <Setter Property="Height" Value="38"></Setter>
  285. <Setter Property="Margin" Value="0 740 30 20"></Setter>
  286. <Setter Property="Background" Value="#E40714"></Setter>
  287. <Setter Property="CornerRadius" Value="13"></Setter>
  288. </Style>
  289. <Style Selector="Button.BtSave:pointerover /template/ ContentPresenter">
  290. <Setter Property="Background" Value="#A10009"></Setter>
  291. </Style>
  292. <Style Selector="Button.BtSave:pressed">
  293. <Setter Property="RenderTransform" Value="none"/>
  294. </Style>
  295. </StackPanel.Styles>
  296. <Button Classes="BtSave" Command="">
  297. <TextBlock Classes="TextBtSave">Сохранить</TextBlock>
  298. </Button>
  299. </StackPanel>
  300. </Grid>
  301. </UserControl>