public override Task <Empty> CreateApplicantWorkHistory(AppWorkHistoryArray request, ServerCallContext context)
        {
            var pocos = ProtoToPoco(request);

            _logic.Add(pocos.ToArray());
            return(new Task <Empty>(() => new Empty()));
        }
示例#2
0
        public void AddApplicantWorkHistory(ApplicantWorkHistoryPoco[] pocos)
        {
            EFGenericRepository <ApplicantWorkHistoryPoco> repo = new EFGenericRepository <ApplicantWorkHistoryPoco>(false);
            ApplicantWorkHistoryLogic logic = new ApplicantWorkHistoryLogic(repo);

            logic.Add(pocos);
        }
示例#3
0
        public ActionResult PostApplicantWorkHistory(
            [FromBody] ApplicantWorkHistoryPoco[] pocos)
        {
            _logic.Add(pocos);

            return(Ok());
        }
示例#4
0
        public void AddApplicantWorkHistory(ApplicantWorkHistoryPoco[] items)
        {
            EFGenericRepository <ApplicantWorkHistoryPoco> ApplicantWorkHistoryRepo = new EFGenericRepository <ApplicantWorkHistoryPoco>(false);
            var Logic = new ApplicantWorkHistoryLogic(ApplicantWorkHistoryRepo);

            Logic.Add(items);
        }
示例#5
0
        public void AddApplicantWorkHistory(ApplicantWorkHistoryPoco[] pocos)
        {
            ApplicantProfileRepository <ApplicantWorkHistoryPoco> repo = new ApplicantProfileRepository <ApplicantWorkHistoryPoco>(false);
            ApplicantWorkHistoryLogic log = new ApplicantWorkHistoryLogic(repo);

            log.Add(pocos);
        }
示例#6
0
        public void AddApplicantWorkHistory(ApplicantWorkHistoryPoco[] item)
        {
            EFGenericRepository <ApplicantWorkHistoryPoco> applicantworkhistoryrepo = new EFGenericRepository <ApplicantWorkHistoryPoco>(false);
            ApplicantWorkHistoryLogic _applicantworkhistorylogic = new ApplicantWorkHistoryLogic(applicantworkhistoryrepo);

            _applicantworkhistorylogic.Add(item);
        }
示例#7
0
        public void AddApplicantWorkHistory(ApplicantWorkHistoryPoco[] items)
        {
            var logic = new ApplicantWorkHistoryLogic(new EFGenericRepository <ApplicantWorkHistoryPoco
                                                                               >(false));

            logic.Add(items);
        }
 public IHttpActionResult PostApplicantWorkHistory(ApplicantWorkHistoryPoco[] applicantWorkHistory)
 {
     if (applicantWorkHistory == null)
     {
         return(NotFound());
     }
     _logic.Add(applicantWorkHistory);
     return(Ok());
 }
示例#9
0
        public ActionResult Create([Bind(Include = "Id,Applicant,CompanyName,CountryCode,Location,JobTitle, JobDescription,StartMonth, StartYear, EndMonth,EndYear ")] ApplicantWorkHistoryPoco applicantWorkHistory)
        {
            Guid _userProfileId = (Guid)TempData["Applicant"];

            TempData.Keep();
            applicantWorkHistory.Id        = Guid.NewGuid();
            applicantWorkHistory.Applicant = _userProfileId;
            _logic.Add(new ApplicantWorkHistoryPoco[] { applicantWorkHistory });
            return(RedirectToAction("Index"));
        }
示例#10
0
 public IHttpActionResult PostApplicantWorkHistory([FromBody] ApplicantWorkHistoryPoco[] pocos)
 {
     try
     {
         _logic.Add(pocos);
         return(Ok());
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
        public IActionResult Create([Bind("Applicant,CompanyName,CountryCode,Location,JobTitle,JobDescription,StartMonth,StartYear,EndMonth,EndYear")] ApplicantWorkHistoryPoco applicantWorkHistoryPoco)
        {
            if (ModelState.IsValid)
            {
                applicantWorkHistoryPoco.Id = Guid.NewGuid();
                _logic.Add(new ApplicantWorkHistoryPoco[] { applicantWorkHistoryPoco });

                return(RedirectToAction(nameof(Details), "ApplicantProfile", new { Id = applicantWorkHistoryPoco.Applicant }));
            }
            PopulateApplicantList(applicantWorkHistoryPoco.Applicant);
            PopulateCountryCodeList(applicantWorkHistoryPoco.CountryCode);

            return(View(applicantWorkHistoryPoco));
        }
        public ActionResult Create([Bind(Include = "Id,Applicant,CompanyName,CountryCode,Location,JobTitle,JobDescription,StartMonth,StartYear,EndMonth,EndYear,TimeStamp")] ApplicantWorkHistoryPoco applicantWorkHistoryPoco)
        {
            if (ModelState.IsValid)
            {
                applicantWorkHistoryPoco.Id = Guid.NewGuid();
                appWorkHistoryPoco[0]       = applicantWorkHistoryPoco;
                applicantWorkHistoryLogic.Add(appWorkHistoryPoco);

                return(RedirectToAction("Index"));
            }

            ViewBag.Applicant   = new SelectList(applicantWorkHistoryLogic.GetAll(), "Applicant", "Applicant");
            ViewBag.CountryCode = new SelectList(applicantWorkHistoryLogic.GetAll(), "CountryCode", "CountryCode");
            return(View(applicantWorkHistoryPoco));
        }
        public ActionResult Create([Bind(Include = "Id,CompanyName,CountryCode,JobTitle,JobDescription,StartMonth,StartYear,EndMonth,EndYear,TimeStamp,Applicant,Location")] ApplicantWorkHistoryPoco applicantWorkHistoryPoco)
        {
            if (ModelState.IsValid)
            {
                applicantWorkHistoryPoco.Id = Guid.NewGuid();
                //db.ApplicantWorkHistory.Add(applicantWorkHistoryPoco);
                //db.SaveChanges();
                _logic.Add(new ApplicantWorkHistoryPoco[] { applicantWorkHistoryPoco });
                return(RedirectToAction("Index"));
            }

            ViewBag.Applicant   = new SelectList(db.ApplicantProfile, "Id", "Country", applicantWorkHistoryPoco.Applicant);
            ViewBag.CountryCode = new SelectList(db.SystemCountryCode, "Code", "Name", applicantWorkHistoryPoco.CountryCode);
            return(View(applicantWorkHistoryPoco));
        }
 public ActionResult PostApplicantWorkHistory([FromBody] ApplicantWorkHistoryPoco[] workHistory)
 {
     try
     {
         _logic.Add(workHistory);
         return(Ok());
     }
     catch (AggregateException e)
     {
         return(BadRequest(e));
     }
     catch
     {
         return(StatusCode(500));
     }
 }
示例#15
0
 public override Task <Empty> CreateApplicantWorkHistory(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.Add(pocos);
     return(new Task <Empty>(() => new Empty()));
 }
 public override Task <Empty> CreateApplicantWorkHistory(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.Add(pocos);
     return(new Task <Empty>(() => new Empty()));
 }
        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 override Task <Empty> CreateApplicantWorkHistory(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.Add(pocos);
            return(new Task <Empty>(null));
        }
 public IHttpActionResult PostApplicantWorkHistory([FromBody] ApplicantWorkHistoryPoco[] 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);
     }
 }
示例#20
0
 public void AddApplicantWorkHistory(ApplicantWorkHistoryPoco[] item)
 {
     _wLogic.Add(item);
 }
示例#21
0
 public void AddApplicantWorkHistory(ApplicantWorkHistoryPoco[] pocos)
 {
     _ApplicantWorkHistoryLogic.Add(pocos);
 }
 public IHttpActionResult PostApplicantWorkHistory([FromBody] ApplicantWorkHistoryPoco[] applicantWorkHistory)
 {
     _logic.Add(applicantWorkHistory);
     return(Ok());
 }
 public override Task <Empty> CreateApplicantWorkHistory(ApplicantWorkHistoryPayload request, ServerCallContext context)
 {
     _logic.Add(GetArray(request));
     return(new Task <Empty>(null));
 }
示例#24
0
 public void addApplicantWorkHistoryPoco(ApplicantWorkHistoryPoco[] item)
 {
     _logicApplicantWorkHistoryLogic.Add(item);
 }