本文整理汇总了C#中OpenCbsReader类的典型用法代码示例。如果您正苦于以下问题:C# OpenCbsReader类的具体用法?C# OpenCbsReader怎么用?C# OpenCbsReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OpenCbsReader类属于命名空间,在下文中一共展示了OpenCbsReader类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetProduct
private static LoanProduct GetProduct(OpenCbsReader r)
{
LoanProduct package = new LoanProduct();
package.Id = r.GetInt("id");
package.Delete = r.GetBool("deleted");
package.Name = r.GetString("name");
package.Code = r.GetString("code");
package.ClientType = r.GetChar("client_type");
package.LoanType = (OLoanTypes)r.GetSmallInt("loan_type");
package.RoundingType = (ORoundingType)r.GetSmallInt("rounding_type");
package.Amount = r.GetMoney("amount");
package.AmountMin = r.GetMoney("amount_min");
package.AmountMax = r.GetMoney("amount_max");
package.InterestRate = r.GetNullDecimal("interest_rate");
package.InterestRateMin = r.GetNullDecimal("interest_rate_min");
package.InterestRateMax = r.GetNullDecimal("interest_rate_max");
package.GracePeriod = r.GetNullInt("grace_period");
package.GracePeriodMin = r.GetNullInt("grace_period_min");
package.GracePeriodMax = r.GetNullInt("grace_period_max");
package.GracePeriodOfLateFees = r.GetNullInt("grace_period_of_latefees");
package.NbOfInstallments = r.GetNullInt("number_of_installments");
package.NbOfInstallmentsMin = r.GetNullInt("number_of_installments_min");
package.NbOfInstallmentsMax = r.GetNullInt("number_of_installments_max");
package.AnticipatedTotalRepaymentPenalties = r.GetNullDouble("anticipated_total_repayment_penalties");
package.AnticipatedTotalRepaymentPenaltiesMin = r.GetNullDouble("anticipated_total_repayment_penalties_min");
package.AnticipatedTotalRepaymentPenaltiesMax = r.GetNullDouble("anticipated_total_repayment_penalties_max");
package.AnticipatedPartialRepaymentPenalties = r.GetNullDouble("anticipated_partial_repayment_penalties");
package.AnticipatedPartialRepaymentPenaltiesMin = r.GetNullDouble("anticipated_partial_repayment_penalties_min");
package.AnticipatedPartialRepaymentPenaltiesMax = r.GetNullDouble("anticipated_partial_repayment_penalties_max");
package.ChargeInterestWithinGracePeriod = r.GetBool("charge_interest_within_grace_period");
package.KeepExpectedInstallment = r.GetBool("keep_expected_installment");
package.AnticipatedTotalRepaymentPenaltiesBase = (OAnticipatedRepaymentPenaltiesBases)r.GetSmallInt("anticipated_total_repayment_base");
package.AnticipatedPartialRepaymentPenaltiesBase = (OAnticipatedRepaymentPenaltiesBases)r.GetSmallInt("anticipated_partial_repayment_base");
package.NonRepaymentPenalties.InitialAmount = r.GetNullDouble("non_repayment_penalties_based_on_initial_amount");
package.NonRepaymentPenalties.OLB = r.GetNullDouble("non_repayment_penalties_based_on_olb");
package.NonRepaymentPenalties.OverDueInterest = r.GetNullDouble("non_repayment_penalties_based_on_overdue_interest");
package.NonRepaymentPenalties.OverDuePrincipal = r.GetNullDouble("non_repayment_penalties_based_on_overdue_principal");
package.NonRepaymentPenaltiesMin.InitialAmount = r.GetNullDouble("non_repayment_penalties_based_on_initial_amount_min");
package.NonRepaymentPenaltiesMin.OLB = r.GetNullDouble("non_repayment_penalties_based_on_olb_min");
package.NonRepaymentPenaltiesMin.OverDuePrincipal = r.GetNullDouble("non_repayment_penalties_based_on_overdue_principal_min");
package.NonRepaymentPenaltiesMin.OverDueInterest = r.GetNullDouble("non_repayment_penalties_based_on_overdue_interest_min");
package.NonRepaymentPenaltiesMax.InitialAmount = r.GetNullDouble("non_repayment_penalties_based_on_initial_amount_max");
package.NonRepaymentPenaltiesMax.OLB = r.GetNullDouble("non_repayment_penalties_based_on_olb_max");
package.NonRepaymentPenaltiesMax.OverDueInterest = r.GetNullDouble("non_repayment_penalties_based_on_overdue_interest_max");
package.NonRepaymentPenaltiesMax.OverDuePrincipal = r.GetNullDouble("non_repayment_penalties_based_on_overdue_principal_max");
package.AllowFlexibleSchedule = r.GetBool("allow_flexible_schedule");
package.UseGuarantorCollateral = r.GetBool("use_guarantor_collateral");
package.SetSeparateGuarantorCollateral = r.GetBool("set_separate_guarantor_collateral");
package.PercentageTotalGuarantorCollateral = r.GetInt("percentage_total_guarantor_collateral");
package.PercentageSeparateGuarantour = r.GetInt("percentage_separate_guarantor");
package.PercentageSeparateCollateral = r.GetInt("percentage_separate_collateral");
package.UseCompulsorySavings = r.GetBool("use_compulsory_savings");
package.CompulsoryAmount = r.GetNullInt("compulsory_amount");
package.CompulsoryAmountMin = r.GetNullInt("compulsory_amount_min");
package.CompulsoryAmountMax = r.GetNullInt("compulsory_amount_max");
package.UseEntryFeesCycles = r.GetBool("use_entry_fees_cycles");
//if (DatabaseHelper.GetNullAuthorizedInt32("fundingLine_id", pReader).HasValue)
//{
// package.FundingLine = new FundingLine { Id = r.GetNullInt("fundingLine_id").Value };
// package.FundingLine.Name = r.GetString("funding_line_name");
// package.FundingLine.Currency = new Currency { Id = r.GetInt("funding_line_currency_id") };
//}
if (r.GetNullInt("currency_id").HasValue)
{
package.Currency = new Currency
{
Id = r.GetInt("currency_id"),
Code = r.GetString("currency_code"),
Name = r.GetString("currency_name"),
IsPivot = r.GetBool("currency_is_pivot"),
IsSwapped = r.GetBool("currency_is_swapped"),
UseCents = r.GetBool("currency_use_cents")
};
}
/* Line of credit */
package.DrawingsNumber = r.GetNullInt("number_of_drawings_loc");
package.AmountUnderLoc = r.GetMoney("amount_under_loc");
package.AmountUnderLocMin = r.GetMoney("amount_under_loc_min");
package.AmountUnderLocMax = r.GetMoney("amount_under_loc_max");
package.MaturityLoc = r.GetNullInt("maturity_loc");
package.MaturityLocMin = r.GetNullInt("maturity_loc_min");
package.MaturityLocMax = r.GetNullInt("maturity_loc_max");
package.ActivatedLOC = r.GetBool("activated_loc");
package.CycleId = r.GetNullInt("cycle_id");
package.CreditInsuranceMin = r.GetDecimal("insurance_min");
package.CreditInsuranceMax = r.GetDecimal("insurance_max");
//.........这里部分代码省略.........
开发者ID:BillTheBest,项目名称:opencbs,代码行数:101,代码来源:LoanProductManager.cs
示例2: _GetLoan
private Loan _GetLoan(OpenCbsReader r)
{
return new Loan(_user, ApplicationSettings.GetInstance(_user.Md5),
NonWorkingDateSingleton.GetInstance(_user.Md5),
ProvisionTable.GetInstance(_user), ChartOfAccounts.GetInstance(_user))
{
Id = r.GetInt("credit_id"),
ClientType = r.GetChar("client_type_code") == 'I'
? OClientTypes.Person
: r.GetChar("client_type_code") == 'G'
? OClientTypes.Group
: OClientTypes.Corporate,
ContractStatus = (OContractStatus) r.GetSmallInt("status"),
CreditCommiteeDate = r.GetNullDateTime("credit_commitee_date"),
CreditCommiteeComment = r.GetString("credit_commitee_comment"),
CreditCommitteeCode = r.GetString("credit_commitee_code"),
Amount = r.GetMoney("amount"),
InterestRate = r.GetDecimal("interest_rate"),
NbOfInstallments = r.GetInt("nb_of_installment"),
NonRepaymentPenalties = new NonRepaymentPenalties
{
InitialAmount = r.GetDouble("non_repayment_penalties_based_on_initial_amount"),
OLB = r.GetDouble("non_repayment_penalties_based_on_olb"),
OverDueInterest = r.GetDouble("non_repayment_penalties_based_on_overdue_interest"),
OverDuePrincipal = r.GetDouble("non_repayment_penalties_based_on_overdue_principal")
},
AnticipatedTotalRepaymentPenalties = r.GetDouble("anticipated_total_repayment_penalties"),
AnticipatedPartialRepaymentPenalties = r.GetDouble("anticipated_partial_repayment_penalties"),
AnticipatedPartialRepaymentPenaltiesBase = (OAnticipatedRepaymentPenaltiesBases)
r.GetSmallInt("anticipated_partial_repayment_base"),
AnticipatedTotalRepaymentPenaltiesBase =(OAnticipatedRepaymentPenaltiesBases)
r.GetSmallInt("anticipated_total_repayment_base"),
Disbursed = r.GetBool("disbursed"),
GracePeriod = r.GetNullInt("grace_period"),
GracePeriodOfLateFees = r.GetNullInt("grace_period_of_latefees"),
WrittenOff = r.GetBool("written_off"),
Rescheduled = r.GetBool("rescheduled"),
Code = r.GetString("contract_code"),
BranchCode = r.GetString("branch_code"),
CreationDate = r.GetDateTime("creation_date"),
StartDate = r.GetDateTime("start_date"),
AlignDisbursementDate = r.GetDateTime("align_disbursed_date"),
CloseDate = r.GetDateTime("close_date"),
Closed = r.GetBool("closed"),
BadLoan = r.GetBool("bad_loan"),
Synchronize = r.GetBool("synchronize"),
ScheduleChangedManually = r.GetBool("schedule_changed"),
AmountUnderLoc = r.GetMoney("amount_under_loc"),
CompulsorySavingsPercentage = r.GetNullInt("loan_percentage"),
LoanPurpose = r.GetString("loan_purpose"),
Comments = r.GetString("comments"),
AmountMin = r.GetMoney("amount_min"),
AmountMax = r.GetMoney("amount_max"),
InterestRateMin = r.GetNullDecimal("ir_min"),
InterestRateMax = r.GetNullDecimal("ir_max"),
NmbOfInstallmentsMin = r.GetNullInt("nmb_of_inst_min"),
NmbOfInstallmentsMax = r.GetNullInt("nmb_of_inst_max"),
LoanCycle = r.GetNullInt("loan_cycle"),
Insurance = r.GetDecimal("insurance"),
NsgID = r.GetNullInt("nsg_id"),
EconomicActivityId = r.GetInt("activity_id"),
FirstInstallmentDate = r.GetDateTime("preferred_first_installment_date"),
};
}
开发者ID:TalasZh,项目名称:opencbs,代码行数:67,代码来源:LoanManager.cs
示例3: GetSavingFromReader
private SavingBookContract GetSavingFromReader(OpenCbsReader pReader)
{
var savingContract = new SavingBookContract(
ApplicationSettings.GetInstance(_user.Md5),
_user);
savingContract.Product = new SavingsBookProduct
{
Id = pReader.GetInt("product_id")
};
savingContract.Id = pReader.GetInt("id");
savingContract.Code = pReader.GetString("code");
savingContract.Status = (OSavingsStatus)pReader.GetSmallInt("status");
savingContract.CreationDate = pReader.GetDateTime("creation_date");
savingContract.ClosedDate = pReader.GetNullDateTime("closed_date");
savingContract.InterestRate = pReader.GetDouble("interest_rate");
savingContract.SavingsOfficer = new User
{
Id = pReader.GetInt("savings_officer_id")
, FirstName = pReader.GetString("so_first_name")
, LastName = pReader.GetString("so_last_name")
};
savingContract.InitialAmount = pReader.GetMoney("initial_amount");
savingContract.EntryFees = pReader.GetMoney("entry_fees");
savingContract.NsgID = pReader.GetNullInt("nsg_id");
return savingContract;
}
开发者ID:TalasZh,项目名称:opencbs,代码行数:28,代码来源:SavingManager.cs
示例4: GetContractAccountingRule
private static ContractAccountingRule GetContractAccountingRule(OpenCbsReader reader)
{
ContractAccountingRule rule = new ContractAccountingRule();
rule.Id = reader.GetInt("id");
rule.EventType = new EventType
{
EventCode = reader.GetString("event_type"),
Description = reader.GetString("event_description")
};
rule.EventAttribute = new EventAttribute
{
Id = reader.GetInt("event_attribute_id"),
Name = reader.GetString("attribute_name")
};
rule.DebitAccount = new Account { Id = reader.GetInt("debit_account_number_id") };
rule.CreditAccount = new Account { Id = reader.GetInt("credit_account_number_id") };
rule.BookingDirection = (OBookingDirections)reader.GetSmallInt("booking_direction");
rule.Order = reader.GetInt("order");
rule.Description = reader.GetString("rule_description");
rule.ProductType = (OProductTypes)reader.GetSmallInt("product_type");
int? loanProductId = reader.GetNullInt("loan_product_id");
if (loanProductId.HasValue)
rule.LoanProduct = new LoanProduct { Id = loanProductId.Value };
int? currencyId = reader.GetNullInt("currency_id");
if (currencyId.HasValue)
rule.Currency = new Currency { Id = currencyId.Value };
int? savingsProductId = reader.GetNullInt("savings_product_id");
if (savingsProductId.HasValue)
rule.SavingProduct = new SavingsBookProduct { Id = savingsProductId.Value };
rule.ClientType = reader.GetChar("client_type").ConvertToClientType();
int? activityId = reader.GetNullInt("activity_id");
if (activityId.HasValue)
rule.EconomicActivity = new EconomicActivity { Id = activityId.Value };
return rule;
}
开发者ID:aelhadi,项目名称:opencbs,代码行数:44,代码来源:AccountingRuleManager.cs
示例5: GetAlert
private static Alert GetAlert(OpenCbsReader pReader, char pType)
{
int i = 0;
var alert = new Alert();
while (i < pReader.FieldCount)
{
alert.AddParameter(pReader.GetName(i), pReader.GetValue(i));
i++;
}
alert.Type = pType;
return alert;
}
开发者ID:TalasZh,项目名称:opencbs,代码行数:14,代码来源:LoanManager.cs
示例6: GetBooking
private static BookingToView GetBooking(Account pAccount, OpenCbsReader reader)
{
return new BookingToView
{
Date = reader.GetDateTime("date"),
EventCode = reader.GetString("event_code"),
ExchangeRate = reader.GetNullDouble("exchange_rate"),
AmountInternal = reader.GetMoney("amount"),
ContractCode = reader.GetString("contract_code"),
Direction =
(reader.GetString("debit_local_account_number") == pAccount.Number
? OBookingDirections.Debit
: OBookingDirections.Credit),
IsExported = reader.GetBool("is_exported")
};
}
开发者ID:aelhadi,项目名称:opencbs,代码行数:16,代码来源:AccountingTransactionManager.cs
示例7: ReadEvent
private static SavingEvent ReadEvent(OpenCbsReader r, ISavingProduct pProduct)
{
string code = r.GetString("code");
SavingEvent e = GetSavingsEvent(code);
SetSavingsEvent(r, e, pProduct);
return e;
}
开发者ID:TalasZh,项目名称:opencbs,代码行数:8,代码来源:SavingEventManager.cs
示例8: GetLoanInterestAccruingEvent
private static AccruedInterestEvent GetLoanInterestAccruingEvent(OpenCbsReader r)
{
return new AccruedInterestEvent{
Id = r.GetInt("liae_id"),
AccruedInterest = r.GetMoney("liae_accruedInterest"),
Interest = r.GetMoney("liae_interestPrepayment"),
Rescheduled = r.GetBool("liae_rescheduled"),
InstallmentNumber = r.GetInt("liae_installmentNumber")
};
}
开发者ID:TalasZh,项目名称:opencbs,代码行数:10,代码来源:EventManager.cs
示例9: GetOverdueEvent
private static OverdueEvent GetOverdueEvent(OpenCbsReader r)
{
return new OverdueEvent{
Id = r.GetInt("ov_id"),
OLB = r.GetMoney("ov_olb"),
OverdueDays = r.GetInt("ov_overdue_days"),
OverduePrincipal = r.GetMoney("ov_overdue_principal")
};
}
开发者ID:TalasZh,项目名称:opencbs,代码行数:9,代码来源:EventManager.cs
示例10: GetEntryFeeEvent
private static LoanEntryFeeEvent GetEntryFeeEvent(OpenCbsReader r)
{
return new LoanEntryFeeEvent
{
Id = r.GetInt("ef_id"),
Fee = r.GetMoney("ef_fee"),
Cancelable = true,
DisbursementEventId = r.GetInt("disbursement_event_id")
};
}
开发者ID:TalasZh,项目名称:opencbs,代码行数:10,代码来源:EventManager.cs
示例11: GetEvent
private static void GetEvent(OpenCbsReader r, Event pEvent)
{
//abstract class Event attributes
string eventType = r.GetString("event_type");
pEvent.Code = eventType;
pEvent.ContracId = r.GetInt("contract_id");
pEvent.Date = r.GetDateTime("event_date");
pEvent.EntryDate = r.GetDateTime("entry_date");
pEvent.Deleted = r.GetBool("event_deleted");
pEvent.IsFired = true;
pEvent.Cancelable = true;
pEvent.ExportedDate = DateTime.MinValue;
pEvent.Comment = r.GetString("comment");
pEvent.TellerId = r.GetNullInt("teller_id");
pEvent.ParentId = r.GetNullInt("parent_id");
pEvent.CancelDate = r.GetNullDateTime("cancel_date");
pEvent.ClientType = OClientTypes.All;
switch (r.GetString("client_type_code"))
{
case "I":
pEvent.ClientType = OClientTypes.Person;
break;
case "C":
pEvent.ClientType = OClientTypes.Corporate;
break;
case "G":
pEvent.ClientType = OClientTypes.Group;
break;
case "V":
pEvent.ClientType = OClientTypes.Village;
break;
}
//User associated to the event
pEvent.User = new User
{
Id = r.GetInt("user_id"),
UserName = r.GetString("user_username"),
Password = r.GetString("user_password"),
LastName = r.GetString("user_lastname"),
FirstName = r.GetString("user_firstname")
};
pEvent.Currency = new Currency
{
Id = r.GetInt("currency_id"),
Code = r.GetString("currency_code"),
IsPivot = r.GetBool("is_pivot"),
IsSwapped = r.GetBool("is_swapped")
};
pEvent.Branch = new Branch { Id = r.GetInt("branch_id") };
pEvent.LoanProduct = new LoanProduct { Id = r.GetInt("product_id") };
pEvent.User.SetRole(r.GetString("user_role"));
if (
eventType.Equals("ULIE") ||
eventType.Equals("ULOE")
)
return;
if (r.HasColumn("contract_code"))
pEvent.Description = r.GetString("contract_code");
}
开发者ID:TalasZh,项目名称:opencbs,代码行数:65,代码来源:EventManager.cs
示例12: GetCreditInsuranceEvent
private static Event GetCreditInsuranceEvent(OpenCbsReader r)
{
CreditInsuranceEvent cie = new CreditInsuranceEvent();
cie.Id = r.GetInt("cie_id");
cie.Commission = r.GetDecimal("cie_commission");
cie.Principal = r.GetDecimal("cie_principal");
return cie;
}
开发者ID:TalasZh,项目名称:opencbs,代码行数:8,代码来源:EventManager.cs
示例13: _GetExoticProduct
private static ExoticInstallmentsTable _GetExoticProduct(OpenCbsReader r)
{
return new ExoticInstallmentsTable
{
Id = r.GetInt("id"),
Name = r.GetString("name")
};
}
开发者ID:BillTheBest,项目名称:opencbs,代码行数:8,代码来源:LoanProductManager.cs
示例14: _GetExoticInstallment
private static ExoticInstallment _GetExoticInstallment(OpenCbsReader r)
{
return new ExoticInstallment
{
Number = r.GetInt("number"),
PrincipalCoeff = r.GetDouble("principal_coeff"),
InterestCoeff =r.GetNullDouble("interest_coeff")
};
}
开发者ID:BillTheBest,项目名称:opencbs,代码行数:9,代码来源:LoanProductManager.cs
示例15: ReadEvent
private Event ReadEvent(OpenCbsReader r)
{
Event e;
if (r.GetNullInt("lde_id").HasValue)
{
e = GetLoanDisbursmentEvent(r);
}
else if (r.GetNullInt("woe_id").HasValue)
{
e = GetWriteOffEvent(r);
}
else if (r.GetNullInt("rle_id").HasValue)
{
e = GetReschedulingLoanEvent(r);
}
else if (r.GetNullInt("rpe_id").HasValue)
{
e = GetRepaymentEvent(r);
}
else if (r.GetNullInt("tranche_id").HasValue)
{
e = GetTrancheLoanEvent(r);
}
else if (r.GetNullInt("liae_id").HasValue)
{
e = GetLoanInterestAccruingEvent(r);
}
else if (r.GetNullInt("ov_id").HasValue)
{
e = GetOverdueEvent(r);
}
else if (r.GetNullInt("pe_id").HasValue)
{
e = GetProvisionEvent(r);
}
else if (r.GetNullInt("ef_id").HasValue)
{
e = GetEntryFeeEvent(r);
}
else if (r.GetNullInt("cie_id").HasValue)
{
e = GetCreditInsuranceEvent(r);
}
else if (r.GetString("code").StartsWith("S"))
{
e = GetSavingEvent(r);
}
else
{
if(r.GetString("code").Equals("LOVE"))
e = new LoanValidationEvent{Id = r.GetInt("event_id")};
else if (r.GetString("code").Equals("LOCE"))
e = new LoanCloseEvent{Id = r.GetInt("event_id")};
else
e = new RegEvent {Id = r.GetInt("event_id")};
}
GetEvent(r, e);
return e;
}
开发者ID:TalasZh,项目名称:opencbs,代码行数:62,代码来源:EventManager.cs
示例16: GetProvisionEvent
private static ProvisionEvent GetProvisionEvent(OpenCbsReader r)
{
return new ProvisionEvent{
Id = r.GetInt("pe_id"),
Amount = r.GetMoney("pe_amount"),
OverdueDays = r.GetInt("pe_overdue_days")
};
}
开发者ID:TalasZh,项目名称:opencbs,代码行数:8,代码来源:EventManager.cs
示例17: GetReschedulingLoanEvent
private static RescheduleLoanEvent GetReschedulingLoanEvent(OpenCbsReader r)
{
return new RescheduleLoanEvent{
Id = r.GetInt("rle_id"),
Amount = r.GetMoney("rle_amount"),
NbOfMaturity = r.GetInt("rle_maturity"),
DateOffset = r.GetInt("rle_date_offset")
};
}
开发者ID:TalasZh,项目名称:opencbs,代码行数:9,代码来源:EventManager.cs
示例18: GetAccount
private static Account GetAccount(OpenCbsReader pReader)
{
return new Account
{
Id = pReader.GetInt("id"),
Number = pReader.GetString("account_number"),
Label = pReader.GetString("label"),
DebitPlus = pReader.GetBool("debit_plus"),
TypeCode = pReader.GetString("type_code"),
AccountCategory = ((OAccountCategories)pReader.GetSmallInt("account_category_id")),
Type = pReader.GetBool("type"),
ParentAccountId = pReader.GetNullInt("parent_account_id"),
Left = pReader.GetInt("lft"),
Right = pReader.GetInt("rgt")
};
}
开发者ID:jay3126,项目名称:opencbs,代码行数:16,代码来源:AccountManager.cs
示例19: GetSavingEvent
private static Event GetSavingEvent(OpenCbsReader r)
{
SavingEvent e;
switch (r.GetString("code"))
{
case OSavingEvents.Deposit:
e = new SavingDepositEvent();
break;
case OSavingEvents.Withdraw:
e = new SavingWithdrawEvent();
break;
case OSavingEvents.InitialDeposit:
e = new SavingInitialDepositEvent();
break;
case OSavingEvents.CreditTransfer:
e = new SavingCreditTransferEvent();
break;
case OSavingEvents.DebitTransfer:
e = new SavingDebitTransferEvent();
break;
case OSavingEvents.SpecialOperationCredit:
e = new SavingCreditOperationEvent();
break;
case OSavingEvents.SpecialOperationDebit:
e = new SavingDebitOperationEvent();
break;
case OSavingEvents.InterBranchCreditTransfer:
e = new SavingCreditInterBranchTransferEvent();
break;
case OSavingEvents.InterBranchDebitTransfer:
e = new SavingDebitInterBranchTransferEvent();
break;
default:
throw new Exception();
}
e.Amount = r.GetMoney("se_amount");
if (e is ISavingsFees)
((ISavingsFees)e).Fee = r.GetMoney("se_fees");
if (e is SavingTransferEvent)
((SavingTransferEvent)e).RelatedContractCode = r.GetString("se_transfer_code");
return e;
}
开发者ID:TalasZh,项目名称:opencbs,代码行数:45,代码来源:EventManager.cs
示例20: SetSavingsEvent
private static void SetSavingsEvent(OpenCbsReader r, SavingEvent e, ISavingProduct pProduct)
{
e.Id = r.GetInt("id");
e.ContracId = r.GetInt("contract_id");
e.Code = r.GetString("code");
e.Amount = r.GetMoney("amount");
e.Description = r.GetString("description");
e.Deleted = r.GetBool("deleted");
e.Date = r.GetDateTime("creation_date");
e.Cancelable = r.GetBool("cancelable");
e.IsFired = r.GetBool("is_fired");
e.CancelDate = r.GetNullDateTime("cancel_date");
if(pProduct != null)
e.ProductType = pProduct.GetType();
if (r.GetNullSmallInt("savings_method").HasValue)
e.SavingsMethod = (OSavingsMethods)r.GetNullSmallInt("savings_method").Value;
e.IsPending = r.GetBool("pending");
e.PendingEventId = r.GetNullInt("pending_event_id");
e.TellerId = r.GetNullInt("teller_id");
e.LoanEventId = r.GetNullInt("loan_event_id");
if (pProduct != null)
{
e.ProductType = pProduct.GetType();
}
if (e is SavingTransferEvent)
{
((SavingTransferEvent)e).RelatedContractCode = r.GetString("related_contract_code");
}
if (e is ISavingsFees)
{
((ISavingsFees) e).Fee = r.GetMoney("fees");
}
e.User = new User
{
Id = r.GetInt("user_id"),
UserName = r.GetString("user_name"),
Password = r.GetString("user_pass"),
LastName = r.GetString("last_name"),
FirstName = r.GetString("first_name")
};
e.User.SetRole(r.GetString("role_code"));
e.ClientType = OClientTypes.All;
switch (r.GetString("client_type_code"))
{
case "I":
e.ClientType = OClientTypes.Person; break;
case "C":
e.ClientType = OClientTypes.Corporate; break;
case "G":
e.ClientType = OClientTypes.Group; break;
case "V":
e.ClientType = OClientTypes.Village; break;
}
e.Branch = new Branch { Id = r.GetInt("branch_id") };
e.Currency = new Currency
{
Id = r.GetInt("currency_id"),
Code = r.GetString("currency_code"),
IsPivot = r.GetBool("is_pivot"),
IsSwapped = r.GetBool("is_swapped")
};
e.SavingProduct = new SavingsBookProduct { Id = r.GetInt("product_id") };
}
开发者ID:TalasZh,项目名称:opencbs,代码行数:73,代码来源:SavingEventManager.cs
注:本文中的OpenCbsReader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论