Exemplo n.º 1
0
        public static int insertAccountInfo(BankAccounts ObjBAcc, int UserId = 0)
        {
            List <SqlParameter> prm = new List <SqlParameter>();

            try
            {
                using (DbManager DB = DbManager.GetDbManager())
                {
                    prm.Add(DB.MakeInParam("@intbankaccounttypeid", SqlDbType.Int, 0, ObjBAcc._bankaccounttypeid));
                    prm.Add(DB.MakeInParam("@bankName", SqlDbType.NVarChar, 120, ObjBAcc.BankName));
                    prm.Add(DB.MakeInParam("@branch", SqlDbType.NVarChar, 120, ObjBAcc.BranchName));
                    prm.Add(DB.MakeInParam("@accountTitle", SqlDbType.NVarChar, 120, ObjBAcc.AccountTitle));
                    prm.Add(DB.MakeInParam("@accountNumber", SqlDbType.NVarChar, 120, ObjBAcc.AccountNumber));
                    prm.Add(DB.MakeInParam("@routingNumber", SqlDbType.NVarChar, 120, ObjBAcc.RoutingNumber));
                    prm.Add(DB.MakeInParam("@IBANNumber", SqlDbType.NVarChar, 120, ObjBAcc.IBANNumber));
                    prm.Add(DB.MakeInParam("@swiftCode", SqlDbType.NVarChar, 120, ObjBAcc.SwiftCode));
                    prm.Add(DB.MakeInParam("@streetName", SqlDbType.NVarChar, 150, ObjBAcc.StreetName));
                    prm.Add(DB.MakeInParam("@streetNumber", SqlDbType.NVarChar, 50, ObjBAcc.StreetNumber));
                    prm.Add(DB.MakeInParam("@city", SqlDbType.NVarChar, 75, ObjBAcc.City));
                    prm.Add(DB.MakeInParam("@zipCode", SqlDbType.NVarChar, 10, ObjBAcc.ZipCode));
                    prm.Add(DB.MakeInParam("@primaryPhone", SqlDbType.NVarChar, 20, ObjBAcc.PrimaryPhone));
                    prm.Add(DB.MakeInParam("@stateid", SqlDbType.Int, 4, ObjBAcc.StateId));
                    prm.Add(DB.MakeInParam("@intUserId", SqlDbType.Int, 0, UserId));
                    prm.Add(DB.MakeInParam("@IsETF", SqlDbType.Bit, 0, ObjBAcc._isetf));


                    DB.RunProc("up_InsertBankAccounts", prm.ToArray());
                }
            }
            catch (Exception ex)
            {
                new SqlLog().InsertSqlLog(0, "BankAccounts.InsertAccountInfo", ex);
            }

            return(0);
        }
Exemplo n.º 2
0
        public static int insertAccountInfo(BankAccounts ObjBAcc, int UserId = 0)
        {
            List<SqlParameter> prm = new List<SqlParameter>();
            try
            {
                using (DbManager DB = DbManager.GetDbManager())
                {

                    prm.Add(DB.MakeInParam("@intbankaccounttypeid", SqlDbType.Int, 0, ObjBAcc._bankaccounttypeid));
                    prm.Add(DB.MakeInParam("@bankName", SqlDbType.NVarChar, 120, ObjBAcc.BankName));
                    prm.Add(DB.MakeInParam("@branch", SqlDbType.NVarChar, 120, ObjBAcc.BranchName));
                    prm.Add(DB.MakeInParam("@accountTitle", SqlDbType.NVarChar, 120, ObjBAcc.AccountTitle));
                    prm.Add(DB.MakeInParam("@accountNumber", SqlDbType.NVarChar, 120, ObjBAcc.AccountNumber));
                    prm.Add(DB.MakeInParam("@routingNumber", SqlDbType.NVarChar, 120, ObjBAcc.RoutingNumber));
                    prm.Add(DB.MakeInParam("@IBANNumber", SqlDbType.NVarChar, 120, ObjBAcc.IBANNumber));
                    prm.Add(DB.MakeInParam("@swiftCode", SqlDbType.NVarChar, 120, ObjBAcc.SwiftCode));
                    prm.Add(DB.MakeInParam("@streetName", SqlDbType.NVarChar, 150, ObjBAcc.StreetName));
                    prm.Add(DB.MakeInParam("@streetNumber", SqlDbType.NVarChar, 50, ObjBAcc.StreetNumber));
                    prm.Add(DB.MakeInParam("@city", SqlDbType.NVarChar, 75, ObjBAcc.City));
                    prm.Add(DB.MakeInParam("@zipCode", SqlDbType.NVarChar, 10, ObjBAcc.ZipCode));
                    prm.Add(DB.MakeInParam("@primaryPhone", SqlDbType.NVarChar, 20, ObjBAcc.PrimaryPhone));
                    prm.Add(DB.MakeInParam("@stateid", SqlDbType.Int, 4, ObjBAcc.StateId));
                    prm.Add(DB.MakeInParam("@intUserId", SqlDbType.Int, 0, UserId));
                    prm.Add(DB.MakeInParam("@IsETF", SqlDbType.Bit, 0, ObjBAcc._isetf));


                    DB.RunProc("up_InsertBankAccounts", prm.ToArray());
                }
            }
            catch (Exception ex)
            {

                new SqlLog().InsertSqlLog(0, "BankAccounts.InsertAccountInfo", ex);
            }

            return 0;
        }