예제 #1
0
        private void directPayment(int moneyType, bool returnSale)
        {
            ComboBoxItem selectedItem      = (ComboBoxItem)section.SelectedItem;
            string       department_string = selectedItem.Tag.ToString();
            int          department        = int.Parse(department_string);

            decimal price = DocPack.manualParseDecimal(priceForDirectPayment.Text);
            decimal summ  = DocPack.manualParseDecimal(moneyForDirectPayment.Text);

            string sendingSMSorEMAIL = directPaymentSending.Text;

            string printing = stringForPrinting.Text;
            bool   vat      = vatDirectPayment.IsChecked ?? true;

            string[] result = Cashbox.DirectPayment(
                moneyPrice: price, moneySumm: summ, forPrinting: printing, sending: sendingSMSorEMAIL,
                department: department, moneyType: moneyType, returnSale: returnSale, VAT: vat
                ).Split(':');

            if (result[0] == "OK")
            {
                CleanCheck();
                MessageBoxes.ChangeMessage(result[1]);
            }
            else
            {
                ShowError(moneyPlace, "Ошибка кассы: " + result[1]);
            }
        }
예제 #2
0
 public void CheckError(string[] result, Canvas place)
 {
     if (result[0] == "OK")
     {
         CleanCheck();
         MessageBoxes.ChangeMessage(result[1]);
     }
     else
     {
         ShowError(place, "Ошибка кассы: " + result[1], Cashbox.manDocPackForPrinting.AgrNumber);
     }
 }