本文整理汇总了C#中OpenCbsReader.GetDateTime方法的典型用法代码示例。如果您正苦于以下问题:C# OpenCbsReader.GetDateTime方法的具体用法?C# OpenCbsReader.GetDateTime怎么用?C# OpenCbsReader.GetDateTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenCbsReader
的用法示例。
在下文中一共展示了OpenCbsReader.GetDateTime方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: GetTransh
private static TrancheEvent GetTransh(OpenCbsReader r)
{
return new TrancheEvent
{
Number = r.GetInt("Number"),
StartDate = r.GetDateTime("start_date"),
Amount = r.GetMoney("amount"),
Maturity = r.GetInt("countOfInstallments"),
ApplyNewInterest = r.GetBool("ApplyNewInterest"),
InterestRate = r.GetDecimal("interest_rate"),
StartedFromInstallment = r.GetInt("started_from_installment"),
Deleted = r.GetBool("is_deleted"),
Id = r.GetInt("event_id")
};
}
示例3: _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"),
};
}
示例4: 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")
};
}
示例5: 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") };
}
示例6: GetTrancheLoanEvent
private static TrancheEvent GetTrancheLoanEvent(OpenCbsReader r)
{
return new TrancheEvent{
Id = r.GetInt("tranche_id"),
Amount = r.GetMoney("tranche_amount"),
InterestRate = r.GetMoney("tranche_interest_rate").Value,
Maturity = r.GetInt("tranche_maturity"),
StartDate = r.GetDateTime("tranche_start_date")
};
}
示例7: 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");
}
示例8: GetMemberFromReader
private VillageMember GetMemberFromReader(OpenCbsReader r)
{
return new VillageMember
{
Tiers = { Id = r.GetInt("person_id") },
JoinedDate = r.GetDateTime("joined_date"),
LeftDate = r.GetNullDateTime("left_date"),
IsLeader = r.GetBool("is_leader"),
CurrentlyIn = r.GetBool("currently_in"),
};
}
示例9: GetTrancheLoanEvent
private static TrancheEvent GetTrancheLoanEvent(OpenCbsReader r)
{
return new TrancheEvent{
Id = r.GetInt("tranche_id"),
Amount = r.GetMoney("tranche_amount"),
InterestRate = r.GetMoney("tranche_interest_rate").Value,
Maturity = r.GetInt("tranche_maturity"),
StartDate = r.GetDateTime("tranche_start_date"),
GracePeriod = r.GetInt("tranche_grace_period"),
FirstRepaymentDate = r.GetDateTime("tranche_first_repayment_date"),
};
}
示例10: GetTrancheLoanEvent
private TrancheEvent GetTrancheLoanEvent(OpenCbsReader r)
{
return new TrancheEvent{
Id = r.GetInt("tranche_id"),
Amount = r.GetMoney("tranche_amount"),
InterestRate = r.GetMoney("tranche_interest_rate").Value,
Maturity = r.GetInt("tranche_maturity"),
StartDate = r.GetDateTime("tranche_start_date"),
GracePeriod = r.GetInt("tranche_grace_period"),
FirstRepaymentDate = r.GetDateTime("tranche_first_repayment_date"),
PaymentMethodId = r.GetNullInt("tranche_pm"),
PaymentMethod = r.GetNullInt("tranche_pm") == null
? null
: _paymentMethodManager.SelectPaymentMethodById(
r.GetNullInt("tranche_pm").Value)
};
}
示例11: 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"),
PreferredFirstInstallmentDate = r.GetDateTime("rle_preferred_first_installment_date"),
PreviousInterestRate = r.GetDecimal("rle_previous_interest_rate")
};
}