Пример #1
0
        public async Task <IActionResult> Edit(int id, [Bind("CommissionsPaidId,DatePaid,CommissionType,PaymentType,ChequeNumber,CreatedDate,CreatedBy,LastUpdateDate,LastUpdatedBy")] CommissionsPaid commissionsPaid)
        {
            if (id != commissionsPaid.CommissionsPaidId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(commissionsPaid);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CommissionsPaidExists(commissionsPaid.CommissionsPaidId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(commissionsPaid));
        }
Пример #2
0
        public async Task <IActionResult> Create([Bind("CommissionsPaidId,DatePaid,CommissionType,PaymentType,ChequeNumber,CreatedDate,CreatedBy,LastUpdateDate,LastUpdatedBy")] CommissionsPaid commissionsPaid, [Bind("ProductId,AssociateId,ApplicationNumber,DateFunded,BorrowerName,TransactionType,ProductDescription,Term,MortgageAmount,TotalFileCommissions,CreatedDate,CreatedBy,LastUpdateDate,LastUpdatedBy")] Product product)
        {
            if (ModelState.IsValid)
            {
                _context.Add(product);
                _context.Add(commissionsPaid);
                await _context.SaveChangesAsync();

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

            return(View(commissionsPaid));
        }