示例#1
0
 public List <GetFacturas_Sp_Result> GetFacturas()
 {
     try
     {
         PruebaSodEntities db = new PruebaSodEntities();
         return(db.Database.SqlQuery <GetFacturas_Sp_Result>("GetFacturas_Sp").ToList());
     }catch (Exception ex)
     {
         return(null);
     }
 }
示例#2
0
 public GetFactura_Sp_Result GetFactura(int id)
 {
     try
     {
         PruebaSodEntities db = new PruebaSodEntities();
         return(db.Database.SqlQuery <GetFactura_Sp_Result>("GetFactura_Sp @id", new SqlParameter("@id", id)).FirstOrDefault());
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
示例#3
0
 public Clientes GetCliente(int id)
 {
     try
     {
         PruebaSodEntities db = new PruebaSodEntities();
         return(db.Clientes.Where(x => x.Nit == id).FirstOrDefault());
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
示例#4
0
 public List <Clientes> GetClientes()
 {
     try
     {
         PruebaSodEntities db = new PruebaSodEntities();
         return(db.Clientes.ToList());
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
示例#5
0
 public Impuestoes GetImpuesto(int id)
 {
     try
     {
         PruebaSodEntities db = new PruebaSodEntities();
         return(db.Impuestoes.Where(x => x.Id == id).FirstOrDefault());
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
示例#6
0
 public List <Productoes> GetProductos()
 {
     try
     {
         PruebaSodEntities db = new PruebaSodEntities();
         return(db.Productoes.ToList());
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
示例#7
0
 public List <GetFacturaPorproducto_Sp_Result> GetFacturaporproducto(int id)
 {
     try
     {
         PruebaSodEntities db = new PruebaSodEntities();
         return(db.Database.SqlQuery <GetFacturaPorproducto_Sp_Result>("GetFacturaPorproducto_Sp @id", new SqlParameter("@id", id)).ToList());
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
示例#8
0
 public string Deleteproductosporfactura(int id)
 {
     try
     {
         PruebaSodEntities db = new PruebaSodEntities();
         db.Database.ExecuteSqlCommand("DeleteProductosporfactura_Sp @id", new SqlParameter("@id", id));
         return("ok");
     }
     catch (Exception ex)
     {
         return(null);
     }
 }