public void addEventByItemAndPerson(Item item, Person person)
        {
            StateDescription state = new StateDescription(item);
            Event            tmp   = new Event(state, person, DateTime.Now);

            DataRepository.addEvent(tmp);
        }
예제 #2
0
 public void updateStateDescription(int Id, StateDescription state)
 {
     if (Id > DataCtx.StatesCatalog.Count - 1 || Id < 0)
     {
         throw new KeyNotFoundException("StatesCatalog does not contain such ID - \"" + Id + "\"");
     }
     DataCtx.StatesCatalog[Id] = state;
 }
        public List <Event> getAllEventsByStateDescription(StateDescription state)
        {
            List <Event> tmp = DataRepository.getAllEvents();
            List <Event> res = new List <Event>();

            foreach (Event ev in tmp)
            {
                if (ev.StateDescription == state)
                {
                    res.Add(ev);
                }
            }
            return(res);
        }
 public void updateStateDescription(int Id, StateDescription state)
 {
     DataRepository.updateStateDescription(Id, state);
 }
 public void addStateDescription(StateDescription state)
 {
     DataRepository.addStateDescription(state);
 }
        public void addEventByStateAndPerson(StateDescription state, Person person)
        {
            Event tmp = new Event(state, person, DateTime.Now);

            DataRepository.addEvent(tmp);
        }
        public void addStateDescriptionByItem(Item item)
        {
            StateDescription tmp = new StateDescription(item);

            DataRepository.addStateDescription(tmp);
        }
예제 #8
0
 public Event(StateDescription stateDescription, Person person, DateTime hireDate)
 {
     StateDescription = stateDescription;
     Person           = person;
     HireDate         = hireDate;
 }
예제 #9
0
        // StateDescription C.R.U.D. methods

        public void addStateDescription(StateDescription state)
        {
            DataCtx.StatesCatalog.Add(state);
        }
예제 #10
0
 public Rental(StateDescription stateDescription, Person person, DateTime hireDate) :
     base(stateDescription, person, hireDate)
 {
     ReturnDate = null;
 }