public static Precio_por_volumen getPrecio_por_volumen(int id) { try { Query query = new Query("select", "precio_por_volumen"); query.AddWhere("ID", id.ToString()); query.AddSelect("*"); Precio_por_volumen objeto = new Precio_por_volumen(); DataSet dataset = FachadaPrecio_por_volumen.getListado(query); int contador = 0; if (dataset != null) { foreach (DataRow fila in dataset.Tables[0].Rows) { objeto = new Precio_por_volumen(fila); contador++; } } return(objeto); } catch (Exception ex) { Utils.EscribeLog(ex); return(null); } }
public static Precio_por_volumen[] getListadoPorWhere(string where) { try { string[] arrString = where.Split('='); Query query = new Query("select", "precio_por_volumen"); query.AddWhere(arrString[0], arrString[1]); query.AddSelect("*"); DataSet dataset = FachadaPrecio_por_volumen.getListado(query); Precio_por_volumen[] arrprecio_por_volumen = new Precio_por_volumen[dataset.Tables[0].Rows.Count]; int contador = 0; if (dataset != null) { foreach (DataRow fila in dataset.Tables[0].Rows) { Precio_por_volumen objeto = new Precio_por_volumen(fila); arrprecio_por_volumen[contador] = objeto; contador++; } } return(arrprecio_por_volumen); } catch (Exception ex) { Utils.EscribeLog(ex); return(null); } }
public static Precio_por_volumen[] getListado(Query query) { try { query.AddWhereExacto(ST_Precio_por_volumen.estado_vigente, "vigente"); DataSet dataset = FachadaPrecio_por_volumen.getListado(query); Precio_por_volumen[] arrprecio_por_volumen = new Precio_por_volumen[dataset.Tables[0].Rows.Count]; int contador = 0; if (dataset != null) { foreach (DataRow fila in dataset.Tables[0].Rows) { Precio_por_volumen objeto = new Precio_por_volumen(fila); arrprecio_por_volumen[contador] = objeto; contador++; } } return(arrprecio_por_volumen); } catch (Exception ex) { Utils.EscribeLog(ex); return(null); } }
public static void ejecutaSin_retorno(Query query) { try { FachadaPrecio_por_volumen.ejecutaSin_retorno(query); } catch (Exception ex) { Utils.EscribeLog(ex); } }
public static void eliminar(Query query) { try { FachadaPrecio_por_volumen.eliminar(query); } catch (Exception ex) { Utils.EscribeLog(ex); } }
public static void actualizarJSON(Precio_por_volumenJSON objeto) { try { FachadaPrecio_por_volumen.actualizarJSON(objeto); } catch (Exception ex) { Utils.EscribeLog(ex); } }
public static int guardar(Precio_por_volumen objeto) { try { return(FachadaPrecio_por_volumen.guardar(objeto)); } catch (Exception ex) { Utils.EscribeLog(ex); return(0); } }
public static void eliminar(int ID) { try { Query query = new Query("delete", "precio_por_volumen"); query.AddWhere("ID", ID.ToString()); FachadaPrecio_por_volumen.eliminar(query); } catch (Exception ex) { Utils.EscribeLog(ex); } }