Example #1
0
        public async Task <IActionResult> Edit(int id, [Bind("Payment_ID,Party_Name,Mobile,Qty,Amount,Paid_Amt,Status,Payment_Edate")] Payment_Master payment_Master)
        {
            if (id != payment_Master.Payment_ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(payment_Master);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Payment_MasterExists(payment_Master.Payment_ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(payment_Master));
        }
Example #2
0
        public async Task <IActionResult> Create([Bind("Payment_ID,Party_Name,Mobile,Qty,Amount,Paid_Amt,Status,Payment_Edate")] Payment_Master payment_Master)
        {
            if (ModelState.IsValid)
            {
                _context.Add(payment_Master);
                await _context.SaveChangesAsync();

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