Пример #1
0
 public bool Modificar(ref VEHICULO oVEHICULO)
 {
     try
     {
         return new VehiculoDao().Modificar(ref oVEHICULO);
     }
     catch (FaultException ex)
     {
         throw new FaultException(ex.Message);
     }
 }
Пример #2
0
 public bool Modificar(ref VEHICULO oVEHICULO)
 {
     try
     {
         using (Contexto = new AlquilerEntities())
         {
             Contexto.Entry(oVEHICULO).State = System.Data.Entity.EntityState.Modified;
             var vResult = Contexto.SaveChanges();
             if (vResult > 0)
                 return true;
             else
                 return false;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #3
0
        public bool Agregar(ref VEHICULO oVEHICULO)
        {
            try
            {
                using (Contexto = new AlquilerEntities())
                {
                    Contexto.VEHICULO.Add(oVEHICULO);
                    var vResult = Contexto.SaveChanges();
                    if (vResult > 0)
                        return true;
                    else
                        return false;
                }
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }