Exemple #1
0
 public static bool RegistrarUnidad(string nombreUnidad)
 {
     using (var context = new CapacitacionEntities())
     {
         try
         {
             context.registrar_unidad(nombreUnidad);
             return(true);
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }
Exemple #2
0
 public static bool RegistrarTienda(string nombreTienda, string direccion, string nit)
 {
     using (var context = new CapacitacionEntities())
     {
         try
         {
             context.registrar_tienda(nombreTienda, nit, direccion);
             return(true);
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }
Exemple #3
0
 public static cliente ObtenerCliente(int identificacion)
 {
     using (var context = new CapacitacionEntities())
     {
         try
         {
             var oCliente = from c in context.clientes
                            where c.cedula == identificacion
                            select c;
             return(oCliente.FirstOrDefault());
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }