예제 #1
0
        public UserPage(Model.User user)
        {
            InitializeComponent();
            Local();
            _user         = user;
            UserName.Text = string.Format("{0} {1}", _user.Surname, _user.Name);
            _surveys      = surveyController.GetByUserId(_user.Id);
            UpdateSurveysTable();
            if (_surveys.Count > 0)
            {
                GoToTest.Visibility = Visibility.Visible;
            }
            else
            {
                GoToTest.Visibility = Visibility.Collapsed;
            }
            string bestSurvey = surveyController.GetTheBestSurveyOfUser(_user.Id);

            if (!string.IsNullOrEmpty(bestSurvey))
            {
                LabelBestSurvey.Content = bestSurvey;
            }
        }