Exemplo n.º 1
0
        public async Task <IActionResult> Create([Bind("TokenID,Decimals,Name,ShortName,Contract,IsObserved,PercentForNotification,TotalSupply")] Token token)
        {
            if (ModelState.IsValid)
            {
                _context.Add(token);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(token));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("TrasferID,IncomingAddress,OutgoingAddress,Date,Value,Token,UsdValue")] Transfer transfer)
        {
            if (ModelState.IsValid)
            {
                _context.Add(transfer);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(transfer));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> Create([Bind("TwitterAccountId,Name,LastUpdated,Template")] TwitterAccount twitterAccount)
        {
            if (ModelState.IsValid)
            {
                _context.Add(twitterAccount);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(twitterAccount));
        }
Exemplo n.º 4
0
        public async Task <IActionResult> Create([Bind("NotificationID,Description,Action,DateTime,Value")] Notification notification)
        {
            if (ModelState.IsValid)
            {
                _context.Add(notification);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(notification));
        }
Exemplo n.º 5
0
        public async Task <IActionResult> Create([Bind("UserID,Login,Password")] User user)
        {
            if (ModelState.IsValid)
            {
                _context.Add(user);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(user));
        }
Exemplo n.º 6
0
        public async Task <IActionResult> Create([Bind("ID,Title")] Exchange exchange)
        {
            if (ModelState.IsValid)
            {
                exchange.NotifyOnNextUpdate = false;
                _context.Add(exchange);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(exchange));
        }
Exemplo n.º 7
0
        public async Task <IActionResult> Create([Bind("WalletID,Name,Address,Comment,ExchangeId")] Wallet wallet)
        {
            if (ModelState.IsValid)
            {
                _context.Add(wallet);
                if (wallet.Exchange != null)
                {
                    wallet.Exchange.NotifyOnNextUpdate = false;
                }

                wallet.Exchange = GetExhangeById(wallet.ExchangeId == null ? 0 : (int)wallet.ExchangeId);
                if (wallet.Exchange == null)
                {
                    wallet.ExchangeId = null;
                }

                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ExchangesDropDownList(wallet.Exchange);
            return(View(wallet));
        }