protected void ConnectButton_Click(object sender, EventArgs e) { string key = orders.GetIntegrationKey(OrgId); string newkey = Guid.NewGuid().ToString(); if (string.IsNullOrEmpty(key)) { orders.InsertIntegrationKey(OrgId, newkey); } else { orders.UpdateIntegrationKey(OrgId, newkey); } Guid oldKey = Client.ConnectWithKeyReturn(new Guid(OrganizationList.SelectedValue), new Guid(InstanceList.SelectedValue), "FLEET" + newkey); orders.DeleteIntegrationKey(oldKey.ToString()); MessagePanel.Visible = true; ConnectPanel.Visible = false; }