Beispiel #1
0
        /// <summary>
        /// 根据账户ID获取账户个人信息
        /// </summary>
        /// <param name="ProfessionInfoPersonalInformationId">个人信息中的开户者信息ID</param>
        /// <returns></returns>
        public PersonalInformation GetPersonalInformationByProfessionInfoPersonalInformationId(string ProfessionInfoPersonalInformationId)
        {
            PersonalInformation account = null;

            account = new PersonalInformationDAL().GetPersonalInformationByInformationId(ProfessionInfoPersonalInformationId);

            return(account);
        }
Beispiel #2
0
        /// <summary>
        /// 开设真实账户,录入信息到数据库
        /// </summary>
        /// <param name="account">用户基础信息</param>
        /// <param name="profe">开户者职业信息</param>
        /// <param name="personalInfo">个人信息</param>
        /// <param name="tradingInfo">从事交易信息</param>
        /// <returns>返回录入结果</returns>
        public int ApplyForLiveAccount(Account account, ProfessionInfo profe, PersonalInformation personalInfo)
        {
            try
            {
                //个人信息
                personalInfo = new PersonalInformationDAL().AddPersonalInformation(personalInfo);
                if (personalInfo == null)
                {
                    return(0);
                }

                profe.PersonalInformationId = personalInfo.InformationId;

                //雇主信息
                profe = new ProfessionInfoDAL().AddProfessionInfo(profe);
                if (profe == null)
                {
                    return(0);
                }

                //基础信息

                account.InformationId = profe.ProfessionInfoId;
                account = new AccountDAL().AddAccount(account);
                if (account == null)
                {
                    return(0);
                }


                return(account.AccountId);
            }
            catch (Exception)
            {
                return(0);
            }
        }