예제 #1
0
        static void Main(string[] args)
        {
            TrelloAnalog TrelloProgram = new TrelloAnalog();

            //AbstractDBProvider dbProvider = new XML(TrelloProgram);
            AbstractDBProvider dbProvider = new JSON(TrelloProgram);

            TrelloProgram.StartApp(dbProvider);
        }
예제 #2
0
        public Repository(TrelloAnalog myProgram, AbstractDBProvider dbProvider)
        {
            this.myProgram  = myProgram;
            this.dBProvider = dbProvider;

            Persons   = new PersonRepository(dBProvider);
            Boards    = new BoardRepository(dBProvider, this);
            HomeWorks = new HomeWorkRepository(dBProvider, this);
        }
예제 #3
0
        public XML(TrelloAnalog myProgram)
        {
            if (!File.Exists(FilePath))
            {
                CreateXmlFile();
            }

            this.myProgram = myProgram;
        }
예제 #4
0
        public JSON(TrelloAnalog myProgram)
        {
            //if (!File.Exists(FilePath))
            //{
            //    CreateJSONFile();
            //}

            this.myProgram = myProgram;
        }
예제 #5
0
파일: Person.cs 프로젝트: larin-ihor/Trello
        public static Person Login(string userName, TrelloAnalog myProgram)
        {
            var allStudent     = myProgram.repository.Persons.Get().ToList();
            var foundedStudent = allStudent.Where(p => p.PersonName == userName.Trim());

            if (foundedStudent.Count() > 0)
            {
                return(foundedStudent.First());
            }
            else
            {
                return(null);
            }
        }
예제 #6
0
파일: Person.cs 프로젝트: larin-ihor/Trello
        public static Person RegisterPerson(string name, TrelloAnalog myProgram, PersonType type, string email)
        {
            Person newStudent = new Person(name, myProgram.repository.Persons.Get().Count() + 1, type, email);

            return(newStudent);
        }