diff --git a/RMWPFUserInterface/RMWPFUserInterface.csproj b/RMWPFUserInterface/RMWPFUserInterface.csproj index cc8a1a6..bff8b6c 100644 --- a/RMWPFUserInterface/RMWPFUserInterface.csproj +++ b/RMWPFUserInterface/RMWPFUserInterface.csproj @@ -84,10 +84,14 @@ + LoginView.xaml + + SalesView.xaml + ShellView.xaml @@ -99,6 +103,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/RMWPFUserInterface/ViewModels/SalesViewModel.cs b/RMWPFUserInterface/ViewModels/SalesViewModel.cs new file mode 100644 index 0000000..7ff3c91 --- /dev/null +++ b/RMWPFUserInterface/ViewModels/SalesViewModel.cs @@ -0,0 +1,124 @@ +using Caliburn.Micro; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RMWPFUserInterface.ViewModels +{ + public class SalesViewModel : Screen + { + private BindingList _products; + + public BindingList Products + { + get { return _products; } + set + { + _products = value; + NotifyOfPropertyChange(() => Products); + } + } + + private BindingList _cart; + + public BindingList Cart + { + get { return _cart; } + set + { + Cart = value; + NotifyOfPropertyChange(() => Cart); + } + } + + private string _itemQuantity; + + public string ItemQuantity + { + get { return _itemQuantity; } + set + { + ItemQuantity = value; + NotifyOfPropertyChange(() => ItemQuantity); + } + } + + public string SubTotal + { + get + { + // replace with calulation; + return "$0.00"; + } + } + + public string Tax + { + get + { + // replace with calulation; + return "$0.00"; + } + } + + public string Total + { + get + { + // replace with calulation; + return "$0.00"; + } + } + + public bool CanAddToCart + { + get + { + bool output = false; + + // Make sure item is selected and quantity is typed in + + return output; + } + } + public void AddToCart() + { + + } + + public bool CanRemoveFromCart + { + get + { + bool output = false; + + // Make sure something is selected + + return output; + } + } + public void RemoveFromCart() + { + + } + + public bool CanCheckOut + { + get + { + bool output = false; + + // Make sure there is something in the cart + + return output; + } + } + public void CheckOut() + { + + } + } +} diff --git a/RMWPFUserInterface/Views/SalesView.xaml b/RMWPFUserInterface/Views/SalesView.xaml new file mode 100644 index 0000000..5a165c0 --- /dev/null +++ b/RMWPFUserInterface/Views/SalesView.xaml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +