本文整理汇总了C#中Candidate类的典型用法代码示例。如果您正苦于以下问题:C# Candidate类的具体用法?C# Candidate怎么用?C# Candidate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Candidate类属于命名空间,在下文中一共展示了Candidate类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: makeHeader
private string makeHeader(Candidate candidate)
{
string dob = Random.Range(1, 28).ToString() + "/";
dob += Random.Range(1, 12).ToString() + "/";
dob += calculateDOB(candidate);
string headerText = "Date of Birth: " + dob + "\n";
headerText += "Gender: " + candidate.getGender()+ "\n\n";
return headerText;
}
开发者ID:Scythus,项目名称:InhumanResources,代码行数:11,代码来源:CVGenerator.cs
示例17: btn_Login_Click
protected void btn_Login_Click(object sender, EventArgs e)
{
try
{
if (IsValidEmail(txt_LoginName.Text) && IsValidPassword(txt_Password.Text))
{
//Utils.csIsSystemUser = false;
Candidate oCandidate = new Candidate();
CandidateBO oCandidateBO = new CandidateBO();
Result oResult = new Result();
oCandidate.CandidateEmail = txt_LoginName.Text;
oCandidate.CandidatePassword = txt_Password.Text;
oCandidate.CandidateLoginTime = DateTime.Now;
try
{
oResult = oCandidateBO.CandidateLogin(oCandidate);
if (oResult.ResultIsSuccess)
{
Utils.SetSession(SessionManager.csLoggedUser, (CandidateForExam)oResult.ResultObject);
Response.Redirect(ContainerManager.csMasterContainerCandidate + "?option=" + OptionManager.csExamProcess);
}
else
{
lbl_Error.ForeColor = Color.Red;
lbl_Error.Text = oResult.ResultMessage;
}
}
catch (Exception oEx)
{
lbl_Error.ForeColor = Color.Red;
lbl_Error.Text = "Login Failed.";
}
}
else
{
lbl_Error.ForeColor = Color.Red;
lbl_Error.Text = "Email & Password Required.";
}
}
catch (Exception oEx2)
{
lbl_Error.ForeColor = Color.Red;
lbl_Error.Text = "Login Failed.";
}
}
开发者ID:krishnakanthms,项目名称:Online-Exam-tool,代码行数:51,代码来源:CandidateLogin.aspx.cs
示例18: Save
public string Save(Candidate aCandidate)
{
connection.Open();
string query = string.Format("INSERT INTO t_Candidate VALUES('{0}','{1}')", aCandidate.Name,
aCandidate.Symbol);
SqlCommand aCommand = new SqlCommand(query, connection);
int affectedRow = aCommand.ExecuteNonQuery();
connection.Close();
if (affectedRow>0)
return "Save Successful";
return "Save Failed.";
}
开发者ID:SyedArifulIslamEmon,项目名称:VotingSystem-2,代码行数:14,代码来源:CandidateGateway.cs
示例19: makeJobHistory
private string makeJobHistory(Candidate candidate)
{
// Get the job history for a candidate
int numJobs = calculateNumberOfJobs(candidate.getAge());
string jobList = "";
for (int x=0; x<numJobs; x++)
{
string job = generateJob(candidate);
jobList += job;
jobList += "\n";
}
string jobOutput = "Employment History:\n";
jobOutput += jobList;
return jobOutput;
}
开发者ID:Scythus,项目名称:InhumanResources,代码行数:15,代码来源:CVGenerator.cs
示例20: LoadMenuBarByPermission
private void LoadMenuBarByPermission(SystemUser oSystemUser, Candidate oCandidate)
{
String sJSMenu = String.Empty;
String sLoadedControlName = String.Empty;
try
{
PanelHorizontalMenu.Controls.Clear();
sLoadedControlName = Utils.GetSession(SessionManager.csLoadedPage).ToString();
if (oSystemUser != null && oCandidate == null)
{
//lbl_ControlName.Text = sLoadedControlName.Substring(0,sLoadedControlName.IndexOf("."));
if (oSystemUser.SystemUserName.ToLower().Equals(LoginManager.csAdministrator))
{
if (sLoadedControlName.Equals(ControlManager.csSystemUserMainPage) || sLoadedControlName.Equals(ControlManager.csCategoryEntry) || sLoadedControlName.Equals(ControlManager.csCategoryModification) || sLoadedControlName.Equals(ControlManager.csChangePassword) || sLoadedControlName.Equals(ControlManager.csExamEntry) || sLoadedControlName.Equals(ControlManager.csQuestionModification) || sLoadedControlName.Equals(ControlManager.csSystemUserEntry) || sLoadedControlName.Equals(ControlManager.csSystemUserModification) || sLoadedControlName.Equals(ControlManager.csQuestionEntry) || sLoadedControlName.Equals(ControlManager.csExamMofication) || sLoadedControlName.Equals(ControlManager.csLabelEntryAndModification))
{
sJSMenu = File.ReadAllText(DirectoryManager.csJSMenuBarDirectory + FileManager.csAdminSystemUserMenuFile, System.Text.Encoding.Default);
PanelHorizontalMenu.Controls.Add(new LiteralControl(sJSMenu));
}
else if (sLoadedControlName.Equals(ControlManager.csCandidateSetup) || sLoadedControlName.Equals(ControlManager.csCandidateModification) || sLoadedControlName.Equals(ControlManager.csEvaluateCandidate) || sLoadedControlName.Equals(ControlManager.csExamineProcess) || sLoadedControlName.Equals(ControlManager.csQuestionSetup) || sLoadedControlName.Equals(ControlManager.csQuestionSetupRemove) || sLoadedControlName.Equals(ControlManager.csQuestionReportForAnExam) || sLoadedControlName.Equals(ControlManager.csResultView) || sLoadedControlName.Equals(ControlManager.csCandidateExtend))
{
sJSMenu = File.ReadAllText(DirectoryManager.csJSMenuBarDirectory + FileManager.csAdminSystemUserSetupMenuFile, System.Text.Encoding.Default);
PanelHorizontalMenu.Controls.Add(new LiteralControl(sJSMenu));
}
}
else //some controls will not shown for the Non Admin
{
if (sLoadedControlName.Equals(ControlManager.csSystemUserMainPage) || sLoadedControlName.Equals(ControlManager.csChangePassword) || sLoadedControlName.Equals(ControlManager.csQuestionModification) || sLoadedControlName.Equals(ControlManager.csQuestionEntry))
{
sJSMenu = File.ReadAllText(DirectoryManager.csJSMenuBarDirectory + FileManager.csNonAdminSystemUserMenuFile, System.Text.Encoding.Default);
PanelHorizontalMenu.Controls.Add(new LiteralControl(sJSMenu));
}
else if (sLoadedControlName.Equals(ControlManager.csEvaluateCandidate) || sLoadedControlName.Equals(ControlManager.csExamineProcess) || sLoadedControlName.Equals(ControlManager.csQuestionSetup) || sLoadedControlName.Equals(ControlManager.csQuestionSetupRemove) || sLoadedControlName.Equals(ControlManager.csQuestionReportForAnExam) || sLoadedControlName.Equals(ControlManager.csResultView))
{
sJSMenu = File.ReadAllText(DirectoryManager.csJSMenuBarDirectory + FileManager.csNonAdminSystemUserSetupMenuFile, System.Text.Encoding.Default);
PanelHorizontalMenu.Controls.Add(new LiteralControl(sJSMenu));
}
}
}
}
catch (Exception oEx)
{
}
}
开发者ID:krishnakanthms,项目名称:Online-Exam-tool,代码行数:48,代码来源:MasterPage.master.cs
注:本文中的Candidate类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论