public static FechasBOE MapFechaBLToDA(FechasBOEBL fechas)
        {
            FechasBOE dt = new FechasBOE();

            dt.Id = fechas.idCalendar;
            dt.FechaDescargaBoe = fechas.fecha;
            return(dt);
        }
        public static FechasBOEBL MapFechaDAToBL(FechasBOE fechaDA)
        {
            FechasBOEBL dt = new FechasBOEBL();

            dt.idCalendar = fechaDA.Id;
            dt.fecha      = fechaDA.FechaDescargaBoe;
            return(dt);
        }
Example #3
0
        public static FechasBOE MapFechaEntityToDA(FechasDescargaBOE EntidadFecha)
        {
            FechasBOE dt = new FechasBOE();

            dt.Id = EntidadFecha.CalendarID;
            dt.FechaDescargaBoe = EntidadFecha.fecha.Value;
            return(dt);
        }
Example #4
0
        public static FechasDescargaBOE MapFechaDATOEntity(FechasBOE EntidadFecha)
        {
            FechasDescargaBOE dt = new FechasDescargaBOE();

            dt.CalendarID = EntidadFecha.Id;
            dt.fecha      = EntidadFecha.FechaDescargaBoe;
            return(dt);
        }
Example #5
0
 public bool save(FechasBOE fecha, out Error.Error err)
 {
     Error.Error error = new Error.Error();
     try
     {
         using (DataAccess.ACMEEntities db = new ACMEEntities())
         {
             FechasDescargaBOE ent = Mapper.MapperFecha.MapFechaDATOEntity(fecha);
             db.FechasDescargaBOE.Add(ent);
             db.SaveChanges();
         }
         error.ok      = true;
         error.mensaje = "fecha añadida con exito";
     }
     catch (Exception e)
     {
         error.ok      = false;
         error.mensaje = "Error al añadir fecha";
         Console.WriteLine(e.Message);
     }
     err = error;
     return(error.ok);
 }