コード例 #1
0
    public static void eliminarEvento(Models.PlanifAgendaCat evento, bool enviarMail, bool solapamiento)
    {
        BLL.PlanifAgendaCat planifAgendaCat = new BLL.PlanifAgendaCat();
        ArrayList           aListCorreo     = new ArrayList();

        try
        {
            int result = planifAgendaCat.eliminarEvento(evento, enviarMail, solapamiento);
        }
        catch (Exception ex)
        {
            IB.SUPER.Shared.LogError.LogearError("Error al elmininar el evento", ex);
            throw new Exception("Error al eliminar el evento");
        }

        finally
        {
            planifAgendaCat.Dispose();
        }
    }
コード例 #2
0
    public static Models.PlanifAgendaCat getDetalleEvento(int idEvento)
    {
        BLL.PlanifAgendaCat planifAgendaCat = new BLL.PlanifAgendaCat();

        try
        {
            Models.PlanifAgendaCat oEvento = null;

            oEvento = planifAgendaCat.getDetalleEvento(idEvento);
            return(oEvento);
        }
        catch (Exception ex)
        {
            LogError.LogearError("Error al cargar el detalle de un evento", ex);
            throw new Exception("Error al cargar el detalle de un evento");
        }
        finally
        {
            planifAgendaCat.Dispose();
        }
    }
コード例 #3
0
    public static string grabarEvento(Models.PlanifAgendaCat evento, string[] otrosProfesionales, bool confirmarBorrado)
    {
        BLL.PlanifAgendaCat planifAgendaCat = new BLL.PlanifAgendaCat();
        string result = "";;
        int    resultGrabarEvento;

        try
        {
            resultGrabarEvento = planifAgendaCat.grabarEvento(evento, confirmarBorrado);
            if (resultGrabarEvento == -1)
            {
                return(resultGrabarEvento + "");
            }
            else
            {
                result = resultGrabarEvento + "";
            }
            if (otrosProfesionales != null && otrosProfesionales.Count() > 0)
            {
                result = planifAgendaCat.grabarEventoProfAsignados(evento, otrosProfesionales, confirmarBorrado);
            }
            return(result);
        }

        catch (ValidationException ex)
        {
            throw new ValidationException(System.Uri.EscapeDataString(ex.Message));
        }

        catch (Exception ex)
        {
            throw new Exception(System.Uri.EscapeDataString(ex.Message));
        }

        finally
        {
            planifAgendaCat.Dispose();
        }
    }