public ActionResult DeleteConfirmed(long id) { HandlingUnitsShippingPost handlingunitsshipping = _handlingunitsshippingService.GetPost(id); handlingunitsshipping.UserName = User.Identity.Name; _handlingunitsshippingService.Delete(handlingunitsshipping); return(RedirectToAction("Index")); }
public ActionResult Edit(long id) { HandlingUnitsShippingPost handlingunitsshipping = _handlingunitsshippingService.GetPost(id); if (handlingunitsshipping == null) { return(NotFound()); } ViewBag.ixHandlingUnit = new SelectList(_handlingunitsshippingService.selectHandlingUnits().Select(x => new { x.ixHandlingUnit, x.sHandlingUnit }), "ixHandlingUnit", "sHandlingUnit", handlingunitsshipping.ixHandlingUnit); ViewBag.ixStatus = new SelectList(_handlingunitsshippingService.selectStatuses().Select(x => new { x.ixStatus, x.sStatus }), "ixStatus", "sStatus", handlingunitsshipping.ixStatus); return(View(handlingunitsshipping)); }
public ActionResult Edit([Bind("ixHandlingUnitShipping,sHandlingUnitShipping,ixHandlingUnit,ixStatus")] HandlingUnitsShippingPost handlingunitsshipping) { if (ModelState.IsValid) { handlingunitsshipping.UserName = User.Identity.Name; _handlingunitsshippingService.Edit(handlingunitsshipping); return(RedirectToAction("Index")); } ViewBag.ixHandlingUnit = new SelectList(_handlingunitsshippingService.selectHandlingUnits().Select(x => new { x.ixHandlingUnit, x.sHandlingUnit }), "ixHandlingUnit", "sHandlingUnit", handlingunitsshipping.ixHandlingUnit); ViewBag.ixStatus = new SelectList(_handlingunitsshippingService.selectStatuses().Select(x => new { x.ixStatus, x.sStatus }), "ixStatus", "sStatus", handlingunitsshipping.ixStatus); return(View(handlingunitsshipping)); }
public Task Delete(HandlingUnitsShippingPost handlingunitsshippingPost) { // Additional validations // Pre-process // Process this._handlingunitsshippingRepository.RegisterDelete(handlingunitsshippingPost); try { this._handlingunitsshippingRepository.Commit(); } catch (Exception ex) { this._handlingunitsshippingRepository.Rollback(); // Log exception throw; } // Post-process return(Task.CompletedTask); }
public Task <Int64> Create(HandlingUnitsShippingPost handlingunitsshippingPost) { // Additional validations // Pre-process // Process this._handlingunitsshippingRepository.RegisterCreate(handlingunitsshippingPost); try { this._handlingunitsshippingRepository.Commit(); } catch (Exception ex) { this._handlingunitsshippingRepository.Rollback(); // Log exception throw; } // Post-process return(Task.FromResult(handlingunitsshippingPost.ixHandlingUnitShipping)); }
public void RegisterDelete(HandlingUnitsShippingPost handlingunitsshippingPost) { _context.HandlingUnitsShippingPost.Remove(handlingunitsshippingPost); }
public void RegisterEdit(HandlingUnitsShippingPost handlingunitsshippingPost) { _context.Entry(handlingunitsshippingPost).State = EntityState.Modified; }
public void RegisterCreate(HandlingUnitsShippingPost handlingunitsshippingPost) { _context.HandlingUnitsShippingPost.Add(handlingunitsshippingPost); }