コード例 #1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Name,CreateDate,UpdateDate")] QualificationLevel qualificationLevel)
        {
            if (id != qualificationLevel.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(qualificationLevel);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!QualificationLevelExists(qualificationLevel.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(qualificationLevel));
        }
コード例 #2
0
 public DeveloperViewModel(Developer entity)
 {
     Id            = entity.Id;
     CreatedAt     = entity.CreatedAt;
     Commentary    = entity.Commentary;
     Qualification = entity.Qualification;
     FullName      = entity.FullName;
 }
コード例 #3
0
 // Prospective(candidate) employee
 public Employee(SpecialistType specialistType,
                 QualificationLevel qualificationLevel,
                 string personalId, string firstName, string lastName, string phoneNumber, string email, DateTime birthDate)
     : base(specialistType, personalId, firstName, lastName, phoneNumber, email, birthDate)
 {
     this.qualificationLevel = qualificationLevel;
     this.specialistType     = specialistType;
 }
コード例 #4
0
        public async Task <IActionResult> Create([Bind("Id,Name,CreateDate,UpdateDate")] QualificationLevel qualificationLevel)
        {
            if (ModelState.IsValid)
            {
                _context.Add(qualificationLevel);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(qualificationLevel));
        }
        public CourseDetails(int courseid,
                             string courseTitle,
                             string courseSummary,
                             string awardingBody,
                             string entryRequirements,
                             string assessmentMethod,
                             string equipmentRequired,
                             string uRL,
                             string bookingURL,
                             string tariffRequired,
                             string lADID,
                             string qualificationReferenceAuthority,
                             string qualificationReference,
                             QualificationLevel qualificationLevel,
                             string qualificationTitle,
                             string level2EntitlementCategoryDesc,
                             string level3EntitlementCategoryDesc,
                             string sectorLeadBodyDesc,
                             string accreditationStartDate,
                             string accreditationEndDate,
                             string certificationEndDate,
                             string creditValue,
                             string qCAGuidedLearningHours,
                             string skillsForLifeTypeDesc



                             )
        {
            CourseId          = courseid;
            CourseTitle       = courseTitle;
            CourseSummary     = courseSummary;
            AwardingBody      = awardingBody;
            EntryRequirements = entryRequirements;
            AssessmentMethod  = assessmentMethod;
            EquipmentRequired = equipmentRequired;
            URL            = uRL;
            BookingURL     = bookingURL;
            TariffRequired = tariffRequired;
            LADID          = lADID;
            QualificationReferenceAuthority = qualificationReferenceAuthority;
            QualificationReference          = qualificationReference;
            QualificationLevel            = qualificationLevel;
            QualificationTitle            = qualificationTitle;
            Level2EntitlementCategoryDesc = level2EntitlementCategoryDesc;
            Level3EntitlementCategoryDesc = level3EntitlementCategoryDesc;
            SectorLeadBodyDesc            = sectorLeadBodyDesc;
            AccreditationStartDate        = accreditationStartDate;
            AccreditationEndDate          = accreditationEndDate;
            CertificationEndDate          = certificationEndDate;
            CreditValue            = creditValue;
            QCAGuidedLearningHours = qCAGuidedLearningHours;
            SkillsForLifeTypeDesc  = skillsForLifeTypeDesc;
        }
        internal static bool IsDisplayable(QualificationLevel qualificationLevel)
        {
            switch (qualificationLevel)
            {
            case QualificationLevel.Level9:
            case QualificationLevel.LevelNa:
                return(false);

            default:
                return(true);
            }
        }
コード例 #7
0
 public Qualification(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
 {
     QualificationLevel = qualificationLevel;
     if (qualificationLevel == QualificationLevel.Base)
     {
         BaseQualificationLevel = level;
     }
     else
     {
         BaseQualificationLevel   = level;
         MasterQualificationLevel = level;
     }
 }
コード例 #8
0
        //Constructors
        public Employee(string companyId, string teamId, string departmentId, SpecialistType specialistType,
                        QualificationLevel qualificationLevel, uint salary,
                        string personalId, string firstName, string lastName, string phoneNumber, string email, DateTime birthDate)
            : base(specialistType, personalId, firstName, lastName, phoneNumber, email, birthDate)

        {
            this.companyId          = companyId;
            this.departmentId       = departmentId;
            this.teamId             = teamId;
            this.qualificationLevel = qualificationLevel;
            this.specialistType     = specialistType;
            this.salary             = salary;
        }
 public void Hire(Team team, SpecialistType specialistType, QualificationLevel qualificationLevel,
                  string personalId, string firstName, string lastName, string numberPhone, string email, DateTime birthDate)
 {
     if (hrAuthority)
     {
         Employee employee = new Employee(specialistType, qualificationLevel, personalId, firstName,
                                          lastName, numberPhone, email, birthDate);
         team.AddEmployee(employee);
         //Hire(team, employee);
     }
     else
     {
         Console.WriteLine("Contact the HR department for that question");
     }
 }
コード例 #10
0
        public static Employee GenerateFutureEmployee()
        {
            var rand = new Random();
            var qualificationLevelCount           = Enum.GetNames(typeof(QualificationLevel)).Length;
            QualificationLevel qualificationLevel = (QualificationLevel)rand.Next(1, qualificationLevelCount + 1);
            var            specialistTypeCount    = Enum.GetNames(typeof(SpecialistType)).Length;
            SpecialistType specialistType         = (SpecialistType)rand.Next(1, specialistTypeCount + 1);

            string   firstName   = TestUtil.GetRandomFirstName(6);
            string   lastName    = TestUtil.GetRandomLastName(4);
            string   email       = TestUtil.GetRandomEmail(10);
            string   phoneNumber = TestUtil.GetRandomPhoneNumber();
            DateTime birthDate   = TestUtil.GetDateOfBirth(18, 70);
            string   personalId  = TestUtil.getGuid();
            Employee employee    = new Employee(specialistType, qualificationLevel, personalId, firstName, lastName, phoneNumber, email, birthDate);

            //Console.WriteLine(employee.ToString() + "\n");
            return(employee);
        }
コード例 #11
0
        public Course(
            int id,
            string title,
            QualificationLevel qualificationLevel)
        {
            if (id <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(id));
            }
            if (string.IsNullOrWhiteSpace(title))
            {
                throw new ArgumentException($"{nameof(title)} cannot be null, empty or only whitespace.");
            }
            if (!Enum.IsDefined(typeof(QualificationLevel), qualificationLevel))
            {
                throw new ArgumentOutOfRangeException(nameof(qualificationLevel));
            }

            Id    = id;
            Title = title;
            QualificationLevel = qualificationLevel;
        }
コード例 #12
0
        public ActionResult getCompanies()
        {
            var    companies = companyManager.FindList();
            string qt        = Request.QueryString["QualificationType"];
            string ql        = Request.QueryString["QualificationLevel"];
            string name      = Request.QueryString["Name"];

            if (qt != null && qt != "-1")
            {
                QualificationType t = (QualificationType)int.Parse(qt);
                companies = companies.Where(c => c.Type1 == t || c.Type2 == t);
            }

            if (ql != null && ql != "-1")
            {
                QualificationLevel l = (QualificationLevel)int.Parse(ql);
                companies = companies.Where(c => c.Level1 == l || c.Level2 == l);
            }

            if (name != null && name != "")
            {
                companies = companies.Where(c => c.Name.Contains(name));
            }

            companies = companies.OrderByDescending(c => c.ID);

            var data = companies.Select(c => new
            {
                ID     = c.ID,
                Name   = c.Name,
                Type   = c.Type1.ToString() + (c.Type2 == null ? "" : "/" + c.Type2.ToString()),
                Level  = c.Level1.ToString() + (c.Type2 == null ? "" : "/" + c.Level2.ToString()),
                Number = c.Number1.ToString() + (c.Type2 == null ? "" : "/" + c.Number2.ToString()),
                State  = (c.ExpiryDate1 > DateTime.Now ? "有效" : "无效") + (c.Type2 == null ? "" : ("/" + (c.ExpiryDate2 > DateTime.Now ? "有效" : "无效"))),
                Score  = c.Score
            });

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
コード例 #13
0
        private void UpdateCollections(object sender, SelectionChangedEventArgs e)
        {
            var institutes = SqlServer.SqlServer.ExecuteStoredProcedure(_connectionString, _userCredential,
                                                                        "GetInstitutes", "Institutes").Tables["Institutes"].Rows;

            Institutes = Institute.GetCollection(institutes);

            InstitutesComboBox.ItemsSource = Institutes.Select(i => i.InstituteSName).ToList();

            var qualificationLevels = SqlServer.SqlServer.ExecuteStoredProcedure(_connectionString, _userCredential,
                                                                                 "GetQualificationLevels", "QualificationLevels").Tables["QualificationLevels"].Rows;

            QualificationLevels = QualificationLevel.GetCollection(qualificationLevels);

            var studyForms = SqlServer.SqlServer.ExecuteStoredProcedure(_connectionString, _userCredential,
                                                                        "GetStudyForms", "StudyForms").Tables["StudyForms"].Rows;

            StudyForms = StudyForm.GetCollection(studyForms);

            var academicRanks = SqlServer.SqlServer.ExecuteStoredProcedure(_connectionString, _userCredential,
                                                                           "GetAcademicRanks", "AcademicRanks").Tables["AcademicRanks"].Rows;

            AcademicRanks = AcademicRank.GetCollection(academicRanks);
        }
コード例 #14
0
 public HistoryKnowledge(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }
コード例 #15
0
 public AntientLanguageKnowledge(AntientLanguage language, QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
     Language = language;
 }
コード例 #16
0
 public Agriculture(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }
コード例 #17
0
 public SoundImitation(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }
コード例 #18
0
 public SingingAndMakingMusic(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }
コード例 #19
0
 public Physiology(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }
コード例 #20
0
 public TrackReadingAndHiding(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }
        public static SearchPhrase ToEntity(this AddEditSearchPhraseModel model, ProviderPortalEntities db)
        {
            SearchPhrase searchPhrase = new SearchPhrase();

            if (model.SearchPhraseId.HasValue)
            {
                searchPhrase = db.SearchPhrases.Find(model.SearchPhraseId);
                if (searchPhrase == null)
                {
                    return(null);
                }
            }

            searchPhrase.Phrase = model.SearchPhrase;
            searchPhrase.RemovePhraseFromSearch = model.RemovePhraseFromSearch;

            if (model.SearchPhraseId.HasValue)
            {
                searchPhrase.ModifiedByUserId    = Permission.GetCurrentUserId();
                searchPhrase.ModifiedDateTimeUtc = DateTime.UtcNow;
            }
            else
            {
                searchPhrase.CreatedByUserId    = Permission.GetCurrentUserId();
                searchPhrase.CreatedDateTimeUtc = DateTime.UtcNow;
                Int32        nextOrdinal = 1;
                SearchPhrase maxOrdinal  = db.SearchPhrases.OrderByDescending(x => x.Ordinal).FirstOrDefault();
                if (maxOrdinal != null)
                {
                    nextOrdinal = maxOrdinal.Ordinal + 1;
                }
                searchPhrase.Ordinal        = nextOrdinal;
                searchPhrase.RecordStatusId = (Int32)Constants.RecordStatus.Live;
            }

            // Remove any existing and not selected Qualification Levels
            List <QualificationLevel> existingQualificationLevels = searchPhrase.QualificationLevels.ToList();

            foreach (QualificationLevel qualificationLevel in existingQualificationLevels.Where(x => !model.SelectedQualificationLevels.Contains(x.QualificationLevelId)))
            {
                searchPhrase.QualificationLevels.Remove(qualificationLevel);
            }

            // Add any new Qualification Levels
            foreach (Int32 qlId in model.SelectedQualificationLevels)
            {
                QualificationLevel ql = searchPhrase.QualificationLevels.FirstOrDefault(x => x.QualificationLevelId == qlId);
                if (ql == null)
                {
                    ql = db.QualificationLevels.Find(qlId);
                    if (ql != null)
                    {
                        searchPhrase.QualificationLevels.Add(ql);
                    }
                }
            }

            // Remove any existing and not selected Study Modes
            List <StudyMode> existingStudyModes = searchPhrase.StudyModes.ToList();

            foreach (StudyMode studyMode in existingStudyModes.Where(x => !model.SelectedStudyModes.Contains(x.StudyModeId)))
            {
                searchPhrase.StudyModes.Remove(studyMode);
            }

            // Add any new Study Modes
            foreach (Int32 smId in model.SelectedStudyModes)
            {
                StudyMode sm = searchPhrase.StudyModes.FirstOrDefault(x => x.StudyModeId == smId);
                if (sm == null)
                {
                    sm = db.StudyModes.Find(smId);
                    if (sm != null)
                    {
                        searchPhrase.StudyModes.Add(sm);
                    }
                }
            }

            // Remove any existing and not selected Attendance Types
            List <AttendanceType> existingAttendanceTypes = searchPhrase.AttendanceTypes.ToList();

            foreach (AttendanceType attendanceType in existingAttendanceTypes.Where(x => !model.SelectedAttendanceTypes.Contains(x.AttendanceTypeId)))
            {
                searchPhrase.AttendanceTypes.Remove(attendanceType);
            }

            // Add any new Attendance Types
            foreach (Int32 atId in model.SelectedAttendanceTypes)
            {
                AttendanceType at = searchPhrase.AttendanceTypes.FirstOrDefault(x => x.AttendanceTypeId == atId);
                if (at == null)
                {
                    at = db.AttendanceTypes.Find(atId);
                    if (at != null)
                    {
                        searchPhrase.AttendanceTypes.Add(at);
                    }
                }
            }

            // Remove any existing and not selected Attendance Patterns
            List <AttendancePattern> existingAttendancePatterns = searchPhrase.AttendancePatterns.ToList();

            foreach (AttendancePattern attendancePattern in existingAttendancePatterns.Where(x => !model.SelectedAttendancePatterns.Contains(x.AttendancePatternId)))
            {
                searchPhrase.AttendancePatterns.Remove(attendancePattern);
            }

            // Add any new Attendance Patterns
            foreach (Int32 apId in model.SelectedAttendancePatterns)
            {
                AttendancePattern ap = searchPhrase.AttendancePatterns.FirstOrDefault(x => x.AttendancePatternId == apId);
                if (ap == null)
                {
                    ap = db.AttendancePatterns.Find(apId);
                    if (ap != null)
                    {
                        searchPhrase.AttendancePatterns.Add(ap);
                    }
                }
            }

            return(searchPhrase);
        }
コード例 #22
0
 public Pottery(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }
コード例 #23
0
 public NewsDistributor(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }
コード例 #24
0
 public Etiquette(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }
コード例 #25
0
 public CardSharper(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }
コード例 #26
0
 public Teaching(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }
コード例 #27
0
 public ValueEstimation(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }
コード例 #28
0
 public WeaponKnowledge(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }
コード例 #29
0
 public CamouflageOrDisguise(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }
コード例 #30
0
 public Wrestling(QualificationLevel qualificationLevel = QualificationLevel.Base, byte level = 1)
     : base(qualificationLevel, level)
 {
 }