コード例 #1
0
 public ActionResult PaymentAccountUpdate(VM_PaymentAccount paymentAccount)
 {
     if (_DL.PaymentAccount.Get.ByID((int)paymentAccount.AccountID) == null)
     {
         throw new PaymentAccountNotFoundException();
     }
     return(GetJson(_DL.PaymentAccount.Update.UpdateAccount(paymentAccount)));
 }
コード例 #2
0
        public ActionResult PaymentAccountAdd(VM_PaymentAccount paymentAccount)
        {
            paymentAccount.User            = CurrentUser;
            paymentAccount.AccountTypeName = paymentAccount.AccountType.ToString();
            switch (paymentAccount.AccountType)
            {
            case En_AccountType.Bitcoin:
            case En_AccountType.PayPal:
            case En_AccountType.WebMoney:
                return(GetJson(_DL.PaymentAccount.Add.New(paymentAccount)));

            default: throw new IncorrectPaymentAccountTypeException();
            }
        }
コード例 #3
0
                public static int UpdateAccount(VM_PaymentAccount account)
                {
                    using (var exodusDB = new exodusEntities())
                    {
                        var rez = new ObjectParameter("Result", 0);

                        exodusDB.stp_User_Account_Update(
                            accountID: account.AccountID,
                            accountValue: account.AccountDetails,
                            result: rez
                            );

                        return(Convert.ToInt32(rez.Value));
                    }
                }
コード例 #4
0
                public static long New(VM_PaymentAccount account)
                {
                    using (var exodusDB = new exodusEntities())
                    {
                        var accountID = new ObjectParameter("AccountID", 0);

                        exodusDB.stp_User_Account_Add(
                            userID: account.User.UserID,
                            accountTypeID: (int)account.AccountType,
                            accountValue: account.AccountDetails,
                            accountID: accountID
                            );

                        return(Convert.ToInt64(accountID.Value));
                    }
                }