Exemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("ProviderTradingProfileID,ProviderTradingProfileName,AmountReceivable,CurrencyName2,AmountReceivableUSD,Rate")] ReportAccountReceivable reportAccountReceivable)
        {
            if (id != reportAccountReceivable.ProviderTradingProfileID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(reportAccountReceivable);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ReportAccountReceivableExists(reportAccountReceivable.ProviderTradingProfileID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(reportAccountReceivable));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("ProviderTradingProfileID,ProviderTradingProfileName,AmountReceivable,CurrencyName2,AmountReceivableUSD,Rate")] ReportAccountReceivable reportAccountReceivable)
        {
            if (ModelState.IsValid)
            {
                _context.Add(reportAccountReceivable);
                await _context.SaveChangesAsync();

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