Ejemplo n.º 1
0
        public static Boleta Create(Boleta boleta)
        {
            try
            {
                var Query  = BoletaQuerys.Create(boleta);
                var Result = Convert.ToInt32(Commands.ExecuteScalar(Query));

                boleta.Id = Result;
            }
            catch (Exception ex)
            {
                ExceptionUtility.LogError(ex);
            }
            return(boleta);
        }
Ejemplo n.º 2
0
        public static bool Update(Boleta boleta)
        {
            bool Result = false;

            try
            {
                var Query = BoletaQuerys.Update(boleta);
                Result = Commands.ExecuteNonQuery(Query);
            }
            catch (Exception ex)
            {
                ExceptionUtility.LogError(ex);
            }
            return(Result);
        }
Ejemplo n.º 3
0
        public static Boleta GetById(int id, bool onlyActives = true)
        {
            Boleta Boleta = null;

            try
            {
                var Query  = BoletaQuerys.GetById(id, onlyActives);
                var Result = Commands.ExecuteQuery(Query);

                Boleta = GetData(Result).First();
            }
            catch (Exception ex)
            {
                ExceptionUtility.LogError(ex);
            }
            return(Boleta);
        }
Ejemplo n.º 4
0
        public static List <Boleta> GetList(bool onlyActives = true)
        {
            List <Boleta> ListBoleta = new List <Boleta>();

            try
            {
                var Query  = BoletaQuerys.GetList(onlyActives);
                var Result = Commands.ExecuteQuery(Query);

                ListBoleta = GetData(Result);
            }
            catch (Exception ex)
            {
                ExceptionUtility.LogError(ex);
            }
            return(ListBoleta);
        }