EmployeesView.axaml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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" Text="{Binding PersonalAccountVM.CurrentUser.Surname}">Фамилия И.О.</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="ListBox.filters ListBoxItem:pointerover /template/ ContentPresenter">
  119. <Setter Property="Background" Value="#FFF8F8"/>
  120. </Style>
  121. <Style Selector="ListBox.filters ListBoxItem:focus-within /template/ ContentPresenter">
  122. <Setter Property="Background" Value="#FFF8F8"/>
  123. </Style>
  124. <Style Selector="ListBox.filters ListBoxItem:selected /template/ ContentPresenter">
  125. <Setter Property="Background" Value="#F48288"/>
  126. </Style>
  127. <Style Selector="TextBox.EditTextBox">
  128. <Setter Property="Foreground" Value="Black"></Setter>
  129. <Setter Property="FontFamily" Value="Roboto"></Setter>
  130. <Setter Property="FontWeight" Value="Medium"></Setter>
  131. <Setter Property="FontSize" Value="15"></Setter>
  132. <Setter Property="Background" Value="#FFF8F8"></Setter>
  133. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  134. <Setter Property="CornerRadius" Value="13"></Setter>
  135. <Setter Property="BorderThickness" Value="2"></Setter>
  136. <Setter Property="Padding" Value="20 8 0 0"></Setter>
  137. </Style>
  138. <Style Selector="TextBlock.TextColumns">
  139. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  140. <Setter Property="FontFamily" Value="Roboto"></Setter>
  141. <Setter Property="FontWeight" Value="Medium"></Setter>
  142. <Setter Property="FontSize" Value="20"></Setter>
  143. <!--<Setter Property="Margin" Value="40 0 185 0"></Setter>-->
  144. <Setter Property="Margin" Value="40 0 100 0"></Setter>
  145. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  146. </Style>
  147. <Style Selector="Border.TextColumns">
  148. <Setter Property="Margin" Value="0 0 0 20"></Setter>
  149. </Style>
  150. <Style Selector="Border.Data">
  151. <Setter Property="Background" Value="#FFF8F8"></Setter>
  152. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  153. <Setter Property="CornerRadius" Value="13"></Setter>
  154. <Setter Property="BorderThickness" Value="2"></Setter>
  155. </Style>
  156. <Style Selector="TextBlock.Data">
  157. <Setter Property="Background" Value="#FFF8F8"></Setter>
  158. <Setter Property="FontSize" Value="15"></Setter>
  159. <Setter Property="FontFamily" Value="Roboto"></Setter>
  160. <Setter Property="FontWeight" Value="Medium"></Setter>
  161. <Setter Property="Margin" Value="20 0 0 0"></Setter>
  162. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  163. </Style>
  164. <Style Selector="TextBlock.TextBtEdit">
  165. <Setter Property="Foreground" Value="Black"></Setter>
  166. <Setter Property="FontFamily" Value="Roboto"></Setter>
  167. <Setter Property="FontWeight" Value="Medium"></Setter>
  168. <Setter Property="FontSize" Value="15"></Setter>
  169. <Setter Property="Padding" Value="20 4 0 0"></Setter>
  170. </Style>
  171. <Style Selector="Button.BtEdit">
  172. <Setter Property="BorderThickness" Value="2"></Setter>
  173. <Setter Property="Width" Value="180"></Setter>
  174. <Setter Property="Height" Value="38"></Setter>
  175. <Setter Property="Background" Value="#FFF8F8"></Setter>
  176. <Setter Property="CornerRadius" Value="13"></Setter>
  177. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  178. </Style>
  179. <Style Selector="Button.BtEdit:pointerover /template/ ContentPresenter">
  180. <Setter Property="Background" Value="#FFF8F8"></Setter>
  181. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  182. </Style>
  183. <Style Selector="Button.BtEdit:pressed">
  184. <Setter Property="RenderTransform" Value="none"/>
  185. </Style>
  186. </StackPanel.Styles>
  187. <Border Classes="TextColumns" Background="#80E40714" CornerRadius="13" Width="1490" Height="40">
  188. <StackPanel Orientation="Horizontal">
  189. <TextBlock Classes="TextColumns">ID</TextBlock>
  190. <!--<TextBlock Classes="TextColumns">СОТРУДНИКИ</TextBlock>-->
  191. <TextBlock Classes="TextColumns">ФАМИЛИЯ</TextBlock>
  192. <TextBlock Classes="TextColumns">ИМЯ</TextBlock>
  193. <TextBlock Classes="TextColumns">ОТЧЕСТВО</TextBlock>
  194. <TextBlock Classes="TextColumns">РОЛЬ</TextBlock>
  195. <TextBlock Classes="TextColumns">ПОЧТА</TextBlock>
  196. <TextBlock Classes="TextColumns">ТЕЛЕФОН</TextBlock>
  197. </StackPanel>
  198. </Border>
  199. <ScrollViewer Height="550">
  200. <StackPanel Orientation="Vertical">
  201. <!--СЛИТНОЕ ФИО-->
  202. <!--<StackPanel Orientation="Horizontal" Margin="40 0 0 0">
  203. <Button Classes="BtEdit" Width="180" Height="40" Margin="0 0 65 0" Command="{Binding EditEmployeesView}">
  204. <TextBlock Classes="TextBtEdit">Типа ID</TextBlock>
  205. </Button>
  206. --><!--<Border Classes="Data" CornerRadius="13" Width="180" Height="40" Margin="0 0 140 0">
  207. <TextBlock Classes="Data">Типа ID</TextBlock>
  208. </Border>--><!--
  209. <TextBox Classes="EditTextBox" Width="230" Margin="0 0 125 0">Типа сотрудник</TextBox>
  210. --><!--<Border Classes="Data" CornerRadius="13" Width="310" Height="40" Margin="0 0 140 0">
  211. <TextBlock Classes="Data">Типа название торговой сети</TextBlock>
  212. </Border>--><!--
  213. <Border Classes="Data" CornerRadius="13" Width="170" Height="40" Margin="0 0 105 0">
  214. <TextBlock Classes="Data">Типа роль</TextBlock>
  215. </Border>
  216. <Border Classes="Data" CornerRadius="13" Width="190" Height="40" Margin="0 0 100 0">
  217. <TextBlock Classes="Data">Типа почта</TextBlock>
  218. </Border>
  219. <Border Classes="Data" CornerRadius="13" Width="255" Height="40">
  220. <TextBlock Classes="Data">Типа телефон</TextBlock>
  221. </Border>
  222. </StackPanel>-->
  223. <!--<StackPanel Orientation="Horizontal" Margin="40 20 0 0">
  224. <Button Classes="BtEdit" Width="180" Height="40" Margin="0 0 65 0" Command="{Binding EditEmployeesView}">
  225. <TextBlock Classes="TextBtEdit">Типа ID</TextBlock>
  226. </Button>
  227. -->
  228. <!--<Border Classes="Data" CornerRadius="13" Width="180" Height="40" Margin="0 0 140 0">
  229. <TextBlock Classes="Data">Типа ID</TextBlock>
  230. </Border>-->
  231. <!--
  232. <TextBox Classes="EditTextBox" Width="230" Margin="0 0 125 0">Типа сотрудник</TextBox>
  233. -->
  234. <!--<Border Classes="Data" CornerRadius="13" Width="310" Height="40" Margin="0 0 140 0">
  235. <TextBlock Classes="Data">Типа название торговой сети</TextBlock>
  236. </Border>-->
  237. <!--
  238. <Border Classes="Data" CornerRadius="13" Width="170" Height="40" Margin="0 0 105 0">
  239. <TextBlock Classes="Data">Типа роль</TextBlock>
  240. </Border>
  241. <Border Classes="Data" CornerRadius="13" Width="190" Height="40" Margin="0 0 100 0">
  242. <TextBlock Classes="Data">Типа почта</TextBlock>
  243. </Border>
  244. <Border Classes="Data" CornerRadius="13" Width="255" Height="40">
  245. <TextBlock Classes="Data">Типа телефон</TextBlock>
  246. </Border>
  247. </StackPanel>-->
  248. <!--РАЗДЕЛЬНОЕ ФИО-->
  249. <ListBox Classes="filters" ItemsSource="{Binding ListEmployees}" Background="Transparent" IsTabStop="False">
  250. <ListBox.ItemTemplate>
  251. <DataTemplate>
  252. <StackPanel Orientation="Horizontal" Margin="40 0 0 0">
  253. <!--Margin="40 0 0 0"-->
  254. <!--<Border Classes="Data" CornerRadius="13" Width="180" Height="40" Margin="0 0 140 0">
  255. <TextBlock Classes="Data">Типа ID</TextBlock>
  256. </Border>-->
  257. <!--<TextBox Classes="EditTextBox" Width="230" Margin="0 0 125 0">Типа сотрудник</TextBox>-->
  258. <Border Classes="Data" CornerRadius="13" Width="100" Height="40" Margin="0 0 50 0">
  259. <TextBlock Text="{Binding Employeesid}" Classes="Data">Типа id</TextBlock>
  260. </Border>
  261. <Border Classes="Data" CornerRadius="13" Width="180" Height="40" Margin="0 0 60 0">
  262. <TextBlock Text="{Binding Surname}" Classes="Data">Типа фамилия</TextBlock>
  263. </Border>
  264. <Border Classes="Data" CornerRadius="13" Width="130" Height="40" Margin="0 0 60 0">
  265. <TextBlock Text="{Binding Name}" Classes="Data" >Типа имя</TextBlock>
  266. </Border>
  267. <Border Classes="Data" CornerRadius="13" Width="170" Height="40" Margin="0 0 70 0">
  268. <TextBlock Text="{Binding Patronymic}" Classes="Data" >Типа отчество</TextBlock>
  269. </Border>
  270. <Border Classes="Data" CornerRadius="13" Width="130" Height="40" Margin="0 0 63 0">
  271. <TextBlock Text="{Binding RoleNavigation.Title}" Classes="Data">Типа роль</TextBlock>
  272. </Border>
  273. <Border Classes="Data" CornerRadius="13" Width="150" Height="40" Margin="0 0 55 0">
  274. <ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Disabled" Width="130" Height="35">
  275. <TextBlock TextWrapping="Wrap" Text="{Binding Email}" Classes="Data">Типа почта</TextBlock>
  276. </ScrollViewer>
  277. </Border>
  278. <!--<Border Classes="Data" CornerRadius="13" Width="150" Height="40" Margin="0 0 55 0">
  279. <TextBlock Text="{Binding Email}" Classes="Data">Типа почта</TextBlock>
  280. </Border>-->
  281. <Border Classes="Data" CornerRadius="13" Width="140" Height="40" Margin="0 0 20 0">
  282. <TextBlock Text="{Binding Phonenumber}" Classes="Data">Типа телефон</TextBlock>
  283. </Border>
  284. <StackPanel Orientation="Horizontal">
  285. <Button Classes="BtEdit" Width="40" Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).EditUser}" CommandParameter ="{Binding Employeesid}">
  286. <Image Source="avares://Acosta/Assets/change.png" Width="25"></Image>
  287. </Button>
  288. </StackPanel>
  289. <!--<Button Content="Изменить" Command="{Binding $parent[Window].((vm:MainWindowViewModel)DataContext).EditUser}" CommandParameter ="{Binding Employeesid}"/>-->
  290. </StackPanel>
  291. </DataTemplate>
  292. </ListBox.ItemTemplate>
  293. </ListBox>
  294. </StackPanel>
  295. </ScrollViewer>
  296. </StackPanel>
  297. <!--<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  298. <StackPanel.Styles>
  299. <Style Selector="TextBlock.TextBtSave">
  300. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  301. <Setter Property="FontFamily" Value="Roboto"></Setter>
  302. <Setter Property="FontWeight" Value="Medium"></Setter>
  303. <Setter Property="FontSize" Value="20"></Setter>
  304. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  305. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  306. </Style>
  307. <Style Selector="Button.BtSave">
  308. <Setter Property="Width" Value="180"></Setter>
  309. <Setter Property="Height" Value="38"></Setter>
  310. <Setter Property="Margin" Value="0 740 30 20"></Setter>
  311. <Setter Property="Background" Value="#E40714"></Setter>
  312. <Setter Property="CornerRadius" Value="13"></Setter>
  313. </Style>
  314. <Style Selector="Button.BtSave:pointerover /template/ ContentPresenter">
  315. <Setter Property="Background" Value="#A10009"></Setter>
  316. </Style>
  317. <Style Selector="Button.BtSave:pressed">
  318. <Setter Property="RenderTransform" Value="none"/>
  319. </Style>
  320. </StackPanel.Styles>
  321. <Button Classes="BtSave" Command="">
  322. <TextBlock Classes="TextBtSave">Сохранить</TextBlock>
  323. </Button>
  324. </StackPanel>-->
  325. </Grid>
  326. </UserControl>