public static Detalle_documento_venta getDetalle_documento_venta(int id)
 {
     try
     {
         Query query = new Query("select", "detalle_documento_venta");
         query.AddWhere("ID", id.ToString());
         query.AddSelect("*");
         Detalle_documento_venta objeto = new Detalle_documento_venta();
         DataSet dataset  = FachadaDetalle_documento_venta.getListado(query);
         int     contador = 0;
         if (dataset != null)
         {
             foreach (DataRow fila in dataset.Tables[0].Rows)
             {
                 objeto = new Detalle_documento_venta(fila);
                 contador++;
             }
         }
         return(objeto);
     }
     catch (Exception ex)
     {
         Utils.EscribeLog(ex);
         return(null);
     }
 }
 public static Detalle_documento_venta[] getListadoPorWhere(string where)
 {
     try
     {
         string[] arrString = where.Split('=');
         Query    query     = new Query("select", "detalle_documento_venta");
         query.AddWhere(arrString[0], arrString[1]);
         query.AddSelect("*");
         DataSet dataset = FachadaDetalle_documento_venta.getListado(query);
         Detalle_documento_venta[] arrdetalle_documento_venta = new Detalle_documento_venta[dataset.Tables[0].Rows.Count];
         int contador = 0;
         if (dataset != null)
         {
             foreach (DataRow fila in dataset.Tables[0].Rows)
             {
                 Detalle_documento_venta objeto = new Detalle_documento_venta(fila);
                 arrdetalle_documento_venta[contador] = objeto;
                 contador++;
             }
         }
         return(arrdetalle_documento_venta);
     }
     catch (Exception ex)
     {
         Utils.EscribeLog(ex);
         return(null);
     }
 }
 public static Detalle_documento_venta[] getListado(Query query)
 {
     try
     {
         //query.AddWhereExacto(ST_Detalle_documento_venta.estado_vigente, "vigente");
         DataSet dataset = FachadaDetalle_documento_venta.getListado(query);
         Detalle_documento_venta[] arrdetalle_documento_venta = new Detalle_documento_venta[dataset.Tables[0].Rows.Count];
         int contador = 0;
         if (dataset != null)
         {
             foreach (DataRow fila in dataset.Tables[0].Rows)
             {
                 Detalle_documento_venta objeto = new Detalle_documento_venta(fila);
                 arrdetalle_documento_venta[contador] = objeto;
                 contador++;
             }
         }
         return(arrdetalle_documento_venta);
     }
     catch (Exception ex)
     {
         Utils.EscribeLog(ex);
         return(null);
     }
 }