public async Task <IActionResult> Create([Bind("ID,MemberState,WhenCreated")] Member member) { if (ModelState.IsValid) { _context.Add(member); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(member)); }
public async Task <IActionResult> Create([Bind("ID")] ExchangeRate exchangeRate) { if (ModelState.IsValid) { _context.Add(exchangeRate); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(exchangeRate)); }
public async Task <IActionResult> Create([Bind("ID,PaymentState,FromAccountID,ToAccountID,WhenProposed,WhenAccepted,WhenDeclined,RefundPaymentID")] Payment payment) { if (ModelState.IsValid) { _context.Add(payment); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(payment)); }
public async Task <IActionResult> Create([Bind("ID,BankNoteState,Printed")] Voucher voucher) { if (ModelState.IsValid) { _context.Add(voucher); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(voucher)); }
public async Task <IActionResult> Create([Bind("ID,CurrencyState,Name,WhenCreated")] Currency currency) { if (ModelState.IsValid) { _context.Add(currency); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(currency)); }
public async Task <IActionResult> Create([Bind("ID,AccountState,MemberID,CurrencyID,WhenCreated")] Account account) { if (ModelState.IsValid) { _context.Add(account); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["CurrencyID"] = new SelectList(_context.Currency, "ID", "ID", account.CurrencyID); return(View(account)); }
public async Task <IActionResult> Create([Bind("ID,MemberDetailsState,FirstName,LastName,Address1,Address2,City,State,CountryCode,ZipCode,WhenCreated,MemberID")] MemberDetail memberDetails) { if (ModelState.IsValid) { _context.Add(memberDetails); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["MemberID"] = new SelectList(_context.Member, "ID", "ID", memberDetails.MemberID); return(View(memberDetails)); }
public async Task <IActionResult> Create([Bind("ID,BankNoteAccountLutState,BankNoteID,AccountID")] VoucherAccountLut voucherAccountLut) { if (ModelState.IsValid) { _context.Add(voucherAccountLut); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["AccountID"] = new SelectList(_context.Account, "ID", "ID", voucherAccountLut.AccountID); ViewData["BankNoteID"] = new SelectList(_context.Voucher, "ID", "ID", voucherAccountLut.BankNoteID); return(View(voucherAccountLut)); }