Added better error handling + added bulk handling of payable import BOD-152

This commit is contained in:
Patrick Fic
2020-06-04 09:52:17 -07:00
parent fe4cb24742
commit b9573b38f0
11 changed files with 202 additions and 27 deletions

View File

@@ -21,6 +21,7 @@
FontFamily="{DynamicResource MaterialDesignFont}"
Loaded="Window_Loaded"
xmlns:util="clr-namespace:BodyshopPartner.Utils"
xmlns:properties="clr-namespace:BodyshopPartner.Properties"
Closing="Window_Closing">
<Window.DataContext>
<vm:MainViewModel />
@@ -205,13 +206,17 @@
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<StackPanel Grid.Column="1"
Height="Auto">
<TextBox Text="{Binding Source={x:Static properties:Settings.Default},
Path=QuickBooksFilePath}"
materialDesign:HintAssist.Hint="QuickBooks File Path" TextChanged="TextBox_TextChanged"/>
<TextBox Height="Auto"
Text="{Binding HttpServerLog}"
TextWrapping="Wrap"
AcceptsReturn="True" />
</StackPanel>
<TextBox Grid.Column="1"
Height="Auto"
Text="{Binding HttpServerLog}"
TextWrapping="Wrap"
AcceptsReturn="True"
/>
</Grid>
</DockPanel>

View File

@@ -35,5 +35,11 @@ namespace BodyshopPartner.Views
e.Cancel = true ;
this.Hide();
}
private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
{
Properties.Settings.Default.QuickBooksFilePath = ((System.Windows.Controls.TextBox)sender).Text;
Properties.Settings.Default.Save();
}
}
}