示例#1
0
        public void UpdateApplicantEducation(ApplicantEducationPoco[] items)
        {
            //throw new NotImplementedException();
            var logic = new ApplicantEducationLogic(new EFGenericRepository <ApplicantEducationPoco>(false));

            logic.Update(items);
        }
示例#2
0
        public void UpdateApplicantEducation(ApplicantEducationPoco[] pocos)
        {
            EFGenericRepository <ApplicantEducationPoco> repo = new EFGenericRepository <ApplicantEducationPoco>(false);
            ApplicantEducationLogic logic = new ApplicantEducationLogic(repo);

            logic.Update(pocos);
        }
示例#3
0
        public override Task <Empty> UpdateApplicantEducation(ApplicantEducations request, ServerCallContext context)
        {
            var topoco = ToPoco(request).ToArray();

            _logic.Update(topoco);
            return(Task.FromResult <Empty>(null));
        }
示例#4
0
        public void UpdateApplicantEducation(ApplicantEducationPoco[] items)
        {
            EFGenericRepository <ApplicantEducationPoco> ApplicantEducationRepo = new EFGenericRepository <ApplicantEducationPoco>(false);
            var Logic = new ApplicantEducationLogic(ApplicantEducationRepo);

            Logic.Update(items);
        }
示例#5
0
        public ActionResult PutApplicantEducation(
            [FromBody] ApplicantEducationPoco[] pocos)
        {
            _logic.Update(pocos);

            return(Ok());
        }
示例#6
0
        public void UpdateApplicantEducation(ApplicantEducationPoco[] pocos)
        {
            ApplicantProfileRepository <ApplicantEducationPoco> repo = new ApplicantProfileRepository <ApplicantEducationPoco>(false);
            ApplicantEducationLogic log = new ApplicantEducationLogic(repo);

            log.Update(pocos);
        }
示例#7
0
        public void UpdateApplicantEducation(ApplicantEducationPoco[] items)
        {
            var logic = new ApplicantEducationLogic
                            (new EFGenericRepository <ApplicantEducationPoco>());

            logic.Update(items);
        }
示例#8
0
        public void UpdateApplicantEducation(ApplicantEducationPoco[] items)
        {
            EFGenericRepository <ApplicantEducationPoco> applicanteducationrepo = new EFGenericRepository <ApplicantEducationPoco>(false);
            ApplicantEducationLogic _applicanteducationlogic = new ApplicantEducationLogic(applicanteducationrepo);

            _applicanteducationlogic.Update(items);
        }
示例#9
0
 public ActionResult Edit([Bind(Include = "Id,Applicant,Major,CertificateDiploma,StartDate,CompletionDate,CompletionPercent,TimeStamp")] ApplicantEducationPoco applicantEducationPoco)
 {
     if (ModelState.IsValid)
     {
         logic.Update(new[] { applicantEducationPoco });
         return(RedirectToAction("Index"));
     }
     return(View(applicantEducationPoco));
 }
示例#10
0
 public IHttpActionResult PutApplicantEducation(ApplicantEducationPoco[] applicantEducations)
 {
     if (applicantEducations == null)
     {
         return(NotFound());
     }
     _logic.Update(applicantEducations);
     return(Ok());
 }
示例#11
0
        public ActionResult Edit([Bind(Include = "Id,Applicant,Major,CertificateDiploma,StartDate,CompletionDate,CompletionPercent")] ApplicantEducationPoco applicantEducation)
        {
            Guid _userProfileId = (Guid)TempData["Applicant"];

            TempData.Keep();
            applicantEducation.TimeStamp = (byte[])TempData["TimeStamp"];
            applicantEducation.Applicant = _userProfileId;
            _logic.Update(new ApplicantEducationPoco[] { applicantEducation });
            return(RedirectToAction("Index"));
        }
示例#12
0
        public override Task <Empty> UpdateApplicantEducation(ApplicantEducations request, ServerCallContext context)
        {
            List <ApplicantEducationPoco> pocos = new List <ApplicantEducationPoco>();

            foreach (ApplicantEducationReply reply in request.AppEdus)
            {
                pocos.Add(ToPOCO(reply));
            }
            _logic.Update(pocos.ToArray());
            return(Task.FromResult <Empty>(null));
        }
示例#13
0
        public override Task <Empty> UpdateApplicantEducation(ApplicantEducationList request, ServerCallContext context)
        {
            List <ApplicantEducationPoco> pocos = new List <ApplicantEducationPoco>();

            foreach (var item in request.AppEdus)
            {
                pocos.Add(ToPoco(item));
            }
            logic.Update(pocos.ToArray());
            return(Task.FromResult(new Empty()));
        }
 public ActionResult Edit([Bind(Include = "Id,CertificateDiploma,StartDate,CompletionDate,CompletionPercent,TimeStamp,Applicant,Major")] ApplicantEducationPoco applicantEducationPoco)
 {
     if (ModelState.IsValid)
     {
         //db.Entry(applicantEducationPoco).State = EntityState.Modified;
         //db.SaveChanges();
         _logic.Update(new ApplicantEducationPoco[] { applicantEducationPoco });
         return(RedirectToAction("Index"));
     }
     ViewBag.Applicant = new SelectList(db.ApplicantProfile, "Id", "Country", applicantEducationPoco.Applicant);
     return(View(applicantEducationPoco));
 }
示例#15
0
 public IHttpActionResult PutApplicantEducation([FromBody] ApplicantEducationPoco[] pocos)
 {
     try
     {
         _logic.Update(pocos);
         return(Ok());
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
示例#16
0
        public override Task <Empty> UpdateApplicantEducation(ApplicantEducationObjs request, ServerCallContext context)
        {
            var _logic = new ApplicantEducationLogic(new EFGenericRepository <ApplicantEducationPoco>());
            List <ApplicantEducationPoco> pocos = new List <ApplicantEducationPoco>();

            foreach (var item in request.Obj)
            {
                var poco = _logic.Get(Guid.Parse(item.Id));
                pocos.Add(TranslateFromProto(item, poco));
            }

            _logic.Update(pocos.ToArray());
            return(Task.FromResult(new Empty()));
        }
示例#17
0
 public ActionResult Edit([Bind(Include = "Id,Applicant,Major,CertificateDiploma,StartDate,CompletionDate,CompletionPercent")] ApplicantEducationPoco applicantEducationPoco)
 {
     if (ModelState.IsValid)
     {
         //db.Entry(applicantEducationPoco).State = EntityState.Modified;
         //db.SaveChanges();
         ApplicantEducationPoco[] pocos = new ApplicantEducationPoco[2];
         pocos[0] = applicantEducationPoco;
         Logic.Update(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));
 }
示例#18
0
        public override Task <Empty> UpdateApplcantEducation(ApplicantEducations request, ServerCallContext context)
        {
            var logic = new ApplicantEducationLogic(new EFGenericRepository <ApplicantEducationPoco>());

            List <ApplicantEducationPoco> pocos = new List <ApplicantEducationPoco>();

            foreach (ApplicantEducation proto in request.AppEdu)
            {
                pocos.Add(TranslateFromProto(proto));
            }

            logic.Update(pocos.ToArray());

            return(Task.FromResult(new Empty()));
        }
 public ActionResult PutApplicantEducation([FromBody] ApplicantEducationPoco[] pocos)
 {
     try
     {
         _logic.Update(pocos);
         return(Ok());
     }
     catch (AggregateException ae)
     {
         return(BadRequest(ae));
     }
     catch
     {
         return(StatusCode(500));
     }
 }
        public override Task <Empty> UpdateApplicantEducation(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.Update(pocos);

            return(new Task <Empty>(null));
        }
示例#21
0
        public async Task <IActionResult> EditSave(Guid id)
        {
            var poco = _logic.Get(id);

            if (poco == null)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                if (await TryUpdateModelAsync(poco, "",
                                              i => i.CertificateDiploma,
                                              i => i.CompletionDate,
                                              i => i.CompletionPercent,
                                              i => i.Major,
                                              i => i.StartDate
                                              )
                    )
                {
                    try
                    {
                        _logic.Update(new ApplicantEducationPoco[] { poco });
                        return(RedirectToAction(nameof(Details), "ApplicantProfile", new { Id = poco.Applicant }));
                    }
                    catch (DbUpdateConcurrencyException)
                    {
                        if (!ApplicantEducationPocoExists(poco.Id))
                        {
                            return(NotFound());
                        }
                        else
                        {
                            throw;
                        }
                    }
                }
            }
            PopulateApplicantList(poco.Applicant);
            return(View(poco));
        }
 public IHttpActionResult PutApplicantEducation([FromBody] ApplicantEducationPoco[] 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 ActionResult Edit([Bind(Include = "Id,Applicant,Major,CertificateDiploma,StartDate,CompletionDate,CompletionPercent,TimeStamp")] ApplicantEducationPoco applicantEducationPoco)
        {
            //if (ModelState.IsValid)
            //{
            //    db.Entry(applicantEducationPoco).State = EntityState.Modified;
            //    db.SaveChanges();
            //    return RedirectToAction("Index");
            //}
            //ViewBag.Applicant = new SelectList(db.ApplicantProfilePocos, "Id", "Currency", applicantEducationPoco.Applicant);
            //return View(applicantEducationPoco);

            if (ModelState.IsValid)
            {
                appEduPoco[0] = applicantEducationPoco;

                applicantEducationLogic.Update(appEduPoco);

                return(RedirectToAction("Index"));
            }
            ViewBag.Applicant = new SelectList(applicantEducationLogic.GetAll(), "Applicant", "Applicant");
            return(View(applicantEducationPoco));
        }
示例#24
0
        public void UpdateApplicantEducation(ApplicantEducationPoco[] items)
        {
            var reference = new ApplicantEducationLogic(new EFGenericRepository <ApplicantEducationPoco>(false));

            reference.Update(items);
        }
示例#25
0
 public void UpdateApplicantEducation(ApplicantEducationPoco[] pocos)
 {
     _applicantEducationLogic.Update(pocos);
 }
示例#26
0
 public IHttpActionResult PutApplicantEducation([FromBody] ApplicantEducationPoco[] appEdu)
 {
     _logic.Update(appEdu);
     return(Ok());
 }
示例#27
0
        public void UpdateApplicantEducation(ApplicantEducationPoco[] pocos)
        {
            var logic = new ApplicantEducationLogic(new EFGenericRepository <ApplicantEducationPoco>(false));

            logic.Update(pocos);
        }
示例#28
0
 public void UpdateApplicantEducation(ApplicantEducationPoco[] items)
 {
     _logic.Update(items);
 }