public override Task <Empty> DeleteApplicantWorkHistory(ApplicantWorkHistoryPayload request, ServerCallContext context) { _ = _logic.Get(Guid.Parse(request.Id)) ?? throw new ArgumentNullException("No Applicant Work History Record with this Id Found "); _logic.Delete(new ApplicantWorkHistoryPoco[] { _logic.Get(Guid.Parse(request.Id)) }); return(null); }
public override Task <Empty> DeleteApplicantWorkHistory(ApplicantWorkHistoryPayload request, ServerCallContext context) { ApplicantWorkHistoryPoco poco = _logic.Get(Guid.Parse(request.Id)); _logic.Delete(new ApplicantWorkHistoryPoco[] { poco }); return(new Task <Empty>(() => new Empty())); }
public override Task <Empty> UpdateApplicantWorkHistory(ApplicantWorkHistoryPayload request, ServerCallContext context) { ApplicantWorkHistoryPoco[] pocos = { new ApplicantWorkHistoryPoco() { Id = Guid.Parse(request.Id), Applicant = Guid.Parse(request.Applicant), CompanyName = request.CompanyName, CountryCode = request.CountryCode, JobTitle = request.JobTitle, JobDescription = request.JobDescription, Location = request.Location, StartMonth = (byte)request.StartMonth, EndMonth = (byte)request.EndMonth, StartYear = request.StartYear, EndYear = request.EndYear } }; _logic.Update(pocos); return(new Task <Empty>(() => new Empty())); }
public override Task <Empty> UpdateApplicantWorkHistory(ApplicantWorkHistoryPayload request, ServerCallContext context) { ApplicantWorkHistoryPoco[] pocos = new ApplicantWorkHistoryPoco[1]; foreach (var poco in pocos) { poco.Id = Guid.Parse(request.Id); poco.Applicant = Guid.Parse(request.Applicant); poco.CompanyName = request.CompanyName; poco.CountryCode = request.CountryCode; poco.Location = request.Location; poco.JobTitle = request.JobTitle; poco.JobDescription = request.JobDescription; poco.StartMonth = (short)request.StartMonth; poco.StartYear = request.StartYear; poco.EndMonth = (short)request.EndMonth; poco.EndYear = request.EndYear; } _logic.Update(pocos); return(new Task <Empty>(() => new Empty())); }
public override Task <Empty> UpdateApplicantWorkHistory(ApplicantWorkHistoryPayload request, ServerCallContext context) { ApplicantWorkHistoryPoco[] pocos = new ApplicantWorkHistoryPoco[1]; pocos[0].Id = Guid.Parse(request.Id); pocos[0].Applicant = Guid.Parse(request.Applicant); pocos[0].CompanyName = request.CompanyName; pocos[0].CountryCode = request.CountryCode; pocos[0].Location = request.Location; pocos[0].JobTitle = request.JobTitle; pocos[0].JobDescription = request.JobDescription; pocos[0].StartMonth = Convert.ToInt16(request.StartMonth); pocos[0].StartYear = request.StartYear; pocos[0].EndMonth = Convert.ToInt16(request.EndMonth); pocos[0].EndYear = request.EndYear; _logic.Update(pocos); return(new Task <Empty>(null)); }
public override Task <Empty> CreateApplicantWorkHistory(ApplicantWorkHistoryPayload request, ServerCallContext context) { ApplicantWorkHistoryPoco poco = new ApplicantWorkHistoryPoco() { Id = Guid.Parse(request.Id), Applicant = Guid.Parse(request.Applicant), CompanyName = request.CompanyName, CountryCode = request.CountryCode, JobTitle = request.JobTitle, JobDescription = request.JobDescription, Location = request.Location, StartMonth = (byte)request.StartMonth, EndMonth = Convert.ToByte(request.EndMonth), StartYear = request.StartYear, EndYear = request.EndYear, }; _logic.Add(new ApplicantWorkHistoryPoco[] { poco }); return(null); }
public ApplicantWorkHistoryPoco[] GetArray(ApplicantWorkHistoryPayload request) { ApplicantWorkHistoryPoco poco = new ApplicantWorkHistoryPoco() { Id = Guid.Parse(request.Id), Applicant = Guid.Parse(request.Applicant), CompanyName = request.CompanyName, CountryCode = request.CountryCode, Location = request.Location, JobTitle = request.JobTitle, JobDescription = request.JobDescription, StartMonth = (short)request.StartMonth, StartYear = request.StartYear, EndMonth = (short)request.EndMonth, EndYear = request.EndYear }; ApplicantWorkHistoryPoco[] pocos = new ApplicantWorkHistoryPoco[1]; pocos[0] = poco; return(pocos); }
public override Task <Empty> UpdateApplicantWorkHistory(ApplicantWorkHistoryPayload request, ServerCallContext context) { _ = _logic.Get(Guid.Parse(request.Id)) ?? throw new ArgumentNullException("No Applicant Work History Record with this Id Found "); var poco = new ApplicantWorkHistoryPoco() { Id = Guid.Parse(request.Id), Applicant = Guid.Parse(request.Applicant), CompanyName = request.CompanyName, CountryCode = request.CountryCode, JobTitle = request.JobTitle, JobDescription = request.JobDescription, Location = request.Location, StartMonth = (byte)request.StartMonth, EndMonth = Convert.ToByte(request.EndMonth), StartYear = request.StartYear, EndYear = request.EndYear, }; _logic.Update(new ApplicantWorkHistoryPoco[] { poco }); return(null); }
public override Task <Empty> DeleteApplicantWorkHistory(ApplicantWorkHistoryPayload request, ServerCallContext context) { _logic.Delete(GetArray(request)); return(new Task <Empty>(null)); }