public Task <Int64> Create(OutboundCarrierManifestPickupsPost outboundcarriermanifestpickupsPost) { // Additional validations // Pre-process // Process this._outboundcarriermanifestpickupsRepository.RegisterCreate(outboundcarriermanifestpickupsPost); try { this._outboundcarriermanifestpickupsRepository.Commit(); } catch (Exception ex) { this._outboundcarriermanifestpickupsRepository.Rollback(); // Log exception throw; } // Post-process //Custom Code Start | Added Code Block //_shipping.shipInventoryForManifest(outboundcarriermanifestpickupsPost.ixOutboundCarrierManifest, outboundcarriermanifestpickupsPost.UserName); ShipInventoryForManifestPointer shipInventoryForManifestPointer = new ShipInventoryForManifestPointer(_shipping.shipInventoryForManifest); var taskShipInventoryForManifest = new Task(() => shipInventoryForManifestPointer(outboundcarriermanifestpickupsPost.ixOutboundCarrierManifest, outboundcarriermanifestpickupsPost.UserName), TaskCreationOptions.LongRunning | TaskCreationOptions.PreferFairness); taskShipInventoryForManifest.Start(); //Custom Code End return(Task.FromResult(outboundcarriermanifestpickupsPost.ixOutboundCarrierManifestPickup)); }
public ActionResult DeleteConfirmed(long id) { OutboundCarrierManifestPickupsPost outboundcarriermanifestpickups = _outboundcarriermanifestpickupsService.GetPost(id); outboundcarriermanifestpickups.UserName = User.Identity.Name; _outboundcarriermanifestpickupsService.Delete(outboundcarriermanifestpickups); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind("ixOutboundCarrierManifestPickup,sOutboundCarrierManifestPickup,ixOutboundCarrierManifest,ixStatus")] OutboundCarrierManifestPickupsPost outboundcarriermanifestpickups) { if (ModelState.IsValid) { outboundcarriermanifestpickups.UserName = User.Identity.Name; _outboundcarriermanifestpickupsService.Edit(outboundcarriermanifestpickups); return(RedirectToAction("Index")); } ViewBag.ixOutboundCarrierManifest = new SelectList(_outboundcarriermanifestpickupsService.selectOutboundCarrierManifests().Select(x => new { x.ixOutboundCarrierManifest, x.sOutboundCarrierManifest }), "ixOutboundCarrierManifest", "sOutboundCarrierManifest", outboundcarriermanifestpickups.ixOutboundCarrierManifest); ViewBag.ixStatus = new SelectList(_outboundcarriermanifestpickupsService.selectStatuses().Select(x => new { x.ixStatus, x.sStatus }), "ixStatus", "sStatus", outboundcarriermanifestpickups.ixStatus); return(View(outboundcarriermanifestpickups)); }
public ActionResult Edit(long id) { OutboundCarrierManifestPickupsPost outboundcarriermanifestpickups = _outboundcarriermanifestpickupsService.GetPost(id); if (outboundcarriermanifestpickups == null) { return(NotFound()); } ViewBag.ixOutboundCarrierManifest = new SelectList(_outboundcarriermanifestpickupsService.selectOutboundCarrierManifests().Select(x => new { x.ixOutboundCarrierManifest, x.sOutboundCarrierManifest }), "ixOutboundCarrierManifest", "sOutboundCarrierManifest", outboundcarriermanifestpickups.ixOutboundCarrierManifest); ViewBag.ixStatus = new SelectList(_outboundcarriermanifestpickupsService.selectStatuses().Select(x => new { x.ixStatus, x.sStatus }), "ixStatus", "sStatus", outboundcarriermanifestpickups.ixStatus); return(View(outboundcarriermanifestpickups)); }
public Task Edit(OutboundCarrierManifestPickupsPost outboundcarriermanifestpickupsPost) { // Additional validations // Pre-process // Process this._outboundcarriermanifestpickupsRepository.RegisterEdit(outboundcarriermanifestpickupsPost); try { this._outboundcarriermanifestpickupsRepository.Commit(); } catch (Exception ex) { this._outboundcarriermanifestpickupsRepository.Rollback(); // Log exception throw; } // Post-process return(Task.CompletedTask); }
public void RegisterDelete(OutboundCarrierManifestPickupsPost outboundcarriermanifestpickupsPost) { _context.OutboundCarrierManifestPickupsPost.Remove(outboundcarriermanifestpickupsPost); }
public void RegisterEdit(OutboundCarrierManifestPickupsPost outboundcarriermanifestpickupsPost) { _context.Entry(outboundcarriermanifestpickupsPost).State = EntityState.Modified; }
public void RegisterCreate(OutboundCarrierManifestPickupsPost outboundcarriermanifestpickupsPost) { _context.OutboundCarrierManifestPickupsPost.Add(outboundcarriermanifestpickupsPost); }