Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        private void LoadEducationalLevels(long id)
        {
            WrapPanelEducationaLevel.Children.Clear();
            List <long> childrenIDs = _contentManager.GetChildrenIDs(id);

            if (childrenIDs != null)
            {
                foreach (int childID in childrenIDs)
                {
                    EducationalLevel level = _contentManager.GetComponent(childID) as EducationalLevel;
                    Image            image = new Image()
                    {
                        Source     = new BitmapImage(new Uri(level.Icon)),
                        RenderSize = new Size(100, 100),
                        MaxHeight  = 100,
                        MaxWidth   = 100,
                        Margin     = new Thickness(15),
                        Opacity    = 0.5,
                        Visibility = Visibility.Visible,
                        Name       = "Icon_" + level.ID
                    };
                    image.MouseUp += delegate(object sender, MouseButtonEventArgs args)
                    {
                        ImageEducationaLevel_Click(sender as Image);
                    };
                    _educationalLevelDictionary[image.Name] = childID;
                    WrapPanelEducationaLevel.Children.Add(image);
                    _selectedEducationalLevel = image;
                }
            }
            WrapPanelGrades.Children.Clear();
            NoOfLessons.Text = "0";
            NoOfFiles.Text   = "0";
            NoOfWeeks.Text   = "0";
        }
Esempio n. 2
0
 public Student(Person person, EducationalLevel obtainedEducationalLevel, ObservableCollection <Exam> exams = null)
 {
     this.person = person;
     this.obtainedEducationalLevel = obtainedEducationalLevel;
     this.exams = exams == null ? new ObservableCollection <Exam>()
     {
     } : exams;
 }
Esempio n. 3
0
        public async Task <IHttpActionResult> GetEducationalLevel(int id, string language = "el")
        {
            EducationalLevel educationalLevel = await db.EducationalLevels.FindAsync(id);

            if (educationalLevel == null)
            {
                return(NotFound());
            }


            educationalLevel.ActiveLanguage =
                (from k in db.EducationalLevelLanguages where k.EducationalLevelId == id && k.Language == language select k)
                .FirstOrDefault();
            return(Ok(educationalLevel));
        }
        public async Task <IActionResult> Create([Bind("Id,ApplicationUserId,AcademicDegreeId,SpecialityId,CountryId,ArCertificateName,EnCertificateName,FacultyId,UniversityId,ArDescription,EnDescription,IsCurrent,FromYear,ToYear,Indx")] EducationalLevel educationalLevels)
        {
            if (ModelState.IsValid)
            {
                //educationalLevels.Indx = 0;
                _context.Add(educationalLevels);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ApplicationUserId"] = _userManager.GetUserId(User);
            ViewData["AcademicDegreeId"]  = new SelectList(_context.AcademicDegrees, "Id", "ArDegreeName", educationalLevels.AcademicDegreeId);
            ViewData["FacultyId"]         = new SelectList(_context.Faculties, "Id", "ArFacultyName", educationalLevels.FacultyId);
            ViewData["SpecialityId"]      = new SelectList(_context.Specialities, "Id", "Name", educationalLevels.SpecialityId);
            ViewData["UniversityId"]      = new SelectList(_context.Universities, "Id", "ArUniversityName", educationalLevels.UniversityId);
            ViewData["CountryId"]         = new SelectList(_context.Countries, "Id", "ArCountryName");
            return(View(educationalLevels));
        }
        public async Task <IActionResult> Edit(int id,
                                               [Bind("Id,ApplicationUserId,AcademicDegreeId,SpecialityId,CountryId,ArCertificateName,EnCertificateName,FacultyId,UniversityId,ArDescription,EnDescription,IsCurrent,FromYear,ToYear,Indx")]
                                               EducationalLevel educationalLevels)
        {
            if (id != educationalLevels.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    //educationalLevels.Indx = 0;
                    _context.Update(educationalLevels);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EducationalLevelsExists(educationalLevels.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["AcademicDegreeId"] = new SelectList(_context.AcademicDegrees, "Id", "ArDegreeName", educationalLevels.AcademicDegreeId);
            ViewData["FacultyId"]        = new SelectList(_context.Faculties, "Id", "ArFacultyName", educationalLevels.FacultyId);
            ViewData["SpecialityId"]     = new SelectList(_context.Specialities, "Id", "Name", educationalLevels.SpecialityId);
            ViewData["UniversityId"]     = new SelectList(_context.Universities, "Id", "ArUniversityName", educationalLevels.UniversityId);
            ViewData["CountryId"]        = new SelectList(_context.Countries, "Id", "ArCountryName", educationalLevels.CountryId);
            return(View(educationalLevels));
        }
Esempio n. 6
0
 async void NavigateEducationalLevelAsync(EducationalLevel EducationalLevel)
 {
     await NavigationService.NavigateAsync(new Uri($"EducationalLevelPage?Id={EducationalLevel.Id}", UriKind.Relative));
 }