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]); } }
public void CheckError(string[] result, Canvas place) { if (result[0] == "OK") { CleanCheck(); MessageBoxes.ChangeMessage(result[1]); } else { ShowError(place, "Ошибка кассы: " + result[1], Cashbox.manDocPackForPrinting.AgrNumber); } }