public override Task <Empty> AddApplicantEducations(ApplicantEducations request, ServerCallContext context) { var topoco = ToPoco(request).ToArray(); _logic.Add(topoco); return(Task.FromResult <Empty>(null)); }
public void AddApplicantEducation(ApplicantEducationPoco[] item) { EFGenericRepository <ApplicantEducationPoco> applicanteducationrepo = new EFGenericRepository <ApplicantEducationPoco>(false); ApplicantEducationLogic _applicanteducationlogic = new ApplicantEducationLogic(applicanteducationrepo); _applicanteducationlogic.Add(item); }
public void AddApplicantEducation(ApplicantEducationPoco[] items) { EFGenericRepository <ApplicantEducationPoco> ApplicantEducationRepo = new EFGenericRepository <ApplicantEducationPoco>(false); var Logic = new ApplicantEducationLogic(ApplicantEducationRepo); Logic.Add(items); }
public void AddApplicantEducation(ApplicantEducationPoco[] pocos) { EFGenericRepository <ApplicantEducationPoco> repo = new EFGenericRepository <ApplicantEducationPoco>(false); ApplicantEducationLogic logic = new ApplicantEducationLogic(repo); logic.Add(pocos); }
public void AddApplicantEducation(ApplicantEducationPoco[] pocos) { ApplicantProfileRepository <ApplicantEducationPoco> repo = new ApplicantProfileRepository <ApplicantEducationPoco>(false); ApplicantEducationLogic log = new ApplicantEducationLogic(repo); log.Add(pocos); }
public void AddApplicantEducation(ApplicantEducationPoco[] items) { var logic = new ApplicantEducationLogic (new EFGenericRepository <ApplicantEducationPoco>()); logic.Add(items); }
public ActionResult PostApplicantEducation( [FromBody] ApplicantEducationPoco[] pocos) { _logic.Add(pocos); return(Ok()); }
public IHttpActionResult PostApplicantEducation(ApplicantEducationPoco[] applicantEducations) { if (applicantEducations == null) { return(NotFound()); } _logic.Add(applicantEducations); return(Ok()); }
public ActionResult Create([Bind(Include = "Id,Applicant,Major,CertificateDiploma,StartDate,CompletionDate, CompletionPercent")] ApplicantEducationPoco applicantEducation) { Guid _userProfileId = (Guid)TempData["Applicant"]; TempData.Keep(); applicantEducation.Id = Guid.NewGuid(); applicantEducation.Applicant = _userProfileId; _logic.Add(new ApplicantEducationPoco[] { applicantEducation }); return(RedirectToAction("Index")); }
public override Task <Empty> AddApplicantEducation(ApplicantEducations request, ServerCallContext context) { List <ApplicantEducationPoco> pocos = new List <ApplicantEducationPoco>(); foreach (ApplicantEducationReply reply in request.AppEdus) { pocos.Add(ToPOCO(reply)); } _logic.Add(pocos.ToArray()); return(Task.FromResult <Empty>(null)); }
public IHttpActionResult PostApplicantEducation([FromBody] ApplicantEducationPoco[] pocos) { try { _logic.Add(pocos); return(Ok()); }catch (Exception e) { return(InternalServerError(e)); } }
public ActionResult Create([Bind(Include = "Id,Applicant,Major,CertificateDiploma,StartDate,CompletionDate,CompletionPercent,TimeStamp")] ApplicantEducationPoco applicantEducationPoco) { if (ModelState.IsValid) { applicantEducationPoco.Id = Guid.NewGuid(); logic.Add(new[] { applicantEducationPoco }); return(RedirectToAction("Index")); } return(View(applicantEducationPoco)); }
public override Task <Empty> AddApplicantEducation(ApplicantEducationList request, ServerCallContext context) { List <ApplicantEducationPoco> pocos = new List <ApplicantEducationPoco>(); foreach (var reply in request.AppEdus) { pocos.Add(ToPoco(reply)); } logic.Add(pocos.ToArray()); return(Task.FromResult(new Empty())); }
public async Task <IActionResult> Create([Bind("Applicant,Major,CertificateDiploma,StartDate,CompletionDate,CompletionPercent")] ApplicantEducationPoco applicantEducationPoco) { if (ModelState.IsValid) { applicantEducationPoco.Id = Guid.NewGuid(); _logic.Add(new ApplicantEducationPoco[] { applicantEducationPoco }); return(RedirectToAction(nameof(Details), "ApplicantProfile", new { Id = applicantEducationPoco.Applicant })); } PopulateApplicantList(applicantEducationPoco.Applicant); return(View(applicantEducationPoco)); }
public override Task <Empty> CreateApplicantEducation(ApplicantEducationObjs request, ServerCallContext context) { var _logic = new ApplicantEducationLogic(new EFGenericRepository <ApplicantEducationPoco>()); List <ApplicantEducationPoco> pocos = new List <ApplicantEducationPoco>(); foreach (var item in request.Obj) { pocos.Add(TranslateFromProto(item, new ApplicantEducationPoco())); } _logic.Add(pocos.ToArray()); return(Task.FromResult(new Empty())); }
public ActionResult Create([Bind(Include = "Id,CertificateDiploma,StartDate,CompletionDate,CompletionPercent,TimeStamp,Applicant,Major")] ApplicantEducationPoco applicantEducationPoco) { if (ModelState.IsValid) { applicantEducationPoco.Id = Guid.NewGuid(); //db.ApplicantEducation.Add(applicantEducationPoco); //db.SaveChanges(); _logic.Add(new ApplicantEducationPoco[] { applicantEducationPoco }); return(RedirectToAction("Index")); } ViewBag.Applicant = new SelectList(db.ApplicantProfile, "Id", "Country", applicantEducationPoco.Applicant); return(View(applicantEducationPoco)); }
public void AddApplicantEducation(ApplicantEducationPoco[] items) { //One Way //EFGenericRepository<ApplicantEducationPoco> repo = new EFGenericRepository<ApplicantEducationPoco>(); //ApplicantEducationLogic logic = new ApplicantEducationLogic(repo); //Another Way var logic = new ApplicantEducationLogic ( new EFGenericRepository <ApplicantEducationPoco>() ); logic.Add(items); }
public override Task <Empty> CreateApplicantEducation(ApplicantEducationPayload request, ServerCallContext context) { ApplicantEducationPoco[] pocos = new ApplicantEducationPoco[1]; pocos[0].Id = Guid.Parse(request.Id); pocos[0].Applicant = Guid.Parse(request.Applicant); pocos[0].CertificateDiploma = request.CertificateDiploma; pocos[0].Major = request.Major; pocos[0].CompletionPercent = Byte.Parse(request.CompletionPercent.ToString()); pocos[0].CompletionDate = request.CompletionDate.ToDateTime(); pocos[0].StartDate = request.StartDate.ToDateTime(); _logic.Add(pocos); return(new Task <Empty>(null)); }
public ActionResult PostApplicantEducation([FromBody] ApplicantEducationPoco[] pocos) { try { _logic.Add(pocos); return(Ok()); } catch (AggregateException ae) { return(BadRequest(ae)); } catch { return(StatusCode(500)); } }
public ActionResult Create([Bind(Include = "Id,Applicant,Major,CertificateDiploma,StartDate,CompletionDate,CompletionPercent")] ApplicantEducationPoco applicantEducationPoco) { if (ModelState.IsValid) { applicantEducationPoco.Id = Guid.NewGuid(); // db.ApplicantEducations.Add(applicantEducationPoco); // db.SaveChanges(); ApplicantEducationPoco[] pocos = new ApplicantEducationPoco[5]; pocos[0] = applicantEducationPoco; Logic.Add(pocos); return(RedirectToAction("Index")); } ViewBag.Applicant = new SelectList(db.ApplicantProfiles, "Id", "Currency", applicantEducationPoco.Applicant); //ViewBag.Applicant = new SelectList(Logic.GetAll(), "Id", "Currency", applicantEducationPoco.Applicant); return(View(applicantEducationPoco)); }
public override Task <Empty> AddGetApplicantEducations(ApplicantEducations request, ServerCallContext context) { List <ApplicantEducationPoco> pocos = new List <ApplicantEducationPoco>(); foreach (ApplicantEducationReply reply in request.ApplicationEducarionReplies) { pocos.Add( new ApplicantEducationPoco() { Applicant = Guid.Parse(reply.Applicant), Major = reply.Majot, CertificateDiploma = reply.CertificateDiploma, StartDate = reply.StartDate.ToDateTime(), CompletionDate = reply.CompletionDate.ToDateTime(), CompletionPercent = (byte?)reply.CompletionPercent }); } _logic.Add(pocos.ToArray()); return(Task.FromResult <Empty>(null)); }
public IHttpActionResult PostApplicantEducation([FromBody] ApplicantEducationPoco[] pocos) { try { _logicObj.Add(pocos); return(this.Ok()); } catch (AggregateException e) { IEnumerable <ValidationException> exceptions = e.InnerExceptions.Cast <ValidationException>(); HttpResponseMessage response = this.Request.CreateErrorResponse(HttpStatusCode.BadRequest, exceptions.FirstOrDefault()); throw new HttpResponseException(response); } catch (Exception e) { HttpResponseMessage response = this.Request.CreateErrorResponse(HttpStatusCode.BadRequest, e); throw new HttpResponseException(response); } }
public ActionResult Create([Bind(Include = "Id,Applicant,Major,CertificateDiploma,StartDate,CompletionDate,CompletionPercent,TimeStamp")] ApplicantEducationPoco applicantEducationPoco) { //if (ModelState.IsValid) //{ // applicantEducationPoco.Id = Guid.NewGuid(); // db.ApplicantEducations.Add(applicantEducationPoco); // db.SaveChanges(); // return RedirectToAction("Index"); //} //ViewBag.Applicant = new SelectList(db.ApplicantProfilePocos, "Id", "Currency", applicantEducationPoco.Applicant); //return View(applicantEducationPoco); if (ModelState.IsValid) { applicantEducationPoco.Id = Guid.NewGuid(); appEduPoco[0] = applicantEducationPoco; applicantEducationLogic.Add(appEduPoco); return(RedirectToAction("Index")); } ViewBag.Applicant = new SelectList(applicantEducationLogic.GetAll(), "Applicant", "Applicant"); return(View(applicantEducationPoco)); }
public void AddApplicantEducation(ApplicantEducationPoco[] items) { var reference = new ApplicantEducationLogic(new EFGenericRepository <ApplicantEducationPoco>(false)); reference.Add(items); }
public void AddApplicantEducation(ApplicantEducationPoco[] pocos) { _applicantEducationLogic.Add(pocos); }
public IHttpActionResult PostApplicantEducation([FromBody] ApplicantEducationPoco[] appEdu) { _logic.Add(appEdu); return(Ok()); }
public void AddApplicantEducation(ApplicantEducationPoco[] item) { _logic.Add(item); }
public void AddApplicantEducation(ApplicantEducationPoco[] pocos) { var logic = new ApplicantEducationLogic(new EFGenericRepository <ApplicantEducationPoco>(false)); logic.Add(pocos); }