public async Task <ActionResult <BaseResponse> > PostCandidateType(CandidateType candidateType) { var datas = _context.CandidateTypes.Where(x => x.TypeName.Equals(candidateType.TypeName.Trim())).ToList(); if (String.IsNullOrEmpty(candidateType.TypeName)) { return(new BaseResponse { ErrorCode = 0, Messege = "Not be empty. Please check again!!" }); } else if (datas.Count != 0) { return(new BaseResponse { ErrorCode = 2, Messege = "Candidate Type already exists. Please check again!!" }); } else { _context.CandidateTypes.Add(candidateType); await _context.SaveChangesAsync(); return(new BaseResponse { ErrorCode = 1, Messege = "Add new success!!", Data = CreatedAtAction("GetCandidateTypes", new { id = candidateType.Id }, candidateType) }); } }
private void Search(CandidateType candidateType, SiteType siteType, Community community) { // Navigate to search page, via the community page if needed. if (siteType == SiteType.Community) { Get(GetCommunityEmployerUrl(community)); } var searchUrl = GetSearchUrl(BusinessAnalyst).AsNonReadOnly(); // Set up the search. Some extra steps may need to be done to ensure that it works. if (siteType == SiteType.Community) { if (candidateType == CandidateType.General) { // if (employerType == EmployerType.General) // SetCommunity(_ddlCommunity, null); } } else { // General site. if (candidateType == CandidateType.Community) { searchUrl.QueryString[MemberSearchCriteriaKeys.CommunityId] = community.Id.ToString(); } } // Fill in the form and search. Get(searchUrl); }
public async Task <ActionResult <CandidateType> > PostCandidateType(CandidateType candidateType) { _context.CandidateTypes.Add(candidateType); await _context.SaveChangesAsync(); return(CreatedAtAction("GetCandidateType", new { id = candidateType.Id }, candidateType)); }
public ActionResult Create(CandidateType candidateType) { pr.Create(candidateType); return(RedirectToAction("Index")); }
internal Image GenerateImage(CandidateType candidateType) { Bitmap bi = new Bitmap(16, 16); using (Graphics g = Graphics.FromImage(bi)) { g.Clear(ColorByType(candidateType)); } return(bi); }
private void Test(CandidateType candidateType, EmployerType employerType, SiteType siteType, bool canView) { // Create community. var communities = CreateCommunities(0); var community = communities[0]; // Create a member. Associate with the community if needed. Member member = null; if (canView) { member = CreateMembers(candidateType == CandidateType.Community ? communities : new[] { (Community)null }, 1)[0][0]; } // Create employer. Associate with the community if needed, but give them no credits. Employer employer = null; if (employerType != EmployerType.Anonymous) { switch (employerType) { case EmployerType.Community: employer = CreateEmployer(community, false); break; case EmployerType.General: employer = CreateEmployer(null, false); break; default: throw new ApplicationException("Unexpected employer type: " + employerType); } LogIn(employer); } // The employer has no credits so no access should be given unless they are in the same community. Search(candidateType, siteType, community, member); if (employer != null) { // Give the employer some credits. _allocationsCommand.CreateAllocation(new Allocation { OwnerId = employer.Id, CreditId = _creditsQuery.GetCredit <ContactCredit>().Id }); // Search again. Search(candidateType, siteType, community, member); } }
public Color ColorByType(CandidateType candidateType) { switch (candidateType) { case CandidateType.Republican: return(RepColor); case CandidateType.Democrat: return(DemColor); } return(OtherColor); }
string GetNameByType(CandidateType type) { if (voteSummary == null) { return(type.ToString()); } switch (type) { case CandidateType.Democrat: return(voteSummary.CandidateNameDem); case CandidateType.Republican: return(voteSummary.CandidateNameRep); } return("Others"); }
public async Task <IActionResult> PutCandidateType(int id, CandidateType candidateType_Update) { var CandidateType = await _context.CandidateTypes.FindAsync(id); if (CandidateType == null) { return(NotFound()); } CandidateType.TypeName = candidateType_Update.TypeName; _context.CandidateTypes.Update(CandidateType); await _context.SaveChangesAsync(); return(Ok(CandidateType)); }
private void Search(CandidateType candidateType, SiteType siteType, Community community, Member member) { Search(candidateType, siteType, community); // Assert that the member is shown or not shown as appropriate. if (member == null) { AssertNoResults(); } else { AssertResultCounts(1, 1, 1); AssertMembers(member); } }
private void CmbCandidateType_SelectionChanged(object sender, SelectionChangedEventArgs e) { candidateType = (CandidateType)cmbCandidateType.SelectedIndex + 1; switch (candidateType) { case CandidateType.Domestic: lblIndividualTask.Content = "Is fee deduction allowed?"; break; case CandidateType.International: lblIndividualTask.Content = "Is allowed to work?"; break; case CandidateType.LicenseRenew: lblIndividualTask.Content = "Is license expired?"; break; } }
public string GetNHType(IColumnMetadata cInfo) { List<CandidateType> found = new List<CandidateType>(); var comp = config.typemapping.Where(t => string.Compare(t.dbtype, cInfo.TypeName, true) == 0); foreach (var candidate in comp) { CandidateType ct = new CandidateType(); ct.Type = candidate.nhtype; ct.SatisfiedRestrictions += SatisfyLen(cInfo, candidate); ct.SatisfiedRestrictions += SatisfyPrecision(cInfo, candidate); ct.SatisfiedRestrictions += SatisfyScale(cInfo, candidate); found.Add(ct); } if (found.Count() > 0) return found.OrderByDescending(t=>t.SatisfiedRestrictions).First().Type; //logger.Warn(string.Format("No NHibernate type defined for dbtype:{0} len:{1}", cInfo.TypeName, cInfo.ColumnSize)); return null; }
public string GetNHType(IColumnMetadata cInfo) { List <CandidateType> found = new List <CandidateType>(); var comp = config.typemapping.Where(t => string.Compare(t.dbtype, cInfo.TypeName, true) == 0); foreach (var candidate in comp) { CandidateType ct = new CandidateType(); ct.Type = candidate.nhtype; ct.SatisfiedRestrictions += SatisfyLen(cInfo, candidate); ct.SatisfiedRestrictions += SatisfyPrecision(cInfo, candidate); ct.SatisfiedRestrictions += SatisfyScale(cInfo, candidate); found.Add(ct); } if (found.Count() > 0) { return(found.OrderByDescending(t => t.SatisfiedRestrictions).First().Type); } //logger.Warn(string.Format("No NHibernate type defined for dbtype:{0} len:{1}", cInfo.TypeName, cInfo.ColumnSize)); return(null); }
public async Task <ActionResult <BaseResponse> > PutCandidateType(int id, CandidateType candidateType_Update) { var CandidateType = await _context.CandidateTypes.FindAsync(id); var datas = _context.CandidateTypes.Where(x => x.TypeName.Equals(candidateType_Update.TypeName.Trim())).ToList(); if (CandidateType == null) { return(NotFound()); } else if (String.IsNullOrEmpty(candidateType_Update.TypeName)) { return(new BaseResponse { ErrorCode = 0, Messege = "Not be empty. Please check again!!" }); } else if (datas.Count != 0) { return(new BaseResponse { ErrorCode = 2, Messege = "Candidate Type already exists. Please check again!!" }); } else { CandidateType.TypeName = candidateType_Update.TypeName; _context.CandidateTypes.Update(CandidateType); await _context.SaveChangesAsync(); return(new BaseResponse { ErrorCode = 1, Messege = "Successful update!!" }); } }
public async Task <ActionResult <BaseResponse> > PostCandidateType(CandidateType candidateType) { if (String.IsNullOrEmpty(candidateType.TypeName)) { return(new BaseResponse { ErrorCode = 0, Messege = "Thêm mới thất bại!!" }); } else { _context.CandidateTypes.Add(candidateType); await _context.SaveChangesAsync(); return(new BaseResponse { ErrorCode = 1, Messege = "Thêm mới thành công!!", Data = CreatedAtAction("GetCandidateTypes", new { id = candidateType.Id }, candidateType) }); } }
public IEnumerable <Candidate> Get(CandidateType type) { var query = new GetCandidatesQuery(type); return(_queryHandler.Handler(query)); }
public static Candidate Get(CandidateType candidate) { switch (candidate) { case CandidateType.Valid: return new Candidate { FirstName = FirstNameConstants.ValidFirstName, SecondName = SecondNameConstants.ValidSecondName, LastName = LastNameConstants.ValidLastName, Picture = CandidateFilesConstants.ValidPictureFilePath, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = CandidateInformationConstants.DefaultWorkEducationStatusId, Birthday = CandidateInformationConstants.DefaultBirthday, Email = CandidateInformationConstants.DefaultEmail, Phone = CandidateInformationConstants.DefaultPhone, City = CandidateInformationConstants.DefaultCity, University = CandidateInformationConstants.DefaultUniversity, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = CandidateInformationConstants.DefaultSchool, Cv = CandidateFilesConstants.ValidCvFilePath, CoverLetter = CandidateFilesConstants.ValidCoverLetterFilePath, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = true }; case CandidateType.UncheckedSearchedTerms: return new Candidate { FirstName = FirstNameConstants.DefaultFirstName, SecondName = SecondNameConstants.DefaultSecondName, LastName = LastNameConstants.DefaultLastName, Picture = CandidateFilesConstants.ValidPictureFilePath, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = CandidateInformationConstants.DefaultWorkEducationStatusId, Birthday = CandidateInformationConstants.DefaultBirthday, Email = CandidateInformationConstants.DefaultEmail, Phone = CandidateInformationConstants.DefaultPhone, City = CandidateInformationConstants.DefaultCity, University = CandidateInformationConstants.DefaultUniversity, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = CandidateInformationConstants.DefaultSchool, Cv = CandidateFilesConstants.ValidCvFilePath, CoverLetter = CandidateFilesConstants.ValidCoverLetterFilePath, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = false }; case CandidateType.UnchosenPicture: return new Candidate { FirstName = FirstNameConstants.DefaultFirstName, SecondName = SecondNameConstants.DefaultSecondName, LastName = LastNameConstants.DefaultLastName, Picture = null, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = CandidateInformationConstants.DefaultWorkEducationStatusId, Birthday = CandidateInformationConstants.DefaultBirthday, Email = CandidateInformationConstants.DefaultEmail, Phone = CandidateInformationConstants.DefaultPhone, City = CandidateInformationConstants.DefaultCity, University = CandidateInformationConstants.DefaultUniversity, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = CandidateInformationConstants.DefaultSchool, Cv = CandidateFilesConstants.ValidCvFilePath, CoverLetter = CandidateFilesConstants.ValidCoverLetterFilePath, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = true }; case CandidateType.UnselectedWorkEducationStatus: return new Candidate { FirstName = FirstNameConstants.DefaultFirstName, SecondName = SecondNameConstants.DefaultSecondName, LastName = LastNameConstants.DefaultLastName, Picture = CandidateFilesConstants.ValidPictureFilePath, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = null, Birthday = CandidateInformationConstants.DefaultBirthday, Email = CandidateInformationConstants.DefaultEmail, Phone = CandidateInformationConstants.DefaultPhone, City = CandidateInformationConstants.DefaultCity, University = CandidateInformationConstants.DefaultUniversity, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = CandidateInformationConstants.DefaultSchool, Cv = CandidateFilesConstants.ValidCvFilePath, CoverLetter = CandidateFilesConstants.ValidCoverLetterFilePath, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = true }; case CandidateType.EmptyBirthday: return new Candidate { FirstName = FirstNameConstants.DefaultFirstName, SecondName = SecondNameConstants.DefaultSecondName, LastName = LastNameConstants.DefaultLastName, Picture = CandidateFilesConstants.ValidPictureFilePath, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = CandidateInformationConstants.DefaultWorkEducationStatusId, Birthday = null, Email = CandidateInformationConstants.DefaultEmail, Phone = CandidateInformationConstants.DefaultPhone, City = CandidateInformationConstants.DefaultCity, University = CandidateInformationConstants.DefaultUniversity, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = CandidateInformationConstants.DefaultSchool, Cv = CandidateFilesConstants.ValidCvFilePath, CoverLetter = CandidateFilesConstants.ValidCoverLetterFilePath, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = true }; case CandidateType.BirthdayInThePast: return new Candidate { FirstName = FirstNameConstants.DefaultFirstName, SecondName = SecondNameConstants.DefaultSecondName, LastName = LastNameConstants.DefaultLastName, Picture = CandidateFilesConstants.ValidPictureFilePath, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = CandidateInformationConstants.DefaultWorkEducationStatusId, Birthday = CandidateInformationConstants.BirthdayInThePast, Email = CandidateInformationConstants.DefaultEmail, Phone = CandidateInformationConstants.DefaultPhone, City = CandidateInformationConstants.DefaultCity, University = CandidateInformationConstants.DefaultUniversity, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = CandidateInformationConstants.DefaultSchool, Cv = CandidateFilesConstants.ValidCvFilePath, CoverLetter = CandidateFilesConstants.ValidCoverLetterFilePath, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = true }; case CandidateType.BirthdayInTheFuture: return new Candidate { FirstName = FirstNameConstants.DefaultFirstName, SecondName = SecondNameConstants.DefaultSecondName, LastName = LastNameConstants.DefaultLastName, Picture = CandidateFilesConstants.ValidPictureFilePath, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = CandidateInformationConstants.DefaultWorkEducationStatusId, Birthday = CandidateInformationConstants.BirthdayInTheFuture, Email = CandidateInformationConstants.DefaultEmail, Phone = CandidateInformationConstants.DefaultPhone, City = CandidateInformationConstants.DefaultCity, University = CandidateInformationConstants.DefaultUniversity, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = CandidateInformationConstants.DefaultSchool, Cv = CandidateFilesConstants.ValidCvFilePath, CoverLetter = CandidateFilesConstants.ValidCoverLetterFilePath, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = true }; case CandidateType.EmptyEmail: return new Candidate { FirstName = FirstNameConstants.DefaultFirstName, SecondName = SecondNameConstants.DefaultSecondName, LastName = LastNameConstants.DefaultLastName, Picture = CandidateFilesConstants.ValidPictureFilePath, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = CandidateInformationConstants.DefaultWorkEducationStatusId, Birthday = CandidateInformationConstants.DefaultBirthday, Email = string.Empty, Phone = CandidateInformationConstants.DefaultPhone, City = CandidateInformationConstants.DefaultCity, University = CandidateInformationConstants.DefaultUniversity, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = CandidateInformationConstants.DefaultSchool, Cv = CandidateFilesConstants.ValidCvFilePath, CoverLetter = CandidateFilesConstants.ValidCoverLetterFilePath, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = true }; case CandidateType.InvalidEmail: return new Candidate { FirstName = FirstNameConstants.DefaultFirstName, SecondName = SecondNameConstants.DefaultSecondName, LastName = LastNameConstants.DefaultLastName, Picture = CandidateFilesConstants.ValidPictureFilePath, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = CandidateInformationConstants.DefaultWorkEducationStatusId, Birthday = CandidateInformationConstants.DefaultBirthday, Email = CandidateInformationConstants.InvalidEmailAddress, Phone = CandidateInformationConstants.DefaultPhone, City = CandidateInformationConstants.DefaultCity, University = CandidateInformationConstants.DefaultUniversity, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = CandidateInformationConstants.DefaultSchool, Cv = CandidateFilesConstants.ValidCvFilePath, CoverLetter = CandidateFilesConstants.ValidCoverLetterFilePath, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = true }; case CandidateType.InvalidPhoneNumber: return new Candidate { FirstName = FirstNameConstants.DefaultFirstName, SecondName = SecondNameConstants.DefaultSecondName, LastName = LastNameConstants.DefaultLastName, Picture = CandidateFilesConstants.ValidPictureFilePath, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = CandidateInformationConstants.DefaultWorkEducationStatusId, Birthday = CandidateInformationConstants.DefaultBirthday, Email = CandidateInformationConstants.DefaultEmail, Phone = CandidateInformationConstants.InvalidPhoneNumber, City = CandidateInformationConstants.DefaultCity, University = CandidateInformationConstants.DefaultUniversity, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = CandidateInformationConstants.DefaultSchool, Cv = CandidateFilesConstants.ValidCvFilePath, CoverLetter = CandidateFilesConstants.ValidCoverLetterFilePath, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = true }; case CandidateType.UnchosenCity: return new Candidate { FirstName = FirstNameConstants.DefaultFirstName, SecondName = SecondNameConstants.DefaultSecondName, LastName = LastNameConstants.DefaultLastName, Picture = CandidateFilesConstants.ValidPictureFilePath, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = CandidateInformationConstants.DefaultWorkEducationStatusId, Birthday = CandidateInformationConstants.DefaultBirthday, Email = CandidateInformationConstants.DefaultEmail, Phone = CandidateInformationConstants.DefaultPhone, City = null, University = CandidateInformationConstants.DefaultUniversity, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = CandidateInformationConstants.DefaultSchool, Cv = CandidateFilesConstants.ValidCvFilePath, CoverLetter = CandidateFilesConstants.ValidCoverLetterFilePath, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = true }; case CandidateType.UnchosenUniversity: return new Candidate { FirstName = FirstNameConstants.DefaultFirstName, SecondName = SecondNameConstants.DefaultSecondName, LastName = LastNameConstants.DefaultLastName, Picture = CandidateFilesConstants.ValidPictureFilePath, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = CandidateInformationConstants.DefaultWorkEducationStatusId, Birthday = CandidateInformationConstants.DefaultBirthday, Email = CandidateInformationConstants.DefaultEmail, Phone = CandidateInformationConstants.DefaultPhone, City = CandidateInformationConstants.DefaultCity, University = null, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = CandidateInformationConstants.DefaultSchool, Cv = CandidateFilesConstants.ValidCvFilePath, CoverLetter = CandidateFilesConstants.ValidCoverLetterFilePath, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = true }; case CandidateType.EmptySchool: return new Candidate { FirstName = FirstNameConstants.DefaultFirstName, SecondName = SecondNameConstants.DefaultSecondName, LastName = LastNameConstants.DefaultLastName, Picture = CandidateFilesConstants.ValidPictureFilePath, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = CandidateInformationConstants.DefaultWorkEducationStatusId, Birthday = CandidateInformationConstants.DefaultBirthday, Email = CandidateInformationConstants.DefaultEmail, Phone = CandidateInformationConstants.DefaultPhone, City = CandidateInformationConstants.DefaultCity, University = CandidateInformationConstants.DefaultUniversity, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = string.Empty, Cv = CandidateFilesConstants.ValidCvFilePath, CoverLetter = CandidateFilesConstants.ValidCoverLetterFilePath, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = true }; case CandidateType.UnchosenCv: return new Candidate { FirstName = FirstNameConstants.DefaultFirstName, SecondName = SecondNameConstants.DefaultSecondName, LastName = LastNameConstants.DefaultLastName, Picture = CandidateFilesConstants.ValidPictureFilePath, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = CandidateInformationConstants.DefaultWorkEducationStatusId, Birthday = CandidateInformationConstants.DefaultBirthday, Email = CandidateInformationConstants.DefaultEmail, Phone = CandidateInformationConstants.DefaultPhone, City = CandidateInformationConstants.DefaultCity, University = CandidateInformationConstants.DefaultUniversity, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = CandidateInformationConstants.DefaultSchool, Cv = null, CoverLetter = CandidateFilesConstants.ValidCoverLetterFilePath, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = true }; case CandidateType.UnchosenCoverLetter: return new Candidate { FirstName = FirstNameConstants.DefaultFirstName, SecondName = SecondNameConstants.DefaultSecondName, LastName = LastNameConstants.DefaultLastName, Picture = CandidateFilesConstants.ValidPictureFilePath, IsMaleGender = CandidateInformationConstants.DefaultIsMaleGender, WorkEducationStatusId = CandidateInformationConstants.DefaultWorkEducationStatusId, Birthday = CandidateInformationConstants.DefaultBirthday, Email = CandidateInformationConstants.DefaultEmail, Phone = CandidateInformationConstants.DefaultPhone, City = CandidateInformationConstants.DefaultCity, University = CandidateInformationConstants.DefaultUniversity, Faculty = CandidateInformationConstants.DefaultFaculty, Speciality = CandidateInformationConstants.DefaultSpeciality, School = CandidateInformationConstants.DefaultSchool, Cv = CandidateFilesConstants.ValidCvFilePath, CoverLetter = null, AdditionalDocument = CandidateFilesConstants.ValidAdditionalDocumentFilePath, AcceptTerms = true }; default: throw new ArgumentException(); } }
public CandidateRef(Guid id, string fullName, CandidateType candidateType) { Id = id; FullName = fullName; CandidateType = candidateType; }
public ActionResult Edit(string id) { CandidateType candidate = pr.finID(id); return(View("Edit", candidate)); }
public ActionResult Edit(CandidateType candidateType) { pr.Edit(candidateType); return(RedirectToAction("Index")); }
private IEnumerable<Address> Parse(CandidateType[] candidateTypes) { return candidateTypes.Select(candidate => new Address() { AddressLine = candidate.AddressKeyFormat.AddressLine, City = candidate.AddressKeyFormat.PoliticalDivision2, State = candidate.AddressKeyFormat.PoliticalDivision1, Zip = candidate.AddressKeyFormat.PostcodePrimaryLow, ZipPlusFour = candidate.AddressKeyFormat.PostcodeExtendedLow, CountryCode = candidate.AddressKeyFormat.CountryCode }).ToList(); }
public GetCandidatesQuery(CandidateType candidateType) { _candidateType = candidateType; }