private void PingButton_Click(object sender, RoutedEventArgs e) { this.PingResultTextBox.Text = ""; string pEndPointAddress = this.EndPointURLTextBox.Text; bool pIsAuthenticated = false; bool pIsWsHTTPBinding = true; if ((bool)this.YesRadioButton.IsChecked) { pIsAuthenticated = true; } if ((bool)this.wsHTTPRadioButton.IsChecked) { pIsWsHTTPBinding = true; } else { pIsWsHTTPBinding = false; } try { EWEManagerService.EWEManagerServiceClient Client = ServiceClient.GetClient(pEndPointAddress, pIsAuthenticated, pIsWsHTTPBinding); Epi.Web.Enter.Common.Message.OrganizationRequest Request = new Epi.Web.Enter.Common.Message.OrganizationRequest(); var Result = Client.GetOrganization(Request); this.PingResultTextBox.Text = "Successfully Created Service Client"; } catch (Exception ex) { this.PingResultTextBox.Text = "Failed to create Service Client:\n\n" + ex.Message; } }
private void GetKey_Clik(object sender, RoutedEventArgs e) { EWEManagerService.EWEManagerServiceClient client = ServiceClient.GetClient(); Epi.Web.Enter.Common.Message.OrganizationRequest Request = new Epi.Web.Enter.Common.Message.OrganizationRequest(); this.ONameEditTextBox1.Clear(); this.checkBox1.IsChecked = false; richTextBox1.Document.Blocks.Clear(); try { if (!string.IsNullOrEmpty(passwordBox1.Password.ToString()) && IsGuid(passwordBox1.Password.ToString())) { if (OnamelistBox1.Items.Count > 0) { if (!string.IsNullOrEmpty(OnamelistBox1.SelectedItem.ToString())) { Request.Organization.Organization = this.OnamelistBox1.SelectedItem.ToString(); Request.AdminSecurityKey = new Guid(passwordBox1.Password); Epi.Web.Enter.Common.Message.OrganizationResponse Result = client.GetOrganization(Request); EditOtextBox1.Clear(); ONameEditTextBox1.Clear(); if (Result.Message != null) { richTextBox1.AppendText(Result.Message.ToString()); } if (Result.OrganizationList != null) { for (int i = 0; i < Result.OrganizationList.Count; i++) { // EditOtextBox1.Text = Cryptography.Decrypt(Result.OrganizationList[i].OrganizationKey.ToString()); EditOtextBox1.Text = Result.OrganizationList[i].OrganizationKey.ToString(); this.ONameEditTextBox1.Text = Result.OrganizationList[i].Organization; this.checkBox1.IsChecked = Result.OrganizationList[i].IsEnabled; } } } else { richTextBox1.AppendText("Please selet a organization name."); } } else { richTextBox1.AppendText("Please selet a organization name."); } } else { richTextBox1.AppendText("Admin pass is required and Should be a Guid."); } } catch (Exception ex) { richTextBox1.AppendText("Error occurred while trying to get new organization keys. "); } }
private void AddOrganization_Click(object sender, RoutedEventArgs e) { MessagerichTextBox1.Document.Blocks.Clear(); EWEManagerService.EWEManagerServiceClient client = ServiceClient.GetClient(); Epi.Web.Enter.Common.Message.OrganizationRequest Request = new Epi.Web.Enter.Common.Message.OrganizationRequest(); MessagerichTextBox1.Foreground = Brushes.Red; try { if (!string.IsNullOrEmpty(passwordBox1.Password.ToString()) && IsGuid(passwordBox1.Password.ToString())) { if (!string.IsNullOrEmpty(OrganizationtextBox1.Text.ToString())) { if (!string.IsNullOrEmpty(GeneratedkeytextBox1.Text.ToString())) { Request.Organization.IsEnabled = true; Request.AdminSecurityKey = new Guid(passwordBox1.Password); Request.Organization.Organization = OrganizationtextBox1.Text; //Request.Organization.OrganizationKey = Cryptography.Encrypt(this.GeneratedkeytextBox1.Text); Request.Organization.OrganizationKey = this.GeneratedkeytextBox1.Text.ToString(); Epi.Web.Enter.Common.Message.OrganizationResponse Result = client.SetOrganization(Request); MessagerichTextBox1.Document.Blocks.Clear(); OrganizationtextBox1.Clear(); GeneratedkeytextBox1.Clear(); if (Result.Message.ToString().Contains("Successfully")) { MessagerichTextBox1.Foreground = Brushes.Green; } MessagerichTextBox1.AppendText(Result.Message.ToString()); } else { MessagerichTextBox1.AppendText("Please generate organization key."); } } else { MessagerichTextBox1.AppendText("Organization Name is required."); } } else { MessagerichTextBox1.AppendText("Admin pass is required and Should be a Guid."); } } catch (Exception ex) { MessagerichTextBox1.AppendText("Error occurred while trying to add new organization key. Please try again. "); } }
//Save_Click private void Save_Click(object sender, RoutedEventArgs e) { MessagerichTextBox1.Document.Blocks.Clear(); EWEManagerService.EWEManagerServiceClient client = ServiceClient.GetClient(); Epi.Web.Enter.Common.Message.OrganizationRequest Request = new Epi.Web.Enter.Common.Message.OrganizationRequest(); richTextBox1.Foreground = Brushes.Red; richTextBox1.Document.Blocks.Clear(); try { if (!string.IsNullOrEmpty(passwordBox1.Password.ToString()) && IsGuid(passwordBox1.Password.ToString())) { if (checkBox1.IsChecked == true) { Request.Organization.IsEnabled = true; } else { Request.Organization.IsEnabled = false; } Request.AdminSecurityKey = new Guid(passwordBox1.Password); Request.Organization.Organization = ONameEditTextBox1.Text; //Request.Organization.OrganizationKey = Cryptography.Encrypt(EditOtextBox1.Text); Request.Organization.OrganizationKey = EditOtextBox1.Text.ToString(); Epi.Web.Enter.Common.Message.OrganizationResponse Result = client.UpdateOrganizationInfo(Request); if (Result.Message.ToString().Contains("Successfully")) { richTextBox1.Foreground = Brushes.Green; GetOrganizationNames(); this.OnamelistBox1.SelectedItem = Request.Organization.Organization; } richTextBox1.AppendText(Result.Message.ToString()); } else { richTextBox1.AppendText("Admin pass is required and Should be a Guid."); } } catch (Exception ex) { richTextBox1.AppendText("Error occurred while updating organization info. Please try again. "); } }
public void GetOrganizationNames() { EWEManagerService.EWEManagerServiceClient client = ServiceClient.GetClient(); Epi.Web.Enter.Common.Message.OrganizationRequest Request = new Epi.Web.Enter.Common.Message.OrganizationRequest(); richTextBox1.Document.Blocks.Clear(); try { if (!string.IsNullOrEmpty(passwordBox1.Password.ToString()) && IsGuid(passwordBox1.Password.ToString())) { Request.AdminSecurityKey = new Guid(passwordBox1.Password); // Epi.Web.Enter.Common.Message.OrganizationResponse Result = client.GetOrganizationInfo(Request); Epi.Web.Enter.Common.Message.OrganizationResponse Result = client.GetOrganizationNames(Request); OnamelistBox1.Items.Clear(); if (Result.Message != null) { richTextBox1.AppendText(Result.Message.ToString()); } if (Result.OrganizationList != null) { for (int i = 0; i < Result.OrganizationList.Count; i++) { this.OnamelistBox1.Items.Add(Result.OrganizationList[i].Organization); } this.OnamelistBox1.SelectedIndex = 0; } } else { richTextBox1.AppendText("Admin pass is required and Should be a Guid."); } } catch (Exception ex) { richTextBox1.AppendText("Error occurred while trying to get all organization names. "); } }
private void Edit_Clik(object sender, RoutedEventArgs e) { //if (!string.IsNullOrEmpty(EditOtextBox1.Text)) //{ EWEManagerService.EWEManagerServiceClient client = ServiceClient.GetClient(); Epi.Web.Enter.Common.Message.OrganizationRequest Request = new Epi.Web.Enter.Common.Message.OrganizationRequest(); richTextBox1.Document.Blocks.Clear(); try { if (!string.IsNullOrEmpty(passwordBox1.Password.ToString()) && IsGuid(passwordBox1.Password.ToString())) { Request.AdminSecurityKey = new Guid(passwordBox1.Password); Request.Organization.OrganizationKey = EditOtextBox1.Text; Epi.Web.Enter.Common.Message.OrganizationResponse Result = client.GetOrganizationByKey(Request); if (Result.OrganizationList != null) { for (int i = 0; i < Result.OrganizationList.Count; i++) { this.ONameEditTextBox1.Text = Result.OrganizationList[i].Organization; this.checkBox1.IsChecked = Result.OrganizationList[i].IsEnabled; } } } else { richTextBox1.AppendText("Admin pass is required and Should be a Guid."); } } catch (Exception ex) { richTextBox1.AppendText("Error occurred while trying to get organization Info. "); } //} //else { // richTextBox1.AppendText("Please select organization key."); //} }
public Epi.Web.Enter.Common.Message.OrganizationResponse UpdateOrganizationInfo(Epi.Web.Enter.Common.Message.OrganizationRequest pRequest) { return(base.Channel.UpdateOrganizationInfo(pRequest)); }
public Epi.Web.Enter.Common.Message.OrganizationResponse SetOrganization(Epi.Web.Enter.Common.Message.OrganizationRequest pRequest) { return(base.Channel.SetOrganization(pRequest)); }
public System.Threading.Tasks.Task <Epi.Web.Enter.Common.Message.OrganizationResponse> GetOrganizationUsersAsync(Epi.Web.Enter.Common.Message.OrganizationRequest request) { return(base.Channel.GetOrganizationUsersAsync(request)); }
public Epi.Web.Enter.Common.Message.OrganizationResponse GetOrganizationUsers(Epi.Web.Enter.Common.Message.OrganizationRequest request) { return(base.Channel.GetOrganizationUsers(request)); }
public Epi.Web.Enter.Common.Message.OrganizationResponse GetOrganizationInfo(Epi.Web.Enter.Common.Message.OrganizationRequest OrgRequest) { return(base.Channel.GetOrganizationInfo(OrgRequest)); }