コード例 #1
0
 void bgCheckUserSession_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     try
     {
         if (e.Error == null && Utility.SettingHelpers.IsReconciled)
         {
             IsBusy = false;
             //only for cashier role
             var window = Application.Current.Windows.OfType <POSWindow>().Any();
             if (!window)
             {
                 var poswindow = new POSWindow();
                 _loginScreen.Close();
                 poswindow.TxtBarcode.Focus();
                 var resultLogin = poswindow.ShowDialog();
                 if (resultLogin == true)
                 {
                 }
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #2
0
 public SuspendViewModel(SuspendBill suspendBill, POSWindow posWindow)
 {
     _suspendBill      = suspendBill;
     _posWindow        = posWindow;
     _posRepository    = SettingHelpers.GetRepositoryImplementation();
     ValidationMessage = string.Empty;
     if (_posWindow.ViewModel.CustomerInformation.Customer != null)
     {
         ReferenceName = _posWindow.ViewModel.CustomerInformation.Customer.Name;
     }
 }
コード例 #3
0
 public PaymentViewModel(PaymentWindow paymentWindow, POSWindow posWindow)
 {
     _paymentWindow             = paymentWindow;
     _posWindow                 = posWindow;
     _posRepository             = SettingHelpers.GetRepositoryImplementation();
     SettingHelpers.TotalAmount = _posWindow.ViewModel.BillSummary.OrderAmount.ToString();
     _itemProfileCollection     = _posWindow.ViewModel.ItemProfileCollectionNew;
     TotalAmount                = Convert.ToDecimal(SettingHelpers.TotalAmount.Replace(SettingHelpers.CurrentCultureInfo.NumberFormat.CurrencySymbol, ""));
     if (SettingHelpers.IsCustomerPO)
     {
         SettingHelpers.TotalAmount = (_posWindow.ViewModel.BillSummary.OrderAmount
                                       + (_posWindow.ViewModel.BillSummary.AdditionalAmount == null ? 0
             : _posWindow.ViewModel.BillSummary.AdditionalAmount.Value)).ToString();
         SetPaymentModeAmountForCPO();
         TotalAmount = Convert.ToDecimal(SettingHelpers.TotalAmount.Replace(SettingHelpers.CurrentCultureInfo.NumberFormat.CurrencySymbol, ""));
     }
     if (_posWindow.ViewModel.CustomerInformation.ReturnBill != null)
     {
         TotalAmount = TotalAmount - _posWindow.ViewModel.CustomerInformation.ReturnBill.SubstituteItemsAmount;
         SetValueForReturnBillPayment();
     }
 }
コード例 #4
0
 public CustomerViewModel(CustomerWindow customerWindow, POSWindow posWindow)
 {
     _customerWindow = customerWindow;
     _posWindow      = posWindow;
     _posRepository  = SettingHelpers.GetRepositoryImplementation();
 }