本文整理汇总了C#中OpenCBS.CoreDomain.Events.Loan.Event类的典型用法代码示例。如果您正苦于以下问题:C# Event类的具体用法?C# Event怎么用?C# Event使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Event类属于OpenCBS.CoreDomain.Events.Loan命名空间,在下文中一共展示了Event类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EventCancelConfirmationForm
public EventCancelConfirmationForm(Loan pContract, Event pEvent, List<Installment> archivedInstallments)
{
InitializeComponent();
_contract = pContract;
_archivedInstallments = archivedInstallments;
_event = pEvent;
if ((archivedInstallments == null) || (archivedInstallments.Count == 0))
{
listViewRepayments.Visible = false;
cbShowCurrentState.Visible = false;
lblComeBackToState.Visible = false;
DisplayEvent();
}
else
{
listViewEvents.Visible = false;
lblConfirmEventDelete.Visible = false;
DisplayInstallmentsForRepaymentsStatus();
}
}
示例2: SetLoanPenaltyAccrualEvent
private static void SetLoanPenaltyAccrualEvent(OpenCbsCommand c, Event pEvent, OCurrency penalty)
{
c.AddParam("@id", pEvent.Id);
c.AddParam("@penalty", penalty);
}
示例3: UpdateCommentForLoanEvent
public void UpdateCommentForLoanEvent(Event evnt, SqlTransaction sqlTransac)
{
_eventManagement.UpdateCommentForLoanEvent(evnt, sqlTransac);
}
示例4: FireFundingLineEvent
public void FireFundingLineEvent(Event e, FundingLine fundingLine, SqlTransaction sqlTransac)
{
e.IsFired = true;
FundingLineEvent fL = e as FundingLineEvent;
//_movementSetManagement.AddTransaction(mS, sqlTransac);
}
示例5: CancelFireEvent
public void CancelFireEvent(Event e, SqlTransaction sqlTransac, Loan loanContract, int currencyId)
{
e.CancelDate = new DateTime(
TimeProvider.Now.Year,
TimeProvider.Now.Month,
TimeProvider.Now.Day,
TimeProvider.Now.Hour,
TimeProvider.Now.Minute,
TimeProvider.Now.Second
);
CancelEventOrigination(e, sqlTransac);
}
示例6: CancelSavingsEvent
private void CancelSavingsEvent(Event cancelledEvent, SqlTransaction sqlTransaction)
{
if (cancelledEvent.PaymentMethod != null)
if (cancelledEvent.PaymentMethod.Method == OPaymentMethods.Savings
&&
(cancelledEvent.Code == "RBLE" ||
cancelledEvent.Code == "RGLE" ||
cancelledEvent.Code == "APR" ||
cancelledEvent.Code == "ATR" ||
cancelledEvent.Code == "RRLE" ||
cancelledEvent.Code == "APTR"
)
)
{
int loanEventId = cancelledEvent.ParentId ?? cancelledEvent.Id;
_savingServices.DeleteRepaymentFromSavingEvent(loanEventId, sqlTransaction);
}
}
示例7: SetLoanEvent
private static void SetLoanEvent(OpenCbsCommand c, Event pEvent, int pContractId)
{
c.AddParam("@eventType", pEvent.Code);
c.AddParam("@contractId", pContractId);
c.AddParam("@eventDate", pEvent.Date);
c.AddParam("@userId", pEvent.User.Id);
c.AddParam("@deleted", pEvent.Deleted);
c.AddParam("@tellerId", pEvent.TellerId);
c.AddParam("@parentId", pEvent.ParentId);
c.AddParam("@comment", pEvent.Comment);
}
示例8: Insert
public void Insert(int index, Event e)
{
_list.Insert(index, e);
}
示例9: UpdateCommentForLoanEvent
public void UpdateCommentForLoanEvent(Event pEvent, SqlTransaction pSqlTransac)
{
const string q = @"UPDATE [ContractEvents]
SET [comment] = @comment
WHERE id = @id";
using (OpenCbsCommand c = new OpenCbsCommand(q, pSqlTransac.Connection, pSqlTransac))
{
c.AddParam("@id", pEvent.Id);
c.AddParam("@comment", pEvent.Comment);
c.ExecuteNonQuery();
}
}
示例10: 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");
}
示例11: GetValue
private static OCurrency GetValue(ContractAccountingRule rule, Event eventItem)
{
OCurrency amount = 0;
if (eventItem is SavingEvent)
{
if (rule.EventAttribute.Name.ToLower() == "amount")
{
amount = (eventItem as SavingEvent).Amount;
}
if (rule.EventAttribute.Name.ToLower() == "fees")
{
amount = (eventItem as SavingEvent).Fee;
}
}
if (eventItem.Code == "LODE")
{
var e = (LoanDisbursmentEvent) eventItem;
amount = GetValue(e, rule);
}
if (eventItem.Code == "RGLE" ||
eventItem.Code == "RBLE" ||
eventItem.Code == "APR" ||
eventItem.Code == "ATR" ||
eventItem.Code == "APTR" ||
eventItem.Code == "RRLE")
{
var e = (RepaymentEvent) eventItem;
amount = GetValue(e, rule);
}
if (eventItem.Code == "ROWO")
{
var e = (RepaymentOverWriteOffEvent) eventItem;
amount = GetValue(e, rule);
}
if (eventItem.Code.Substring(0, 3) == "LEE")
{
var e = (LoanEntryFeeEvent) eventItem;
amount = GetValue(e, rule);
}
if (eventItem.Code == "LCIP" || eventItem.Code == "LCIE" || eventItem.Code == "LCIW")
{
var e = (CreditInsuranceEvent) eventItem;
amount = GetValue(e, rule);
}
if (eventItem.Code == "TEET")
{
var e = (TrancheEvent) eventItem;
amount = GetValue(e, rule);
}
if (eventItem.Code == "ROLE")
{
var e = (RescheduleLoanEvent) eventItem;
amount = GetValue(e, rule);
}
if (eventItem.Code == "WROE")
{
var e = (WriteOffEvent) eventItem;
amount = GetValue(e, rule);
}
if (eventItem.Code == "GLBL" ||
eventItem.Code == "LLBL" ||
eventItem.Code == "BLGL" ||
eventItem.Code == "GLLL" ||
eventItem.Code == "BLLL" ||
eventItem.Code == "BLRL" ||
eventItem.Code == "LLGL" ||
eventItem.Code == "BLRL" ||
eventItem.Code == "GLRL" ||
eventItem.Code == "LLRL")
{
var e = (OverdueEvent) eventItem;
amount = GetValue(e, rule);
}
if (eventItem.Code == "LIAE")
{
var e = (AccruedInterestEvent) eventItem;
amount = GetValue(e, rule);
}
if (eventItem.Code == "LLPE")
{
var e = (ProvisionEvent) eventItem;
amount = GetValue(e, rule);
}
if (eventItem is TellerEvent)
{
var e = (TellerEvent) eventItem;
//.........这里部分代码省略.........
示例12: GetBooking
private static Booking GetBooking(ContractAccountingRule rule, Event eventItem)
{
if (eventItem.Code == rule.EventType.EventCode)
{
if ((rule.LoanProduct == null
|| (eventItem.LoanProduct != null && eventItem.LoanProduct.Id == rule.LoanProduct.Id))
&& (rule.SavingProduct == null
|| (eventItem.SavingProduct != null && eventItem.SavingProduct.Id == rule.SavingProduct.Id))
&& (rule.Currency == null
|| (eventItem.Currency != null && eventItem.Currency.Id == rule.Currency.Id))
&& (rule.ClientType == OClientTypes.All
|| eventItem.ClientType == rule.ClientType)
&& (rule.EconomicActivity == null
||
(eventItem.EconomicActivity != null && eventItem.EconomicActivity.Id == rule.EconomicActivity.Id)))
{
var booking = new Booking
{
Amount = GetValue(rule, eventItem),
CreditAccount = rule.CreditAccount,
DebitAccount = rule.DebitAccount,
ContractId = eventItem.ContracId,
Date = eventItem.Date,
EventId = eventItem.Id,
RuleId = rule.Id,
ExchangeRate = 1,
Currency = eventItem.Currency,
Branch = eventItem.Branch,
EventType = eventItem.Code,
Name = eventItem.Description + " [" + eventItem.Date + "]",
Type = eventItem is SavingEvent
? OMovementType.Saving
: eventItem is TellerEvent
? OMovementType.Teller
: OMovementType.Loan
};
return booking;
}
}
return null;
}
示例13: SetLoanTransitionEvent
private static void SetLoanTransitionEvent(OpenCbsCommand c, Event pEvent, OCurrency amount)
{
c.AddParam("@id", pEvent.Id);
c.AddParam("@amount", amount);
}
示例14: Add
/// <summary>
/// Add e to events list and sort list by id
/// </summary>
/// <param name="e"></param>
public void Add(Event e)
{
_list.Add(e);
SortEventsById();
}
示例15: AddLoanEventHead
public int AddLoanEventHead(Event pEvent, int pContractId, SqlTransaction pSqlTransac)
{
const string q = @"INSERT INTO [ContractEvents]
([event_type],
[contract_id],
[event_date],
[user_id],
[is_deleted],
[teller_id],
[parent_id],
[comment])
VALUES
(@eventType,
@contractId,
@eventDate,
@userId,
@deleted,
@tellerId,
@parentId,
@comment)
SELECT SCOPE_IDENTITY()";
using (OpenCbsCommand c = new OpenCbsCommand(q, pSqlTransac.Connection, pSqlTransac))
{
SetLoanEvent(c, pEvent, pContractId);
return int.Parse(c.ExecuteScalar().ToString());
}
}