Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(long id)
        {
            InvoicePurchaseLineTaxAmountsPost invoicepurchaselinetaxamounts = _invoicepurchaselinetaxamountsService.GetPost(id);

            invoicepurchaselinetaxamounts.UserName = User.Identity.Name;
            _invoicepurchaselinetaxamountsService.Delete(invoicepurchaselinetaxamounts);
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        public ActionResult Edit([Bind("ixInvoicePurchaseLineTaxAmount,sInvoicePurchaseLineTaxAmount,ixInvoicePurchaseLineAmount,ixTax,mAmount,ixCurrency")] InvoicePurchaseLineTaxAmountsPost invoicepurchaselinetaxamounts)
        {
            if (ModelState.IsValid)
            {
                invoicepurchaselinetaxamounts.UserName = User.Identity.Name;
                _invoicepurchaselinetaxamountsService.Edit(invoicepurchaselinetaxamounts);
                return(RedirectToAction("Index"));
            }
            ViewBag.ixCurrency = new SelectList(_invoicepurchaselinetaxamountsService.selectCurrencies().Select(x => new { x.ixCurrency, x.sCurrency }), "ixCurrency", "sCurrency", invoicepurchaselinetaxamounts.ixCurrency);
            ViewBag.ixInvoicePurchaseLineAmount = new SelectList(_invoicepurchaselinetaxamountsService.selectInvoicePurchaseLineAmounts().Select(x => new { x.ixInvoicePurchaseLineAmount, x.sInvoicePurchaseLineAmount }), "ixInvoicePurchaseLineAmount", "sInvoicePurchaseLineAmount", invoicepurchaselinetaxamounts.ixInvoicePurchaseLineAmount);
            ViewBag.ixTax = new SelectList(_invoicepurchaselinetaxamountsService.selectTaxes().Select(x => new { x.ixTax, x.sTax }), "ixTax", "sTax", invoicepurchaselinetaxamounts.ixTax);

            return(View(invoicepurchaselinetaxamounts));
        }
Exemplo n.º 3
0
        public ActionResult Edit(long id)
        {
            InvoicePurchaseLineTaxAmountsPost invoicepurchaselinetaxamounts = _invoicepurchaselinetaxamountsService.GetPost(id);

            if (invoicepurchaselinetaxamounts == null)
            {
                return(NotFound());
            }
            ViewBag.ixCurrency = new SelectList(_invoicepurchaselinetaxamountsService.selectCurrencies().Select(x => new { x.ixCurrency, x.sCurrency }), "ixCurrency", "sCurrency", invoicepurchaselinetaxamounts.ixCurrency);
            ViewBag.ixInvoicePurchaseLineAmount = new SelectList(_invoicepurchaselinetaxamountsService.selectInvoicePurchaseLineAmounts().Select(x => new { x.ixInvoicePurchaseLineAmount, x.sInvoicePurchaseLineAmount }), "ixInvoicePurchaseLineAmount", "sInvoicePurchaseLineAmount", invoicepurchaselinetaxamounts.ixInvoicePurchaseLineAmount);
            ViewBag.ixTax = new SelectList(_invoicepurchaselinetaxamountsService.selectTaxes().Select(x => new { x.ixTax, x.sTax }), "ixTax", "sTax", invoicepurchaselinetaxamounts.ixTax);

            return(View(invoicepurchaselinetaxamounts));
        }
        public Task Delete(InvoicePurchaseLineTaxAmountsPost invoicepurchaselinetaxamountsPost)
        {
            // Additional validations

            // Pre-process

            // Process
            this._invoicepurchaselinetaxamountsRepository.RegisterDelete(invoicepurchaselinetaxamountsPost);
            try
            {
                this._invoicepurchaselinetaxamountsRepository.Commit();
            }
            catch (Exception ex)
            {
                this._invoicepurchaselinetaxamountsRepository.Rollback();
                // Log exception
                throw;
            }

            // Post-process

            return(Task.CompletedTask);
        }
        public Task <Int64> Create(InvoicePurchaseLineTaxAmountsPost invoicepurchaselinetaxamountsPost)
        {
            // Additional validations

            // Pre-process

            // Process
            this._invoicepurchaselinetaxamountsRepository.RegisterCreate(invoicepurchaselinetaxamountsPost);
            try
            {
                this._invoicepurchaselinetaxamountsRepository.Commit();
            }
            catch (Exception ex)
            {
                this._invoicepurchaselinetaxamountsRepository.Rollback();
                // Log exception
                throw;
            }

            // Post-process

            return(Task.FromResult(invoicepurchaselinetaxamountsPost.ixInvoicePurchaseLineTaxAmount));
        }
 public void RegisterDelete(InvoicePurchaseLineTaxAmountsPost invoicepurchaselinetaxamountsPost)
 {
     _context.InvoicePurchaseLineTaxAmountsPost.Remove(invoicepurchaselinetaxamountsPost);
 }
 public void RegisterEdit(InvoicePurchaseLineTaxAmountsPost invoicepurchaselinetaxamountsPost)
 {
     _context.Entry(invoicepurchaselinetaxamountsPost).State = EntityState.Modified;
 }
 public void RegisterCreate(InvoicePurchaseLineTaxAmountsPost invoicepurchaselinetaxamountsPost)
 {
     _context.InvoicePurchaseLineTaxAmountsPost.Add(invoicepurchaselinetaxamountsPost);
 }