//private string GetTransactionFileCommandHandler() { // int fileId = int.Parse(GetCommandParameter("id", true)); // RecorderOfficeTransactionFile file = RecorderOfficeTransactionFile.Parse(fileId); // return file.VirtualPath; //} private string GetRecordingRawDataCommandHandler() { int recordingId = int.Parse(GetCommandParameter("recordingId", true)); Recording recording = Recording.Parse(recordingId); string rawData = String.Empty; rawData += recording.PresentationTime.Date.ToString("dd/MMM/yyyy") + "|"; rawData += recording.PresentationTime.ToString("HH:mm") + "|"; rawData += recording.AuthorizedTime.ToString("dd/MMM/yyyy") + "|"; if (recording.RecordingPaymentList.Count > 0) { RecordingPayment payment = recording.RecordingPaymentList[0]; rawData += payment.FeeAmount.Amount.ToString("N2") + "|"; rawData += payment.FeeAmount.Currency.Id.ToString() + "|"; rawData += payment.ReceiptNumber + "|"; rawData += payment.OtherReceipts + "|"; } else { rawData += "||||"; } rawData += recording.AuthorizedBy.Id.ToString() + "|"; if (recording.RecordingDocument != null && !recording.RecordingDocument.IsEmptyInstance) { rawData += recording.RecordingDocument.RecordingDocumentType.Id.ToString() + "|"; } else { rawData += "|"; } return rawData; }
public void LoadRecordingMainPayment() { if (!this.Visible) { return; } if (recording.RecordingPaymentList.Count == 0) { cboRecordingPaymentCurrency.Value = String.Empty; return; } RecordingPayment payment = recording.RecordingPaymentList[0]; txtRecordingPaymentReceipt.Value = payment.ReceiptNumber; txtRecordingPaymentAdditionalReceipts.Value = payment.OtherReceipts; if (payment.FeeAmount.Currency.Equals(Currency.Unknown)) { cboRecordingPaymentCurrency.Value = "NC"; txtRecordingPayment.Value = String.Empty; } else if (payment.FeeAmount.Currency.Equals(Currency.Empty)) { cboRecordingPaymentCurrency.Value = "ND"; txtRecordingPayment.Value = String.Empty; } else if (payment.FeeAmount.Currency.Equals(Currency.NoLegible)) { cboRecordingPaymentCurrency.Value = "NL"; txtRecordingPayment.Value = String.Empty; } else { cboRecordingPaymentCurrency.Value = payment.FeeAmount.Currency.Id.ToString(); txtRecordingPayment.Value = payment.FeeAmount.Amount.ToString("N2"); } }
public void SaveRecordingMainPayment() { if (!this.Visible) { return; } RecordingPayment payment = null; if (recording.RecordingPaymentList.Count == 0) { payment = new RecordingPayment(this.recording); } else { payment = recording.RecordingPaymentList[0]; } if (txtRecordingPayment.Value.Length == 0) { txtRecordingPayment.Value = "0.00"; } payment.PaymentOffice = recording.RecordingBook.RecorderOffice; payment.PaymentTime = recording.AuthorizedTime; Currency currency = null; switch (cboRecordingPaymentCurrency.Value) { case "NC": currency = Currency.Unknown; break; case "NL": currency = Currency.NoLegible; break; case "ND": currency = Currency.Empty; break; default: currency = Currency.Parse(int.Parse(cboRecordingPaymentCurrency.Value)); break; ; } payment.FeeAmount = Money.Parse(currency, decimal.Parse(txtRecordingPayment.Value)); payment.ReceiptNumber = txtRecordingPaymentReceipt.Value; payment.OtherReceipts = txtRecordingPaymentAdditionalReceipts.Value; if (recording.RecordingPaymentList.Count == 0) { recording.AppendRecordingPayment(payment); } else { payment.Save(); } }