예제 #1
0
        public int InsertarFecha(FechasDTO Cat)
        {
            FechasDTO Objgrabar = new FechasDTO();
            FechasBll b = new FechasBll();

            Objgrabar.Id = Cat.Id;
            Objgrabar.Proyecto = Cat.Proyecto;
            Objgrabar.Fecha = Cat.Fecha;
            Objgrabar.Tipo = Cat.Tipo;

            return b.insert(Objgrabar);
        }
예제 #2
0
        //Crear Empleados, Recibe un objeto y retorna un entero.
        public int insert(FechasDTO Cat)
        {
            Fechas Obj = new Fechas();

            try
            {
                Obj.Id = Cat.Id;
                Obj.Fecha = DateTime.Now;
                Obj.Proyecto = Cat.Proyecto;
                Obj.Tipo = "False";
                db.Fechas.Add(Obj);
                db.SaveChanges();
                return Obj.Id;
            }
            catch
            {
                return 0;
            }
        }