Example #1
0
 public int CreateList(MemoList list, string sessionid)
 {
     HouseManagerServer.Person person = dBSession.GetSessionBySessionID(sessionid).Person;
     return(dBList.InsertList(new HouseManagerServer.MemoList {
         Title = list.Title, Description = list.Description, Person = person
     }));
 }
Example #2
0
        public bool UpdateList(MemoList list, string sessionid)
        {
            int personidsession = dBSession.GetSessionBySessionID(sessionid).Person.Id;
            int personidlist    = dBList.GetMemoListById(list.Id).Person.Id;

            if (personidlist == personidsession)
            {
                return(dBList.UpdateList(new HouseManagerServer.MemoList {
                    Id = list.Id, Title = list.Title, Description = list.Description
                }));
            }
            else
            {
                return(false);
            }
        }