Ejemplo n.º 1
0
 void Page3ButtonsViewModel_paymentPressed(object sender, EventArgs e)
 {
     if (paymentWindow != null)
     {
         return;
     }
     paymentWindow         = new PaymentWindow();
     paymentWindow.Closed += paymentWindow_Closed;
     paymentWindow.Show();
 }
Ejemplo n.º 2
0
        public PaymentViewModel(PaymentWindow paymentWindow)
        {
            _paymentWindow = paymentWindow;
            _posRepository = SettingHelpers.GetRepositoryImplementation();
            POSWindowViewModel pos = new POSWindowViewModel();

            if (String.IsNullOrEmpty(SettingHelpers.TotalAmount))
            {
                SettingHelpers.TotalAmount = "0";
            }
            TotalAmount = Convert.ToDecimal(SettingHelpers.TotalAmount.Replace(SettingHelpers.CurrentCultureInfo.NumberFormat.CurrencySymbol, ""));
            if (SettingHelpers.IsCustomerPO)
            {
                SetPaymentModeAmountForCPO();
            }
            if (_posWindow.ViewModel.CustomerInformation.ReturnBill != null)
            {
                TotalAmount = TotalAmount - Convert.ToDecimal(_posWindow.ViewModel.CustomerInformation.ReturnBill.SubstituteItemsAmount);
                SetValueForReturnBillPayment();
            }
        }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 4
0
        private void btn_payment_Click(object sender, RoutedEventArgs e)
        {
            PaymentWindow paymentWindow = new PaymentWindow();

            paymentWindow.Show();
        }
        /// <summary>
        /// Closes the active window and regenerates/open the Payment Window of the connected student
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void PaymentButton_Click(object sender, EventArgs e)
        {
            PaymentWindow paymentWindow = new PaymentWindow(connection, student, status);

            paymentWindow.Show();
        }
Ejemplo n.º 6
0
 void paymentWindow_Closed(object sender, EventArgs e)
 {
     paymentWindow.Closed -= paymentWindow_Closed;
     paymentWindow         = null;
 }