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); }
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); }
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); }
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); }