public virtual ActionResult SkipCarton(string serializedContext, string palletId, string sourceLocationId, string cartonId) { var pallet = _service.GetPallet(palletId); var model = new SkipCartonViewModel() { Context = new ContextModel { Serialized = serializedContext, }, PalletId = palletId, CountCartonsOnPallet = pallet.CartonCount, SourceLocationId = sourceLocationId, CartonId = cartonId, Sound = 'W' }; return(View(Views.SkipCarton, model)); }
public virtual ActionResult MoveCartonToSuspense(SkipCartonViewModel model) { try { switch (model.Choice) { case "": case null: break; case "1": // Send to suspense var isMarked = _service.MarkCartonInSuspense(model.CartonId, model.SourceLocationId); if (isMarked) { AddStatusMessage(string.Format("Carton {0} marked in suspense.", model.CartonId)); } else { AddStatusMessage(string.Format("Unable to mark Carton {0} in suspense, May be carton already pulled.", model.CartonId)); } break; case "2": //remove carton from puller suggestion list _service.RemoveCartonSuggestion(model.CartonId); AddStatusMessage(string.Format("Carton {0} removed from your sugg. list.", model.CartonId)); break; } return(RedirectToAction(Actions.Carton(model.Context.Serialized, model.PalletId))); } catch (DbException ex) { ModelState.AddModelError("", ex.Message); return(View(Views.SkipCarton, model)); } }