/// <summary> /// Initializes a new instance of the <see cref="InvalidTransactionException"/> class. /// </summary> /// <param name="message">The message.</param> /// <param name="transaction">The transaction.</param> public InvalidTransactionException(string message, TransactionBase transaction) : this(message, null, transaction) { }
public Guid Save([FromBody]TransactionBase transaction) { return TransactionService.Save(transaction); }
/// <summary> /// Initializes a new instance of the <see cref="InvalidTransactionException"/> class. /// </summary> /// <param name="transaction">The transaction.</param> public InvalidTransactionException(TransactionBase transaction) : this(string.Format(CultureInfo.CurrentCulture, Resources.InvalidBankTransaction, transaction), transaction) { }
internal void BeginTransaction() { _transaction = _connection.InnerConnection.Database.BeginTransaction(BuildTpb()); }
public GdsArray(IDatabase db, TransactionBase transaction, string tableName, string fieldName) : this(db, transaction, -1, tableName, fieldName) { }
public StatementBase CreateStatement(TransactionBase transaction) { return(new FesStatement(this, transaction as FesTransaction)); }
public override StatementBase CreateStatement(TransactionBase transaction) { return(new GdsStatement(this, transaction)); }
public TransactionInfo Authorize(TransactionBase transaction) { var paymentSlipTransaction = ValidateTransactionType(transaction); return(ProcessAuthorization(paymentSlipTransaction)); }
public FesBlob(DatabaseBase db, TransactionBase transaction) : this(db, transaction, 0) { }
public void Update(TransactionBase eventRow, TransactionsTable eventTable) { eventTable.UpdateEvent(eventRow); }
internal async Task BeginTransactionAsync(FbTransactionOptions options, CancellationToken cancellationToken = default) { _transaction = await _connection.InnerConnection.Database.BeginTransactionAsync(BuildTpb(options), cancellationToken).ConfigureAwait(false); }
public void Add(TransactionBase eventRow, TransactionsTable eventTable) { eventTable.AddEvent(eventRow); }
/// <summary> /// Setter for the basic fields of the transaction. /// </summary> /// <param name="basicFields"></param> /// <returns> A configured transaction </returns> public ConfiguredTransaction SetBasicFields(TransactionBase basicFields) { this.TransactionBase = basicFields; return(new ConfiguredTransaction(this)); }
public void AddTransaction(TransactionBase transaction) { _storage.Add(transaction); }
/// <summary> /// Initializes a new instance of the <see cref="InvalidTransactionException"/> class. /// </summary> /// <param name="message">The message.</param> /// <param name="innerException">The inner exception.</param> /// <param name="transaction">The transaction.</param> public InvalidTransactionException(string message, Exception innerException, TransactionBase transaction) : base(message, innerException) { Transaction = transaction; }
public void AutoRepeat(TransactionBase transactionData) { SalesVM.Instance.AutoRepeat(transactionData); }
internal async Task BeginTransaction(FbTransactionOptions options, AsyncWrappingCommonArgs async) { _transaction = await _connection.InnerConnection.Database.BeginTransaction(BuildTpb(options), async).ConfigureAwait(false); }
private void GoToTransaction(TransactionBase trn) { TransactionData = trn; }
public virtual StatementBase CreateStatement(TransactionBase transaction) { return(new GdsStatement(this, transaction)); }
private void Post(TransactionBase TransactionData) { try { IncludePrecriptionProperties(TransactionData); SalesReceipt s = new SalesReceipt(); s.TxnDate = TransactionData.Time; s.TxnState = "1"; s.Workstation = "02"; s.StoreNumber = "1"; s.SalesReceiptNumber = "123"; s.Discount = "0"; if (TransactionData == null || string.IsNullOrEmpty(TransactionData.TransactionNumber)) { //MessageBox.Show("Invalid Transaction Please Try again"); //TransactionData.Status = "Invalid Transaction Please Try again"; //rms.SaveChanges(); //return; } //TransPreZeroConverter tz = new TransPreZeroConverter(); if (typeof(Prescription).IsInstanceOfType(TransactionData)) { Prescription p = TransactionData as Prescription; string doctor = ""; string patient = ""; if (p.Doctor != null) { doctor = p.Doctor.DisplayName; } if (p.Patient != null) { patient = p.Patient.ContactInfo; s.Discount = p.Patient.Discount == null ? "" : p.Patient.Discount.ToString(); } s.Comments = String.Format("{0} \n RX#:{1} \n Doctor:{2}", patient, p.TransactionNumber, doctor); } else { s.Comments = "RX#:" + TransactionData.TransactionNumber; } //if (TransactionData == null || string.IsNullOrEmpty(TransactionData.TransactionNumber)) //{ // rms.Refresh(RefreshMode.StoreWins, TransactionData); // if (TransactionData == null || string.IsNullOrEmpty(TransactionData.TransactionNumber)) // { // MessageBox.Show("Invalid Transaction Please Try again"); // return; // } //} if (TransactionData != null) { s.TrackingNumber = TransactionData.TransactionNumber; } s.Associate = "Dispensary"; s.SalesReceiptType = "0"; foreach (var item in TransactionData.TransactionEntries) { if (item.Item.QBItemListID != null) { s.SalesReceiptDetails.Add(new SalesReceiptDetail { ItemListID = item.Item.QBItemListID, QtySold = item.Quantity }); //340 } else { ////MessageBox.Show("Please Link Quickbooks item to dispensary"); //TransactionData.Status = "Please Link Quickbooks item to dispensary"; //rms.SaveChanges(); return; } } // QBPOS qb = new QBPOS(); SalesReceiptRet result = QBPOS.Instance.AddSalesReceipt(s); if (result != null) { using (var ctx = new RMSModel()) { TransactionData.ReferenceNumber = "QB#" + result.SalesReceiptNumber; TransactionData.Status = "Posted"; ctx.TransactionBase.AddOrUpdate(TransactionData); ctx.SaveChanges(); } } else { // problem } } catch (Exception ex) { Logger.Log(LoggingLevel.Error, ex.Message + ex.StackTrace); throw ex; } }
public GdsBlob(IDatabase db, TransactionBase transaction) : this(db, transaction, 0) { }
public TransactionInfo Authorize(TransactionBase transaction) { var debitTransaction = ValidateTransactionType(transaction); return(ProcessAuthorization(debitTransaction)); }
internal void BeginTransaction(FbTransactionOptions options) { _transaction = _connection.InnerConnection.Database.BeginTransaction(BuildTpb(options)); }
/// <summary> /// /// </summary> /// <param name="transaction"></param> /// <returns></returns> /// <exception cref="ClientSideException">Throws client side exception</exception> public async Task ValidateInputAsync(TransactionBase transaction) { await _transactionValidationService.ValidateAddressBalanceAsync(transaction.FromAddress, transaction.Value, transaction.GasAmount, transaction.GasPrice); }
public GdsStatement(DatabaseBase db, TransactionBase transaction) : base(db, transaction) { }
/// <summary> /// Adds a new transaction to the document /// </summary> /// <param name="receiver">Object with all the required information about the receiver of the new transaction</param> /// <param name="transaction">Object with all the required information about the transaction itself</param> public void AddTransaction(PaymentInstructionInformation3CH pmtInf, Receiver receiver, TransactionBase transaction) { CreditTransferTransactionInformation10CH cdtTrfTxInf = new CreditTransferTransactionInformation10CH(); // Index 2.27 PaymentIdentification1 pmtId = new PaymentIdentification1(); // Index 2.28 cdtTrfTxInf.PmtId = pmtId; pmtId.InstrId = "1-" + pmtInf.CdtTrfTxInf.Length; // Index 2.29 pmtId.EndToEndId = transaction.ReferenceIdentification; // Index 2.30 AmountType3Choice amt = new AmountType3Choice(); // Index 2.42 cdtTrfTxInf.Amt = amt; ActiveOrHistoricCurrencyAndAmount currencyAndAmount = new ActiveOrHistoricCurrencyAndAmount(); // Index 2.43 amt.Item = currencyAndAmount; currencyAndAmount.Ccy = transaction.CurrencyCode; currencyAndAmount.Value = transaction.Amount; PartyIdentification32CH_Name cdtr = new PartyIdentification32CH_Name(); // Index 2.79 cdtTrfTxInf.Cdtr = cdtr; cdtr.Nm = receiver.Name; // Index 2.79 / Name PostalAddress6CH pstlAdr = new PostalAddress6CH(); // Index 2.79 / Postal Address cdtr.PstlAdr = pstlAdr; pstlAdr.StrtNm = receiver.StreetName; // Index 2.79 / Street Name if (!string.IsNullOrWhiteSpace(receiver.StreetNumber)) { pstlAdr.StrtNm = receiver.StreetName + " " + receiver.StreetNumber; // Index 2.79 / Building Number } pstlAdr.PstCd = receiver.Zip; // Index 2.79 / Post Code pstlAdr.TwnNm = receiver.City; // Index 2.79 / Town Name pstlAdr.Ctry = receiver.CountryCode; // Index 2.79 / Country CashAccount16CH_Id cdtrAcct = new CashAccount16CH_Id(); // Index 2.80 cdtrAcct.Id = new AccountIdentification4ChoiceCH(); // Index 2.80 / Identification cdtTrfTxInf.CdtrAcct = cdtrAcct; if (transaction.GetType() == typeof(TransactionIBANandQRR)) { TransactionIBANandQRR transactionIbaNandQrr = ((TransactionIBANandQRR)transaction); cdtrAcct.Id.Item = transactionIbaNandQrr.ReceiverIban; // Index 2.80 / Id / IBAN Ziel-Konto if (!string.IsNullOrWhiteSpace(transactionIbaNandQrr.ReceiverBIC)) { BranchAndFinancialInstitutionIdentification4CH cdtrAgt = new BranchAndFinancialInstitutionIdentification4CH(); // Index 2.77 cdtTrfTxInf.CdtrAgt = cdtrAgt; FinancialInstitutionIdentification7CH finInstnIdCdtr = new FinancialInstitutionIdentification7CH(); // Index 2.77 / Financial Institution Identification cdtrAgt.FinInstnId = finInstnIdCdtr; finInstnIdCdtr.BIC = transactionIbaNandQrr.ReceiverBIC; // Index 2.21 } // QRR if (!string.IsNullOrWhiteSpace(transactionIbaNandQrr.QRReferenceNumber)) { var rmtInf = new RemittanceInformation5CH(); // Index 2.126 cdtTrfTxInf.RmtInf = rmtInf; rmtInf.Strd = new StructuredRemittanceInformation7 { CdtrRefInf = new CreditorReferenceInformation2 { Ref = transactionIbaNandQrr.QRReferenceNumber, Tp = new CreditorReferenceType2 { CdOrPrtry = new CreditorReferenceType1Choice { Item = "QRR" } } } }; } } else if (transaction.GetType() == typeof(TransactionESR)) { TransactionESR transactionESR = ((TransactionESR)transaction); PaymentTypeInformation19CH pmtTpInf = new PaymentTypeInformation19CH(); // Index 2.31 cdtTrfTxInf.PmtTpInf = pmtTpInf; cdtTrfTxInf.PmtTpInf = new PaymentTypeInformation19CH // Index 2.31 { LclInstrm = new LocalInstrument2Choice // Index 2.36 { ItemElementName = ItemChoiceType5.Prtry, // Index 2.38 Item = transactionESR.PaymentType } }; cdtrAcct.Id.Item = new GenericAccountIdentification1CH() // Index 2.80 { Id = transactionESR.ReceiverAccount }; var rmtInf = new RemittanceInformation5CH(); // Index 2.98 cdtTrfTxInf.RmtInf = rmtInf; rmtInf.Strd = new StructuredRemittanceInformation7 { CdtrRefInf = new CreditorReferenceInformation2 { Ref = transactionESR.ESRReferenceNumber } }; } else if (transaction.GetType() == typeof(TransactionES)) { TransactionES transactionES = ((TransactionES)transaction); PaymentTypeInformation19CH pmtTpInf = new PaymentTypeInformation19CH(); // Index 2.31 cdtTrfTxInf.PmtTpInf = pmtTpInf; cdtTrfTxInf.PmtTpInf = new PaymentTypeInformation19CH // Index 2.31 { LclInstrm = new LocalInstrument2Choice // Index 2.36 { ItemElementName = ItemChoiceType5.Prtry, // Index 2.38 Item = transactionES.PaymentType } }; cdtrAcct.Id.Item = new GenericAccountIdentification1CH() // Index 2.80 { Id = transactionES.ReceiverAccount }; } AddNewCreditTransferTransactionInformation(pmtInf, cdtTrfTxInf); }