public ActionResult Cargo(int pageId, helperCheckoutCargo helperPage) { basketShared bs = new basketShared(db); checkoutShared cs = new checkoutShared(db); checkoutProcess checkoutItem = (checkoutProcess)Session["checkoutProcess"]; if (ModelState.IsValid) { checkoutItem.cargoId = helperPage.selectedCargoId; checkoutItem.lastSuccessStep = checkoutStep.cargo; Session["checkoutProcess"] = checkoutItem; return redirectToStep(checkoutStep.payment, checkoutItem); } else { addErrorTempData(getErrorMessage(getModelStateError(ModelState), "autoHide")); return Cargo(pageId); } }
public ActionResult Cargo(int pageId) { checkoutShared cs = new checkoutShared(db); checkoutProcess checkoutItem = (checkoutProcess)Session["checkoutProcess"]; checkoutItem.clearDataOnStepAndBindCurrentStep(checkoutStep.cargo); // Validation var validation = checkoutItem.validationOnCurrentStep(db); if (!validation.Item1) { return redirectToValidation(validation, checkoutItem); } helperCheckoutCargo helperPage = new helperCheckoutCargo(); sharedCheckoutItemLoad(pageId, helperPage, checkoutItem); // get Basket Content => Price , Discount var productPriceItem = cs.getProductPrice(checkoutItem.cartItem, langId, langCode, mainPath, false); if (!productPriceItem.Item1) { return returnBasketMainPage(null); } var basketTotal = productPriceItem.Item2; // get Cargo List helperPage.cargoList = cs.getCargoItemList(basketTotal, langId, "en-US"); helperPage.selectedCargoId = checkoutItem.cargoId; Session["checkoutProcess"] = checkoutItem; return View(helperPage); }