public C_Responses dameTarea(int tipoRS) { C_Responses retorno = new C_Responses(); retorno.resultado = "KO"; try { C_comunityManager proxy = new C_comunityManager(); string datos = proxy.dameTarea(tipoRS); if (datos.Trim() != "") { string[] commandArgs = datos.Split(new string[] { "###" }, StringSplitOptions.None); // C_FuncionesGenerales.("ws.asmx -> datos -> " + datos).ToString(); string codigoCM = commandArgs[0]; string ultimoPost = commandArgs[1]; bool isHastag = Convert.ToBoolean(commandArgs[2]); retorno.resultado = "OK"; C_Tarea tarea = new C_Tarea(); tarea.codigoCM = codigoCM; tarea.ultimoPostId = ultimoPost.ToString(); tarea.isHashtag = isHastag; retorno.data = tarea; } else //Si no hay nigun CM sin asignar en la red social solicitada { error objError = new error(); objError.codigo = "-1"; objError.mensaje = "All tasks are asigned."; retorno.data = objError; } } catch (Exception ex) { //string codigoError = C_FuncionesGenerales.registroErrores("ws.asmx -> damePosts -> " + ex.Message).ToString(); // throw new Exception("Error de conexión. Cód Error:" + ex.Message); error objError = new error(); objError.codigo = "-100"; objError.mensaje = "Error de conexión. Cód Error:" + ex.Message; retorno.data = objError; } return(retorno); }