AddEmployeesView.axaml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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:vm="using:Acosta.ViewModels"
  5. x:DataType="vm:MainWindowViewModel"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. mc:Ignorable="d" d:DesignWidth="1920" d:DesignHeight="1080"
  8. x:Class="Acosta.Views.AddEmployeesView">
  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 Orientation="Vertical">
  53. <StackPanel.Styles>
  54. <Style Selector="TextBlock.TextToTextBox">
  55. <Setter Property="Foreground" Value="Black"></Setter>
  56. <Setter Property="FontFamily" Value="Roboto"></Setter>
  57. <Setter Property="FontWeight" Value="Regular"></Setter>
  58. <Setter Property="FontSize" Value="18"></Setter>
  59. <Setter Property="Margin" Value="200 30 0 0"></Setter>
  60. </Style>
  61. <Style Selector="TextBox">
  62. <Setter Property="Background" Value="#FFF8F8"></Setter>
  63. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  64. <Setter Property="CornerRadius" Value="9"></Setter>
  65. <Setter Property="BorderThickness" Value="2"></Setter>
  66. <Setter Property="FontSize" Value="14"></Setter>
  67. <Setter Property="FontFamily" Value="Roboto"></Setter>
  68. </Style>
  69. <Style Selector="TextBox:pointerover /template/ TextBlock#PART_Watermark">
  70. <Setter Property="TextBox.BorderBrush" Value="#A10009" />
  71. </Style>
  72. <Style Selector="TextBox:focus /template/ TextBlock#PART_Watermark">
  73. <Setter Property="TextBox.BorderBrush" Value="#A10009" />
  74. </Style>
  75. <Style Selector="TextBlock.TextBtBack">
  76. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  77. <Setter Property="FontFamily" Value="Roboto"></Setter>
  78. <Setter Property="FontWeight" Value="Medium"></Setter>
  79. <Setter Property="FontSize" Value="20"></Setter>
  80. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  81. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  82. </Style>
  83. <Style Selector="TextBlock.Chapter">
  84. <Setter Property="Foreground" Value="Black"></Setter>
  85. <Setter Property="FontFamily" Value="Roboto"></Setter>
  86. <Setter Property="FontWeight" Value="Medium"></Setter>
  87. <Setter Property="FontSize" Value="20"></Setter>
  88. <Setter Property="Margin" Value="30 85 0 0"></Setter>
  89. </Style>
  90. <Style Selector="Button.BtBack">
  91. <Setter Property="Width" Value="140"></Setter>
  92. <Setter Property="Height" Value="40"></Setter>
  93. <Setter Property="Margin" Value="30 80 0 0"></Setter>
  94. <Setter Property="Background" Value="#E40714"></Setter>
  95. <Setter Property="CornerRadius" Value="13"></Setter>
  96. </Style>
  97. <Style Selector="Button.BtBack:pointerover /template/ ContentPresenter">
  98. <Setter Property="Background" Value="#A10009"></Setter>
  99. </Style>
  100. <Style Selector="Button.BtBack:pressed">
  101. <Setter Property="RenderTransform" Value="none"/>
  102. </Style>
  103. <Style Selector="Button.BtAdd">
  104. <Setter Property="Height" Value="35"></Setter>
  105. <Setter Property="Margin" Value="620 80 0 0"></Setter>
  106. <Setter Property="Background" Value="#E40714"></Setter>
  107. <Setter Property="CornerRadius" Value="13"></Setter>
  108. </Style>
  109. <Style Selector="Button.BtAdd:pointerover /template/ ContentPresenter">
  110. <Setter Property="Background" Value="#A10009"></Setter>
  111. </Style>
  112. <Style Selector="TextBlock.TextBtAdd">
  113. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  114. <Setter Property="FontFamily" Value="Roboto"></Setter>
  115. <Setter Property="FontWeight" Value="Medium"></Setter>
  116. <Setter Property="FontSize" Value="20"></Setter>
  117. <Setter Property="Margin" Value="20 0 0 0"></Setter>
  118. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  119. </Style>
  120. <Style Selector="ComboBox.TextToComboBox">
  121. <Setter Property="Background" Value="#FFF8F8"></Setter>
  122. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  123. <Setter Property="CornerRadius" Value="9"></Setter>
  124. <Setter Property="BorderThickness" Value="2"></Setter>
  125. <Setter Property="FontSize" Value="18"></Setter>
  126. <Setter Property="FontFamily" Value="Roboto"></Setter>
  127. </Style>
  128. <Style Selector="Button.BtAdd:pressed">
  129. <Setter Property="RenderTransform" Value="none"/>
  130. </Style>
  131. <Style Selector="CheckBox.TextToCheckBox">
  132. <Setter Property="FontSize" Value="18"></Setter>
  133. <Setter Property="FontFamily" Value="Roboto"></Setter>
  134. </Style>
  135. <Style Selector="CheckBox.TextToCheckBox /template/ Border#NormalRectangle">
  136. <Setter Property="BorderBrush" Value="#E40714"/>
  137. <Setter Property="CornerRadius" Value="5"></Setter>
  138. </Style>
  139. </StackPanel.Styles>
  140. <StackPanel Orientation="Horizontal">
  141. <Button Classes="BtBack" Command="{Binding BackEmployeesView}">
  142. <TextBlock Classes="TextBtBack">Назад</TextBlock>
  143. </Button>
  144. <TextBlock Classes="Chapter">Добавление данных о новом сотруднике</TextBlock>
  145. </StackPanel>
  146. <ScrollViewer Height="600">
  147. <StackPanel Orientation="Vertical">
  148. <StackPanel Orientation="Horizontal">
  149. <TextBlock Classes="TextToTextBox">ID:</TextBlock>
  150. <TextBox Watermark="ID" Width="360" Margin="218 20 0 0"></TextBox>
  151. </StackPanel>
  152. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  153. <StackPanel Orientation="Horizontal">
  154. <TextBlock Classes="TextToTextBox">Фамилия:</TextBlock>
  155. <TextBox Text="{Binding AddEmployeesVM.CurrentUser.Surname}" Watermark="Фамилия" Width="360" Margin="160 20 0 0"></TextBox>
  156. </StackPanel>
  157. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  158. <StackPanel Orientation="Horizontal">
  159. <TextBlock Classes="TextToTextBox">Имя:</TextBlock>
  160. <TextBox Text="{Binding AddEmployeesVM.CurrentUser.Name}" Watermark="Имя" Width="360" Margin="200 20 0 0"></TextBox>
  161. </StackPanel>
  162. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  163. <StackPanel Orientation="Horizontal">
  164. <TextBlock Classes="TextToTextBox">Отчетсво:</TextBlock>
  165. <TextBox Text="{Binding AddEmployeesVM.CurrentUser.Patronymic}" Watermark="Отчетсво" Width="360" Margin="156 20 0 0"></TextBox>
  166. </StackPanel>
  167. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  168. <StackPanel Orientation="Horizontal">
  169. <TextBlock Classes="TextToTextBox">Почта:</TextBlock>
  170. <TextBox Text="{Binding AddEmployeesVM.CurrentUser.Email}" Watermark="Почта" Width="360" Margin="183 20 0 0"></TextBox>
  171. </StackPanel>
  172. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  173. <StackPanel Orientation="Horizontal">
  174. <TextBlock Classes="TextToTextBox">Пароль:</TextBlock>
  175. <TextBox Text="{Binding AddEmployeesVM.CurrentUser.Password}" Watermark="Пароль" Width="360" Margin="170 20 0 0"></TextBox>
  176. </StackPanel>
  177. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  178. <StackPanel Orientation="Horizontal">
  179. <TextBlock Classes="TextToTextBox">Телефон:</TextBlock>
  180. <TextBox Text="{Binding AddEmployeesVM.CurrentUser.Phonenumber}" Watermark="Телефон" Width="360" Margin="165 20 0 0"></TextBox>
  181. </StackPanel>
  182. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  183. <StackPanel Orientation="Horizontal">
  184. <TextBlock Classes="TextToTextBox">Роль:</TextBlock>
  185. <TextBox Text="{Binding AddEmployeesVM.CurrentUser.Role}" Watermark="Роль" Width="360" Margin="200 20 0 0"></TextBox>
  186. </StackPanel>
  187. <!--<StackPanel Orientation="Horizontal">
  188. <TextBlock Classes="TextToTextBox">Роль:</TextBlock>
  189. <ComboBox ItemsSource="{Binding rolesList}">
  190. <ComboBox.ItemTemplate>
  191. <DataTemplate>
  192. <TextBlock Text="{Binding Roleid}" />
  193. </DataTemplate>
  194. </ComboBox.ItemTemplate>
  195. </ComboBox>
  196. </StackPanel>-->
  197. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="197 30 0 10" HorizontalAlignment="Left"></Border>
  198. <TextBlock Classes="TextToTextBox">Проекты:</TextBlock>
  199. <ListBox ItemsSource="{Binding ListProjects}">
  200. <ListBox.ItemTemplate>
  201. <DataTemplate>
  202. <StackPanel Orientation="Vertical">
  203. <CheckBox Classes="TextToCheckBox" Margin="202 10 0 0">
  204. <TextBlock Text="{Binding Title}"></TextBlock>
  205. </CheckBox>
  206. </StackPanel>
  207. </DataTemplate>
  208. </ListBox.ItemTemplate>
  209. </ListBox>
  210. </StackPanel>
  211. </ScrollViewer>
  212. </StackPanel>
  213. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  214. <StackPanel.Styles>
  215. <Style Selector="TextBlock.TextBtDelete">
  216. <Setter Property="Foreground" Value="#E40714"></Setter>
  217. <Setter Property="FontFamily" Value="Roboto"></Setter>
  218. <Setter Property="FontWeight" Value="Medium"></Setter>
  219. <Setter Property="FontSize" Value="20"></Setter>
  220. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  221. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  222. </Style>
  223. <Style Selector="Button.BtDelete">
  224. <Setter Property="BorderThickness" Value="2"></Setter>
  225. <Setter Property="Width" Value="180"></Setter>
  226. <Setter Property="Height" Value="38"></Setter>
  227. <Setter Property="Margin" Value="0 740 70 20"></Setter>
  228. <Setter Property="Background" Value="Transparent"></Setter>
  229. <Setter Property="CornerRadius" Value="13"></Setter>
  230. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  231. </Style>
  232. <Style Selector="Button.BtDelete:pointerover /template/ ContentPresenter">
  233. <Setter Property="BorderBrush" Value="#A10009"></Setter>
  234. <Setter Property="Background" Value="Transparent"></Setter>
  235. </Style>
  236. <Style Selector="Button.BtDelete:pressed">
  237. <Setter Property="RenderTransform" Value="none"/>
  238. </Style>
  239. <Style Selector="TextBlock.TextBtSave">
  240. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  241. <Setter Property="FontFamily" Value="Roboto"></Setter>
  242. <Setter Property="FontWeight" Value="Medium"></Setter>
  243. <Setter Property="FontSize" Value="20"></Setter>
  244. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  245. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  246. </Style>
  247. <Style Selector="Button.BtSave">
  248. <Setter Property="Width" Value="180"></Setter>
  249. <Setter Property="Height" Value="38"></Setter>
  250. <Setter Property="Margin" Value="0 740 30 20"></Setter>
  251. <Setter Property="Background" Value="#E40714"></Setter>
  252. <Setter Property="CornerRadius" Value="13"></Setter>
  253. </Style>
  254. <Style Selector="Button.BtSave:pointerover /template/ ContentPresenter">
  255. <Setter Property="Background" Value="#A10009"></Setter>
  256. </Style>
  257. <Style Selector="Button.BtSave:pressed">
  258. <Setter Property="RenderTransform" Value="none"/>
  259. </Style>
  260. </StackPanel.Styles>
  261. <Button Classes="BtDelete" Command="">
  262. <TextBlock Classes="TextBtDelete">Удалить</TextBlock>
  263. </Button>
  264. <Button Classes="BtSave" Command="{Binding AddEmployeesVM.SaveUser}">
  265. <TextBlock Classes="TextBtSave">Добавить</TextBlock>
  266. </Button>
  267. </StackPanel>
  268. </Grid>
  269. </UserControl>