当前位置: 首页>>代码示例>>C#>>正文


C# IDalSession.GetServerTime方法代码示例

本文整理汇总了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;
//.........这里部分代码省略.........
开发者ID:kiquenet,项目名称:B4F,代码行数:101,代码来源:ImportAccountsAdapter.cs


注:本文中的IDalSession.GetServerTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。