Пример #1
0
        public static bool Delete(int id, bool removePhysical = false)
        {
            bool Result = false;

            try
            {
                var Query = ActividadQuerys.Delete(id, removePhysical);
                Result = Commands.ExecuteNonQuery(Query);
            }
            catch (Exception ex)
            {
                ExceptionUtility.LogError(ex);
            }
            return(Result);
        }
Пример #2
0
        public static bool UpdateBoleta(Actividad actividad)
        {
            bool Result = false;

            try
            {
                var Query = ActividadQuerys.UpdateBoleta(actividad);
                Result = Commands.ExecuteNonQuery(Query);
            }
            catch (Exception ex)
            {
                ExceptionUtility.LogError(ex);
            }
            return(Result);
        }
Пример #3
0
 public static Actividad Create(Actividad actividad)
 {
     try
     {
         var Query = ActividadQuerys.Create(actividad);
         if (!Query.HasError)
         {
             var Result = Convert.ToInt32(Commands.ExecuteScalar(Query));
             actividad.Id = Result;
         }
     }
     catch (Exception ex)
     {
         ExceptionUtility.LogError(ex);
     }
     return(actividad);
 }
Пример #4
0
        public static Actividad GetById(int id, bool onlyActives = true)
        {
            Actividad Actividad = null;

            try
            {
                var Query  = ActividadQuerys.GetById(id, onlyActives);
                var Result = Commands.ExecuteQuery(Query);
                if (!Query.HasError)
                {
                    Actividad = GetData(Result).First();
                }
            }
            catch (Exception ex)
            {
                ExceptionUtility.LogError(ex);
            }
            return(Actividad);
        }
Пример #5
0
        public static List <Actividad> GetList(int boletaId, bool onlyActives = true)
        {
            List <Actividad> ListActividad = new List <Actividad>();

            try
            {
                var Query  = ActividadQuerys.GetList(boletaId, onlyActives);
                var Result = Commands.ExecuteQuery(Query);
                if (!Query.HasError)
                {
                    ListActividad = GetData(Result);
                }
            }
            catch (Exception ex)
            {
                ExceptionUtility.LogError(ex);
            }
            return(ListActividad);
        }