TicketWindow.xaml 6.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <Window x:Class="Practics.TicketWindow"
  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:Practics"
  7. mc:Ignorable="d"
  8. Title="Заявки" Height="800" Width="1000" MinWidth="560" MinHeight="600">
  9. <Grid>
  10. <TabControl>
  11. <TabItem Header="Новая" Selector.IsSelected="True">
  12. <Grid>
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="1*"/>
  15. <RowDefinition Height="40px"/>
  16. <RowDefinition Height="40px"/>
  17. <RowDefinition Height="40px"/>
  18. <RowDefinition Height="40px"/>
  19. <RowDefinition Height="40px"/>
  20. <RowDefinition Height="40px"/>
  21. <RowDefinition Height="40px"/>
  22. <RowDefinition Height="40px"/>
  23. <RowDefinition Height="40px"/>
  24. <RowDefinition Height="40px"/>
  25. <RowDefinition Height="80px"/>
  26. <RowDefinition/>
  27. </Grid.RowDefinitions>
  28. <Label Grid.Row="0" Content="TechSphere" HorizontalContentAlignment="Left" FontFamily="Segoe UI" FontWeight="SemiBold"/>
  29. <Label Grid.Row="1" Foreground="Black" Content="ФИО сотрудника" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontFamily="Segoe UI" FontWeight="SemiBold"/>
  30. <TextBox Grid.Row="2" x:Name="tbUserName" Width="200px" FontFamily="Segoe UI" FontWeight="SemiBold" Margin="0,5" IsReadOnly="False"/>
  31. <Label Grid.Row="3" Foreground="Black" Content="Наименование проблемы" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontFamily="Segoe UI" FontWeight="SemiBold"/>
  32. <TextBox Grid.Row="4" x:Name="tbProblemName" Width="200px" FontFamily="Segoe UI" FontWeight="SemiBold" Margin="0,5"/>
  33. <Label Grid.Row="5" Foreground="Black" Content="Тип проблемы" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontFamily="Segoe UI" FontWeight="SemiBold"/>
  34. <ComboBox Grid.Row="6" x:Name="cbProblemType" Width="200px" FontFamily="Segoe UI" FontWeight="SemiBold" Margin="0,5" />
  35. <Label Grid.Row="7" Foreground="Black" Content="Номер ПК" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontFamily="Segoe UI" FontWeight="SemiBold"/>
  36. <TextBox Grid.Row="8" x:Name="tbPCName" Width="200px" FontFamily="Segoe UI" FontWeight="SemiBold" Margin="0,5"/>
  37. <Label Grid.Row="9" Foreground="Black" Content="Описание проблемы" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontFamily="Segoe UI" FontWeight="SemiBold"/>
  38. <TextBox Grid.Row="10" x:Name="tbProblemDescribe" Width="300px" FontFamily="Segoe UI" FontWeight="SemiBold" Margin="0,5" AcceptsReturn="True"/>
  39. <Button Grid.Row="11" x:Name="btnSendProblem" Content="Отправить" Background="LightSkyBlue" Foreground="Black" Width="200px" FontFamily="Segoe UI" FontWeight="SemiBold" Margin="0,5" Click="btnSendProblem_Click"/>
  40. <Button Grid.Row="0" x:Name="btnExit" Content="Выход" Width="100" Height="40" HorizontalAlignment="Right" VerticalAlignment="Top" Click="btnExit_Click"/>
  41. </Grid>
  42. </TabItem>
  43. <TabItem Header="Архив" Selector.IsSelected="False" GotFocus="TabItem_GotFocus" >
  44. <Grid>
  45. <Grid.RowDefinitions>
  46. <RowDefinition Height="40px"/>
  47. <RowDefinition Height="300px"/>
  48. <RowDefinition/>
  49. <RowDefinition Height="40px"/>
  50. </Grid.RowDefinitions>
  51. <StackPanel>
  52. <Button x:Name="btnRefillProblems" Click="btnRefillProblems_Click">Обновить</Button>
  53. </StackPanel>
  54. <DataGrid Grid.Row="1" x:Name="dgUserTickets" IsReadOnly="True" AutoGenerateColumns="False" CanUserAddRows="False" CanUserReorderColumns="True" HorizontalAlignment="Left" SelectionChanged="dgUserTickets_SelectionChanged">
  55. <DataGrid.Columns>
  56. <DataGridTextColumn Header="Фамилия" Binding="{Binding LastName}"/>
  57. <DataGridTextColumn Header="Время заявки" Binding="{Binding ProblemTime}" Width="*" MinWidth="100"/>
  58. <DataGridTextColumn Header="Время решения" Binding="{Binding SolvedTime}" Width="*" MinWidth="100"/>
  59. <DataGridTextColumn Header="Название заявки" Binding="{Binding ProblemName}" Width="*" MinWidth="100"/>
  60. <DataGridTextColumn Header="Номер компьютера" Binding="{Binding PCNumber}" Width="*" MinWidth="100"/>
  61. <DataGridComboBoxColumn x:Name="dgcbcStatus" SelectedValueBinding="{Binding ProblemStatusID}" Header="Статус" Width="100" MinWidth="100"/>
  62. </DataGrid.Columns>
  63. </DataGrid>
  64. <!--<TextBox x:Name="tbProblemDescribe2" Grid.Row="2" Text="{Binding ProblemDescribe,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" AcceptsReturn="True" IsReadOnly="True"/>-->
  65. <RichTextBox x:Name="rtbChat" Grid.Row="2" IsReadOnly="True"></RichTextBox>
  66. <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Width="900">
  67. <TextBox x:Name="tbMessage" Width="700">123123</TextBox>
  68. <Button x:Name="btnSendMessage" Width="150px" HorizontalAlignment="Right" Click="btnSendMessage_Click">Отправить</Button>
  69. </StackPanel>
  70. </Grid>
  71. </TabItem>
  72. </TabControl>
  73. </Grid>
  74. </Window>