public ActionResult DeleteConfirmed(long id) { PaymentAddressesPost paymentaddresses = _paymentaddressesService.GetPost(id); paymentaddresses.UserName = User.Identity.Name; _paymentaddressesService.Delete(paymentaddresses); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind("ixPaymentAddress,sPaymentAddress,sStreetAndNumberOrPostOfficeBoxOne,sStreetAndNumberOrPostOfficeBoxTwo,sCityOrSuburb,sCountrySubDivisionCode,sZipOrPostCode,sCountryCode")] PaymentAddressesPost paymentaddresses) { if (ModelState.IsValid) { paymentaddresses.UserName = User.Identity.Name; _paymentaddressesService.Edit(paymentaddresses); return(RedirectToAction("Index")); } return(View(paymentaddresses)); }
public ActionResult Edit(long id) { PaymentAddressesPost paymentaddresses = _paymentaddressesService.GetPost(id); if (paymentaddresses == null) { return(NotFound()); } return(View(paymentaddresses)); }
public Task Delete(PaymentAddressesPost paymentaddressesPost) { // Additional validations // Pre-process // Process this._paymentaddressesRepository.RegisterDelete(paymentaddressesPost); try { this._paymentaddressesRepository.Commit(); } catch (Exception ex) { this._paymentaddressesRepository.Rollback(); // Log exception throw; } // Post-process return(Task.CompletedTask); }
public Task <Int64> Create(PaymentAddressesPost paymentaddressesPost) { // Additional validations // Pre-process // Process this._paymentaddressesRepository.RegisterCreate(paymentaddressesPost); try { this._paymentaddressesRepository.Commit(); } catch (Exception ex) { this._paymentaddressesRepository.Rollback(); // Log exception throw; } // Post-process return(Task.FromResult(paymentaddressesPost.ixPaymentAddress)); }
public void RegisterDelete(PaymentAddressesPost paymentaddressesPost) { _context.PaymentAddressesPost.Remove(paymentaddressesPost); }
public void RegisterEdit(PaymentAddressesPost paymentaddressesPost) { _context.Entry(paymentaddressesPost).State = EntityState.Modified; }
public void RegisterCreate(PaymentAddressesPost paymentaddressesPost) { _context.PaymentAddressesPost.Add(paymentaddressesPost); }