implement first QuoteView

pull/1/head
Sascha Woitschetzki 2021-07-01 21:01:40 +07:00
parent 6109db074f
commit 885713d76b
3 changed files with 55 additions and 42 deletions

@ -135,17 +135,17 @@ namespace Gremlin.MVVM
private void CbBrochure_Click(object sender, RoutedEventArgs e)
{
quoteVM.Brochures = cbBrochure.IsChecked;
quoteVM.AttachBrochures = cbBrochure.IsChecked;
}
private void CbDataSheets_Click(object sender, RoutedEventArgs e)
{
quoteVM.DataSheets = cbDataSheets.IsChecked;
quoteVM.AttachDataSheets = cbDataSheets.IsChecked;
}
private void CbMailTemplate_Click(object sender, RoutedEventArgs e)
{
quoteVM.MailTemplate = cbMailTemplate.IsChecked;
quoteVM.UseMailTemplate = cbMailTemplate.IsChecked;
}
private void CbShowDiscounts_Click(object sender, RoutedEventArgs e)

@ -22,54 +22,34 @@ namespace Gremlin.MVVM
private float _vAT = 19f;
private bool? _showBrutto = true;
private bool? _singlePrices = true;
private bool? _brochures = false;
private bool? _dataSheets = false;
private bool? _mailTemplate = false;
private bool? _attachBrochures = false;
private bool? _attachDataSheets = false;
private bool? _useMailTemplate = false;
private bool _quoteContains3PP = false;
private bool _quoteContainsRB = false;
private bool? _showDiscounts = true;
public string QuoteType
{
get => _quoteType;
internal set
{
_quoteType = value;
NotifyOfPropertyChange(() => QuoteType);
}
}
public string QuotePath
{
get => _quotePath;
internal set
{
_quotePath = value;
NotifyOfPropertyChange(() => QuotePath);
}
}
public string QuoteType { get => _quoteType; internal set { _quoteType = value; NotifyOfPropertyChange(() => QuoteType); } }
public string QuotePath { get => _quotePath; internal set { _quotePath = value; NotifyOfPropertyChange(() => QuotePath); } }
public bool? ShowBrutto { get => _showBrutto; internal set { _showBrutto = value; NotifyOfPropertyChange(() => ShowBrutto); } }
public string QuoteNumber { get => _quoteNumber; internal set { _quoteNumber = value; NotifyOfPropertyChange(() => QuoteNumber); } }
public int Warranty { get => _warranty; internal set { _warranty = value; NotifyOfPropertyChange(() => Warranty); } }
public int Validity { get => _validity; internal set { _validity = value; NotifyOfPropertyChange(() => Validity); } }
public bool? SinglePrices { get => _singlePrices; internal set { _singlePrices = value; NotifyOfPropertyChange(() => SinglePrices); } }
public bool? AttachBrochures { get => _attachBrochures; internal set { _attachBrochures = value; NotifyOfPropertyChange(() => AttachBrochures); } }
public bool? AttachDataSheets { get => _attachDataSheets; internal set { _attachDataSheets = value; NotifyOfPropertyChange(() => AttachDataSheets); } }
public bool? UseMailTemplate { get => _useMailTemplate; internal set { _useMailTemplate = value; NotifyOfPropertyChange(() => UseMailTemplate); } }
public bool? ShowDiscounts { get => _showDiscounts; internal set { _showDiscounts = value; NotifyOfPropertyChange(() => ShowDiscounts); } }
public List<LineItemVM> LineItemsVM { get => _lineItemsVM; private set => _lineItemsVM = value; }
public ContactVM Recipient { get => _recipient; internal set => _recipient = value; }
public ContactVM SalesRep { get => _salesRep; private set => _salesRep = value; }
public string QuoteNumber { get => _quoteNumber; internal set => _quoteNumber = value; }
public int Warranty { get => _warranty; internal set => _warranty = value; }
public int Validity { get => _validity; internal set => _validity = value; }
public decimal TotalListprice { get => _totalListprice; private set => _totalListprice = value; }
public decimal AverageDiscount { get => _averageDiscount; private set => _averageDiscount = value; }
public decimal TotalNet { get => _totalNet; private set => _totalNet = value; }
public float VAT { get => _vAT; private set => _vAT = value; }
public bool? SinglePrices { get => _singlePrices; internal set => _singlePrices = value; }
public bool? Brochures { get => _brochures; internal set => _brochures = value; }
public bool? DataSheets { get => _dataSheets; internal set => _dataSheets = value; }
public bool? MailTemplate { get => _mailTemplate; internal set => _mailTemplate = value; }
public bool QuoteContains3PP { get => _quoteContains3PP; private set => _quoteContains3PP = value; }
public bool QuoteContainsRB { get => _quoteContainsRB; private set => _quoteContainsRB = value; }
public bool? ShowDiscounts { get => _showDiscounts; internal set => _showDiscounts = value; }
internal QuoteViewModel(ContactVM salesRep)
{
@ -97,9 +77,9 @@ namespace Gremlin.MVVM
Validity = validity;
QuotePath = quotePath;
SinglePrices = singlePrices;
Brochures = brochures;
DataSheets = dataSheets;
MailTemplate = mailTemplate;
AttachBrochures = brochures;
AttachDataSheets = dataSheets;
UseMailTemplate = mailTemplate;
ShowDiscounts = showDiscounts;
}

@ -3,9 +3,42 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
Width="100" Height="100">
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Height="Auto">
<StackPanel>
<TextBlock x:Name="lblAngebotsname" Text="Angebotsname" Margin="10,5,10,5"/>
<TextBlock x:Name="lblAngebotsnummer" Text="Angebotsnummer" Margin="10,5,10,5"/>
<TextBlock x:Name="lblQuotingPath" Text="Angebotspfad" Margin="10,5,10,5"/>
<TextBlock x:Name="lblGewaehrleistung" Text="Gewährleistung (Monate)" Margin="10,5,10,5"/>
<TextBlock x:Name="lblAngebotsgueltigkeit" Text="Angebotsgültigkeit (Tage)" Margin="10,5,10,5"/>
<TextBlock x:Name="lblOppID" Text="SAP Opp ID" Margin="10,5,10,5"/>
</StackPanel>
</Grid>
<Grid Grid.Column="1" Height="Auto">
<StackPanel>
<TextBox x:Name="QuoteType" Margin="10,5,10,5"/>
<TextBox x:Name="QuoteNumber" Margin="10,5,10,5"/>
<TextBox x:Name="QuotePath" Margin="10,5,10,5"/>
<TextBox x:Name="Warranty" Margin="10,5,10,5"/>
<TextBox x:Name="Validity" Margin="10,5,10,5"/>
<TextBox x:Name="OppID" Margin="10,5,10,5"/>
</StackPanel>
</Grid>
<Grid Grid.Column="2" Height="Auto">
<StackPanel>
<CheckBox x:Name="ShowBrutto" Content="Bruttopreise anzeigen" Margin="10,5,10,5"/>
<CheckBox x:Name="SinglePrices" Content="Einzelpreise ausweisen" Margin="10,5,10,5"/>
<CheckBox x:Name="ShowDiscounts" Content="Discounts ausweisen" Margin="10,5,10,5"/>
<CheckBox x:Name="Brochures" Content="Broschüren anhängen" Margin="10,5,10,5"/>
<CheckBox x:Name="DataSheets" Content="Datenblätter anhängen" Margin="10,5,10,5"/>
<CheckBox x:Name="MailTemplate" Content="Mail aus Template erstellen" Margin="10,5,10,5"/>
</StackPanel>
</Grid>
</Grid>
</UserControl>