Backoffice fun

This commit is contained in:
2020-11-04 18:44:14 -05:00
parent 3f6faacab8
commit 2dc7a565f5
4 changed files with 37 additions and 5 deletions

View File

@@ -8,9 +8,9 @@
d:DesignHeight="450" d:DesignWidth="800"
Padding="10">
<StackPanel>
<TextBlock>Metafield Groups:</TextBlock>
<CheckBox Content="Fitment" />
<CheckBox Content="Product Feed" />
<StackPanel x:Name="ContentPanel">
<TextBlock>Metafield Groups:</TextBlock>
<CheckBox x:Name="Fitment" Content="Fitment" />
<CheckBox x:Name="ProductFeed" Content="Product Feed" />
</StackPanel>
</UserControl>

View File

@@ -18,6 +18,30 @@ namespace PartSource.Backoffice.Components
/// </summary>
public partial class TaskSetup : UserControl
{
public IList<string> SelectedTasks
{
get
{
IList<string> selectedTasks = new List<string>();
foreach (object control in ContentPanel.Children)
{
switch (control)
{
case CheckBox checkbox:
if (checkbox.IsChecked.GetValueOrDefault())
{
selectedTasks.Add(checkbox.Name);
}
break;
}
}
return selectedTasks;
}
}
public TaskSetup()
{
InitializeComponent();