Creation finished, project considered finished
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:WD7UVN_SzTGUI_2023242.Client.WPF.Windows"
|
||||
mc:Ignorable="d"
|
||||
Title="CreateNewCustomer" Height="550" Width="350">
|
||||
Title="Create new customer" Height="550" Width="350">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using WD7UVN_HFT_2023241.Models;
|
||||
using WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels;
|
||||
|
||||
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
||||
|
||||
@@ -5,8 +5,65 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:WD7UVN_SzTGUI_2023242.Client.WPF.Windows"
|
||||
mc:Ignorable="d"
|
||||
Title="CreateNewEmployee" Height="450" Width="800">
|
||||
Title="Create new employee" Height="550" Width="350">
|
||||
|
||||
<Grid>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="9*" />
|
||||
<RowDefinition Height="1*" />
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox Grid.Row="0">
|
||||
<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>
|
||||
<Border BorderBrush="Black" BorderThickness="1" Margin="5">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.Resources>
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="8*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="ID:" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding NewEmployee.ID}" />
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Name:" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding NewEmployee.NAME}" />
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="Email:" />
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding NewEmployee.EMAIL}" />
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="Phone:" />
|
||||
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding NewEmployee.PHONE}" />
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" Content="Maintainer ID:" />
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding NewEmployee.MAINTAINER_ID}" />
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="Manager ID:" />
|
||||
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding NewEmployee.MANAGER_ID}" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ListBox>
|
||||
|
||||
<Button Grid.Row="1" Content="Create" Command="{Binding CreateCommand}"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -1,27 +1,16 @@
|
||||
using System;
|
||||
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;
|
||||
using WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels;
|
||||
|
||||
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for CreateNewEmployee.xaml
|
||||
/// </summary>
|
||||
public partial class CreateNewEmployee : Window
|
||||
{
|
||||
public CreateNewEmployee()
|
||||
public CreateNewEmployee(CreateNewEmployeeViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = viewModel;
|
||||
viewModel.CloseAction = new Action(() => this.Close());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,57 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:WD7UVN_SzTGUI_2023242.Client.WPF.Windows"
|
||||
mc:Ignorable="d"
|
||||
Title="CreateNewMaintainerTeam" Height="450" Width="800">
|
||||
Title="Create new team" Height="550" Width="350">
|
||||
|
||||
<Grid>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="9*" />
|
||||
<RowDefinition Height="1*" />
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox Grid.Row="0">
|
||||
<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>
|
||||
<Border BorderBrush="Black" BorderThickness="1" Margin="5">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.Resources>
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="8*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="ID:" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding NewMaintainerTeam.ID}" />
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Name:" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding NewMaintainerTeam.NAME}" />
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="Email:" />
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding NewMaintainerTeam.EMAIL}" />
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="Leader ID:" />
|
||||
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding NewMaintainerTeam.LEADER_ID}" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ListBox>
|
||||
|
||||
<Button Grid.Row="1" Content="Create" Command="{Binding CreateCommand}"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -1,27 +1,16 @@
|
||||
using System;
|
||||
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;
|
||||
using WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels;
|
||||
|
||||
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for CreateNewMaintainerTeam.xaml
|
||||
/// </summary>
|
||||
public partial class CreateNewMaintainerTeam : Window
|
||||
{
|
||||
public CreateNewMaintainerTeam()
|
||||
public CreateNewMaintainerTeam(CreateNewMaintainerTeamViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = viewModel;
|
||||
viewModel.CloseAction = new Action(() => this.Close());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,77 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:WD7UVN_SzTGUI_2023242.Client.WPF.Windows"
|
||||
mc:Ignorable="d"
|
||||
Title="CreateNewService" Height="450" Width="800">
|
||||
Title="Create new service" Height="550" Width="350">
|
||||
|
||||
<Grid>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="9*" />
|
||||
<RowDefinition Height="1*" />
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox Grid.Row="0">
|
||||
<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>
|
||||
<Border BorderBrush="Black" BorderThickness="1" Margin="5">
|
||||
<StackPanel>
|
||||
<Grid>
|
||||
<Grid.Resources>
|
||||
<Style TargetType="TextBox">
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</Grid.Resources>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*" />
|
||||
<ColumnDefinition Width="8*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="ID:" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding NewService.ID}" />
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Name:" />
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding NewService.NAME}" />
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="IP address:" />
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding NewService.IP}" />
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="Port:" />
|
||||
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding NewService.PORT}" />
|
||||
|
||||
<Label Grid.Row="4" Grid.Column="0" Content="Domain:" />
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding NewService.SERVICE_DOMAIN}" />
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="Account:" />
|
||||
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding NewService.ACCOUNT}" />
|
||||
|
||||
<Label Grid.Row="6" Grid.Column="0" Content="Version:" />
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Text="{Binding NewService.VERSION}" />
|
||||
|
||||
<Label Grid.Row="7" Grid.Column="0" Content="Notes:" />
|
||||
<TextBox Grid.Row="7" Grid.Column="1" Text="{Binding NewService.NOTES}" />
|
||||
|
||||
<Label Grid.Row="8" Grid.Column="0" Content="Maintainer ID:" />
|
||||
<TextBox Grid.Row="8" Grid.Column="1" Text="{Binding NewService.MAINTAINER_ID}" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</ListBox>
|
||||
|
||||
<Button Grid.Row="1" Content="Create" Command="{Binding CreateCommand}"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -1,27 +1,16 @@
|
||||
using System;
|
||||
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;
|
||||
using WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels;
|
||||
|
||||
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for CreateNewService.xaml
|
||||
/// </summary>
|
||||
public partial class CreateNewService : Window
|
||||
{
|
||||
public CreateNewService()
|
||||
public CreateNewService(CreateNewServiceViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = viewModel;
|
||||
viewModel.CloseAction = new Action(() => this.Close());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Windows;
|
||||
using WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels;
|
||||
|
||||
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
||||
{
|
||||
@@ -14,7 +15,19 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
||||
|
||||
private void CreateNewEmployee(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Window window = new CreateNewEmployee();
|
||||
CreateNewEmployeeViewModel viewModel = new CreateNewEmployeeViewModel();
|
||||
viewModel.NewEmployeeCreated += (newEmployee) =>
|
||||
{
|
||||
var getAllEmployeesViewModel = (GetAllEmployeesViewModel)DataContext;
|
||||
if (getAllEmployeesViewModel != null)
|
||||
{
|
||||
Application.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
getAllEmployeesViewModel.Employees.Add(newEmployee);
|
||||
});
|
||||
}
|
||||
};
|
||||
Window window = new CreateNewEmployee(viewModel);
|
||||
window.Show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Windows;
|
||||
using WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels;
|
||||
|
||||
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
||||
{
|
||||
@@ -14,7 +15,19 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
||||
|
||||
private void CreateNewMaintainerTeam(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Window window = new CreateNewMaintainerTeam();
|
||||
CreateNewMaintainerTeamViewModel viewModel = new CreateNewMaintainerTeamViewModel();
|
||||
viewModel.NewMaintainerTeamCreated += (newMaintainerTeam) =>
|
||||
{
|
||||
var getAllMaintainerTeamsViewModel = (GetAllMaintainerTeamsViewModel)DataContext;
|
||||
if (getAllMaintainerTeamsViewModel != null)
|
||||
{
|
||||
Application.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
getAllMaintainerTeamsViewModel.MaintainerTeams.Add(newMaintainerTeam);
|
||||
});
|
||||
}
|
||||
};
|
||||
Window window = new CreateNewMaintainerTeam(viewModel);
|
||||
window.Show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Windows;
|
||||
using WD7UVN_SzTGUI_2023242.Client.WPF.ViewModels;
|
||||
|
||||
namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
||||
{
|
||||
@@ -14,7 +15,19 @@ namespace WD7UVN_SzTGUI_2023242.Client.WPF.Windows
|
||||
|
||||
private void CreateNewService(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Window window = new CreateNewService();
|
||||
CreateNewServiceViewModel viewModel = new CreateNewServiceViewModel();
|
||||
viewModel.NewServiceCreated += (newService) =>
|
||||
{
|
||||
var getAllServicesViewModel = (GetAllServicesViewModel)DataContext;
|
||||
if (getAllServicesViewModel != null)
|
||||
{
|
||||
Application.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
getAllServicesViewModel.Services.Add(newService);
|
||||
});
|
||||
}
|
||||
};
|
||||
Window window = new CreateNewService(viewModel);
|
||||
window.Show();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user