예제 #1
0
        public async Task <IActionResult> Dopayment(string username, int persons, string startdate, string email, string city, string payments)
        {
            ViewBag.amt = TempData["amount1"];
            int total = persons * (int)TempData["amount1"];

            HttpContext.Session.SetInt32(SessionAmt1, total);
            string total1 = total.ToString();

            var transaction = new  Booking {
                PackageName = (string)TempData["packagename"], NumberofPersons = persons, JourneyDate = startdate, email = email, city = city, PaymentMethod = payments, Amount = total1, status = "Failed"
            };

            _context.Add(transaction);
            await _context.SaveChangesAsync();

            ViewBag.total = total;

            /*ViewBag.name = username;
             * ViewBag.method = payments;
             * ViewBag.person = persons;*/
            if (payments == "card")
            {
                return(View("Dopayment"));
            }

            return(View("Netbanking"));
        }
예제 #2
0
        public async Task <IActionResult> Create([Bind("BookingID,PackageName,NumberofPersons,JourneyDate,email,city,PaymentMethod,Amount,status")] Booking booking)
        {
            if (ModelState.IsValid)
            {
                _context.Add(booking);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(booking));
        }
예제 #3
0
        public async Task <IActionResult> Create([Bind("ID,CardNumber,month,year,CVV,mailid,balance")] Dcard dcard)
        {
            if (ModelState.IsValid)
            {
                _context.Add(dcard);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(dcard));
        }
        public async Task <IActionResult> Create([Bind("ID,Username,Password,balance,Bank")] Netbanking netbanking)
        {
            if (ModelState.IsValid)
            {
                _context.Add(netbanking);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(netbanking));
        }
예제 #5
0
        public async Task <IActionResult> Create([Bind("PackagesID,Name,Places,Amount,discount,Duration,Facilities,Description")] packages packages)
        {
            if (ModelState.IsValid)
            {
                _context.Add(packages);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(packages));
        }