Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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));
        }
Ejemplo n.º 4
0
        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));
        }
Ejemplo n.º 5
0
        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));
        }
Ejemplo n.º 6
0
        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));
        }
Ejemplo n.º 7
0
        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));
        }
Ejemplo n.º 8
0
        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));
        }