当前位置: 首页>>代码示例>>C#>>正文


C# Candidate类代码示例

本文整理汇总了C#中Candidate的典型用法代码示例。如果您正苦于以下问题:C# Candidate类的具体用法?C# Candidate怎么用?C# Candidate使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Candidate类属于命名空间,在下文中一共展示了Candidate类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: generateFervorHobbySkill

    private void generateFervorHobbySkill(Candidate candidate)
    {
        int value = candidate.getPerceivedStat("fervor");
        List<string[]> options = new List<string[]>();
        if (value > 70)
        {
            options.Add(checkSecondaryStat(candidate, "physique", "Dancing", true));
            options.Add(checkSecondaryStat(candidate, "morality", "Pyromania", false));
            options.Add(checkSecondaryStat(candidate, "ambition", "Voodoo", true));
            options.Add(entry("skill", "Chanting"));

        }
        else if (value > 50)
        {
            options.Add(entry("hobby", "Meditation"));
            options.Add(entry("hobby", "Chanting"));
            options.Add(entry("hobby", "Sedative Experimentation"));
        }
        else
        {
            options.Add(entry("skill", "Meditation"));
            options.Add(entry("skill", "Sedative Experimentation"));
            options.Add(checkSecondaryStat(candidate, "ambition", "Sitting Quietly", false));
        }
        addOptionToOutputs(options[Random.Range(0, options.Count)]);
    }
开发者ID:Scythus,项目名称:InhumanResources,代码行数:26,代码来源:HobbyGenerator.cs

示例2: nextLevel

    public void nextLevel()
    {
        contractshown = false;
        if(currentJob>=jobs.Count){
            Application.LoadLevel("End");
        }
        else{
       
            job = jobs[currentJob];

            CVGenerator cvGenerator = new CVGenerator();

            cvList = new List<CV>();
            int numberOfCVs = Random.Range(4, 7);
            for (int num = 0; num < numberOfCVs; num++)
            {
                Candidate candidate = new Candidate(ref maleSprites, ref femaleSprites);
                cvList.Add(cvGenerator.generateCV(candidate));
            }

            currentCV = 0;

            renderCV();
            showJob();
            refreshHUD();
        }
    }
开发者ID:Scythus,项目名称:InhumanResources,代码行数:27,代码来源:UIManagerScript.cs

示例3: Create

        public static int Create(Candidate pCandidate)
        {
            Candidate oCandidate = new Candidate();
            SqlCommand SQLCmd = new SqlCommand();
            SQLCmd.CommandType = CommandType.StoredProcedure;
            SQLCmd.CommandText = "CreateCandidate";
            SQLCmd.Parameters.Add("Forename", SqlDbType.NVarChar, 255).Value = pCandidate.Forename;
            SQLCmd.Parameters.Add("Surname", SqlDbType.NVarChar, 255).Value = pCandidate.Surname;
            SQLCmd.Parameters.Add("Telephone", SqlDbType.NVarChar, 50).Value = pCandidate.Telephone;
            SQLCmd.Parameters.Add("Mobile", SqlDbType.NVarChar, 50).Value = pCandidate.Mobile;
            SQLCmd.Parameters.Add("Email", SqlDbType.NVarChar, 255).Value = pCandidate.Email;
            SQLCmd.Parameters.Add("DOB", SqlDbType.Date).Value = pCandidate.DOB;
            SQLCmd.Parameters.Add("Active", SqlDbType.Bit).Value = pCandidate.Active;
            SQLCmd.Parameters.Add("LastContactDate", SqlDbType.Date).Value = pCandidate.LastContactDate;
            SQLCmd.Parameters.Add("NiNumber", SqlDbType.NVarChar, 50).Value = pCandidate.NiNumber;
            SQLCmd.Parameters.Add("CRB", SqlDbType.Bit).Value = pCandidate.CRB;
            SQLCmd.Parameters.Add("References", SqlDbType.Bit).Value = pCandidate.References;
            SQLCmd.Parameters.Add("Interviewed", SqlDbType.Bit).Value = pCandidate.Interviewed;
            SQLCmd.Parameters.Add("TransportId", SqlDbType.Int).Value = pCandidate.TransportId;
            SQLCmd.Parameters.Add("UserId", SqlDbType.UniqueIdentifier).Value = new Guid(pCandidate.UserId);
            SQLCmd.Parameters.Add("Id", SqlDbType.Int).Direction = ParameterDirection.Output;
            BaseDataAccess.OpenConnection(SQLCmd);
            BaseDataAccess.ExecuteNonSelect(SQLCmd);
            BaseDataAccess.CloseConnection();

            return Convert.ToInt32(SQLCmd.Parameters["Id"].Value);
        }
开发者ID:r3plica,项目名称:Boomerang,代码行数:27,代码来源:Candidates.cs

示例4: Assess

        public void Assess(Candidate candidate, Evaluation evaluation)
        {
            if (!candidate.Email.IsValid ())
                throw new InvalidEmailException ();

            var valueApprove = 7;
            var frontend = (evaluation.HTML >= valueApprove
                           && evaluation.CSS >= valueApprove
                           && evaluation.JavaScript >= valueApprove);
            var backend = (evaluation.Django >= valueApprove
                        && evaluation.Python >= valueApprove);

            var mobile = (evaluation.DevelopmentiOS >= valueApprove
                         || evaluation.DevelopmentAndroid >= valueApprove);

            if (frontend)
                Notify (candidate, JobType.Frontend);

            if (backend)
                Notify (candidate, JobType.BackEnd);

            if (mobile)
                Notify (candidate, JobType.Mobile);

            if (!frontend && !backend && !mobile)
                Notify (candidate, JobType.Generic);
        }
开发者ID:bernardo-bruning,项目名称:AnalysiSkill,代码行数:27,代码来源:EvaluationService.cs

示例5: GetScores

        private IEnumerable<decimal> GetScores(Candidate candidate)
        {
            Option option;
            try
            {
                option = candidate.Options.First();
            }
            catch (ArgumentNullException)
            {
                throw new ArgumentException("Candidate has no option.");
            }

            var combinations = new[] { option.MajorSubjectCombination,
                                       option.MajorSubjectCombination1,
                                       option.MajorSubjectCombination2,
                                       option.MajorSubjectCombination3 };

            decimal bonus = 0;
            if (candidate.HasPrivilege)
                bonus += 1;
            bonus += candidate.Region.Bonus;
            bonus += candidate.Beneficiary.Bonus;

            foreach (var combination in combinations)
                if (combination != null)
                    yield return ScoreFromCombination(candidate, combination.SubjectCombination) + bonus;
                else
                    yield break;
        }
开发者ID:TaQuangNgoc,项目名称:EnrollmentSystem,代码行数:29,代码来源:Admission.cs

示例6: ShowCandidates

        public List<Candidate> ShowCandidates()
        {
            connection.Open();
            string query = string.Format("SELECT * FROM t_Candidate");
            SqlCommand aCommand = new SqlCommand(query, connection);
            SqlDataReader aReader = aCommand.ExecuteReader();

            List<Candidate> candidates = new List<Candidate>();
            if (aReader.HasRows)
            {

                while (aReader.Read())
                {
                    Candidate aCandidate = new Candidate();

                    aCandidate.CandidateID = (int)aReader[0];
                    aCandidate.Name = aReader[1].ToString();
                    aCandidate.Symbol = aReader[2].ToString();

                    candidates.Add(aCandidate);
                }

            }
            connection.Close();
            return candidates;
        }
开发者ID:SyedArifulIslamEmon,项目名称:VotingSystem-2,代码行数:26,代码来源:CandidateGateway.cs

示例7: Save

 public void Save(Candidate obj)
 {
     if (obj.Id == 0)
         context.Entry(obj).State = System.Data.Entity.EntityState.Added;
     else
         context.Entry(obj).State = System.Data.Entity.EntityState.Modified;
     context.SaveChanges();
 }
开发者ID:buddzbuddy,项目名称:MSECAnalyze,代码行数:8,代码来源:CandidateRepository.cs

示例8: generateSkillsHobbies

 public Dictionary<string, string> generateSkillsHobbies(Candidate candidate)
 {
     foreach (string stat in candidate.statNames)
     {
         generateHobbySkillForStat(stat, candidate);
     }
     return outputs;
 }
开发者ID:Scythus,项目名称:InhumanResources,代码行数:8,代码来源:HobbyGenerator.cs

示例9: IsEFCodeFirstConventionalKey

        static bool IsEFCodeFirstConventionalKey(Candidate candidate) {
            var member = candidate.Member;
            var memberName = member.Name;

            if(String.Compare(memberName, "id", true) != 0 && String.Compare(memberName, member.DeclaringType.Name + "id", true) != 0)
                return false;

            return ORDERED_SORTABLE_TYPES.Contains(candidate.Type);
        }
开发者ID:DevExpress,项目名称:DevExtreme.AspNet.Data,代码行数:9,代码来源:EFSorting.cs

示例10: Session

 public Session( User user, Candidate candidate, bool isError,
     string displayError, string error)
 {
     User = user;
     Candidate = candidate;
     IsError = isError;
     DisplayError = displayError;
     Error = error;
 }
开发者ID:NosDeveloper2,项目名称:RecruitGenie,代码行数:9,代码来源:Session.cs

示例11: EnrollingCandidate

        public EnrollingCandidate(Candidate candidate, IEnumerable<EnrollingMajor> options, IEnumerable<decimal> scores)
        {
            this.options = options.ToArray();
            this.scores = scores.ToArray();

            this.candidate = candidate;

            currentOption = -1;
        }
开发者ID:TaQuangNgoc,项目名称:EnrollmentSystem,代码行数:9,代码来源:EnrollingCandidate.cs

示例12: CV

    public CV(Candidate candidate, string cvContents, Sprite cvPic)
    {

        this.candidate = candidate;

        // Generate a CV
        this.cvText = cvContents;
        this.cvPic = cvPic;
    }
开发者ID:Scythus,项目名称:InhumanResources,代码行数:9,代码来源:CV.cs

示例13: Candidate

        public void Candidate(User user, Candidate candidate)
        {
            AcademyLoginProvider.Instance.LoginUser(user);
            this.LoginPage.WaitForUserName();
            this.LoginPage.Validator.ValidateUserName(user.Username);

            this.CandidateFormPage.Navigate();

            this.CandidateFormPage.Candidate(candidate);
        }
开发者ID:Team-Griffin-SQA-2015,项目名称:TelerikAcademyCustomTestFramework,代码行数:10,代码来源:CandidateFormService.cs

示例14: Vote

 public Vote(VoteEvent myVoteEvent, Voter v, int uid)
 {
     this.v = v;
     this.c = myVoteEvent.GetCandidateByUid(uid);
     if (this.c == null)
     {
         Log myLog = new Log("The Candidate is null");
         LogStore.LogList.Add(myLog);
     }
 }
开发者ID:yuxuanchen1997,项目名称:VotePlusPlus,代码行数:10,代码来源:Vote.cs

示例15: ShowCandidatesSymbolInComboBox

 public void ShowCandidatesSymbolInComboBox()
 {
     Candidate aCandidate = new Candidate();
     List<Candidate> candidates = aCandidateEntryBll.ShowCandidates();
     foreach (Candidate candidate in candidates)
     {
         selectSymbolOfCandidateComboBox.Items.Add(candidate);
     }
     selectSymbolOfCandidateComboBox.ValueMember = "CandidateID";
     selectSymbolOfCandidateComboBox.DisplayMember = "Symbol";
 }
开发者ID:SyedArifulIslamEmon,项目名称:VotingSystem-2,代码行数:11,代码来源:VoteUi.cs


注:本文中的Candidate类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。