Пример #1
0
 public CRTransaction(CRTransactionType transactionType,
                      BaseObject reference, DateTime transactionDate,
                      DateTime dueDate, decimal inputAmount, decimal outputAmount,
                      string summary, string notes) {
   this.transactionType = transactionType;
   this.baseInstrumentType = InstrumentType.Empty;
   this.cashRegister = CashRegister.MyCashRegister();
   this.referenceId = reference.Id;
   this.transactionDate = transactionDate;
   this.dueDate = dueDate;
   this.currencyAmount = inputAmount + outputAmount;
   this.inputAmount = inputAmount;
   this.outputAmount = outputAmount;
   this.summary = summary;
   this.notes = notes;
 }
Пример #2
0
 public CRTransaction(CRTransactionType transactionType, CashRegister cashier) {
   this.transactionType = transactionType;
   this.cashRegister = cashier;
 }
Пример #3
0
 protected override void OnLoadObjectData(DataRow row) {
   this.cashRegister = CashRegister.Parse(Organization.Parse((int) row["OrganizationId"]),
                                          Contact.Parse((int) row["CashierId"]));
   this.transactionType = CRTransactionType.Parse((int) row["TransactionTypeId"]);
   this.collector = Contact.Parse((int) row["CollectorId"]);
   this.referenceId = (int) row["ReferenceId"];
   this.referenceTag = (string) row["ReferenceTag"];
   this.financialAccountId = (int) row["FinancialAccountId"];
   this.authorizationId = (int) row["AuthorizationId"];
   this.baseInstrumentType = InstrumentType.Parse((int) row["BaseInstrumentTypeId"]);
   this.transactionDate = (DateTime) row["TransactionDate"];
   this.dueDate = (DateTime) row["DueDate"];
   this.currency = Currency.Parse((int) row["CurrencyId"]);
   this.currencyAmount = (decimal) row["CurrencyAmount"];
   this.inputAmount = (decimal) row["InputAmount"];
   this.outputAmount = (decimal) row["OutputAmount"];
   this.summary = (string) row["Summary"];
   this.notes = (string) row["Notes"];
   this.keywords = (string) row["TransactionKeywords"];
   this.postedBy = Contact.Parse((int) row["PostedById"]);
   this.postingTime = (DateTime) row["PostingTime"];
   this.canceledBy = Contact.Parse((int) row["CanceledById"]);
   this.cancelationTime = (DateTime) row["CancelationTime"];
   this.status = (TreasuryItemStatus) Convert.ToChar(row["TransactionStatus"]);
 }