Ejemplo n.º 1
0
        //Get
        public ActionResult Edit(Guid id)
        {
            ApplicantEducationPoco applicant_Education = _logic.Get(id);

            if (applicant_Education == null)
            {
                return(HttpNotFound());
            }
            TempData["TimeStamp"] = applicant_Education.TimeStamp;
            return(View(applicant_Education));
        }
Ejemplo n.º 2
0
        // GET: ApplicantEducation/Edit/5
        public IActionResult Edit(Guid id)
        {
            var applicantEducationPoco = _logic.Get(id);

            if (applicantEducationPoco == null)
            {
                return(NotFound());
            }
            PopulateApplicantList(applicantEducationPoco.Applicant);
            return(View(applicantEducationPoco));
        }
Ejemplo n.º 3
0
        // GET: ApplicantEducations/Details/5
        public ActionResult Details(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ApplicantEducationPoco applicantEducationPoco = Logic.Get(id.Value);            //db.ApplicantEducations.Find(id);

            if (applicantEducationPoco == null)
            {
                return(HttpNotFound());
            }
            return(View(applicantEducationPoco));
        }
        // GET: ApplicantEducation/Edit/5
        public ActionResult Edit(Guid id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ApplicantEducationPoco applicantEducationPoco = _logic.Get(id); // db.ApplicantEducation.Find(id);

            if (applicantEducationPoco == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Applicant = new SelectList(db.ApplicantProfile, "Id", "Country", applicantEducationPoco.Applicant);
            return(View(applicantEducationPoco));
        }
Ejemplo n.º 5
0
        public ApplicantEducationPoco GetSingleApplicantEducation(string Id)
        {
            ApplicantProfileRepository <ApplicantEducationPoco> repo = new ApplicantProfileRepository <ApplicantEducationPoco>(false);
            ApplicantEducationLogic log = new ApplicantEducationLogic(repo);

            return(log.Get(Guid.Parse(Id)));
        }
Ejemplo n.º 6
0
        public ApplicantEducationPoco GetSingleApplicantEducation(string Id)
        {
            //throw new NotImplementedException();
            ApplicantEducationLogic logic = new ApplicantEducationLogic(new EFGenericRepository <ApplicantEducationPoco>(false));

            return(logic.Get(Guid.Parse(Id)));
        }
        public override Task <ApplicantEducationReply> GetApplicantEducation(IdRequest request,
                                                                             ServerCallContext context)
        {
            ApplicantEducationPoco poco = _logic.Get(Guid.Parse(request.Id));

            return(Task.FromResult <ApplicantEducationReply>(FromPoco(poco)));
        }
Ejemplo n.º 8
0
        public ApplicantEducationPoco GetSingleApplicantEducation(string Id)
        {
            ApplicantEducationLogic logic = new ApplicantEducationLogic
                                                (new EFGenericRepository <ApplicantEducationPoco>(false));

            return(logic.Get(Guid.Parse(Id)));
        }
Ejemplo n.º 9
0
        public ApplicantEducationPoco GetSingleApplicantEducation(string id)
        {
            EFGenericRepository <ApplicantEducationPoco> applicanteducationrepo = new EFGenericRepository <ApplicantEducationPoco>(false);
            ApplicantEducationLogic _applicanteducationlogic = new ApplicantEducationLogic(applicanteducationrepo);

            return(_applicanteducationlogic.Get(Guid.Parse(id)));
        }
Ejemplo n.º 10
0
        public ApplicantEducationPoco GetSingleApplicantEducation(string Id)
        {
            EFGenericRepository <ApplicantEducationPoco> ApplicantEducationRepo = new EFGenericRepository <ApplicantEducationPoco>(false);
            var Logic = new ApplicantEducationLogic(ApplicantEducationRepo);

            return(Logic.Get(Guid.Parse(Id)));
        }
Ejemplo n.º 11
0
        public ApplicantEducationPoco GetSingleApplicantEducation(string Id)
        {
            Guid id    = new Guid(Id);
            var  logic = new ApplicantEducationLogic(new EFGenericRepository <ApplicantEducationPoco>(false));

            return(logic.Get(id));
        }
Ejemplo n.º 12
0
        public ApplicantEducationPoco GetSingleApplicantEducation(string Id)
        {
            var logic = new ApplicantEducationLogic(new EFGenericRepository <ApplicantEducationPoco>(false));
            ApplicantEducationPoco applicantEducationPoco = new ApplicantEducationPoco();

            applicantEducationPoco = logic.Get(Guid.Parse(Id));
            return(applicantEducationPoco);
        }
        public IHttpActionResult GetApplicantEducation(Guid id)
        {
            ApplicantEducationPoco poco = logic.Get(id);

            if (poco == null)
            {
                return(NotFound());
            }
            return(Ok(poco));
        }
        public ActionResult GetApplicantEducation(Guid applicantEducationId)
        {
            ApplicantEducationPoco poco = _logic.Get(applicantEducationId);

            if (poco == null)
            {
                return(NotFound());
            }
            return(Ok(poco));
        }
Ejemplo n.º 15
0
        public IHttpActionResult GetApplicantEducation(Guid applicantEducationId)
        {
            ApplicantEducationPoco applicantEducation = _logic.Get(applicantEducationId);

            if (applicantEducation == null)
            {
                return(NotFound());
            }
            return(Ok(applicantEducation));
        }
        public IHttpActionResult GetApplicantEducation(Guid applicantEducationId)
        {
            var getSingle = _logic.Get(applicantEducationId);

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

            return(Ok(getSingle));
        }
Ejemplo n.º 17
0
        public override Task <ApplicantEducationObj> GetApplicantEducation(IdRequestApplicantEducation request, ServerCallContext context)
        {
            var _logic = new ApplicantEducationLogic(new EFGenericRepository <ApplicantEducationPoco>());
            ApplicantEducationPoco poco = _logic.Get(Guid.Parse(request.Id));

            if (poco == null)
            {
                throw new ArgumentOutOfRangeException();
            }
            return(TranslateFromPoco(poco));
        }
        public ActionResult GetApplicantEducation(Guid Id)
        {
            var poco = _logic.Get(Id);

            if (poco == null)
            {
                return(NotFound());
            }
            //poco.ApplicantProfile = new ApplicantProfileLogic(new EFGenericRepository<ApplicantProfilePoco>()).Get(poco.Applicant));
            return(Ok(poco));
        }
Ejemplo n.º 19
0
        public ActionResult GetApplicantEducation(Guid applicanteducationid)
        {
            ApplicantEducationPoco poco = _logicref.Get(applicanteducationid);

            if (poco != null)
            {
                return(Ok(poco));
            }
            else
            {
                return(NotFound());
            }
        }
        public ActionResult GetApplicantEducation(Guid id)
        {
            var poco = _logic.Get(id);

            if (poco != null)
            {
                return(Ok(poco));
            }
            else
            {
                return(NotFound());
            }
        }
Ejemplo n.º 21
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()));
        }
Ejemplo n.º 22
0
        public override Task <ApplicantEducationPayLoad> ReadApplicantEducation(IdRequestEducation request, ServerCallContext context)
        {
            ApplicantEducationPoco poco = _logic.Get(Guid.Parse(request.Id));

            return(new Task <ApplicantEducationPayLoad>(() => new ApplicantEducationPayLoad()
            {
                Id = poco.Id.ToString(),
                Applicant = poco.Applicant.ToString(),
                CertficateDiploma = poco.CertificateDiploma,
                CompletionDate = poco.CompletionDate is null ? null : Timestamp.FromDateTime((DateTime)poco.CompletionDate),
                CompletionPercentage = poco.CompletionPercent is null ? 0 : (int)poco.CompletionPercent,
                Major = poco.Major,
                StartDate = poco.StartDate is null ? null : Timestamp.FromDateTime((DateTime)poco.StartDate)
            }));
Ejemplo n.º 23
0
 public IHttpActionResult GetApplicantEducation(Guid applicantEducationId)
 {
     try
     {
         ApplicantEducationPoco poco = _logic.Get(applicantEducationId);
         if (poco == null)
         {
             return(NotFound());
         }
         return(Ok(poco));
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
Ejemplo n.º 24
0
        public override Task <ApplicantEducationPayload> ReadApplicantEducation(ApplicantEducationIdRequest req, ServerCallContext context)
        {
            var poco = _logic.Get(Guid.Parse(req.Id));

            _ = poco ?? throw new ArgumentNullException(req.Id, req.Id + " - No Applicant Education record with this Id is found");

            var appEdu = new Task <ApplicantEducationPayload>(
                () => new ApplicantEducationPayload()
            {
                Id                 = poco.Id.ToString(),
                Applicant          = poco.Applicant.ToString(),
                Major              = poco.Major,
                CertificateDiploma = poco.CertificateDiploma,
                StartDate          = poco.StartDate is null ? null : Timestamp.FromDateTime((DateTime)poco.StartDate),
                CompletionDate     = poco.CompletionDate is null ? null : Timestamp.FromDateTime((DateTime)poco.CompletionDate),
                CompletionPercent  = poco.CompletionPercent is null ? 0 : (int)poco.CompletionPercent
            });
        public override Task <ApplicantEducation> GetApplicantEducation(IdRequest request, ServerCallContext context)
        {
            var poco = _logic.Get(Guid.Parse(request.Id));

            if (poco is null)
            {
                throw new ArgumentOutOfRangeException();
            }
            return(Task.FromResult(new ApplicantEducation
            {
                Id = poco.Id.ToString(),
                Applicant = poco.Applicant.ToString(),
                Major = poco.Major.ToString(),
                CertificateDiploma = poco.CertificateDiploma.ToString(),
                StartDate = poco.StartDate is null ? null : Timestamp.FromDateTime(DateTime.SpecifyKind(poco.StartDate.GetValueOrDefault(), DateTimeKind.Utc)),
                CompletionDate = poco.CompletionDate is null ? null : Timestamp.FromDateTime(DateTime.SpecifyKind(poco.CompletionDate.GetValueOrDefault(), DateTimeKind.Utc)),
                CompletionPercent = (int)poco.CompletionPercent
            }));
        public override Task <AppEduProto> GetApplicantEducation(AppEduIdRequest request, ServerCallContext context)
        {
            ApplicantEducationPoco poco = _logic.Get(Guid.Parse(request.Id));

            if (poco is null)
            {
                throw new ArgumentOutOfRangeException("Given Id does not exist in system");
            }
            return(new Task <AppEduProto>(
                       () => new AppEduProto()
            {
                Id = poco.Id.ToString(),
                Applicant = poco.ToString(),
                Major = poco.Major,
                CertificateDiploma = poco.CertificateDiploma,
                StartDate = poco.StartDate is null ? null : Timestamp.FromDateTime((DateTime)poco.StartDate),
                CompletionDate = poco.CompletionDate is null ? null : Timestamp.FromDateTime((DateTime)poco.CompletionDate),
                CompletionPercent = poco.CompletionPercent is null ? 0 : (int)poco.CompletionPercent
            }));
 public IHttpActionResult GetApplicantEducation(Guid ApplicantEducationId)
 {
     try
     {
         ApplicantEducationPoco item = _logicObj.Get(ApplicantEducationId);
         if (item != null)
         {
             return(this.Ok(item));
         }
         else
         {
             return(this.NotFound());
         }
     }
     catch (Exception e)
     {
         HttpResponseMessage response =
             this.Request.CreateErrorResponse(HttpStatusCode.BadRequest, e);
         throw new HttpResponseException(response);
     }
 }
Ejemplo n.º 28
0
 public IHttpActionResult Get(Guid id)
 {
     return(Ok(_logic.Get(id)));
 }
Ejemplo n.º 29
0
 public ApplicantEducationPoco GetSingleApplicantEducationPoco(Guid Id)
 {
     return(_logic.Get(Id));
 }
Ejemplo n.º 30
0
 public ApplicantEducationPoco GetSingleApplicantEducation(string Id)
 {
     return(_logic.Get(Guid.Parse(Id)));
 }