public ActionResult DeleteConfirmed(long id) { MonetaryAmountTypesPost monetaryamounttypes = _monetaryamounttypesService.GetPost(id); monetaryamounttypes.UserName = User.Identity.Name; _monetaryamounttypesService.Delete(monetaryamounttypes); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind("ixMonetaryAmountType,sMonetaryAmountType,sMonetaryAmountTypeCode")] MonetaryAmountTypesPost monetaryamounttypes) { if (ModelState.IsValid) { monetaryamounttypes.UserName = User.Identity.Name; _monetaryamounttypesService.Edit(monetaryamounttypes); return(RedirectToAction("Index")); } return(View(monetaryamounttypes)); }
public ActionResult Edit(long id) { MonetaryAmountTypesPost monetaryamounttypes = _monetaryamounttypesService.GetPost(id); if (monetaryamounttypes == null) { return(NotFound()); } return(View(monetaryamounttypes)); }
public Task Delete(MonetaryAmountTypesPost monetaryamounttypesPost) { // Additional validations // Pre-process // Process this._monetaryamounttypesRepository.RegisterDelete(monetaryamounttypesPost); try { this._monetaryamounttypesRepository.Commit(); } catch (Exception ex) { this._monetaryamounttypesRepository.Rollback(); // Log exception throw; } // Post-process return(Task.CompletedTask); }
public Task <Int64> Create(MonetaryAmountTypesPost monetaryamounttypesPost) { // Additional validations // Pre-process // Process this._monetaryamounttypesRepository.RegisterCreate(monetaryamounttypesPost); try { this._monetaryamounttypesRepository.Commit(); } catch (Exception ex) { this._monetaryamounttypesRepository.Rollback(); // Log exception throw; } // Post-process return(Task.FromResult(monetaryamounttypesPost.ixMonetaryAmountType)); }
public void RegisterDelete(MonetaryAmountTypesPost monetaryamounttypesPost) { _context.MonetaryAmountTypesPost.Remove(monetaryamounttypesPost); }
public void RegisterEdit(MonetaryAmountTypesPost monetaryamounttypesPost) { _context.Entry(monetaryamounttypesPost).State = EntityState.Modified; }
public void RegisterCreate(MonetaryAmountTypesPost monetaryamounttypesPost) { _context.MonetaryAmountTypesPost.Add(monetaryamounttypesPost); }