Esempio n. 1
0
 public void Dispose()
 {
     if (Contex != null)
     {
         Contex.Dispose();
     }
 }
 public static void Guardar(Subsidios sub)
 {
     try
     {
         GestionVentaDb db = new GestionVentaDb();
         db.subsidios.Add(sub);
         //db.SaveChanges();
         db.Dispose();
     }
     catch (FormatException)
     {
         Console.WriteLine("No se puede convertir a '{0}' a un solo. ", sub);
     }
 }
Esempio n. 3
0
 public static void Guardar(Vendedores ven)
 {
     try
     {
         GestionVentaDb db = new GestionVentaDb();
         db.vendedores.Add(ven);
         //db.SaveChanges();
         db.Dispose();
     }
     catch (FormatException)
     {
         Console.WriteLine("No se puede convertir a '{0}' a un solo. ", ven);
     }
 }
 public static void Insertar(Gastos g)
 {
     try
     {
         GestionVentaDb db = new GestionVentaDb();
         db.gasto.Add(g);
         db.SaveChanges();
         db.Dispose();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public static void Insertar(CuadresVendedores cv)
 {
     try
     {
         GestionVentaDb db = new GestionVentaDb();
         db.Cuadre.Add(cv);
         db.SaveChanges();
         db.Dispose();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public static void Insertar(VendedoresDetalles vd)
 {
     try
     {
         GestionVentaDb db = new GestionVentaDb();
         db.VendedorDetalle.Add(vd);
         db.SaveChanges();
         db.Dispose();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 7
0
 public static void Insertar(Pagos p)
 {
     try
     {
         GestionVentaDb db = new GestionVentaDb();
         db.pago.Add(p);
         db.SaveChanges();
         db.Dispose();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 8
0
 public static void Insertar(Categorias c)
 {
     try
     {
         GestionVentaDb db = new GestionVentaDb();
         db.Categoria.Add(c);
         db.SaveChanges();
         db.Dispose();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 9
0
 public static void Insertar(DetalleVendedores dv)
 {
     try
     {
         GestionVentaDb db = new GestionVentaDb();
         db.DetalleVendedores.Add(dv);
         // db.SaveChanges();
         db.Dispose();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public static void Guardar(Categorias c)
 {
     try
     {
         GestionVentaDb db = new GestionVentaDb();
         db.Categorias.Add(c);
         //db.SaveChanges();
         db.Dispose();
     }
     catch (FormatException)
     {
         Console.WriteLine("No se puede convertir a '{0}' a un solo. ", c);
     }
 }