Exemplo n.º 1
0
        public Person Update(Person person)
        {
            var editedPerson = DbFacade.Instance.Provider.UpdatePerson(person);

            PersonsChanged?.Invoke(this, editedPerson);
            return(editedPerson);
        }
Exemplo n.º 2
0
        public PersonInScene AddToScene(Person person, Scene scene)
        {
            var pisAdded = DbFacade.Instance.Provider.AddPersonToScene(person, scene);

            PersonsChanged?.Invoke(this, pisAdded.Person);
            return(pisAdded);
        }
Exemplo n.º 3
0
        public Person Add(string name, string photo, DateTime?birthday, int?sex, long?trackingId)
        {
            var person = DbFacade.Instance.Provider.SavePerson(new Person()
            {
                Name       = name,
                Photo      = photo,
                Birthday   = birthday,
                Sex        = sex,
                TrackingId = trackingId
            });

            InputLoader.Instance.FillPersonInputModules(person);
            PersonsChanged?.Invoke(this, person);
            return(person);
        }
Exemplo n.º 4
0
 public void Delete(Person person)
 {
     DbFacade.Instance.Provider.DeletePerson(person);
     PersonsChanged?.Invoke(this, null);
 }