Esempio n. 1
0
        private static ICustomerAccount CreateAccount(IEGAccount egAccount, DateTime creationDate, IAccountFamily family)
        {
            ICustomerAccount newAcc = new CustomerAccount(egAccount.Nummer, egAccount.AccountRequest.AccountName,
                                                egAccount.AssetManager, egAccount.AccountRequest.ModelPortfolio, creationDate);

            newAcc.Family = family;
            IEGAanvraag aacRequest = egAccount.AccountRequest;

            Decimal firstDeposit = 0m;
            if (decimal.TryParse(egAccount.AccountRequest.EersteInleg, out firstDeposit))
                newAcc.FirstPromisedDeposit = new B4F.TotalGiro.Instruments.Money(firstDeposit, newAcc.BaseCurrency);
            newAcc.ValuationsRequired = true;
            newAcc.IsExecOnlyCustomer = egAccount.AccountRequest.IsExecutionOnly;
            return newAcc;
        }
Esempio n. 2
0
        public static string GetNewAccountNumber(IDalSession session, IAccountFamily accountFamily)
        {
            string prefix = accountFamily.AccountPrefix;
            //string accountNumber = "";

            SqlConnection sa = (SqlConnection)session.Connection;

            SqlCommand comm = new SqlCommand("TG_CreateAccountNumber", sa);
            comm.CommandType = CommandType.StoredProcedure;

            SqlParameter cmdParamIn = new SqlParameter( "AccountPrefix", prefix);
            comm.Parameters.Add(cmdParamIn);

            SqlParameter cmdParamOut = new SqlParameter("AccountNumber", SqlDbType.VarChar, 30);
            cmdParamOut.Direction = ParameterDirection.Output;
            comm.Parameters.Add(cmdParamOut);

            SqlDataReader myReader = comm.ExecuteReader();
            return cmdParamOut.Value.ToString();
        }