public bool SaveDeposit(vault_depositits deposit)
        {
            var depositRepository = new DepositRepository();
            depositRepository.InsertDeposit(deposit);

            return true;
        }
        public ActionResult DepositMoney(DepositViewModel model)
        {
            var _userLogic = new UserLogic();
            if (ModelState.IsValid)
            {

                var deposit = new vault_depositits()
                                           {
                                               usr_det_id = _userLogic.GetUserIdByUserName(HttpContext.User.Identity.Name),
                                               vau_dep_timestamp = DateTime.Now,
                                               vau_dep_amount = model.Amount,
                                           };

                bool success = new DepositLogic().SaveDeposit(deposit);
                if (success)
                {
                    model.Message = "Success!";
                }
                else
                {
                    model.Message = "Error!";
                }
            }
            ModelState.Clear();
            model.Balance = _userLogic.GetBalanceByUserId(_userLogic.GetUserIdByUserName(HttpContext.User.Identity.Name)).ToString("N");
            return View(model);
        }
 public void InsertDeposit()
 {
     var deposit = new vault_depositits()
     {
         vau_dep_amount = 100,
         vau_dep_timestamp = DateTime.Now,
         usr_det_id = 1
     };
     _depLogic.SaveDeposit(deposit);
 }
 public int InsertDeposit(vault_depositits deposit)
 {
     db.vault_depositits.Add(deposit);
     return db.SaveChanges();
 }