コード例 #1
0
        public ActionResult Index()
        {
            Guid _userProfileId = (Guid)TempData["Applicant"];

            TempData.Keep();
            ApplicantProfilePoco poco = new ApplicantProfilePoco();

            poco = _logic.Get(_userProfileId);


            return(View(poco));
        }
コード例 #2
0
        // GET: ApplicantProfile/Details/5
        public ActionResult Details(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ApplicantProfilePoco applicantProfilePoco = logic.Get(id.Value);

            if (applicantProfilePoco == null)
            {
                return(HttpNotFound());
            }
            return(View(applicantProfilePoco));
        }
コード例 #3
0
        //private CareerCloudContext db = new CareerCloudContext();


        public ActionResult JobsApplied(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            ApplicantProfilePoco applicantProfilePoco = applicantProfileLogic.Get(id.Value, n => n.ApplicantJobApplications); //db.ApplicantProfilePocos.Find(id);

            if (applicantProfilePoco == null)
            {
                return(HttpNotFound());
            }
            return(View(applicantProfilePoco));
        }
コード例 #4
0
        public ApplicantProfilePoco GetSingleApplicantProfile(string Id)
        {
            Guid id    = new Guid(Id);
            var  logic = new ApplicantProfileLogic(new EFGenericRepository <ApplicantProfilePoco>(false));

            return(logic.Get(id));
        }
コード例 #5
0
        public ApplicantProfilePoco GetSingleApplicantProfile(string Id)
        {
            EFGenericRepository <ApplicantProfilePoco> ApplicantProfileRepo = new EFGenericRepository <ApplicantProfilePoco>(false);
            var Logic = new ApplicantProfileLogic(ApplicantProfileRepo);

            return(Logic.Get(Guid.Parse(Id)));
        }
コード例 #6
0
ファイル: Applicant.cs プロジェクト: SamuelOyanna/CareerCloud
        public ApplicantProfilePoco GetSingleApplicantProfile(string Id)
        {
            ApplicantProfileRepository <ApplicantProfilePoco> repo = new ApplicantProfileRepository <ApplicantProfilePoco>(false);
            ApplicantProfileLogic log = new ApplicantProfileLogic(repo);

            return(log.Get(Guid.Parse(Id)));
        }
コード例 #7
0
        // GET: ApplicantProfile/Edit/5
        public ActionResult Edit(Guid id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ApplicantProfilePoco applicantProfilePoco = _logic.Get(id);// db.ApplicantProfile.Find(id);

            if (applicantProfilePoco == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Login   = new SelectList(db.SecurityLogin, "Id", "EmailAddress", applicantProfilePoco.Login);
            ViewBag.Country = new SelectList(db.SystemCountryCode, "Code", "Name", applicantProfilePoco.Country);
            return(View(applicantProfilePoco));
        }
コード例 #8
0
ファイル: Applicant.cs プロジェクト: AyeshaAleen/CareerCloud
        public ApplicantProfilePoco GetSingleApplicantProfile(string Id)
        {
            ApplicantProfileLogic logic = new ApplicantProfileLogic
                                              (new EFGenericRepository <ApplicantProfilePoco>(false));

            return(logic.Get(Guid.Parse(Id)));
        }
コード例 #9
0
        public override Task <ApplicantProfilePayLoad> ReadApplicantProfile(IdRequestAppProfile request, ServerCallContext context)
        {
            ApplicantProfilePoco poco = _logic.Get(Guid.Parse(request.Id));

            if (poco is null)
            {
                throw new ArgumentOutOfRangeException("poco is null");
            }

            return(new Task <ApplicantProfilePayLoad>(
                       () => new ApplicantProfilePayLoad()
            {
                Id = poco.Id.ToString(),
                Login = poco.Login.ToString(),
                CurrentSalary = ((double)poco.CurrentSalary),
                CurrentRate = ((double)poco.CurrentRate),
                Currency = poco.Currency,
                Country = poco.Country,
                Province = poco.Province,
                Street = poco.Street,
                City = poco.City,
                PostalCode = poco.PostalCode
            }
                       ));
        }
コード例 #10
0
        public ApplicantProfilePoco GetSingleApplicantProfile(string id)
        {
            EFGenericRepository <ApplicantProfilePoco> applicantprofilerepo = new EFGenericRepository <ApplicantProfilePoco>(false);
            ApplicantProfileLogic _applicantprofilelogic = new ApplicantProfileLogic(applicantprofilerepo);

            return(_applicantprofilelogic.Get(Guid.Parse(id)));
        }
コード例 #11
0
        public override Task <ApplicantProfileReply> GetApplicantProfile(IdRequest2 request,
                                                                         ServerCallContext context)
        {
            ApplicantProfilePoco poco = _logic.Get(Guid.Parse(request.Id));

            return(Task.FromResult <ApplicantProfileReply>(FromPoco(poco)));
        }
コード例 #12
0
        public ApplicantProfilePoco GetSingleApplicantProfile(string id)
        {
            EFGenericRepository <ApplicantProfilePoco> repo = new EFGenericRepository <ApplicantProfilePoco>(false);
            ApplicantProfileLogic logic = new ApplicantProfileLogic(repo);

            return(logic.Get(Guid.Parse(id))); /*repo.GetSingle(c => Guid.Parse(id) == c.Id);*/
        }
コード例 #13
0
        public ApplicantProfilePoco GetSingleApplicantProfile(string Id)
        {
            var logic = new ApplicantProfileLogic(new EFGenericRepository <ApplicantProfilePoco>(false));
            ApplicantProfilePoco applicantProfilePoco = new ApplicantProfilePoco();

            applicantProfilePoco = logic.Get(Guid.Parse(Id));
            return(applicantProfilePoco);
        }
コード例 #14
0
        public override Task <ApplicantProfilePayload> ReadApplicantProfile(ApplicantProfileIdRequest request, ServerCallContext context)
        {
            var poco = _logic.Get(Guid.Parse(request.Id));

            return(new Task <ApplicantProfilePayload>(() => new ApplicantProfilePayload()
            {
                Id = poco.Id.ToString(),
                Login = poco.Login.ToString(),
                Street = poco.Street,
                City = poco.City,
                Province = poco.Province,
                PostalCode = poco.PostalCode,
                Country = poco.Country,
                Currency = poco.Currency,
                CurrentRate = (double?)poco.CurrentRate,
                CurrentSalary = (double?)poco.CurrentSalary
            }));
        }
コード例 #15
0
        public IHttpActionResult GetApplicantProfile(Guid applicantProfileId)
        {
            ApplicantProfilePoco poco = logic.Get(applicantProfileId);

            if (poco == null)
            {
                return(NotFound());
            }
            return(Ok(poco));
        }
コード例 #16
0
        public IHttpActionResult GetApplicantProfile(Guid applicantProfileId)
        {
            ApplicantProfilePoco appEdu = _logic.Get(applicantProfileId);

            if (appEdu == null)
            {
                return(NotFound());
            }
            return(Ok(appEdu));
        }
コード例 #17
0
        public ActionResult GetApplicantProfile(Guid id)
        {
            ApplicantProfilePoco poco = _logic.Get(id);

            if (poco == null)
            {
                return(NotFound());
            }
            return(Ok(poco));
        }
コード例 #18
0
        public ActionResult GetApplicantProfile(Guid Id)
        {
            var poco = _Logic.Get(Id);

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

            return(Ok(poco));
        }
コード例 #19
0
        public IHttpActionResult GetApplicantProfile(Guid applicantProfileId)
        {
            var getSingle = _logic.Get(applicantProfileId);

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

            return(Ok(getSingle));
        }
コード例 #20
0
        public override Task <ApplicantProfileObj> GetApplicantProfile(IdRequestApplicantProfile request, ServerCallContext context)
        {
            var _logic = new ApplicantProfileLogic(new EFGenericRepository <ApplicantProfilePoco>());
            ApplicantProfilePoco poco = _logic.Get(Guid.Parse(request.Id));

            if (poco == null)
            {
                throw new ArgumentOutOfRangeException();
            }
            return(TranslateFromPoco(poco));
        }
コード例 #21
0
        public ActionResult GetApplicantProfile(Guid id)
        {
            var poco = _logic.Get(id);

            if (poco != null)
            {
                return(Ok(poco));
            }
            else
            {
                return(NotFound());
            }
        }
コード例 #22
0
        public ActionResult GetApplicantProfile(Guid applicantProfileId)
        {
            ApplicantProfilePoco applicantProfile = _logic.Get(applicantProfileId);

            if (applicantProfile == null)
            {
                return(NotFound());
            }
            else
            {
                return(Ok(applicantProfile));
            }
        }
コード例 #23
0
        public ActionResult GetApplicantProfile(Guid applicantprofileid)
        {
            ApplicantProfilePoco poco = _logicref.Get(applicantprofileid);

            if (poco != null)
            {
                return(Ok(poco));
            }
            else
            {
                return(NotFound());
            }
        }
コード例 #24
0
        public override Task <ApplicantProfilePayload> ReadApplicantProfile(ApplicantProfileIdRequest request, ServerCallContext context)
        {
            var poco = _logic.Get(Guid.Parse(request.Id));

            if (poco is null)
            {
                throw new ArgumentNullException("Sorry! No Applicant with this Id is found");
            }

            return(new Task <ApplicantProfilePayload>(() => new ApplicantProfilePayload()
            {
                Id = poco.Id.ToString(),
                Login = poco.Login.ToString(),
                Street = poco.Street,
                City = poco.City,
                Province = poco.Province,
                PostalCode = poco.PostalCode,
                Country = poco.Country,
                Currency = poco.Currency,
                CurrentRate = (double?)poco.CurrentRate,
                CurrentSalary = (double?)poco.CurrentSalary
            }));
        }
コード例 #25
0
        public override Task <ApplicantProfile> GetApplicantProfile(AppProfileIdRequest request, ServerCallContext context)
        {
            var poco = _logic.Get(Guid.Parse(request.Id));

            if (poco is null)
            {
                throw new ArgumentOutOfRangeException();
            }

            return(Task.FromResult(new ApplicantProfile
            {
                Id = poco.Id.ToString(),
                Login = poco.Login.ToString(),
                CurrentSalary = (double?)poco.CurrentSalary,
                CurrentRate = (double?)poco.CurrentRate,
                Currency = poco.Currency,
                Country = poco.Country,
                Province = poco.Province,
                Street = poco.Street,
                City = poco.City,
                PostalCode = poco.PostalCode
            }));
        }
コード例 #26
0
        public override Task <Empty> UpdateApplicantProfile(ApplicantProfileObjs request, ServerCallContext context)
        {
            var _logic = new ApplicantProfileLogic(new EFGenericRepository <ApplicantProfilePoco>());
            List <ApplicantProfilePoco> pocos = new List <ApplicantProfilePoco>();

            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()));
        }
コード例 #27
0
 public IHttpActionResult GetApplicantProfile(Guid applicantProfileId)
 {
     try
     {
         ApplicantProfilePoco poco = _logic.Get(applicantProfileId);
         if (poco == null)
         {
             return(NotFound());
         }
         return(Ok(poco));
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
コード例 #28
0
        public override Task <ApplicantProfilePayLoad> ReadApplicantProfile(IdRequestProfile request, ServerCallContext context)
        {
            ApplicantProfilePoco poco = _logic.Get(Guid.Parse(request.Id));

            return(new Task <ApplicantProfilePayLoad>(() => new ApplicantProfilePayLoad()
            {
                Id = poco.Id.ToString(),
                Login = poco.Login.ToString(),
                CurrentSalary = (double)poco.CurrentSalary,
                CurrentRate = (double)poco.CurrentRate,
                Currency = poco.Currency,
                CountryCode = poco.Country,
                StateProvinceCode = poco.Province,
                StreetAddress = poco.Street,
                CityTown = poco.City,
                ZipPostalCode = poco.PostalCode
            }));
        }
コード例 #29
0
        public override Task <ApplicantProfilePayload> ReadApplicantProfile(ApplicantRequest request, ServerCallContext context)
        {
            ApplicantProfilePoco poco = _logic.Get(Guid.Parse(request.Id));

            return(new Task <ApplicantProfilePayload>(
                       () => new ApplicantProfilePayload()
            {
                Id = poco.Id.ToString(),
                Login = poco.Login.ToString(),
                CurrentSalary = poco.CurrentSalary is null ? 0 : Convert.ToDouble(poco.CurrentSalary),
                CurrentRate = poco.CurrentRate is null ? 0 : Convert.ToDouble(poco.CurrentRate),
                Currency = poco.Currency,
                Country = poco.Country,
                Province = poco.Province,
                Street = poco.Street,
                City = poco.City,
                PostalCode = poco.PostalCode
            }
コード例 #30
0
 public IHttpActionResult GetApplicantProfile(Guid ApplicantProfileId)
 {
     try
     {
         ApplicantProfilePoco item = _logicObj.Get(ApplicantProfileId);
         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);
     }
 }