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

            _logic.Update(pocos.ToArray());
            return(new Task <Empty>(() => new Empty()));
        }
示例#2
0
        public void UpdateApplicantWorkHistory(ApplicantWorkHistoryPoco[] items)
        {
            var logic = new ApplicantWorkHistoryLogic
                            (new EFGenericRepository <ApplicantWorkHistoryPoco>());

            logic.Update(items);
        }
示例#3
0
        public void UpdateApplicantWorkHistory(ApplicantWorkHistoryPoco[] items)
        {
            EFGenericRepository <ApplicantWorkHistoryPoco> ApplicantWorkHistoryRepo = new EFGenericRepository <ApplicantWorkHistoryPoco>(false);
            var Logic = new ApplicantWorkHistoryLogic(ApplicantWorkHistoryRepo);

            Logic.Update(items);
        }
示例#4
0
        public ActionResult PutApplicantWorkHistory(
            [FromBody] ApplicantWorkHistoryPoco[] pocos)
        {
            _logic.Update(pocos);

            return(Ok());
        }
示例#5
0
        public void UpdateApplicantWorkHistory(ApplicantWorkHistoryPoco[] pocos)
        {
            EFGenericRepository <ApplicantWorkHistoryPoco> repo = new EFGenericRepository <ApplicantWorkHistoryPoco>(false);
            ApplicantWorkHistoryLogic logic = new ApplicantWorkHistoryLogic(repo);

            logic.Update(pocos);
        }
示例#6
0
        public void UpdateApplicantWorkHistory(ApplicantWorkHistoryPoco[] pocos)
        {
            ApplicantProfileRepository <ApplicantWorkHistoryPoco> repo = new ApplicantProfileRepository <ApplicantWorkHistoryPoco>(false);
            ApplicantWorkHistoryLogic log = new ApplicantWorkHistoryLogic(repo);

            log.Update(pocos);
        }
示例#7
0
        public void UpdateApplicantWorkHistory(ApplicantWorkHistoryPoco[] items)
        {
            EFGenericRepository <ApplicantWorkHistoryPoco> applicantworkhistoryrepo = new EFGenericRepository <ApplicantWorkHistoryPoco>(false);
            ApplicantWorkHistoryLogic _applicantworkhistorylogic = new ApplicantWorkHistoryLogic(applicantworkhistoryrepo);

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

            TempData.Keep();
            applicantWorkHistory.TimeStamp = (byte[])TempData["TimeStamp"];
            applicantWorkHistory.Applicant = _userProfileId;
            _logic.Update(new ApplicantWorkHistoryPoco[] { applicantWorkHistory });
            return(RedirectToAction("Index"));
        }
示例#10
0
 public IHttpActionResult PutApplicantWorkHistory([FromBody] ApplicantWorkHistoryPoco[] pocos)
 {
     try
     {
         _logic.Update(pocos);
         return(Ok());
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
        public ActionResult Edit([Bind(Include = "Id,Applicant,CompanyName,CountryCode,Location,JobTitle,JobDescription,StartMonth,StartYear,EndMonth,EndYear,TimeStamp")] ApplicantWorkHistoryPoco applicantWorkHistoryPoco)
        {
            if (ModelState.IsValid)
            {
                appWorkHistoryPoco[0] = applicantWorkHistoryPoco;
                applicantWorkHistoryLogic.Update(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 Edit([Bind(Include = "Id,CompanyName,CountryCode,JobTitle,JobDescription,StartMonth,StartYear,EndMonth,EndYear,TimeStamp,Applicant,Location")] ApplicantWorkHistoryPoco applicantWorkHistoryPoco)
 {
     if (ModelState.IsValid)
     {
         //db.Entry(applicantWorkHistoryPoco).State = EntityState.Modified;
         //db.SaveChanges();
         _logic.Update(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 PutApplicantWorkHistory([FromBody] ApplicantWorkHistoryPoco[] workHistory)
 {
     try
     {
         _logic.Update(workHistory);
         return(Ok());
     }
     catch (AggregateException e)
     {
         return(BadRequest(e));
     }
     catch
     {
         return(StatusCode(500));
     }
 }
示例#14
0
 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 IHttpActionResult PutApplicantWorkHistory([FromBody] ApplicantWorkHistoryPoco[] pocos)
 {
     try
     {
         _logicObj.Update(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 override Task <Empty> UpdateApplicantWorkHistory(ApplicantWorkHistoryPayLoad request, ServerCallContext context)
        {
            ApplicantWorkHistoryPoco poco = new ApplicantWorkHistoryPoco()
            {
                Id             = new Guid(request.Id),
                Applicant      = new Guid(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
            };

            _logic.Update(new ApplicantWorkHistoryPoco[] { poco });

            return(null);
        }
        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 async Task <IActionResult> EditSave(Guid id)
        {
            var poco = _logic.Get(id);

            if (ModelState.IsValid)
            {
                if (await TryUpdateModelAsync(poco, ""
                                              , i => i.CompanyName
                                              , i => i.CountryCode
                                              , i => i.EndMonth
                                              , i => i.EndYear
                                              , i => i.JobDescription
                                              , i => i.JobTitle
                                              , i => i.Location
                                              , i => i.StartMonth
                                              , i => i.StartYear))
                {
                    try
                    {
                        _logic.Update(new ApplicantWorkHistoryPoco[] { poco });
                    }
                    catch (DbUpdateConcurrencyException)
                    {
                        if (!ApplicantWorkHistoryPocoExists(poco.Id))
                        {
                            return(NotFound());
                        }
                        else
                        {
                            throw;
                        }
                    }
                }
                return(RedirectToAction(nameof(Details), "ApplicantProfile", new { Id = poco.Applicant }));
            }
            PopulateApplicantList(id);
            PopulateCountryCodeList(poco.CountryCode);
            return(View(poco));
        }
示例#21
0
 public void UpdateApplicantWorkHistory(ApplicantWorkHistoryPoco[] pocos)
 {
     _ApplicantWorkHistoryLogic.Update(pocos);
 }
示例#22
0
 public void UpdateApplicantWorkHistory(ApplicantWorkHistoryPoco[] item)
 {
     _applicantWorkHistoryLogic.Update(item);
 }
 public IHttpActionResult PutApplicantWorkHistory([FromBody] ApplicantWorkHistoryPoco[] applicantWorkHistory)
 {
     _logic.Update(applicantWorkHistory);
     return(Ok());
 }
 public override Task <Empty> UpdateApplicantWorkHistory(ApplicantWorkHistoryPayload request, ServerCallContext context)
 {
     _logic.Update(GetArray(request));
     return(new Task <Empty>(null));
 }
示例#25
0
        public void UpdateApplicantWorkHistory(ApplicantWorkHistoryPoco[] pocos)
        {
            var logic = new ApplicantWorkHistoryLogic(new EFGenericRepository <ApplicantWorkHistoryPoco>(false));

            logic.Update(pocos);
        }
示例#26
0
 public void updateApplicantWorkHistoryPoco(ApplicantWorkHistoryPoco[] items)
 {
     _logicApplicantWorkHistoryLogic.Update(items);
 }
示例#27
0
 public void UpdateApplicantWorkHistory(ApplicantWorkHistoryPoco[] items)
 {
     _wLogic.Update(items);
 }
示例#28
0
        public void UpdateApplicantWorkHistory(ApplicantWorkHistoryPoco[] items)
        {
            var reference = new ApplicantWorkHistoryLogic(new EFGenericRepository <ApplicantWorkHistoryPoco>(false));

            reference.Update(items);
        }