GetAll windows done
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using WD7UVN_SzTGUI_2023242.Client.WPF.Windows;
|
||||||
|
|
||||||
namespace WD7UVN_SzTGUI_2023242.Client.WPF
|
namespace WD7UVN_SzTGUI_2023242.Client.WPF
|
||||||
{
|
{
|
||||||
@@ -20,17 +21,20 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF
|
|||||||
|
|
||||||
private void ExpandAllCustomers(object sender, RoutedEventArgs e)
|
private void ExpandAllCustomers(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
Window window = new GetAllCustomers();
|
||||||
|
window.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ExpandAllEmployees(object sender, RoutedEventArgs e)
|
private void ExpandAllEmployees(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
Window window = new GetAllEmployees();
|
||||||
|
window.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ExpandAllMaintainerTeams(object sender, RoutedEventArgs e)
|
private void ExpandAllMaintainerTeams(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
Window window = new GetAllMaintainerTeams();
|
||||||
|
window.Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
using WD7UVN_HFT_2023241.Models;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Windows;
|
||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
|
||||||
|
namespace WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels
|
||||||
|
{
|
||||||
|
public class GetAllCustomersViewModel : ObservableRecipient
|
||||||
|
{
|
||||||
|
public RestCollection<Customer> Customers { get; set; }
|
||||||
|
|
||||||
|
private Customer selectedCustomer;
|
||||||
|
|
||||||
|
public Customer SelectedCustomer
|
||||||
|
{
|
||||||
|
get { return selectedCustomer; }
|
||||||
|
set { SetProperty(ref selectedCustomer, value); (UpdateCustomerCommand as RelayCommand).NotifyCanExecuteChanged(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public ICommand UpdateCustomerCommand { get; set; }
|
||||||
|
|
||||||
|
public static bool IsInDesignMode
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var prop = DesignerProperties.IsInDesignModeProperty;
|
||||||
|
return (bool)DependencyPropertyDescriptor.FromProperty(prop, typeof(FrameworkElement)).Metadata.DefaultValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public GetAllCustomersViewModel()
|
||||||
|
{
|
||||||
|
if (!IsInDesignMode)
|
||||||
|
{
|
||||||
|
Customers = new RestCollection<Customer>("http://localhost:5000/", "api/Customer", "hub");
|
||||||
|
|
||||||
|
UpdateCustomerCommand = new RelayCommand(() =>
|
||||||
|
{
|
||||||
|
Customers.Update(SelectedCustomer);
|
||||||
|
},
|
||||||
|
() =>
|
||||||
|
{
|
||||||
|
return SelectedCustomer != null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
using WD7UVN_HFT_2023241.Models;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Windows;
|
||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
|
||||||
|
namespace WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels
|
||||||
|
{
|
||||||
|
public class GetAllEmployeesViewModel : ObservableRecipient
|
||||||
|
{
|
||||||
|
public RestCollection<Employee> Employees { get; set; }
|
||||||
|
|
||||||
|
private Employee selectedEmployee;
|
||||||
|
|
||||||
|
public Employee SelectedEmployee
|
||||||
|
{
|
||||||
|
get { return selectedEmployee; }
|
||||||
|
set { SetProperty(ref selectedEmployee, value); (UpdateEmployeeCommand as RelayCommand).NotifyCanExecuteChanged(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public ICommand UpdateEmployeeCommand { get; set; }
|
||||||
|
|
||||||
|
public static bool IsInDesignMode
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var prop = DesignerProperties.IsInDesignModeProperty;
|
||||||
|
return (bool)DependencyPropertyDescriptor.FromProperty(prop, typeof(FrameworkElement)).Metadata.DefaultValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public GetAllEmployeesViewModel()
|
||||||
|
{
|
||||||
|
if (!IsInDesignMode)
|
||||||
|
{
|
||||||
|
Employees = new RestCollection<Employee>("http://localhost:5000/", "api/Employee", "hub");
|
||||||
|
|
||||||
|
UpdateEmployeeCommand = new RelayCommand(() =>
|
||||||
|
{
|
||||||
|
Employees.Update(SelectedEmployee);
|
||||||
|
},
|
||||||
|
() =>
|
||||||
|
{
|
||||||
|
return SelectedEmployee != null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
using WD7UVN_HFT_2023241.Models;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Windows;
|
||||||
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
|
||||||
|
namespace WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels
|
||||||
|
{
|
||||||
|
public class GetAllMaintainerTeamsViewModel : ObservableRecipient
|
||||||
|
{
|
||||||
|
public RestCollection<MaintainerTeam> MaintainerTeams { get; set; }
|
||||||
|
|
||||||
|
private MaintainerTeam selectedMaintainerTeam;
|
||||||
|
|
||||||
|
public MaintainerTeam SelectedMaintainerTeam
|
||||||
|
{
|
||||||
|
get { return selectedMaintainerTeam; }
|
||||||
|
set { SetProperty(ref selectedMaintainerTeam, value); (UpdateMaintainerTeamCommand as RelayCommand).NotifyCanExecuteChanged(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public ICommand UpdateMaintainerTeamCommand { get; set; }
|
||||||
|
|
||||||
|
public static bool IsInDesignMode
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var prop = DesignerProperties.IsInDesignModeProperty;
|
||||||
|
return (bool)DependencyPropertyDescriptor.FromProperty(prop, typeof(FrameworkElement)).Metadata.DefaultValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public GetAllMaintainerTeamsViewModel()
|
||||||
|
{
|
||||||
|
if (!IsInDesignMode)
|
||||||
|
{
|
||||||
|
MaintainerTeams = new RestCollection<MaintainerTeam>("http://localhost:5000/", "api/MaintainerTeam", "hub");
|
||||||
|
|
||||||
|
UpdateMaintainerTeamCommand = new RelayCommand(() =>
|
||||||
|
{
|
||||||
|
MaintainerTeams.Update(SelectedMaintainerTeam);
|
||||||
|
},
|
||||||
|
() =>
|
||||||
|
{
|
||||||
|
return SelectedMaintainerTeam != null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,60 +3,74 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:WD7UVN_SzTGUI_2023242.Client.WPF.Windows"
|
xmlns:local="clr-namespace:WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Customers" Height="550" Width="350">
|
Title="Customers" Height="550" Width="350">
|
||||||
|
|
||||||
|
<Window.DataContext>
|
||||||
|
<local:GetAllCustomersViewModel/>
|
||||||
|
</Window.DataContext>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<ListBox ItemsSource="{Binding Services}">
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="9*" />
|
||||||
|
<RowDefinition Height="1*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ListBox ItemsSource="{Binding Customers}" Grid.Row="0" SelectedItem="{Binding SelectedCustomer}">
|
||||||
|
<ListBox.ItemContainerStyle>
|
||||||
|
<Style TargetType="ListBoxItem">
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||||
|
<Setter Property="Padding" Value="0" />
|
||||||
|
<Setter Property="Margin" Value="0" />
|
||||||
|
</Style>
|
||||||
|
</ListBox.ItemContainerStyle>
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Border BorderBrush="Gray" BorderThickness="1">
|
<Border BorderBrush="Black" BorderThickness="1" Margin="5">
|
||||||
<Grid>
|
<StackPanel>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid>
|
||||||
<ColumnDefinition Width="2*" />
|
<Grid.Resources>
|
||||||
<ColumnDefinition Width="8*" />
|
<Style TargetType="TextBox">
|
||||||
</Grid.ColumnDefinitions>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
<Grid.RowDefinitions>
|
</Style>
|
||||||
<RowDefinition Height="*" />
|
</Grid.Resources>
|
||||||
<RowDefinition Height="*" />
|
<Grid.ColumnDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<ColumnDefinition Width="2*" />
|
||||||
<RowDefinition Height="*" />
|
<ColumnDefinition Width="8*" />
|
||||||
<RowDefinition Height="*" />
|
</Grid.ColumnDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="ID:" />
|
<Label Grid.Row="0" Grid.Column="0" Content="ID:" />
|
||||||
<Label Grid.Row="0" Grid.Column="1" Content="{Binding ID}" />
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding ID}" IsReadOnly="True" Background="LightGray" />
|
||||||
|
|
||||||
<Label Grid.Row="1" Grid.Column="0" Content="Name:" />
|
<Label Grid.Row="1" Grid.Column="0" Content="Name:" />
|
||||||
<Label Grid.Row="1" Grid.Column="1" Content="{Binding NAME}" />
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding NAME}" />
|
||||||
|
|
||||||
<Label Grid.Row="2" Grid.Column="0" Content="Version:" />
|
|
||||||
<Label Grid.Row="2" Grid.Column="1" Content="{Binding VERSION}" />
|
|
||||||
|
|
||||||
<Label Grid.Row="3" Grid.Column="0" Content="Account:" />
|
<Label Grid.Row="2" Grid.Column="0" Content="Email:" />
|
||||||
<Label Grid.Row="3" Grid.Column="1" Content="{Binding ACCOUNT}" />
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding EMAIL}" />
|
||||||
|
|
||||||
<Label Grid.Row="4" Grid.Column="0" Content="Domain:" />
|
<Label Grid.Row="3" Grid.Column="0" Content="Phone:" />
|
||||||
<Label Grid.Row="4" Grid.Column="1" Content="{Binding SERVICE_DOMAIN}" />
|
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding PHONE}" />
|
||||||
|
|
||||||
<Label Grid.Row="5" Grid.Column="0" Content="IP address:" />
|
<Label Grid.Row="4" Grid.Column="0" Content="Service:" />
|
||||||
<Label Grid.Row="5" Grid.Column="1" Content="{Binding IP}" />
|
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding SERVICE_ID}" />
|
||||||
|
</Grid>
|
||||||
<Label Grid.Row="6" Grid.Column="0" Content="Port:" />
|
</StackPanel>
|
||||||
<Label Grid.Row="6" Grid.Column="1" Content="{Binding PORT}" />
|
|
||||||
|
|
||||||
<Label Grid.Row="7" Grid.Column="0" Content="Notes:" />
|
|
||||||
<Label Grid.Row="7" Grid.Column="1" Content="{Binding NOTES}" />
|
|
||||||
|
|
||||||
<Label Grid.Row="8" Grid.Column="0" Content="Maintainer Team ID:" />
|
|
||||||
<Label Grid.Row="8" Grid.Column="1" Content="{Binding MAINTAINER_ID}" />
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
</Border>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
|
<UniformGrid Rows="2" Grid.Row="1">
|
||||||
|
<Button Content="Edit selected" Command="{Binding UpdateCustomerCommand}"/>
|
||||||
|
<Button Content="Create new" Click="CreateNewCustomer" />
|
||||||
|
</UniformGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -1,16 +1,4 @@
|
|||||||
using System;
|
using System.Windows;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Data;
|
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
|
|
||||||
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
||||||
{
|
{
|
||||||
@@ -23,5 +11,11 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CreateNewCustomer(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Window window = new CreateNewCustomer();
|
||||||
|
window.Show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,60 +3,78 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:WD7UVN_SzTGUI_2023242.Client.WPF.Windows"
|
xmlns:local="clr-namespace:WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Employees" Height="550" Width="350">
|
Title="Employees" Height="550" Width="350">
|
||||||
|
|
||||||
|
<Window.DataContext>
|
||||||
|
<local:GetAllEmployeesViewModel/>
|
||||||
|
</Window.DataContext>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<ListBox ItemsSource="{Binding Services}">
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="9*" />
|
||||||
|
<RowDefinition Height="1*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ListBox ItemsSource="{Binding Employees}" Grid.Row="0" SelectedItem="{Binding SelectedEmployee}">
|
||||||
|
<ListBox.ItemContainerStyle>
|
||||||
|
<Style TargetType="ListBoxItem">
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||||
|
<Setter Property="Padding" Value="0" />
|
||||||
|
<Setter Property="Margin" Value="0" />
|
||||||
|
</Style>
|
||||||
|
</ListBox.ItemContainerStyle>
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Border BorderBrush="Gray" BorderThickness="1">
|
<Border BorderBrush="Black" BorderThickness="1" Margin="5">
|
||||||
<Grid>
|
<StackPanel>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid>
|
||||||
<ColumnDefinition Width="2*" />
|
<Grid.Resources>
|
||||||
<ColumnDefinition Width="8*" />
|
<Style TargetType="TextBox">
|
||||||
</Grid.ColumnDefinitions>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
<Grid.RowDefinitions>
|
</Style>
|
||||||
<RowDefinition Height="*" />
|
</Grid.Resources>
|
||||||
<RowDefinition Height="*" />
|
<Grid.ColumnDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<ColumnDefinition Width="2*" />
|
||||||
<RowDefinition Height="*" />
|
<ColumnDefinition Width="8*" />
|
||||||
<RowDefinition Height="*" />
|
</Grid.ColumnDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="ID:" />
|
<Label Grid.Row="0" Grid.Column="0" Content="ID:" />
|
||||||
<Label Grid.Row="0" Grid.Column="1" Content="{Binding ID}" />
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding ID}" IsReadOnly="True" Background="LightGray" />
|
||||||
|
|
||||||
<Label Grid.Row="1" Grid.Column="0" Content="Name:" />
|
<Label Grid.Row="1" Grid.Column="0" Content="Name:" />
|
||||||
<Label Grid.Row="1" Grid.Column="1" Content="{Binding NAME}" />
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding NAME}" />
|
||||||
|
|
||||||
<Label Grid.Row="2" Grid.Column="0" Content="Version:" />
|
|
||||||
<Label Grid.Row="2" Grid.Column="1" Content="{Binding VERSION}" />
|
|
||||||
|
|
||||||
<Label Grid.Row="3" Grid.Column="0" Content="Account:" />
|
<Label Grid.Row="2" Grid.Column="0" Content="Email:" />
|
||||||
<Label Grid.Row="3" Grid.Column="1" Content="{Binding ACCOUNT}" />
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding EMAIL}" />
|
||||||
|
|
||||||
<Label Grid.Row="4" Grid.Column="0" Content="Domain:" />
|
<Label Grid.Row="3" Grid.Column="0" Content="Phone:" />
|
||||||
<Label Grid.Row="4" Grid.Column="1" Content="{Binding SERVICE_DOMAIN}" />
|
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding PHONE}" />
|
||||||
|
|
||||||
<Label Grid.Row="5" Grid.Column="0" Content="IP address:" />
|
<Label Grid.Row="4" Grid.Column="0" Content="Team ID:" />
|
||||||
<Label Grid.Row="5" Grid.Column="1" Content="{Binding IP}" />
|
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding MAINTAINER_ID}" />
|
||||||
|
|
||||||
<Label Grid.Row="6" Grid.Column="0" Content="Port:" />
|
<Label Grid.Row="5" Grid.Column="0" Content="Manager ID:" />
|
||||||
<Label Grid.Row="6" Grid.Column="1" Content="{Binding PORT}" />
|
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding MANAGER_ID}" />
|
||||||
|
</Grid>
|
||||||
<Label Grid.Row="7" Grid.Column="0" Content="Notes:" />
|
</StackPanel>
|
||||||
<Label Grid.Row="7" Grid.Column="1" Content="{Binding NOTES}" />
|
|
||||||
|
|
||||||
<Label Grid.Row="8" Grid.Column="0" Content="Maintainer Team ID:" />
|
|
||||||
<Label Grid.Row="8" Grid.Column="1" Content="{Binding MAINTAINER_ID}" />
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
</Border>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
|
<UniformGrid Rows="2" Grid.Row="1">
|
||||||
|
<Button Content="Edit selected" Command="{Binding UpdateEmployeeCommand}"/>
|
||||||
|
<Button Content="Create new" Click="CreateNewEmployee" />
|
||||||
|
</UniformGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
@@ -23,5 +23,11 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CreateNewEmployee(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Window window = new CreateNewEmployee();
|
||||||
|
window.Show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,60 +3,70 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:WD7UVN_SzTGUI_2023242.Client.WPF.Windows"
|
xmlns:local="clr-namespace:WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Maintainer teams" Height="550" Width="350">
|
Title="Maintainer teams" Height="550" Width="350">
|
||||||
|
|
||||||
|
<Window.DataContext>
|
||||||
|
<local:GetAllMaintainerTeamsViewModel/>
|
||||||
|
</Window.DataContext>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<ListBox ItemsSource="{Binding Services}">
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="9*" />
|
||||||
|
<RowDefinition Height="1*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ListBox ItemsSource="{Binding MaintainerTeams}" Grid.Row="0" SelectedItem="{Binding SelectedMaintainerTeam}">
|
||||||
|
<ListBox.ItemContainerStyle>
|
||||||
|
<Style TargetType="ListBoxItem">
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||||
|
<Setter Property="Padding" Value="0" />
|
||||||
|
<Setter Property="Margin" Value="0" />
|
||||||
|
</Style>
|
||||||
|
</ListBox.ItemContainerStyle>
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Border BorderBrush="Gray" BorderThickness="1">
|
<Border BorderBrush="Black" BorderThickness="1" Margin="5">
|
||||||
<Grid>
|
<StackPanel>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid>
|
||||||
<ColumnDefinition Width="2*" />
|
<Grid.Resources>
|
||||||
<ColumnDefinition Width="8*" />
|
<Style TargetType="TextBox">
|
||||||
</Grid.ColumnDefinitions>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
<Grid.RowDefinitions>
|
</Style>
|
||||||
<RowDefinition Height="*" />
|
</Grid.Resources>
|
||||||
<RowDefinition Height="*" />
|
<Grid.ColumnDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<ColumnDefinition Width="2*" />
|
||||||
<RowDefinition Height="*" />
|
<ColumnDefinition Width="8*" />
|
||||||
<RowDefinition Height="*" />
|
</Grid.ColumnDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition Height="*" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="ID:" />
|
<Label Grid.Row="0" Grid.Column="0" Content="ID:" />
|
||||||
<Label Grid.Row="0" Grid.Column="1" Content="{Binding ID}" />
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding ID}" IsReadOnly="True" Background="LightGray" />
|
||||||
|
|
||||||
<Label Grid.Row="1" Grid.Column="0" Content="Name:" />
|
<Label Grid.Row="1" Grid.Column="0" Content="Name:" />
|
||||||
<Label Grid.Row="1" Grid.Column="1" Content="{Binding NAME}" />
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding NAME}" />
|
||||||
|
|
||||||
<Label Grid.Row="2" Grid.Column="0" Content="Version:" />
|
|
||||||
<Label Grid.Row="2" Grid.Column="1" Content="{Binding VERSION}" />
|
|
||||||
|
|
||||||
<Label Grid.Row="3" Grid.Column="0" Content="Account:" />
|
<Label Grid.Row="2" Grid.Column="0" Content="Email:" />
|
||||||
<Label Grid.Row="3" Grid.Column="1" Content="{Binding ACCOUNT}" />
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding EMAIL}" />
|
||||||
|
|
||||||
<Label Grid.Row="4" Grid.Column="0" Content="Domain:" />
|
<Label Grid.Row="3" Grid.Column="0" Content="Team leader:" />
|
||||||
<Label Grid.Row="4" Grid.Column="1" Content="{Binding SERVICE_DOMAIN}" />
|
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding LEADER_ID}" />
|
||||||
|
</Grid>
|
||||||
<Label Grid.Row="5" Grid.Column="0" Content="IP address:" />
|
</StackPanel>
|
||||||
<Label Grid.Row="5" Grid.Column="1" Content="{Binding IP}" />
|
|
||||||
|
|
||||||
<Label Grid.Row="6" Grid.Column="0" Content="Port:" />
|
|
||||||
<Label Grid.Row="6" Grid.Column="1" Content="{Binding PORT}" />
|
|
||||||
|
|
||||||
<Label Grid.Row="7" Grid.Column="0" Content="Notes:" />
|
|
||||||
<Label Grid.Row="7" Grid.Column="1" Content="{Binding NOTES}" />
|
|
||||||
|
|
||||||
<Label Grid.Row="8" Grid.Column="0" Content="Maintainer Team ID:" />
|
|
||||||
<Label Grid.Row="8" Grid.Column="1" Content="{Binding MAINTAINER_ID}" />
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
</Border>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
|
<UniformGrid Rows="2" Grid.Row="1">
|
||||||
|
<Button Content="Edit selected" Command="{Binding UpdateMaintainerTeamCommand}"/>
|
||||||
|
<Button Content="Create new" Click="CreateNewMaintainerTeam" />
|
||||||
|
</UniformGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
@@ -1,16 +1,4 @@
|
|||||||
using System;
|
using System.Windows;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Data;
|
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
|
|
||||||
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
||||||
{
|
{
|
||||||
@@ -23,5 +11,11 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CreateNewMaintainerTeam(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Window window = new CreateNewMaintainerTeam();
|
||||||
|
window.Show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<Window x:Class="WD7UVN_SzTGUI_2023242.Client.WPF.GetAllServices"
|
<Window x:Class="WD7UVN_SzTGUI_2023242.Client.WPF.Windows.GetAllServices"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using WD7UVN_HFT_2023241.Models;
|
|
||||||
using WD7UVN_SzTGUI_2023242.Client.WPF.Windows;
|
|
||||||
|
|
||||||
namespace WD7UVN_SzTGUI_2023242.Client.WPF
|
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for GetAllServices.xaml
|
/// Interaction logic for GetAllServices.xaml
|
||||||
|
|||||||
Reference in New Issue
Block a user