private void SetShippingStateList(string shippingCountry) { string sql = String.Empty; if (shippingCountry.Length > 0) { sql = "select s.* from dbo.State s with (NOLOCK) join dbo.country c on s.countryid = c.countryid where c.name = " + DB.SQuote(shippingCountry) + " order by s.DisplayOrder,s.Name"; } else { sql = "select * from dbo.State with (NOLOCK) where countryid = 222 order by DisplayOrder,Name"; } using (SqlConnection con = new SqlConnection(DB.GetDBConn())) { con.Open(); using (IDataReader rs = DB.GetRS(sql, con)) { ShippingState.DataSource = rs; ShippingState.DataTextField = "Name"; ShippingState.DataValueField = "Abbreviation"; ShippingState.DataBind(); } } if (ShippingState.Items.Count == 0) { ShippingState.Items.Insert(0, new ListItem("state.countrywithoutstates".StringResource(), "--")); ShippingState.SelectedIndex = 0; } }
public override void SetShippingState(ShippingState shippingState) { switch (shippingState) { case ShippingState.Completed: Transition(ShippingState2.Left); break; case ShippingState.Confirmed: if (Parent.m_Parent.TruckAwaiting.Value) { Transition(ShippingState2.Waiting); } else { Transition(ShippingState2.Confirmed); } break; case ShippingState.Delayed: Transition(ShippingState2.Delayed); break; case ShippingState.Underway: break; } }
public override void SetShippingState(ShippingState shippingState) { switch (shippingState) { case ShippingState.Canceled: break; } }
public override void SetShippingState(ShippingState shippingState) { switch (shippingState) { case ShippingState.Completed: Transition(ShippingState2.Left); break; case ShippingState.Underway: break; } }
public IActionResult UpdateShippingState(int orderId, ShippingState shippingState) { var order = _unitOfWork.OrderRepository.Get(orderId, new string[0]); if (order != null) { order.ShippingState = shippingState; _unitOfWork.Complete(); } return(RedirectToAction(nameof(List))); }
public override void SetShippingState(ShippingState shippingState) { switch (shippingState) { case ShippingState.Cancelation: break; case ShippingState.Canceled: Transition(ShippingState2.Canceled); break; } }
public override void SetShippingState(ShippingState shippingState) { switch (shippingState) { case ShippingState.Creation: break; case ShippingState.Delayed: Transition(ShippingState2.Delayed); break; case ShippingState.Cancelation: Transition(ShippingState2.Cancelation); break; case ShippingState.WaitingForCarrierData: Transition(ShippingState2.LackOfData); break; } }
public override void SetShippingState(ShippingState shippingState) { switch (shippingState) { case ShippingState.Cancelation: Transition(ShippingState2.Cancelation); break; case ShippingState.Underway: Transition(ShippingState2.Started); break; case ShippingState.Confirmed: if (!Parent.m_Parent.TruckAwaiting.Value) { Transition(ShippingState2.Confirmed); } break; } }
private void FormReserveDetail_Activated(object sender, EventArgs e) { if (ReserveDetail != null) { cbxType.SelectedValue = ReserveDetail.ItemTypeCode; cbxState.SelectedValue = ReserveDetail.ItemStateCode; cbxZaiko.SelectedValue = ReserveDetail.Zaiko.Value; txtName.Text = ReserveDetail.Name; txtModelNo.Text = ReserveDetail.ModelNo; txtInsertTime.Text = ReserveDetail.InsertTimeStr; txtUpdateTime.Text = ReserveDetail.UpdateTimeStr; var cs = new CollectState(ReserveDetail); txtCollectSchedule.Text = cs.ViewValue; btnCSCheck.Enabled = cs.Value != CollectStates.Undecided; var ss = new ShippingState(ReserveDetail); txtShipping.Text = ss.ViewValue; } else { Clear(); } }
public override void SetShippingState(ShippingState shippingState) { switch (shippingState) { case ShippingState.Delayed: break; case ShippingState.Cancelation: Transition(ShippingState2.Cancelation); break; case ShippingState.WaitingForConfirmation: case ShippingState.Confirmed: Transition(ShippingState2.Confirmed); break; case ShippingState.WaitingForCarrierData: Transition(ShippingState2.LackOfData); break; case ShippingState.Creation: if (Parent.m_Parent.PartnerTitle == null) { Transition(ShippingState2.Creation); } else { Transition(ShippingState2.LackOfData); } break; case ShippingState.Underway: Transition(ShippingState2.Started); break; } }
private void InitializePageContent() { JSPopupRoutines.Text = AppLogic.GetJSPopupRoutines(); ShippingResidenceType.Items.Add(new ListItem(AppLogic.GetString("address.cs.55", SkinID, ThisCustomer.LocaleSetting), ((int)ResidenceTypes.Unknown).ToString())); ShippingResidenceType.Items.Add(new ListItem(AppLogic.GetString("address.cs.56", SkinID, ThisCustomer.LocaleSetting), ((int)ResidenceTypes.Residential).ToString())); ShippingResidenceType.Items.Add(new ListItem(AppLogic.GetString("address.cs.57", SkinID, ThisCustomer.LocaleSetting), ((int)ResidenceTypes.Commercial).ToString())); ShippingResidenceType.SelectedIndex = 1; if (CommonLogic.QueryStringNativeInt("ErrorMsg") > 0) { pnlErrorMsg.Visible = true; ErrorMessage e = new ErrorMessage(CommonLogic.QueryStringNativeInt("ErrorMsg")); //ctrlShippingMethods.ErrorMessage = e.Message; pnlErrorMsg.Controls.Add(new LiteralControl(String.Format("<b style='color:red;'>{0}</b>", e.Message))); } if (!cart.ShippingIsFree && cart.MoreNeededToReachFreeShipping != 0.0M) { pnlGetFreeShippingMsg.Visible = true; GetFreeShippingMsg.Text = String.Format(AppLogic.GetString("checkoutshipping.aspx.2", SkinID, ThisCustomer.LocaleSetting), ThisCustomer.CurrencyString(cart.FreeShippingThreshold), CommonLogic.Capitalize(cart.FreeShippingMethod)); } if (cart.ShippingIsFree) { pnlFreeShippingMsg.Visible = true; String Reason = String.Empty; if (cart.FreeShippingReason == Shipping.FreeShippingReasonEnum.AllDownloadItems) { Reason = AppLogic.GetString("checkoutshipping.aspx.5", SkinID, ThisCustomer.LocaleSetting); btnContinueCheckout.Text = AppLogic.GetString("checkoutshipping.aspx.19", ThisCustomer.SkinID, ThisCustomer.LocaleSetting); } if (cart.FreeShippingReason == Shipping.FreeShippingReasonEnum.AllFreeShippingItems) { Reason = AppLogic.GetString("checkoutshipping.aspx.18", SkinID, ThisCustomer.LocaleSetting); btnContinueCheckout.Text = AppLogic.GetString("checkoutshipping.aspx.19", ThisCustomer.SkinID, ThisCustomer.LocaleSetting); } if (cart.FreeShippingReason == Shipping.FreeShippingReasonEnum.CouponHasFreeShipping) { Reason = AppLogic.GetString("checkoutshipping.aspx.6", SkinID, ThisCustomer.LocaleSetting); btnContinueCheckout.Text = AppLogic.GetString("checkoutshipping.aspx.19", ThisCustomer.SkinID, ThisCustomer.LocaleSetting); } if (cart.FreeShippingReason == Shipping.FreeShippingReasonEnum.AllOrdersHaveFreeShipping) { Reason = String.Format(AppLogic.GetString("checkoutshipping.aspx.7", SkinID, ThisCustomer.LocaleSetting), cart.FreeShippingMethod); btnContinueCheckout.Text = AppLogic.GetString("checkoutshipping.aspx.19", ThisCustomer.SkinID, ThisCustomer.LocaleSetting); } if (cart.FreeShippingReason == Shipping.FreeShippingReasonEnum.CustomerLevelHasFreeShipping) { Reason = String.Format(AppLogic.GetString("checkoutshipping.aspx.8", SkinID, ThisCustomer.LocaleSetting), ThisCustomer.CustomerLevelName); btnContinueCheckout.Text = AppLogic.GetString("checkoutshipping.aspx.19", ThisCustomer.SkinID, ThisCustomer.LocaleSetting); } if (cart.FreeShippingReason == Shipping.FreeShippingReasonEnum.ExceedsFreeShippingThreshold) { Reason = cart.FreeShippingMethod; btnContinueCheckout.Text = AppLogic.GetString("checkoutshipping.aspx.19", ThisCustomer.SkinID, ThisCustomer.LocaleSetting); } FreeShippingMsg.Text = Reason; } Addresses addrs = new Addresses(); addrs.LoadCustomer(ThisCustomer.CustomerID); ddlChooseShippingAddr.Items.Clear(); Hashtable ht = new Hashtable(); // add their primary shipping address id FIRST: foreach (Address a in addrs) { if (a.AddressID == ThisCustomer.PrimaryShippingAddressID) { string addrString = a.Address1 + " " + a.City + " " + a.State + " " + a.Country + " " + a.Zip; while (addrString.IndexOf(" ") != -1) { addrString = addrString.Replace(" ", " "); } ht.Add(addrString, "true"); ddlChooseShippingAddr.Items.Add(new ListItem(addrString, a.AddressID.ToString())); } } // now add their remaining addresses, only if they are materially different from the primary shipping address foreach (Address a in addrs) { if (a.AddressID != ThisCustomer.PrimaryShippingAddressID) { string addrString = a.Address1 + " " + a.City + " " + a.State + " " + a.Country + " " + a.Zip; while (addrString.IndexOf(" ") != -1) { addrString = addrString.Replace(" ", " "); } if (!ht.Contains(addrString)) { ht.Add(addrString, "true"); ddlChooseShippingAddr.Items.Add(new ListItem(addrString, a.AddressID.ToString())); } } } //allow the customer to add a new address ddlChooseShippingAddr.Items.Add(new ListItem(AppLogic.GetString("checkoutshipping.aspx.22", ThisCustomer.SkinID, ThisCustomer.LocaleSetting), "0")); ddlChooseShippingAddr.SelectedValue = ThisCustomer.PrimaryShippingAddressID.ToString(); ddlChooseShippingAddr.AutoPostBack = true; using (SqlConnection con = new SqlConnection(DB.GetDBConn())) { con.Open(); using (IDataReader rs = DB.GetRS("select * from State with (NOLOCK) order by DisplayOrder,Name", con)) { ShippingState.DataSource = rs; ShippingState.DataTextField = "Name"; ShippingState.DataValueField = "Abbreviation"; ShippingState.DataBind(); } } using (SqlConnection con = new SqlConnection(DB.GetDBConn())) { con.Open(); using (IDataReader rs = DB.GetRS("select * from Country with (NOLOCK) order by DisplayOrder,Name", con)) { ShippingCountry.DataSource = rs; ShippingCountry.DataTextField = "Name"; ShippingCountry.DataValueField = "Name"; ShippingCountry.DataBind(); } } ShippingCountry.SelectedValue = "United States"; pnlCartAllowsShippingMethodSelection.Visible = cart.CartAllowsShippingMethodSelection; ctrlShippingMethods.Visible = cart.CartAllowsShippingMethodSelection; if ((!cart.CartAllowsShippingMethodSelection || AnyShippingMethodsFound) || (!AnyShippingMethodsFound && !AppLogic.AppConfigBool("FreeShippingAllowsRateSelection") && cart.ShippingIsFree)) { btnContinueCheckout.Visible = true; } ShippingDisplay(AnyShippingMethodsFound); }
protected void SetContextToNewCustomer() { SearchCustomerPanel.Visible = false; CustomerIDPanel.Visible = false; CustomerID.Text = String.Empty; FirstName.Text = String.Empty; LastName.Text = String.Empty; EMail.Text = String.Empty; Phone.Text = String.Empty; RadioButtonList1.SelectedIndex = 0; Over13.Checked = true; BillingFirstName.Text = String.Empty; BillingLastName.Text = String.Empty; BillingPhone.Text = String.Empty; BillingCompany.Text = String.Empty; BillingResidenceType.ClearSelection(); BillingResidenceType.SelectedIndex = 1; BillingAddress1.Text = String.Empty; BillingAddress2.Text = String.Empty; BillingSuite.Text = String.Empty; BillingCity.Text = String.Empty; BillingState.ClearSelection(); BillingState.SelectedIndex = 0; BillingZip.Text = String.Empty; BillingCountry.ClearSelection(); BillingCountry.SelectedIndex = 0; ShippingFirstName.Text = String.Empty; ShippingLastName.Text = String.Empty; ShippingPhone.Text = String.Empty; ShippingCompany.Text = String.Empty; ShippingResidenceType.ClearSelection(); ShippingResidenceType.SelectedIndex = 1; ShippingAddress1.Text = String.Empty; ShippingAddress2.Text = String.Empty; ShippingSuite.Text = String.Empty; ShippingCity.Text = String.Empty; ShippingCountry.ClearSelection(); ShippingCountry.SelectedIndex = -1; ShippingState.ClearSelection(); ShippingState.SelectedIndex = -1; ShippingZip.Text = String.Empty; try { AffiliateList.SelectedIndex = -1; AffiliateList.ClearSelection(); } catch { } try { CustomerLevelList.SelectedIndex = -1; CustomerLevelList.ClearSelection(); } catch { } CreateCustomer.Visible = true; UseCustomer.Visible = false; UpdateCustomer.Visible = false; CreateNewCustomerPanel.Visible = true; CustomerStatsPanel.Visible = false; ImpersonationPanel.Visible = false; Panel3.Visible = false; Panel2.Visible = false; }
protected void Page_Load(object sender, EventArgs e) { Response.CacheControl = "private"; Response.Expires = 0; Response.AddHeader("pragma", "no-cache"); /****************************************************************************/ // * WARNING TO DEVELOPERS // * The redirect below is a SAFETY feature. Removing the redirect will not // * enable ML-only features on a lower version of AspDotNetStorefront. // * Attempting to do so can very easily result in a partially implemented // * feature, invalid or incomplete data in your DB, and other serious // * conditions that will cause your store to be non-functional. // * // * If you break your store attempting to enable ML-only features in PRO or // * Standard, our staff cannot help you fix it, and it will also invalidate // * your AspDotNetStorefront License. /***************************************************************************/ if (AppLogic.ProductIsMLExpress()) { Response.Redirect(AppLogic.AdminLinkUrl("restrictedfeature.aspx")); } m_OrderNumber = CommonLogic.QueryStringUSInt("OrderNumber"); GetJavaScriptFunctions(); if (!IsPostBack) { saveOrderNumber.Text = m_OrderNumber.ToString(); if (AppLogic.AppConfigBool("PhoneOrder.EMailIsOptional")) { valRegExValEmail.Enabled = false; } BillingState.ClearSelection(); BillingState.Items.Clear(); ShippingState.ClearSelection(); ShippingState.Items.Clear(); using (SqlConnection conn = DB.dbConn()) { conn.Open(); using (IDataReader rs = DB.GetRS("select * from State with (NOLOCK) order by DisplayOrder,Name", conn)) { ShippingState.DataValueField = "Abbreviation"; ShippingState.DataTextField = "Name"; ShippingState.DataSource = rs; ShippingState.DataBind(); } } using (SqlConnection conn = DB.dbConn()) { conn.Open(); using (IDataReader rs = DB.GetRS("select * from State with (NOLOCK) order by DisplayOrder,Name", conn)) { BillingState.DataValueField = "Abbreviation"; BillingState.DataTextField = "Name"; BillingState.DataSource = rs; BillingState.DataBind(); } } ShippingCountry.ClearSelection(); ShippingCountry.Items.Clear(); BillingCountry.ClearSelection(); BillingCountry.Items.Clear(); using (SqlConnection conn = DB.dbConn()) { conn.Open(); using (IDataReader rs = DB.GetRS("select * from Country with (NOLOCK) order by DisplayOrder,Name", conn)) { ShippingCountry.DataValueField = "Name"; ShippingCountry.DataTextField = "Name"; ShippingCountry.DataSource = rs; ShippingCountry.DataBind(); } } using (SqlConnection conn = DB.dbConn()) { conn.Open(); using (IDataReader rs = DB.GetRS("select * from Country with (NOLOCK) order by DisplayOrder,Name", conn)) { BillingCountry.DataValueField = "Name"; BillingCountry.DataTextField = "Name"; BillingCountry.DataSource = rs; BillingCountry.DataBind(); } } AffiliateList.ClearSelection(); AffiliateList.Items.Clear(); using (SqlConnection conn = DB.dbConn()) { conn.Open(); using (IDataReader rs = DB.GetRS("select AffiliateID,Name,DisplayOrder from Affiliate with (NOLOCK) union select 0,'--N/A--', 0 from Affiliate with (NOLOCK) order by DisplayOrder,Name", conn)) { AffiliateList.DataSource = rs; AffiliateList.DataBind(); if (AffiliateList.Items.Count == 0) { AffiliateList.Visible = false; AffiliatePrompt.Visible = false; } } } CustomerLevelList.ClearSelection(); CustomerLevelList.Items.Clear(); using (SqlConnection conn = DB.dbConn()) { conn.Open(); using (IDataReader dr = DB.GetRS("select CustomerLevelID,Name,DisplayOrder from CustomerLevel with (NOLOCK) union select 0,'--N/A--', 0 from CustomerLevel with (NOLOCK) order by DisplayOrder,Name", conn)) { while (dr.Read()) { CustomerLevelList.Items.Add(new ListItem(DB.RSFieldByLocale(dr, "Name", LocaleSetting), DB.RSFieldInt(dr, "CustomerLevelID").ToString())); } } } ThisCustomer.ThisCustomerSession.ClearVal("IGD_EDITINGORDER"); // are we order editing? if (m_OrderNumber != 0) { ThisCustomer.ThisCustomerSession["IGD_EDITINGORDER"] = m_OrderNumber.ToString(); // setup cart to match order: DB.ExecuteSQL("aspdnsf_EditOrder " + m_OrderNumber.ToString()); Button89.Visible = true; Button90.Visible = true; Button91.Visible = true; helpphone.Visible = false; helporderedit.Visible = true; backtoorderlink.NavigateUrl = AppLogic.AdminLinkUrl("orders.aspx") + "?ordernumber=" + m_OrderNumber.ToString(); content.Visible = false; SearchCustomerPanel.Visible = false; txtordernumber.Text = m_OrderNumber.ToString(); Order ord = new Order(m_OrderNumber); // use customer as is: TopPanel.Visible = false; SearchCustomerPanel.Visible = false; CreateNewCustomerPanel.Visible = false; CustomerStatsPanel.Visible = true; CreateCustomer.Visible = false; UseCustomer.Visible = false; UpdateCustomer.Visible = false; SetContextToCustomerID(ord.CustomerID); UsingCustomerID.Text = CustomerID.Text; UsingFirstName.Text = FirstName.Text; UsingLastName.Text = LastName.Text; UsingEMail.Text = EMail.Text.ToLowerInvariant().Trim(); SetToImpersonationPageContext(ord.CustomerID, "../shoppingcart.aspx", false); } } else { m_OrderNumber = System.Int32.Parse(saveOrderNumber.Text); } bool RequireEmail = !(AppLogic.AppConfigBool("PasswordIsOptionalDuringCheckout") && !AppLogic.AppConfigBool("AnonCheckoutReqEmail")); RequiredEmailValidator.Enabled = RequireEmail; lblRequiredEmailAsterix.Visible = RequireEmail; }
protected void SetContextToCustomerID(int iCustomerID) { CustomerID.Text = iCustomerID.ToString(); using (SqlConnection conn = DB.dbConn()) { conn.Open(); using (IDataReader rs = DB.GetRS("select * from Customer with (NOLOCK) where deleted=0 and IsAdmin=0 and CustomerID=" + iCustomerID.ToString(), conn)) { if (rs.Read()) { FirstName.Text = DB.RSField(rs, "FirstName"); LastName.Text = DB.RSField(rs, "LastName"); EMail.Text = DB.RSField(rs, "EMail").ToLowerInvariant().Trim(); Phone.Text = DB.RSField(rs, "Phone"); Over13.Checked = DB.RSFieldBool(rs, "Over13Checked"); RadioButtonList1.SelectedIndex = CommonLogic.IIF(DB.RSFieldBool(rs, "OkToEMail"), 0, 1); Address BillingAddress = new Address(); BillingAddress.LoadByCustomer(iCustomerID, AddressTypes.Billing); BillingFirstName.Text = BillingAddress.FirstName; BillingLastName.Text = BillingAddress.LastName; BillingPhone.Text = BillingAddress.Phone; BillingCompany.Text = BillingAddress.Company; try { BillingResidenceType.ClearSelection(); if (BillingAddress.ResidenceType != ResidenceTypes.Unknown) { BillingResidenceType.Items.FindByValue(((int)BillingAddress.ResidenceType).ToString()).Selected = true; } } catch { } BillingAddress1.Text = BillingAddress.Address1; BillingAddress2.Text = BillingAddress.Address2; BillingSuite.Text = BillingAddress.Suite; BillingCity.Text = BillingAddress.City; try { BillingState.SelectedIndex = -1; BillingState.ClearSelection(); BillingState.Items.FindByValue(BillingAddress.State).Selected = true; } catch { } BillingZip.Text = BillingAddress.Zip; try { BillingCountry.SelectedIndex = -1; BillingCountry.ClearSelection(); BillingCountry.Items.FindByValue(BillingAddress.Country).Selected = true; } catch { } Address ShippingAddress = new Address(); ShippingAddress.LoadByCustomer(iCustomerID, AddressTypes.Shipping); ShippingFirstName.Text = ShippingAddress.FirstName; ShippingLastName.Text = ShippingAddress.LastName; ShippingPhone.Text = ShippingAddress.Phone; ShippingCompany.Text = ShippingAddress.Company; try { ShippingResidenceType.ClearSelection(); if (ShippingAddress.ResidenceType != ResidenceTypes.Unknown) { ShippingResidenceType.Items.FindByValue(((int)ShippingAddress.ResidenceType).ToString()).Selected = true; } } catch { } ShippingAddress1.Text = ShippingAddress.Address1; ShippingAddress2.Text = ShippingAddress.Address2; ShippingSuite.Text = ShippingAddress.Suite; ShippingCity.Text = ShippingAddress.City; try { ShippingState.SelectedIndex = -1; ShippingState.ClearSelection(); ShippingState.Items.FindByValue(ShippingAddress.State).Selected = true; } catch { } ShippingZip.Text = ShippingAddress.Zip; try { ShippingCountry.SelectedIndex = -1; ShippingCountry.ClearSelection(); ShippingCountry.Items.FindByValue(ShippingAddress.Country).Selected = true; } catch { } try { AffiliateList.SelectedIndex = -1; AffiliateList.ClearSelection(); AffiliateList.Items.FindByValue(DB.RSFieldInt(rs, "AffiliateID").ToString()).Selected = true; } catch { } try { CustomerLevelList.SelectedIndex = -1; CustomerLevelList.ClearSelection(); CustomerLevelList.Items.FindByValue(DB.RSFieldInt(rs, "CustomerLevelID").ToString()).Selected = true; } catch { } } } } }
protected void Page_Load(object sender, EventArgs e) { Response.CacheControl = "private"; Response.Expires = 0; Response.AddHeader("pragma", "no-cache"); m_OrderNumber = CommonLogic.QueryStringUSInt("OrderNumber"); GetJavaScriptFunctions(); if (!IsPostBack) { saveOrderNumber.Text = m_OrderNumber.ToString(); if (AppLogic.AppConfigBool("PhoneOrder.EMailIsOptional")) { valRegExValEmail.Enabled = false; } BillingState.ClearSelection(); BillingState.Items.Clear(); ShippingState.ClearSelection(); ShippingState.Items.Clear(); using (SqlConnection conn = DB.dbConn()) { conn.Open(); using (IDataReader rs = DB.GetRS("select * from State with (NOLOCK) order by DisplayOrder,Name", conn)) { ShippingState.DataValueField = "Abbreviation"; ShippingState.DataTextField = "Name"; ShippingState.DataSource = rs; ShippingState.DataBind(); } } using (SqlConnection conn = DB.dbConn()) { conn.Open(); using (IDataReader rs = DB.GetRS("select * from State with (NOLOCK) order by DisplayOrder,Name", conn)) { BillingState.DataValueField = "Abbreviation"; BillingState.DataTextField = "Name"; BillingState.DataSource = rs; BillingState.DataBind(); } } ShippingCountry.ClearSelection(); ShippingCountry.Items.Clear(); BillingCountry.ClearSelection(); BillingCountry.Items.Clear(); using (SqlConnection conn = DB.dbConn()) { conn.Open(); using (IDataReader rs = DB.GetRS("select * from Country with (NOLOCK) order by DisplayOrder,Name", conn)) { ShippingCountry.DataValueField = "Name"; ShippingCountry.DataTextField = "Name"; ShippingCountry.DataSource = rs; ShippingCountry.DataBind(); } } using (SqlConnection conn = DB.dbConn()) { conn.Open(); using (IDataReader rs = DB.GetRS("select * from Country with (NOLOCK) order by DisplayOrder,Name", conn)) { BillingCountry.DataValueField = "Name"; BillingCountry.DataTextField = "Name"; BillingCountry.DataSource = rs; BillingCountry.DataBind(); } } AffiliateList.ClearSelection(); AffiliateList.Items.Clear(); using (SqlConnection conn = DB.dbConn()) { conn.Open(); using (IDataReader rs = DB.GetRS("select AffiliateID,Name,DisplayOrder from Affiliate with (NOLOCK) union select 0,'--N/A--', 0 from Affiliate with (NOLOCK) order by DisplayOrder,Name", conn)) { AffiliateList.DataSource = rs; AffiliateList.DataBind(); if (AffiliateList.Items.Count == 0) { AffiliateList.Visible = false; AffiliatePrompt.Visible = false; } } } CustomerLevelList.ClearSelection(); CustomerLevelList.Items.Clear(); using (SqlConnection conn = DB.dbConn()) { conn.Open(); using (IDataReader dr = DB.GetRS("select CustomerLevelID,Name,DisplayOrder from CustomerLevel with (NOLOCK) union select 0,'--N/A--', 0 from CustomerLevel with (NOLOCK) order by DisplayOrder,Name", conn)) { while (dr.Read()) { CustomerLevelList.Items.Add(new ListItem(DB.RSFieldByLocale(dr, "Name", LocaleSetting), DB.RSFieldInt(dr, "CustomerLevelID").ToString())); } } } ThisCustomer.ThisCustomerSession.ClearVal("IGD_EDITINGORDER"); // are we order editing? if (m_OrderNumber != 0) { ThisCustomer.ThisCustomerSession["IGD_EDITINGORDER"] = m_OrderNumber.ToString(); // setup cart to match order: DB.ExecuteSQL("aspdnsf_EditOrder " + m_OrderNumber.ToString()); Button89.Visible = true; Button90.Visible = true; Button91.Visible = true; helpphone.Visible = false; helporderedit.Visible = true; backtoorderlink.NavigateUrl = AppLogic.AdminLinkUrl("orders.aspx") + "?ordernumber=" + m_OrderNumber.ToString(); content.Visible = false; SearchCustomerPanel.Visible = false; txtordernumber.Text = m_OrderNumber.ToString(); Order ord = new Order(m_OrderNumber); // use customer as is: TopPanel.Visible = false; SearchCustomerPanel.Visible = false; CreateNewCustomerPanel.Visible = false; CustomerStatsPanel.Visible = true; CreateCustomer.Visible = false; UseCustomer.Visible = false; UpdateCustomer.Visible = false; SetContextToCustomerID(ord.CustomerID); UsingCustomerID.Text = CustomerID.Text; UsingFirstName.Text = FirstName.Text; UsingLastName.Text = LastName.Text; UsingEMail.Text = EMail.Text.ToLowerInvariant().Trim(); SetToImpersonationPageContext(ord.CustomerID, "../shoppingcart.aspx", false); } } else { m_OrderNumber = System.Int32.Parse(saveOrderNumber.Text); } bool RequireEmail = !(AppLogic.AppConfigBool("PasswordIsOptionalDuringCheckout") && !AppLogic.AppConfigBool("AnonCheckoutReqEmail")); RequiredEmailValidator.Enabled = RequireEmail; lblRequiredEmailAsterix.Visible = RequireEmail; }
public void SetShippingState(ShippingState shippingState) { m_AbstractState.SetShippingState(shippingState); }
public virtual void SetShippingState(ShippingState shippingState) { throw ContexException.TriggerError(String.Format("SetShippingState( {0} )", shippingState), this.Parent.m_Parent.ShippingState2.Value); }