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)); }
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)); }
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)); }
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)); }
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)); }
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)); }
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)); }