public string DeleteTask(byte[] bytes) { string baseUrl = ConfigurationManager.ConnectionStrings["DALServerUrl"].ConnectionString; string url = baseUrl + DestinationNames.DeleteTask; TaskForDelete deserialized = Communicator.SendRequest <TaskForDelete> (bytes, url, "POST"); return("Success"); }
public string DeleteTask(byte[] bytes) { MemoryStream stream = new MemoryStream(bytes); TaskForDelete task = Communicator.ParseResponse <TaskForDelete>(stream); _sqlProvider.DeleteTask(task); return("Deleted."); }
public string DeleteTask(TaskId task) { TaskForDelete Task = new TaskForDelete(); Task.Id = task.Id; string baseUrl = ConfigurationManager.ConnectionStrings["ManagementServerName"].ConnectionString; string url = baseUrl + DestinationNames.DeleteTask; TaskForDelete deserialized = Communicator.SendRequest <TaskForDelete, TaskForDelete> (Task, url, "POST", "application/octet-stream"); return("Success"); }
public string DeleteTask(TaskForDelete task) { using (SqlConnection con = new SqlConnection (ConfigurationManager.ConnectionStrings["SQLProviderConnectionString"].ConnectionString)) { SqlCommand cmd = new SqlCommand("dbo.DeleteTask", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Id", task.Id); con.Open(); cmd.ExecuteNonQuery(); } return("Deleted."); }
public string DeleteTask(TaskForDelete task) { throw new NotImplementedException(); }