public bool RemoveReservation(Material material)
 {
     throw new NotImplementedException();
     //material.GuestID = null;
     //material.StartDate = null;
     //material.EndDate = null;
     //return material;
 }
        public bool Delete(Material entity)
        {
            var material = _materials.FirstOrDefault(e => e.ID == entity.ID);
            if (material == null) return false;

            _materials.Remove(material);
            return true;
        }
        public Material AddReservation(Material material, int guestID, DateTime startDate, DateTime endDate)
        {
            material.GuestID = guestID;
            material.StartDate = startDate;
            material.EndDate = endDate;

            return material;
        }
        public Material Insert(Material entity)
        {
            if (GetById(entity.ID) != null) return null;

            var id = _materials.Max(e => e.ID);
            var material = new Material(id, entity.Name, entity.EventID, entity.TypeID);
            _materials.Add(material);

            return material;
        }
        public bool UpdateReservation(Material material, DateTime startDate, DateTime endDate)
        {
            if (material.GuestID == 0) return false;

            material.StartDate = startDate;
            material.EndDate = endDate;

            return true;
        }
예제 #6
0
 public bool RemoveReservation(Material material)
 {
     return _contextMaterial.RemoveReservation(material);
 }
예제 #7
0
 public Material Insert(Material entity)
 {
     return _contextMaterial.Insert(entity);
 }
예제 #8
0
 public bool Delete(Material entity)
 {
     return _contextMaterial.Delete(entity);
 }
예제 #9
0
 public Material AddReservation(Material material, int guestId, DateTime startDate, DateTime endDate)
 {
     return _contextMaterial.AddReservation(material, guestId, startDate, endDate);
 }
예제 #10
0
 public bool UpdateReservation(Material material, DateTime startDate, DateTime endDate)
 {
     return _contextMaterial.UpdateReservation(material, startDate, endDate);
 }
예제 #11
0
 public bool Update(Material entity)
 {
     return _contextMaterial.Update(entity);
 }