Пример #1
0
    public C_Responses cerrarTarea(int tipoRS, string codigoCM, int motivoCierre)
    {
        C_Responses retorno = new C_Responses();

        retorno.resultado = "KO";
        try
        {
            C_comunityManager proxy = new C_comunityManager();
            int datos = proxy.cerrarTarea(tipoRS, codigoCM, motivoCierre);

            if (datos > 0)
            {
                retorno.resultado = "OK";
            }
            else //Si no ha cerrado la tarea
            {
                error objError = new error();
                objError.codigo  = "-1";
                objError.mensaje = "No ha podido ser cerrada la tarea.";
                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);
    }