protected void Page_Load(object sender, EventArgs e) { #region Route Data if (!IsPostBack) { string alias = null; object id = String.Empty; // Attempt to get WebAlias from routing data if (RouteData.Values.TryGetValue("id", out id)) { ExigoApiServices api = new ExigoApiServices(); #region Get the data var auth = new ExigoApiServices(); string webAlias = id.ToString(); var query = (from c in auth.OData.Customers where c.LoginName == id.ToString() select new { c.FirstName, c.LastName, c.Phone, c.LoginName }); #endregion #region Return the data if (query.Count() > 0) { foreach (var i in query) { webAlias = i.LoginName; } } #endregion alias = webAlias; } if (alias != null) { Response.Redirect("RAsignup/page1.aspx?ID=" + alias); } else { // The requested person was not found Response.Redirect("RAsignup/page1.aspx?ID=" + "orphan"); } } #endregion }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string alias = null; string firstName = ""; string lastName = ""; string phone = ""; object id = String.Empty; // Attempt to get WebAlias from routing data if (Request.QueryString["ID"] != null) { ExigoApiServices api = new ExigoApiServices(); #region Get the data var auth = new ExigoApiServices(); string webAlias = Request.QueryString["ID"]; var query = (from c in auth.OData.Customers where c.LoginName == webAlias select new { c.FirstName, c.LastName, c.Phone, c.LoginName }); #endregion #region Return the data if (query.Count() > 0) { foreach (var i in query) { firstName = i.FirstName; lastName = i.LastName; phone = i.Phone; webAlias = i.LoginName; } } #endregion alias = webAlias; } if (alias != null) { lblFirstName.Text = firstName; lblLastName.Text = lastName; lblPhone.Text = phone; } else { // The requested city was not found lblFirstName.Text = "The person specified is not available!"; } } }
public void SubmitOrder() { ExigoApiServices Exigo = new ExigoApiServices(); var response = Exigo.WebService.ProcessTransaction(TransactionRequest_Initial()); if (response.Result.Status == ResultStatus.Success) { foreach (ApiResponse resp in response.TransactionResponses) { if (resp is CreateCustomerLeadResponse) NewCustomerID = ((CreateCustomerLeadResponse)resp).CustomerLeadID; } } }