Beispiel #1
0
 public bool AltaLocal(EntidadesCompartidas.Local local)
 {
     try
     {
         return(LogicaLocal.AltaLocal(local));
     }
     catch
     {
         throw new Exception("Error al intentar dar de alta el Local.");
     }
 }
Beispiel #2
0
 public static bool AltaLocal(EntidadesCompartidas.Local unLocal)
 {
     try
     {
         return(FabricaPersistencia.GetPersistenciaLocal().AltaLocal(unLocal));
     }
     catch
     {
         throw new Exception("Error al intentar dar de alta el Local.");
     }
 }
Beispiel #3
0
        public void AltaLocalERRORTest()
        {
            EntidadesCompartidas.Local local = new EntidadesCompartidas.Local
            {
                Id        = 0,
                Direccion = "DireccionOptica5",
                Nombre    = "Optica5",
                Entregas  = null,
                Entregas1 = null
            };

            var resultado = FabricaServicio.GetControladorLocal().AltaLocal(local);

            Assert.IsFalse(resultado);
        }
Beispiel #4
0
        public bool AltaLocal(EntidadesCompartidas.Local local)
        {
            try
            {
                Persistencia.Locales localAgregar = new Persistencia.Locales();

                localAgregar.Direccion = local.Direccion;
                localAgregar.Nombre    = local.Nombre;

                using (EnviosContext dbConnection = new EnviosContext())
                {
                    dbConnection.Locales.Add(localAgregar);

                    dbConnection.SaveChanges();

                    return(true);
                }
            }
            catch (Exception ex)
            {
                throw new Exception("Error al dar de alta el Local.");
            }
        }
Beispiel #5
0
 public bool ModificarLocal(EntidadesCompartidas.Local local)
 {
     return(true);
 }
Beispiel #6
0
 public static EntidadesCompartidas.Local ModificarLocal(EntidadesCompartidas.Local unLocal)
 {
     EntidadesCompartidas.Local local = new EntidadesCompartidas.Local();
     return(local);
 }
Beispiel #7
0
 public static EntidadesCompartidas.Local BuscarLocal(string nombreLocal)
 {
     EntidadesCompartidas.Local local = new EntidadesCompartidas.Local();
     return(local);
 }