protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["profileID"] != null) { //Load the profile ProfilesService.ProfilesClient client = new ProfilesService.ProfilesClient(); this.Profile = client.GetLocationProfile(new Guid(Request.QueryString["profileID"])); ShowProfile(); } } }
void rgProfiles_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) { if (e.CommandName == "Edit") { e.Canceled = true; // go to the the edit display this.mpProfile.SelectedIndex = 1; // Load the Selected Profile ProfilesService.ProfilesClient client = new ProfilesService.ProfilesClient(); this.Profile = client.GetLocationProfile(new Guid(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ProfileID"].ToString())); ShowProfile(); } if (e.CommandName == "Vehicles") { e.Canceled = true; this.mpProfile.SelectedIndex = 2; ProfilesService.ProfilesClient client = new ProfilesService.ProfilesClient(); this.Profile = client.GetLocationProfile(new Guid(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ProfileID"].ToString())); ShowVehicles(); } }