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