Ejemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("CommissionsPaidProductId,CommissionsPaidId,ProductId,Commission,CreatedDate,CreatedBy,LastUpdateDate,LastUpdatedBy")] CommissionsPaidProduct commissionsPaidProduct)
        {
            if (id != commissionsPaidProduct.CommissionsPaidProductId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(commissionsPaidProduct);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CommissionsPaidProductExists(commissionsPaidProduct.CommissionsPaidProductId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["CommissionsPaidId"] = new SelectList(_context.CommissionsPaids, "CommissionsPaidId", "CommissionsPaidId", commissionsPaidProduct.CommissionsPaidId);
            ViewData["ProductId"]         = new SelectList(_context.Products, "ProductId", "ProductId", commissionsPaidProduct.ProductId);
            return(View(commissionsPaidProduct));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Edit(int id, [Bind("AssociateCommissionId,AssociateId,AssociateCommission1,EffectiveDate,CreatedDate,CreatedBy,LastUpdateDate,LastUpdatedBy,CommissionSplitId")] AssociateCommission associateCommission)
        {
            if (id != associateCommission.AssociateCommissionId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(associateCommission);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AssociateCommissionExists(associateCommission.AssociateCommissionId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["AssociateId"] = new SelectList(_context.Associates, "AssociateId", "AssociateFirstName", associateCommission.AssociateId);
            return(View(associateCommission));
        }
Ejemplo n.º 3
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));
        }
Ejemplo n.º 4
0
        public async Task <IActionResult> Edit(int id, [Bind("ProductId,AssociateId,ApplicationNumber,DateFunded,BorrowerName,TransactionType,ProductDescription,Term,MortgageAmount,TotalFileCommissions,CreatedDate,CreatedBy,LastUpdateDate,LastUpdatedBy")] Product product)
        {
            if (id != product.ProductId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(product);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ProductExists(product.ProductId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["AssociateId"] = new SelectList(_context.Associates, "AssociateId", "AssociateLastName", product.AssociateId);
            return(View(product));
        }
Ejemplo n.º 5
0
        public async Task <IActionResult> Edit(int id, [Bind("AssociateId,AssociateFirstName,AssociateLastName,Company,DateOfPayment,SplitId")] Associate associate)
        {
            if (id != associate.AssociateId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(associate);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AssociateExists(associate.AssociateId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(associate));
        }