本文整理汇总了C#中IDalSession.GetServerTime方法的典型用法代码示例。如果您正苦于以下问题:C# IDalSession.GetServerTime方法的具体用法?C# IDalSession.GetServerTime怎么用?C# IDalSession.GetServerTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDalSession
的用法示例。
在下文中一共展示了IDalSession.GetServerTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: processAanvraag
private static ICustomerAccount processAanvraag(IDalSession session, IEGAccount acc)
{
IEGAanvraag aacReq = acc.AccountRequest;
//Most Important ... Manage Contact First
IContact primary = null;
IContact secondary = null;
DateTime creationdate = session.GetServerTime();
if (aacReq.IsPersonalAccount)
{
primary = CreateContactPerson(session, aacReq.SOFI,
aacReq.Voorletters,
aacReq.Tussenvoegsels,
aacReq.Naam,
aacReq.PostalAddress,
aacReq.ResidentialAddress1,
aacReq.ContactDetails1,
aacReq.PrimaryGender,
aacReq.Nationality1,
aacReq.Identification1,
aacReq.Geboortedatum,
acc.AssetManager,
creationdate);
if (aacReq.IsDualAccount)
secondary = CreateContactPerson(session, aacReq.PSOFI,
aacReq.PVoorletters,
aacReq.PTussenvoegsels,
aacReq.PNaam,
aacReq.PostalAddress,
aacReq.ResidentialAddress2,
aacReq.ContactDetails2,
aacReq.SecondaryGender,
aacReq.Nationality2,
aacReq.Identification2,
aacReq.PGeboortedatum,
acc.AssetManager,
creationdate);
}
else
{
primary = CreateContactCompany(session, aacReq.KVK,
aacReq.BNaam,
aacReq.PostalAddress,
aacReq.BAddress,
aacReq.BContactDetails,
aacReq.DatumOprichting,
acc.AssetManager,
creationdate);
// contact person on company
secondary = CreateContactPerson(session, aacReq.SOFI,
aacReq.Voorletters,
aacReq.Tussenvoegsels,
aacReq.Naam,
aacReq.PostalAddress,
aacReq.ResidentialAddress1,
aacReq.ContactDetails1,
aacReq.PrimaryGender,
aacReq.Nationality1,
aacReq.Identification1,
aacReq.Geboortedatum,
acc.AssetManager,
creationdate);
}
ICounterAccount counterAccount = CreateCounterAccount(session, primary, acc);
// store contacts
B4F.TotalGiro.CRM.ContactMapper.Update(session, primary);
if (secondary != null) B4F.TotalGiro.CRM.ContactMapper.Update(session, secondary);
// check for contactperson on company
if (!aacReq.IsPersonalAccount && secondary != null)
{
ICompanyContactPerson compContactPerson = new CompanyContactPerson((IContactPerson)secondary, (IContactCompany)primary);
if (!((IContactCompany)primary).CompanyContacts.Contains(compContactPerson))
{
((IContactCompany)primary).CompanyContacts.Add(compContactPerson);
ContactMapper.Update(session, primary);
}
}
// get the family
IAccountFamily family = AccountFamilyMapper.GetAccountFamily(session, acc.NummerPreFix);
ICustomerAccount newAcc = CreateAccount(acc, creationdate, family);
//add as accountHolders
newAcc.AccountHolders.Add(new AccountHolder(newAcc, primary));
newAcc.AccountHolders.SetPrimaryAccountHolder(primary);
if (secondary != null)
{
newAcc.AccountHolders.Add(new AccountHolder(newAcc, secondary));
secondary.CounterAccounts.Add(newAcc.CounterAccount);
}
//Add CounterAccount
newAcc.CounterAccount = counterAccount;
//.........这里部分代码省略.........