private msOrder unbindOrder(List <string> booths) { // ok, let's create our order var o = new msOrder(); o.ShipTo = o.BillTo = targetEntity.ID; o.LineItems = new List <msOrderLineItem>(); // add the primary booth var oli = new msOrderLineItem { Product = rblBoothTypes.SelectedValue, Quantity = 1 }; oli.Options = new List <NameValueStringPair>(); oli.Options.Add(new NameValueStringPair { Name = OrderLineItemOptions.Exhibits.SpecialRequests, Value = tbSpecialRequest.Text }); // now, the preferences string prefs = ""; foreach (string s in booths) { prefs += s + "|"; } oli.Options.Add(new NameValueStringPair(OrderLineItemOptions.Exhibits.BoothPreferences, prefs)); o.LineItems.Add(oli); unbindMerchandise(o); return(o); }
protected override void InitializeTargetObject() { base.InitializeTargetObject(); targetOrder = LoadObjectFromAPI <msOrder>(ContextID); if (targetOrder == null) { GoToMissingRecordPage(); } lblConfirmationText.Text = getConfirmationText(); if (MultiStepWizards.PlaceAnOrder.ReloadEntityOnOrderComplete) { MultiStepWizards.PlaceAnOrder.ReloadEntityOnOrderComplete = false; ConciergeAPI.CurrentEntity = LoadObjectFromAPI <msEntity>(ConciergeAPI.CurrentEntity.ID); } if (!string.IsNullOrWhiteSpace(MultiStepWizards.PlaceAnOrder.OrderCompleteUrl)) { string nextUrl = MultiStepWizards.PlaceAnOrder.OrderCompleteUrl; nextUrl += nextUrl.Contains("?") ? "&OrderID=" + ContextID : "?OrderID=" + ContextID; MultiStepWizards.PlaceAnOrder.OrderCompleteUrl = null; QueueBannerMessage(lblConfirmationText.Text); GoTo(nextUrl); } }
private void unbindSections(msOrder mso, string membershipItemGuid) { if (!divSections.Visible) { return; // they're not even enabled } using (var api = GetConciegeAPIProxy()) { foreach (RepeaterItem ri in rptSections.Items) { var cbSections = (CheckBoxList)ri.FindControl("cbSections"); if (cbSections == null) { continue; } foreach (ListItem item in cbSections.Items) { if (item.Selected) // they ased for it { var productID = api.GetDefaultSectionProduct2(targetEntity.ID, targetMembership.Type, item.Value).ResultValue.SafeGetValue <string>("ID"); mso.LineItems.Add(new msOrderLineItem { Quantity = 1, Product = productID, LinkedOrderLineItemID = membershipItemGuid }); } } } } }
private void unbindDonations(msOrder mso, string parentItem) { if (!divDonations.Visible) { return; } foreach (RepeaterItem ri in rptDonations.Items) { TextBox tbAmount = (TextBox)ri.FindControl("tbAmount"); if (string.IsNullOrEmpty(tbAmount.Text)) { continue; } HiddenField hfProductID = (HiddenField)ri.FindControl("hfProductID"); msOrderLineItem li = new msOrderLineItem(); li.Total = decimal.Parse(tbAmount.Text); li.PriceOverride = true; // IMPORTANT - all donations are price overriden! li.UnitPrice = li.Total; li.Quantity = 1; if (li.Total <= 0) { continue; // don't add } li.Product = hfProductID.Value; li.LinkedOrderLineItemID = parentItem; mso.LineItems.Add(li); } }
protected override void OnLoad(EventArgs e) { if (Request.QueryString["useTransient"] == "true") { targetOrder = MultiStepWizards.PlaceAnOrder.TransientShoppingCart; isTransient = true; } else { targetOrder = MultiStepWizards.PlaceAnOrder.ShoppingCart; } if (targetOrder == null || targetOrder.LineItems == null || targetOrder.LineItems.Count == 0) { Response.Redirect("/"); return; } if (targetOrder.BillTo == null) { targetOrder.BillTo = ConciergeAPI.CurrentEntity.ID; } if (targetOrder.ShipTo == null) { targetOrder.ShipTo = ConciergeAPI.CurrentEntity.ID; } if (targetOrder.Date == DateTime.MinValue) { targetOrder.Date = DateTime.Now; } Response.Redirect("CrossSellItems.aspx?useTransient=" + isTransient); }
protected void btnContinue_Click(object sender, EventArgs e) { if (!IsValid) { return; } string selectedValue = rbSubscriptionPlans.SelectedValue; if (string.IsNullOrWhiteSpace(selectedValue)) { return; } // ok, let's create our order msOrder o = new msOrder(); o.ShipTo = o.BillTo = ConciergeAPI.CurrentEntity.ID; o.LineItems = new List <msOrderLineItem>(); // add the primary booth var oli = new msOrderLineItem { Product = selectedValue, Quantity = int.Parse(tbQuantity.Text) }; o.LineItems.Add(oli); MultiStepWizards.PlaceAnOrder.InitiateOrderProcess(o); }
protected LongRunningTaskStatusInfo processOrder(IConciergeAPIService api) { var processedOrderPacket = api.PreProcessOrder(targetOrder).ResultValue; cleanOrder = processedOrderPacket.FinalizedOrder.ConvertTo <msOrder>(); //Reset the total because a donation can be any amount - the product price returned from preprocessing is just the "suggested donation" cleanOrder.LineItems[0].Total = targetOrder.Total; // now, let's set the total - in case the product has added additional stuff like shipping/taxes cleanOrder.Total = cleanOrder.LineItems.Sum(x => x.Total); cleanOrder.PaymentMethod = OrderPaymentMethod.CreditCard; cleanOrder.CreditCardNumber = targetCreditCard.CardNumber; cleanOrder.CreditCardExpirationDate = targetCreditCard.CardExpirationDate; cleanOrder.CCVCode = targetCreditCard.CCVCode; cleanOrder.BillingAddress = acBillingAddress.Address; // cleanOrder.BillingEmailAddress = tbEmailAddress.Text; var info = api.ProcessOrder(cleanOrder, null).ResultValue; // let's wait return(OrderUtilities.WaitForOrderToComplete(api, info)); }
protected override void InitializeTargetObject() { base.InitializeTargetObject(); if (string.Equals(Request.QueryString["useTransient"], "true", StringComparison.CurrentCultureIgnoreCase)) { originalOrder = MultiStepWizards.PlaceAnOrder.TransientShoppingCart; isTransient = true; } else { originalOrder = MultiStepWizards.PlaceAnOrder.ShoppingCart; } if (originalOrder == null) { QueueBannerError("No order was found."); GoHome(); } //MS-2823 if (originalOrder.BillTo == null) { originalOrder.BillTo = ConciergeAPI.CurrentEntity.ID; } if (originalOrder.ShipTo == null) { originalOrder.ShipTo = originalOrder.BillTo; } targetOrder = originalOrder.Clone().ConvertTo <msOrder>(); // set the anti-dupe key ViewState["AntiDupeKey"] = Guid.NewGuid().ToString(); }
protected override void InitializeTargetObject() { base.InitializeTargetObject(); if (ContextID == null) { GoToMissingRecordPage(); } Search s = new Search(msBillingSchedule.CLASS_NAME); s.AddCriteria(Expr.Equals("ID", ContextID)); s.AddOutputColumn("Order.LocalID"); s.AddOutputColumn("Order.Date"); s.AddOutputColumn("Order.Total"); s.AddOutputColumn("Order"); s.AddOutputColumn("Order.BillTo"); s.AddOutputColumn("Order.FutureBillingAmount"); var sr = APIExtensions.GetSearchResult(s, 0, 1); if (sr.TotalRowCount == 0) { GoToMissingRecordPage(); } targetSchedule = sr.Table.Rows[0]; if (Convert.ToString(targetSchedule["Order.BillTo"]) != ConciergeAPI.CurrentEntity.ID) { throw new ApplicationException("Access denied"); } targetOrder = LoadObjectFromAPI <msOrder>(Convert.ToString(targetSchedule["Order"])); if (targetOrder == null) { GoToMissingRecordPage(); } hfOrderBillToId.Value = ConciergeAPI.CurrentEntity.ID; dvPriorityData.InnerHtml = GetPriorityPaymentsConfig(hfOrderBillToId.Value); using (var api = GetServiceAPIProxy()) { var methods = api.DetermineAllowableOrderPaymentMethods(targetOrder).ResultValue; // some payments NEVER make sense in this context methods.AllowBillMeLater = false; BillingInfoWidget.AllowableMethods = methods; } }
protected override void InitializeTargetObject() { base.InitializeTargetObject(); targetObject = LoadObjectFromAPI <msAssociationDomainObject>(ContextID); // determine allowed payments PortalPaymentMethods methods; using (var api = GetServiceAPIProxy()) switch (targetObject.ClassType) { case msMembership.CLASS_NAME: msOrder targetOrder = new msOrder(); targetOrder.BillTo = targetOrder.ShipTo = targetObject.SafeGetValue <string>("Owner"); targetOrder.LineItems = new List <msOrderLineItem>(); targetOrder.LineItems.Add(new msOrderLineItem { Product = targetObject.SafeGetValue <string>(msMembership.FIELDS.Product) }); methods = api.DetermineAllowableOrderPaymentMethods(targetOrder).ResultValue; break; case msSubscription.CLASS_NAME: msOrder targetOrder2 = new msOrder(); targetOrder2.BillTo = targetOrder2.ShipTo = targetObject.SafeGetValue <string>("Owner"); targetOrder2.LineItems = new List <msOrderLineItem>(); targetOrder2.LineItems.Add(new msOrderLineItem { Product = targetObject.SafeGetValue <string>(msSubscription.FIELDS.Fee) }); methods = api.DetermineAllowableOrderPaymentMethods(targetOrder2).ResultValue; break; case msGift.CLASS_NAME: methods = api.DetermineAllowableGiftPaymentMethods(targetObject).ResultValue; break; default: throw new NotSupportedException("Cannot deal with class type " + targetObject.ClassType); } // some payments NEVER make sense in this context methods.AllowBillMeLater = false; BillingInfoWidget.AllowableMethods = methods; hfOrderBillToId.Value = ConciergeAPI.CurrentEntity.ID; dvPriorityData.InnerHtml = GetPriorityPaymentsConfig(hfOrderBillToId.Value); }
/// <summary> /// Initializes the target object for the page /// </summary> /// <remarks>Many pages have "target" objects that the page operates on. For instance, when viewing /// an event, the target object is an event. When looking up a directory, that's the target /// object. This method is intended to be overriden to initialize the target object for /// each page that needs it.</remarks> protected override void InitializeTargetObject() { if (ConciergeAPI.CurrentEntity == null) { GoTo("~/profile/CreateAccount_BasicInfo.aspx?t=JobPosting"); } base.InitializeTargetObject(); targetOrder = new msOrder(); targetOrder.BillTo = targetOrder.ShipTo = ConciergeAPI.CurrentEntity.ID; }
/// <summary> /// Initializes the target object for the page /// </summary> /// <remarks>Many pages have "target" objects that the page operates on. For instance, when viewing /// an event, the target object is an event. When looking up a directory, that's the target /// object. This method is intended to be overriden to initialize the target object for /// each page that needs it.</remarks> protected override void InitializeTargetObject() { base.InitializeTargetObject(); targetOrder = MultiStepWizards.PlaceAnOrder.ShoppingCart; if (targetOrder == null) { GoTo("~/onlinestorefront/BrowseMerchandise.aspx"); return; } }
private msOrder unbindOrder( ) { // ok, let's create our order msOrder o = new msOrder(); o.ShipTo = o.BillTo = targetExhibitor.Customer; o.LineItems = new List <msOrderLineItem>(); unbindMerchandise(o); return(o); }
public static void InitiateOrderProcess(msOrder targetOrder, OrderPayload payload) { if (targetOrder != null) { TransientShoppingCart = targetOrder; Payload = payload; HttpContext.Current.Response.Redirect("/orders/InitiateOrder.aspx?useTransient=true"); } else { HttpContext.Current.Response.Redirect("/orders/InitiateOrder.aspx"); } }
public static void InitializeShoppingCart() { if (MultiStepWizards.PlaceAnOrder.ShoppingCart == null) { var mso = new msOrder(); if (ConciergeAPI.CurrentEntity != null) { mso.BillTo = mso.ShipTo = ConciergeAPI.CurrentEntity.ID; } MultiStepWizards.PlaceAnOrder.ShoppingCart = mso; CrossSellItems = null; } }
/// <summary> /// Initializes the target object for the page /// </summary> /// <remarks>Many pages have "target" objects that the page operates on. For instance, when viewing /// an event, the target object is an event. When looking up a directory, that's the target /// object. This method is intended to be overriden to initialize the target object for /// each page that needs it.</remarks> protected override void InitializeTargetObject() { base.InitializeTargetObject(); //Describe a Historical Transaction. We will need this metadata to bind to the acceptable values for certain fields and for creating a new event using (IConciergeAPIService proxy = GetConciegeAPIProxy()) { historicalTransactionClassMetadata = proxy.DescribeObject(msHistoricalTransaction.CLASS_NAME).ResultValue; historicalTransactionFieldMetadata = historicalTransactionClassMetadata.GenerateFieldDictionary(); } var contextObject = APIExtensions.LoadObjectFromAPI(ContextID); if (contextObject == null) { GoToMissingRecordPage(); return; } switch (contextObject.ClassType) { case msOrder.CLASS_NAME: targetOrder = contextObject.ConvertTo <msOrder>(); targetHistoricalTransaction = msHistoricalTransaction.FromClassMetadata(historicalTransactionClassMetadata); targetHistoricalTransaction.Type = HistoricalTransactionType.Payment; break; case msHistoricalTransaction.CLASS_NAME: targetHistoricalTransaction = contextObject.ConvertTo <msHistoricalTransaction>(); targetOrder = LoadObjectFromAPI <msOrder>(targetHistoricalTransaction.Order); break; default: QueueBannerError(string.Format("Unknown context object type supplied '{0}'.", contextObject.ClassType)); GoHome(); return; } targetEvent = LoadObjectFromAPI <msEvent>(EventId); if (targetOrder == null || targetHistoricalTransaction == null || targetEvent == null) { GoToMissingRecordPage(); return; } loadEventOwners(); }
/// <summary> /// Initializes the target object for the page /// </summary> /// <remarks>Many pages have "target" objects that the page operates on. For instance, when viewing /// an event, the target object is an event. When looking up a directory, that's the target /// object. This method is intended to be overriden to initialize the target object for /// each page that needs it.</remarks> protected override void InitializeTargetObject() { base.InitializeTargetObject(); var target = APIExtensions.LoadObjectFromAPI(ContextID); if (target == null) { GoToMissingRecordPage(); return; } // If we are starting with a Registration, go to that setup process if (target.ClassType == msEventRegistration.CLASS_NAME) { targetRegistration = target.ConvertTo <msEventRegistration>(); LoadExistingRegistration(); return; } // If this is not a Registration or an Event, then get out of here if (target.ClassType != msEvent.CLASS_NAME) { GoToMissingRecordPage(); return; } targetEvent = target.ConvertTo <msEvent>(); targetOrder = MultiStepWizards.RegisterForEvent.Order; targetRegistrationFee = MultiStepWizards.RegisterForEvent.RegistrationFee; MultiStepWizards.RegisterForEvent.IsSessionSwap = false; if (targetOrder == null || string.IsNullOrWhiteSpace(targetOrder.BillTo) || string.IsNullOrWhiteSpace(targetOrder.ShipTo) || targetRegistrationFee == null) { GoTo(string.Format("~/events/Register_SelectFee.aspx?contextID={0}", targetEvent.ID)); return; } registrantId = targetOrder.BillTo; if (string.IsNullOrEmpty(registrantId)) { GoToMissingRecordPage(); return; } loadEventOwners(); }
/// <summary> /// Initializes the target object for the page /// </summary> /// <remarks>Many pages have "target" objects that the page operates on. For instance, when viewing /// an event, the target object is an event. When looking up a directory, that's the target /// object. This method is intended to be overriden to initialize the target object for /// each page that needs it.</remarks> protected override void InitializeTargetObject() { base.InitializeTargetObject(); targetEvent = LoadObjectFromAPI <msEvent>(ContextID); if (targetEvent == null) { GoToMissingRecordPage(); return; } onlyShowGuestSpouseRegistrations = Request.QueryString["guestOnly"] == "true"; targetOrder = new msOrder(); if (!string.IsNullOrWhiteSpace(EntityId)) { targetEntity = LoadObjectFromAPI <msEntity>(EntityId); if (targetEntity == null) { GoToMissingRecordPage(); return; } } else { targetEntity = ConciergeAPI.CurrentEntity; } targetOrder.BillTo = targetOrder.ShipTo = targetEntity.ID; if (!string.IsNullOrWhiteSpace(targetEvent.Chapter)) { targetChapter = LoadObjectFromAPI <msChapter>(targetEvent.Chapter); } if (!string.IsNullOrWhiteSpace(targetEvent.Section)) { targetSection = LoadObjectFromAPI <msSection>(targetEvent.Section); } if (!string.IsNullOrWhiteSpace(targetEvent.OrganizationalLayer)) { targetOrganizationalLayer = LoadObjectFromAPI <msOrganizationalLayer>(targetEvent.OrganizationalLayer); } }
protected void gvCompetitionEntries_RowCommand(object sender, GridViewCommandEventArgs e) { switch (e.CommandName.ToLower()) { case "completedraft": GoTo(string.Format("~/competitions/Enter_EntryForm.aspx?contextID={0}", e.CommandArgument)); break; case "completepayment": var entry = LoadObjectFromAPI <msCompetitionEntry>((string)e.CommandArgument); var competitionEntryInfo = CompetitionLogic.GetCompetitionEntryInformation( entry.Competition); if (entry.EntryFee == null) { entry.Status = competitionEntryInfo.SubmittedStatusId; using (IConciergeAPIService proxy = GetConciegeAPIProxy()) { proxy.Save(entry); } QueueBannerMessage(string.Format("Competition entry {0} successfully processed.", entry.LocalID)); GoHome(); } var newOrder = new msOrder(); newOrder.BillTo = newOrder.ShipTo = ConciergeAPI.CurrentEntity.ID; newOrder.LineItems = new List <msOrderLineItem> { new msOrderLineItem { Quantity = 1, Product = entry.EntryFee, Options = new List <NameValueStringPair>() { new NameValueStringPair("CompetitionEntryId", entry.ID) } } }; //Add the order as the "shopping cart" for the order processing wizard MultiStepWizards.PlaceAnOrder.InitiateOrderProcess(newOrder); break; } }
protected void initializeClonedOrder() { msOrder newOrder = MultiStepWizards.RegisterForEvent.Order.Clone().ConvertTo <msOrder>(); newOrder.LineItems = new List <msOrderLineItem>(); // this is NECESSARY b/c clone doesn't work with lists! // add the main fee if (!MultiStepWizards.RegisterForEvent.IsSessionSwap) { var mode = Request.QueryString["mode"]; if (mode == "group") { newOrder.LineItems.Add(new msOrderLineItem { Product = targetRegistrationFee.ID, Quantity = 1, OrderLineItemID = new Guid().ToString(), OverrideMemberPricingTo = Request.QueryString["individualID"] }); } else { newOrder.LineItems.Add(new msOrderLineItem { Product = targetRegistrationFee.ID, Quantity = 1, OrderLineItemID = Guid.NewGuid().ToString() }); } } if (targetAdditionalItems != null) { foreach (var item in targetAdditionalItems) { if (item.OrderLineItemID == null) { item.OrderLineItemID = Guid.NewGuid().ToString(); } newOrder.LineItems.Add(item); } } targetOrder = newOrder; }
private void unbindMerchandise(msOrder mso) { foreach (RepeaterItem ri in rptAdditionalItems.Items) { var tbQuantity = (TextBox)ri.FindControl("tbQuantity"); var hfProductID = (HiddenField)ri.FindControl("hfProductID"); var li = new msOrderLineItem(); li.Quantity = int.Parse(tbQuantity.Text); if (li.Quantity <= 0) { continue; // don't add } li.Product = hfProductID.Value; mso.LineItems.Add(li); } }
/// <summary> /// Initializes the target object for the page /// </summary> /// <remarks>Many pages have "target" objects that the page operates on. For instance, when viewing /// an event, the target object is an event. When looking up a directory, that's the target /// object. This method is intended to be overriden to initialize the target object for /// each page that needs it.</remarks> protected override void InitializeTargetObject() { base.InitializeTargetObject(); using (IConciergeAPIService proxy = ConciergeAPIProxyGenerator.GenerateProxy()) { searchForProducts(proxy); } targetOrder = new msOrder(); if (ConciergeAPI.CurrentEntity != null) { targetIndividual = ConciergeAPI.CurrentEntity.ConvertTo <msIndividual>(); divSaveContact.Visible = false; divDonate.Visible = true; divPayment.Visible = true; rfvProducts.Enabled = true; spnNameRequired.Visible = rfvCCNameOnCard.Enabled = true; spnCreditCardRequired.Visible = rfvCreditCardNumber.Enabled = true; //spnCVVRequired.Visible = rfvCardSecurity.Enabled = revCCV.Enabled=true; spnExpirationRequired.Visible = true; hfOrderBillToId.Value = targetIndividual.ID; dvPriorityData.InnerHtml = GetPriorityPaymentsConfig(hfOrderBillToId.Value); } else { divPayment.Visible = false; rfvProducts.Enabled = false; spnNameRequired.Visible = rfvCCNameOnCard.Enabled = false; spnCreditCardRequired.Visible = rfvCreditCardNumber.Enabled = revCCV.Enabled = false; spnCVVRequired.Visible = rfvCardSecurity.Enabled = false; spnExpirationRequired.Visible = false; } acBillingAddress.Host = this; }
private msOrder unbindOrder(List <string> boothProductsToPurchase) { // ok, let's create our order var o = new msOrder(); o.ShipTo = o.BillTo = targetEntity.ID; o.LineItems = new List <msOrderLineItem>(); foreach (var booth in boothProductsToPurchase) { var oli = new msOrderLineItem { Product = booth, Quantity = 1 }; oli.Options = new List <NameValueStringPair>(); oli.Options.Add(new NameValueStringPair(OrderLineItemOptions.Exhibits.SpecialRequests, tbSpecialRequest.Text)); o.LineItems.Add(oli); } unbindMerchandise(o); return(o); }
/// <summary> /// Initializes the target object for the page /// </summary> /// <remarks>Many pages have "target" objects that the page operates on. For instance, when viewing /// an event, the target object is an event. When looking up a directory, that's the target /// object. This method is intended to be overriden to initialize the target object for /// each page that needs it.</remarks> protected override void InitializeTargetObject() { base.InitializeTargetObject(); if (string.Equals(Request.QueryString["useTransient"], "true", StringComparison.CurrentCultureIgnoreCase)) { targetOrder = MultiStepWizards.PlaceAnOrder.TransientShoppingCart; isTransient = true; } else { targetOrder = MultiStepWizards.PlaceAnOrder.ShoppingCart; } if (targetOrder == null) { QueueBannerError("Unable to checkout without an active shopping cart."); GoHome(); return; } }
protected void GoToOrderForm() { msOrder newOrder = new msOrder(); newOrder.BillTo = newOrder.ShipTo = ConciergeAPI.CurrentEntity.ID; newOrder.LineItems = new List <msOrderLineItem> { new msOrderLineItem { Quantity = 1, Product = MultiStepWizards.EnterCompetition.EntryFee.ID, Options = new List <NameValueStringPair>() { new NameValueStringPair("CompetitionEntryId", targetCompetitionEntry.ID) } } }; //Add the order as the "shopping cart" for the order processing wizard MultiStepWizards.PlaceAnOrder.InitiateOrderProcess(newOrder); }
private msOrder unbindObjectsFromPage() { msOrder mso = new msOrder(); mso.BillTo = mso.ShipTo = ConciergeAPI.CurrentEntity.ID; foreach (RepeaterItem ri in rpTableProducts.Items) { TextBox tbQuantity = (TextBox)ri.FindControl("tbQuantity"); HiddenField hfProductID = (HiddenField)ri.FindControl("hfProductID"); msOrderLineItem li = new msOrderLineItem(); li.Quantity = int.Parse(tbQuantity.Text); if (li.Quantity <= 0) { continue; // don't add } li.Product = hfProductID.Value; mso.LineItems.Add(li); } return(mso); }
private void unbindAdditionalItems(msOrder mso, string parentItem) { if (!divOtherProducts.Visible) { return; } foreach (RepeaterItem ri in rptAdditionalItems.Items) { TextBox tbQuantity = (TextBox)ri.FindControl("tbQuantity"); HiddenField hfProductID = (HiddenField)ri.FindControl("hfProductID"); msOrderLineItem li = new msOrderLineItem(); li.Quantity = int.Parse(tbQuantity.Text); if (li.Quantity <= 0) { continue; // don't add } li.Product = hfProductID.Value; li.LinkedOrderLineItemID = parentItem; mso.LineItems.Add(li); } }
/// <summary> /// Initializes the target object for the page /// </summary> /// <remarks>Many pages have "target" objects that the page operates on. For instance, when viewing /// an event, the target object is an event. When looking up a directory, that's the target /// object. This method is intended to be overriden to initialize the target object for /// each page that needs it.</remarks> protected override void InitializeTargetObject() { base.InitializeTargetObject(); if (string.Equals(Request.QueryString["useTransient"], "true", StringComparison.CurrentCultureIgnoreCase)) { targetOrder = MultiStepWizards.PlaceAnOrder.TransientShoppingCart; isTransient = true; } else { targetOrder = MultiStepWizards.PlaceAnOrder.ShoppingCart; } if (targetOrder == null) { QueueBannerError("Unable to checkout without an active shopping cart."); GoHome(); return; } //MS-2823 if (targetOrder.BillTo == null) { targetOrder.BillTo = ConciergeAPI.CurrentEntity.ID; } if (targetOrder.ShipTo == null) { targetOrder.ShipTo = targetOrder.BillTo; } RegisterJavascriptConfirmationBox(lbCancel, "Are you sure you want to cancel this order?"); acBillingAddress.Host = this; }
public static void InitiateOrderProcess(msOrder targetOrder) { InitiateOrderProcess(targetOrder, null); }
protected void loadTargetOrder(IConciergeAPIService serviceProxy) { targetOrder = serviceProxy.LoadObjectFromAPI <msOrder>(ContextID); }