/// <summary> /// Mark a set of Transport Responses as retrieved. Retrieved transport should not be returned /// in subsequent retrieve operations unless the <i>allAvailable</i> flag is specified. /// </summary> /// <param name="removeRequest">Specify the transport responses to be removed.</param> /// <param name="endpointUrl">The endpoint URL for the TRR service.</param> /// <returns>A list of results indicating if the operation is successful.</returns> public RemoveResultType[] Remove(remove removeRequest, Uri endpointUrl) { Validation.ValidateArgumentRequired("removeRequest", removeRequest); Validation.ValidateArgumentRequired("endpointUrl", endpointUrl); Validation.ValidateArgumentRequired("removeRequest.organisation", removeRequest.organisation); Validation.ValidateArgumentRequired("removeRequest.responseId", removeRequest.responseId); if (trrClient is Nehta.SMD2010.TRR.TransportResponseRetrievalClient) { Nehta.SMD2010.TRR.TransportResponseRetrievalClient client = (Nehta.SMD2010.TRR.TransportResponseRetrievalClient)trrClient; client.Endpoint.Address = new EndpointAddress(endpointUrl); } removeRequest request = new removeRequest(); request.remove = removeRequest; removeResponse response = trrClient.remove(request); if (response != null) { return(response.removeResponse1); } else { throw new ApplicationException(Properties.Resources.UnexpectedServiceResponse); } }
public void Sample() { // TLS certificate used to authenticate the client to the TRR service during TLS connection. X509Certificate2 tlsCert = X509CertificateUtil.GetCertificate("TlsCertificateSerialNumber", X509FindType.FindBySerialNumber, StoreName.My, StoreLocation.CurrentUser, true); // Instantiate client TransportResponseRetrievalClient client = new TransportResponseRetrievalClient(tlsCert); // ------------------------------------------------------------------------------ // Retrieve // ------------------------------------------------------------------------------ // Set up request retrieve retrieveRequest = new retrieve() { allAvailable = true, limit = 0, organisation = HIQualifiers.HPIOQualifier + "16 digit HPIO of receiver organisation" }; // Invoke the Retrieve operation TransportResponseListType responseList = client.Retrieve(retrieveRequest, new Uri("https://TRREndpointUri")); // ------------------------------------------------------------------------------ // Remove // ------------------------------------------------------------------------------ // Build list of retrieved transport response IDs string[] responseIds = responseList.response.Select(r => r.metadata.responseId).ToArray(); // Set up request remove removeRequest = new remove() { force = true, organisation = HIQualifiers.HPIOQualifier + "16 digit HPIO of receiver organisation", responseId = responseIds }; // Invoke the Remove operation RemoveResultType[] removeResults = client.Remove(removeRequest, new Uri("https://TRREndpointUri")); }
private void eDITREMOVECOURSEToolStripMenuItem_Click(object sender, EventArgs e) { remove removefrm = new remove(); removefrm.Show(); }
static void Main() { Console.WriteLine("Выберите что нужно сделать?"); Console.WriteLine("- [1] добавить запись"); Console.WriteLine("- [2] удалить запись"); Console.WriteLine("- [3] редактировать"); Console.WriteLine("- [4] показать список"); Console.WriteLine("- [5] выход из программы"); int i = Convert.ToInt32(Console.ReadLine()); if (i == 1) { add addrow = new add(); Console.WriteLine("напишите номер задачи и саму задачу"); int id = Convert.ToInt32(Console.ReadLine()); string task = Console.ReadLine(); addrow.addrow(id, task); Program main = new Program(); Program.Main(); } if (i == 2) { remove removerow = new remove(); Console.WriteLine("напишите номер задачи которую нужно удалить"); int id = Convert.ToInt32(Console.ReadLine()); removerow.removerow(id); Program main = new Program(); Program.Main(); } if (i == 3) { update updaterow = new update(); Console.WriteLine("напишите номер задачи которую надо обновить"); int id = Convert.ToInt32(Console.ReadLine()); string task = Console.ReadLine(); updaterow.updaterow(id, task); Program main = new Program(); Program.Main(); } if (i == 4) { show show = new show(); show.shownotes(); Console.ReadLine(); Program main = new Program(); Program.Main(); } if (i == 5) { Environment.Exit(0); } else { Console.WriteLine("не указано действие"); Program main = new Program(); Program.Main(); } }