Example #1
0
        public IActionResult OnGet()
        {
            OutgoingPayment = new OutgoingPayment();

            ViewData["PaymentFormId"]    = new SelectList(_context.PaymentForms, "Id", "Name");
            ViewData["PaymentTypeId"]    = new SelectList(_context.PaymentTypes, "Id", "Name");
            ViewData["PartnerCompanyId"] = new SelectList(_context.PartnerCompanies, "Id", "Name");

            return(Page());
        }
Example #2
0
        public async Task <IActionResult> OnPostAsync(Guid?outgoingPaymentId)
        {
            if (outgoingPaymentId == null)
            {
                return(NotFound());
            }

            OutgoingPayment = await _context.OutgoingPayments.FindAsync(outgoingPaymentId);

            if (OutgoingPayment != null)
            {
                _context.OutgoingPayments.Remove(OutgoingPayment);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("../Index"));
        }
Example #3
0
        public async Task <IActionResult> OnGetAsync(Guid?outgoingPaymentId)
        {
            if (outgoingPaymentId == null)
            {
                return(NotFound());
            }

            OutgoingPayment = await _context.OutgoingPayments
                              .Include(o => o.PaymentForm)
                              .Include(o => o.PaymentType)
                              .Include(o => o.Order)
                              .Include(o => o.PartnerCompany).FirstOrDefaultAsync(m => m.Id == outgoingPaymentId);

            if (OutgoingPayment == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Example #4
0
        public async Task <IActionResult> OnGetAsync(Guid?outgoingPaymentId)
        {
            if (outgoingPaymentId == null)
            {
                return(NotFound());
            }

            OutgoingPayment = await _context.OutgoingPayments
                              .Include(p => p.PaymentForm)
                              .Include(p => p.PaymentType)
                              .Include(p => p.PartnerCompany)
                              .FirstOrDefaultAsync(m => m.Id == outgoingPaymentId);

            if (OutgoingPayment == null)
            {
                return(NotFound());
            }

            ViewData["OrderId"]          = TempData.Peek("OrderId");
            ViewData["PaymentFormId"]    = new SelectList(_context.PaymentForms, "Id", "Name");
            ViewData["PaymentTypeId"]    = new SelectList(_context.PaymentTypes, "Id", "Name");
            ViewData["PartnerCompanyId"] = new SelectList(_context.PartnerCompanies, "Id", "Name");
            return(Page());
        }