public IActionResult DeleteConfirmed(Guid id)
        {
            var poco = _logic.Get(id);

            _logic.Delete(new ApplicantWorkHistoryPoco[] { _logic.Get(id) });
            return(RedirectToAction(nameof(Details), "ApplicantProfile", new { Id = poco.Applicant }));
        }
 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);
 }
Exemple #3
0
        public void RemoveApplicantWorkHistory(ApplicantWorkHistoryPoco[] items)
        {
            EFGenericRepository <ApplicantWorkHistoryPoco> applicantworkhistoryrepo = new EFGenericRepository <ApplicantWorkHistoryPoco>(false);
            ApplicantWorkHistoryLogic _applicantworkhistorylogic = new ApplicantWorkHistoryLogic(applicantworkhistoryrepo);

            _applicantworkhistorylogic.Delete(items);
        }
        public override Task <Empty> DeleteApplicantWorkHistory(AppWorkHistoryArray request, ServerCallContext context)
        {
            var pocos = ProtoToPoco(request);

            _logic.Delete(pocos.ToArray());
            return(new Task <Empty>(() => new Empty()));
        }
Exemple #5
0
        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 void RemoveApplicantWorkHistory(ApplicantWorkHistoryPoco[] pocos)
        {
            EFGenericRepository <ApplicantWorkHistoryPoco> repo = new EFGenericRepository <ApplicantWorkHistoryPoco>(false);
            ApplicantWorkHistoryLogic logic = new ApplicantWorkHistoryLogic(repo);

            logic.Delete(pocos);
        }
Exemple #7
0
        public ActionResult DeleteApplicantWorkHistory(
            [FromBody] ApplicantWorkHistoryPoco[] pocos)
        {
            _logic.Delete(pocos);

            return(Ok());
        }
        public void RemoveApplicantWorkHistory(ApplicantWorkHistoryPoco[] pocos)
        {
            ApplicantProfileRepository <ApplicantWorkHistoryPoco> repo = new ApplicantProfileRepository <ApplicantWorkHistoryPoco>(false);
            ApplicantWorkHistoryLogic log = new ApplicantWorkHistoryLogic(repo);

            log.Delete(pocos);
        }
Exemple #9
0
        public void RemoveApplicantWorkHistory(ApplicantWorkHistoryPoco[] items)
        {
            EFGenericRepository <ApplicantWorkHistoryPoco> ApplicantWorkHistoryRepo = new EFGenericRepository <ApplicantWorkHistoryPoco>(false);
            var Logic = new ApplicantWorkHistoryLogic(ApplicantWorkHistoryRepo);

            Logic.Delete(items);
        }
Exemple #10
0
        public void RemoveApplicantWorkHistory(ApplicantWorkHistoryPoco[] items)
        {
            var logic = new ApplicantWorkHistoryLogic
                            (new EFGenericRepository <ApplicantWorkHistoryPoco>());

            logic.Delete(items);
        }
Exemple #11
0
        public ActionResult DeleteConfirmed(Guid id)
        {
            ApplicantWorkHistoryPoco applicantWorkHistory = _logic.Get(id);

            _logic.Delete(new ApplicantWorkHistoryPoco[] { applicantWorkHistory });
            return(RedirectToAction("Index"));
        }
        public ActionResult DeleteConfirmed(Guid id)
        {
            ApplicantWorkHistoryPoco applicantWorkHistoryPoco = applicantWorkHistoryLogic.Get(id);

            appWorkHistoryPoco[0] = applicantWorkHistoryPoco;
            applicantWorkHistoryLogic.Delete(appWorkHistoryPoco);
            return(RedirectToAction("Index"));
        }
 public IHttpActionResult DeleteApplicantWorkHistory(ApplicantWorkHistoryPoco[] applicantWorkHistory)
 {
     if (applicantWorkHistory == null)
     {
         return(NotFound());
     }
     _logic.Delete(applicantWorkHistory);
     return(Ok());
 }
        public ActionResult DeleteConfirmed(Guid id)
        {
            ApplicantWorkHistoryPoco applicantWorkHistoryPoco = _logic.Get(id);// db.ApplicantWorkHistory.Find(id);

            //db.ApplicantWorkHistory.Remove(applicantWorkHistoryPoco);
            //db.SaveChanges();
            _logic.Delete(new ApplicantWorkHistoryPoco[] { applicantWorkHistoryPoco });
            return(RedirectToAction("Index"));
        }
Exemple #15
0
 public IHttpActionResult DeleteApplicantWorkHistory([FromBody] ApplicantWorkHistoryPoco[] pocos)
 {
     try
     {
         _logic.Delete(pocos);
         return(Ok());
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
 public ActionResult DeleteApplicantWorkHistory([FromBody] ApplicantWorkHistoryPoco[] pocos)
 {
     try
     {
         _logic.Delete(pocos);
         return(Ok());
     }
     catch (AggregateException ex)
     {
         return(BadRequest(ex));
     }
     catch
     {
         return(StatusCode(500));
     }
 }
 public override Task <Empty> DeleteApplicantWorkHistory(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.Delete(pocos);
     return(new Task <Empty>(() => new Empty()));
 }
        public override Task <Empty> DeleteApplicantWorkHistory(ApplicantWorkHistoryPayload request, ServerCallContext context)
        {
            ApplicantWorkHistoryPoco[] poco = { new ApplicantWorkHistoryPoco()
                                                {
                                                    Id             = Guid.Parse(request.Id),
                                                    Applicant      = Guid.Parse(request.Applicant),
                                                    CompanyName    = request.CompanyName,
                                                    CountryCode    = request.CountryCode,
                                                    Location       = request.Location,
                                                    JobDescription = request.JobDescription,
                                                    JobTitle       = request.JobTitle,
                                                    StartMonth     = (short)request.StartMonth,
                                                    StartYear      = request.StartYear,
                                                    EndMonth       = (short)request.EndMonth,
                                                    EndYear        = request.EndYear
                                                } };

            _logic.Delete(poco);
            return(new Task <Empty>(() => new Empty()));
        }
        public override Task <Empty> DeleteApplicantWorkHistory(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.Delete(pocos);
            return(new Task <Empty>(null));
        }
 public IHttpActionResult DeleteApplicantWorkHistory([FromBody] ApplicantWorkHistoryPoco[] pocos)
 {
     try
     {
         _logicObj.Delete(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> DeleteApplicantWorkHistory(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.Delete(new ApplicantWorkHistoryPoco[] { poco });


            return(null);
        }
Exemple #22
0
        public void RemoveApplicantWorkHistory(ApplicantWorkHistoryPoco[] items)
        {
            var reference = new ApplicantWorkHistoryLogic(new EFGenericRepository <ApplicantWorkHistoryPoco>(false));

            reference.Delete(items);
        }
Exemple #23
0
 public void RemoveApplicantWorkHistory(ApplicantWorkHistoryPoco[] pocos)
 {
     _ApplicantWorkHistoryLogic.Delete(pocos);
 }
 public IHttpActionResult DeleteApplicantWorkHistory([FromBody] ApplicantWorkHistoryPoco[] applicantWorkHistory)
 {
     _logic.Delete(applicantWorkHistory);
     return(Ok());
 }
Exemple #25
0
 public void removeApplicantWorkHistoryPoco(ApplicantWorkHistoryPoco[] items)
 {
     _logicApplicantWorkHistoryLogic.Delete(items);
 }
 public override Task <Empty> DeleteApplicantWorkHistory(ApplicantWorkHistoryPayload request, ServerCallContext context)
 {
     _logic.Delete(GetArray(request));
     return(new Task <Empty>(null));
 }
Exemple #27
0
 public void RemoveApplicantWorkHistory(ApplicantWorkHistoryPoco[] item)
 {
     _wLogic.Delete(item);
 }