Example #1
0
        public static SkillViewModel CreateSkill()
        {
            SkillViewModel skill = new SkillViewModel()
            {
                Name = GetDataHelper.GetNameFromUser(),
            };

            return(skill);
        }
        public static CourseViewModel CreateCourse()
        {
            CourseViewModel user = new CourseViewModel()
            {
                Name        = GetDataHelper.GetNameFromUser(),
                Description = GetDataHelper.GetDescriptionForCourseFromUser(),
            };

            return(user);
        }
        public static BookViewModel CreateBook()
        {
            BookViewModel book = new BookViewModel()
            {
                Name         = GetDataHelper.GetNameFromUser(),
                Author       = GetDataHelper.GetAuthorNameFromUser(),
                CountOfPages = GetDataHelper.GetCountOfBookPages(),
            };

            return(book);
        }
        public static ArticleViewModel CreateArticle()
        {
            ArticleViewModel article = new ArticleViewModel()
            {
                Name            = GetDataHelper.GetNameFromUser(),
                PublicationDate = GetDataHelper.GetDateTimeFromUser(),
                Site            = GetDataHelper.GetSiteAddressFromUser(),
            };

            return(article);
        }
Example #5
0
        public static VideoViewModel CreateVideo()
        {
            VideoViewModel video = new VideoViewModel()
            {
                Name     = GetDataHelper.GetNameFromUser(),
                Link     = GetDataHelper.GetSiteAddressFromUser(),
                Duration = GetDataHelper.GetVideoDuration(),
                Quality  = GetDataHelper.GetVideoQuality(),
            };

            return(video);
        }
        public static UserViewModel CreateUser()
        {
            UserViewModel user = new UserViewModel()
            {
                Name        = GetDataHelper.GetNameFromUser(),
                Email       = GetDataHelper.GetEmailFromUser(),
                Password    = GetDataHelper.GetPasswordWithConfirmFromUser(),
                PhoneNumber = GetDataHelper.GetPhoneNumberFromUser(),
            };

            return(user);
        }
Example #7
0
        public void VerifyLoginAndPassword()
        {
            // get data from user
            string name     = GetDataHelper.GetNameFromUser();
            string password = GetDataHelper.GetPasswordFromUser();

            // verify user
            bool validUser = this.userService.VerifyUser(name, password);

            if (validUser)
            {
                ProgramBranch.SelectFirstStepForAuthorizedUser();
            }
            else
            {
                Console.WriteLine("User with such data does not exist");
                Thread.Sleep(4000);
                ProgramBranch.StartApplication();
            }
        }