Ejemplo n.º 1
0
 public static Documento_venta getDocumento_venta(int id)
 {
     try
     {
         Query query = new Query("select", "documento_venta");
         query.AddWhere("ID", id.ToString());
         query.AddSelect("*");
         Documento_venta objeto   = new Documento_venta();
         DataSet         dataset  = FachadaDocumento_venta.getListado(query);
         int             contador = 0;
         if (dataset != null)
         {
             foreach (DataRow fila in dataset.Tables[0].Rows)
             {
                 objeto = new Documento_venta(fila);
                 contador++;
             }
         }
         return(objeto);
     }
     catch (Exception ex)
     {
         Utils.EscribeLog(ex);
         return(null);
     }
 }
Ejemplo n.º 2
0
 public static Documento_venta[] getListadoPorWhere(string where)
 {
     try
     {
         string[] arrString = where.Split('=');
         Query    query     = new Query("select", "documento_venta");
         query.AddWhere(arrString[0], arrString[1]);
         query.AddSelect("*");
         DataSet           dataset            = FachadaDocumento_venta.getListado(query);
         Documento_venta[] arrdocumento_venta = new Documento_venta[dataset.Tables[0].Rows.Count];
         int contador = 0;
         if (dataset != null)
         {
             foreach (DataRow fila in dataset.Tables[0].Rows)
             {
                 Documento_venta objeto = new Documento_venta(fila);
                 arrdocumento_venta[contador] = objeto;
                 contador++;
             }
         }
         return(arrdocumento_venta);
     }
     catch (Exception ex)
     {
         Utils.EscribeLog(ex);
         return(null);
     }
 }
Ejemplo n.º 3
0
 public static Documento_venta[] getListado(Query query)
 {
     try
     {
         query.AddWhereExacto(ST_Documento_venta.estado_vigente, "vigente");
         DataSet           dataset            = FachadaDocumento_venta.getListado(query);
         Documento_venta[] arrdocumento_venta = new Documento_venta[dataset.Tables[0].Rows.Count];
         int contador = 0;
         if (dataset != null)
         {
             foreach (DataRow fila in dataset.Tables[0].Rows)
             {
                 Documento_venta objeto = new Documento_venta(fila);
                 arrdocumento_venta[contador] = objeto;
                 contador++;
             }
         }
         return(arrdocumento_venta);
     }
     catch (Exception ex)
     {
         Utils.EscribeLog(ex);
         return(null);
     }
 }
Ejemplo n.º 4
0
 public static void ejecutaSin_retorno(Query query)
 {
     try
     {
         FachadaDocumento_venta.ejecutaSin_retorno(query);
     }
     catch (Exception ex)
     {
         Utils.EscribeLog(ex);
     }
 }
Ejemplo n.º 5
0
 public static void eliminar(Query query)
 {
     try
     {
         FachadaDocumento_venta.eliminar(query);
     }
     catch (Exception ex)
     {
         Utils.EscribeLog(ex);
     }
 }
Ejemplo n.º 6
0
 public static void actualizarJSON(Documento_ventaJSON objeto)
 {
     try
     {
         FachadaDocumento_venta.actualizarJSON(objeto);
     }
     catch (Exception ex)
     {
         Utils.EscribeLog(ex);
     }
 }
Ejemplo n.º 7
0
 public static int guardar(Documento_venta objeto)
 {
     try
     {
         return(FachadaDocumento_venta.guardar(objeto));
     }
     catch (Exception ex)
     {
         Utils.EscribeLog(ex);
         return(0);
     }
 }
Ejemplo n.º 8
0
 public static void eliminar(int ID)
 {
     try
     {
         Query query = new Query("delete", "documento_venta");
         query.AddWhere("ID", ID.ToString());
         FachadaDocumento_venta.eliminar(query);
     }
     catch (Exception ex)
     {
         Utils.EscribeLog(ex);
     }
 }