public IActionResult Index()
        {
            var pocos = _logic.GetAll(e => e.ApplicantEducations,
                                      w => w.ApplicantWorkHistories,
                                      s => s.ApplicantSkills,
                                      j => j.ApplicantJobApplications,
                                      s => s.SecurityLogin).OrderByDescending(o => o.SecurityLogin.Created);

            if (pocos is null)
            {
                return(NotFound("No student found"));
            }

            return(View(pocos));
        }
        void PopulateApplicantList(Guid?Selected = null)
        {
            var logic      = new ApplicantProfileLogic(new EFGenericRepository <ApplicantProfilePoco>());
            var Applicants = logic.GetAll(i => i.SecurityLogin).OrderByDescending(u => u.SecurityLogin.Created).Select(k => new { Id = k.Id, Name = k.SecurityLogin.FullName });

            ViewData["Applicant"] = new SelectList(Applicants, "Id", "Name", Selected);
        }
Пример #3
0
        public ActionResult Login([Bind(Include = "Login,Password")] SecurityLoginPoco poco)
        {
            if (poco.Login == null || poco.Password == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            // Get user credentials, later profile information
            var securityLoginLogic = new SecurityLoginLogic(new EFGenericRepository <SecurityLoginPoco>(false));

            poco = securityLoginLogic.GetAll().Where(s => s.Login.ToLower() == poco.Login.ToLower() && s.Password == poco.Password).FirstOrDefault();
            var applicantProfileLogic = new ApplicantProfileLogic(new EFGenericRepository <ApplicantProfilePoco>(false));
            var applicant             = applicantProfileLogic.GetAll().Where(s => s.Login == poco.Id).FirstOrDefault();

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

            // Only Administrator is allowed to view and manage Companies
            if (poco.Login.ToLower() == "administrator")
            {
                return(RedirectToAction("Index", "CompanyDescription"));
            }
            System.Web.HttpContext.Current.Session["ApplicantProfileId"] = applicant.Id;
            return(RedirectToAction("Edit", "ApplicantProfile"));
        }
Пример #4
0
        public List <ApplicantProfilePoco> GetAllApplicantProfile()
        {
            EFGenericRepository <ApplicantProfilePoco> ApplicantProfileRepo = new EFGenericRepository <ApplicantProfilePoco>(false);
            var Logic = new ApplicantProfileLogic(ApplicantProfileRepo);

            return(Logic.GetAll());
        }
Пример #5
0
        public List <ApplicantProfilePoco> GetAllApplicantProfile()
        {
            var logic = new ApplicantProfileLogic
                            (new EFGenericRepository <ApplicantProfilePoco>(false));

            return(logic.GetAll());
        }
Пример #6
0
        public List <ApplicantProfilePoco> GetAllApplicantProfile()
        {
            ApplicantProfileRepository <ApplicantProfilePoco> repo = new ApplicantProfileRepository <ApplicantProfilePoco>(false);
            ApplicantProfileLogic log = new ApplicantProfileLogic(repo);

            return(log.GetAll());
        }
Пример #7
0
        public List <ApplicantProfilePoco> GetAllApplicantProfile()
        {
            EFGenericRepository <ApplicantProfilePoco> applicantprofilerepo = new EFGenericRepository <ApplicantProfilePoco>(false);
            ApplicantProfileLogic _applicantprofilelogic = new ApplicantProfileLogic(applicantprofilerepo);

            return(_applicantprofilelogic.GetAll());
        }
Пример #8
0
        // GET: ApplicantDashboard
        public ActionResult Index()
        {
            Guid UserId         = (Guid)Session["UserId"];
            Guid _userProfileId = (from x in _logic.GetAll() where x.Login == UserId select x.Id).FirstOrDefault();

            TempData["Applicant"] = _userProfileId;
            return(View());
        }
Пример #9
0
        public List <ApplicantProfilePoco> GetAllApplicantProfile()
        {
            List <ApplicantProfilePoco> applicantProfilePocos = new List <ApplicantProfilePoco>();
            var logic = new ApplicantProfileLogic(new EFGenericRepository <ApplicantProfilePoco>(false));

            applicantProfilePocos = logic.GetAll();
            return(applicantProfilePocos);
        }
Пример #10
0
        public IHttpActionResult GetAllApplicantProfile()
        {
            var applicants = _logic.GetAll();

            if (applicants == null)
            {
                return(NotFound());
            }
            return(Ok(applicants));
        }
        public IHttpActionResult GetAllApplicantProfile()
        {
            List <ApplicantProfilePoco> poco = _logic.GetAll();

            if (poco == null)
            {
                return(NotFound());
            }
            return(Ok(poco));
        }
        public override Task <ApplicantProfiles> GetApplicantProfiles(Empty request, ServerCallContext context)
        {
            ApplicantProfiles           CollectionofApplicantProfile = new ApplicantProfiles();
            List <ApplicantProfilePoco> pocos = _logic.GetAll();

            foreach (ApplicantProfilePoco poco in pocos)
            {
                CollectionofApplicantProfile.AppEdus.Add(FromPOCO(poco));
            }
            return(Task.FromResult <ApplicantProfiles>(CollectionofApplicantProfile));
        }
Пример #13
0
        public override Task <ApplicantProfileList> GetAllApplicantProfile(Empty request, ServerCallContext context)
        {
            ApplicantProfileList        list  = new ApplicantProfileList();
            List <ApplicantProfilePoco> pocos = logic.GetAll();

            foreach (var poco in pocos)
            {
                list.AppProfiles.Add(FromPoco(poco));
            }
            return(Task.FromResult(list));
        }
Пример #14
0
        public IHttpActionResult GetAllApplicantProfile()
        {
            List <ApplicantProfilePoco> results = logic.GetAll();

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

            return(Ok(results));
        }
Пример #15
0
        public IHttpActionResult GetApplicantProfile()
        {
            var getAll = _logic.GetAll();

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

            return(Ok(getAll));
        }
Пример #16
0
        public ActionResult GetApplicantProfile()
        {
            var poco = _Logic.GetAll();

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

            return(Ok(poco));
        }
Пример #17
0
        public override Task <ApplicantProfiles> GetApplicantProfiles(Empty request, ServerCallContext context)
        {
            List <ApplicantProfilePoco> pocos  = _logic.GetAll();
            ApplicantProfiles           apppro = new ApplicantProfiles();

            foreach (var poco in pocos)
            {
                ApplicantProfileReply reply = FromPoco(poco);
                apppro.AppProfs.Add(reply);
            }
            return(Task.FromResult(apppro));
        }
 public IHttpActionResult GetAllApplicantProfile()
 {
     try
     {
         IEnumerable <ApplicantProfilePoco> itemList = _logicObj.GetAll();
         if (itemList != null)
         {
             return(this.Ok(itemList));
         }
         else
         {
             return(this.NotFound());
         }
     }
     catch (Exception e)
     {
         HttpResponseMessage response =
             this.Request.CreateErrorResponse(HttpStatusCode.BadRequest, e);
         throw new HttpResponseException(response);
     }
 }
Пример #19
0
        public override Task <ApplicantProfiles> GetApplicantProfiles(Empty request, ServerCallContext context)
        {
            ApplicantProfiles           edus  = new ApplicantProfiles();
            List <ApplicantProfilePoco> pocos = _logic.GetAll();

            foreach (ApplicantProfilePoco poco in pocos)
            {
                edus.ApplicantProfileReplies.Add(FromPoco(poco));
            }

            return(Task.FromResult <ApplicantProfiles>(edus));
        }
        public ActionResult GetAllApplicantProfile()
        {
            var applicants = _logicref.GetAll();

            if (applicants != null)
            {
                return(Ok(applicants));
            }
            else
            {
                return(NotFound());
            }
        }
Пример #21
0
        public ActionResult GetApplicantProfile()
        {
            List <ApplicantProfilePoco> applicantProfiles = _logic.GetAll();

            if (applicantProfiles == null)
            {
                return(NotFound());
            }
            else
            {
                return(Ok(applicantProfiles));
            }
        }
Пример #22
0
        public ActionResult GetAllApplicantProfiles()
        {
            var applicantprofiles = _logic.GetAll();

            if (applicantprofiles == null)
            {
                return(NotFound());
            }
            else
            {
                return(Ok(applicantprofiles));
            }
        }
Пример #23
0
 public IHttpActionResult GetAllApplicantProfile()
 {
     try
     {
         List <ApplicantProfilePoco> pocos = _logic.GetAll();
         if (pocos == null)
         {
             return(NotFound());
         }
         return(Ok(pocos));
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
Пример #24
0
        public ActionResult SecurityLogin([Bind(Include = "Login,Password")] SecurityLoginPoco poco)
        {
            if (poco.Login == null || poco.Password == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            SecurityLoginPoco[]     pocos = new SecurityLoginPoco[] { poco };
            SecurityLoginRepository securityLoginRepository = new SecurityLoginRepository();
            SecurityLoginLogic      logic = new SecurityLoginLogic(securityLoginRepository);

            poco = logic.GetAll().Where(s => s.Login == poco.Login && s.Password == poco.Password).FirstOrDefault();


            ApplicantProfileLogic applicantProfileLogic = new ApplicantProfileLogic(new ApplicantProfileRepository());
            ApplicantProfilePoco  applicantProfilePoco  = applicantProfileLogic.GetAll().Where(s => s.Login == poco.Id).FirstOrDefault();

            return(RedirectToAction("Edit/" + applicantProfilePoco.Id, "AppProfile"));
        }
Пример #25
0
        public ActionResult Edit(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ApplicantProfilePoco poco;
            var logic = new ApplicantProfileLogic(new ApplicantProfileRepository());

            poco = logic.GetAll().Where(s => s.Id == id).FirstOrDefault();
            if (poco == null)
            {
                return(HttpNotFound());
            }
            id = poco.Id;
            // ViewBag.Login = new SelectList(db.SecurityLogins, "Id", "Login", poco.Login);
            //ViewBag.Country = new SelectList(db.SystemCountryCodes, "Code", "Name", poco.Country);
            return(View(poco));
        }
Пример #26
0
        // GET: ApplicantProfile/Edit/5
        public ActionResult Edit()
        {
            Guid id = (Guid)System.Web.HttpContext.Current.Session["ApplicantProfileId"];

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ApplicantProfilePoco poco;
            var logic = new ApplicantProfileLogic(new EFGenericRepository <ApplicantProfilePoco>(false));

            poco = logic.GetAll().Where(s => s.Id == id).FirstOrDefault();
            if (poco == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Login   = new SelectList(db.SecurityLogins, "Id", "Login", poco.Login);
            ViewBag.Country = new SelectList(db.SystemCountryCodes, "Code", "Name", poco.Country);
            return(View(poco));
        }
        public override Task <AppProfileArray> GetAllApplicantProfile(Empty request, ServerCallContext context)
        {
            List <AppProfileProto>      appProfileList = new List <AppProfileProto>();
            List <ApplicantProfilePoco> pocos          = _logic.GetAll();

            foreach (var poco in pocos)
            {
                AppProfileProto appProfile = new AppProfileProto();
                appProfile.Id            = poco.Id.ToString();
                appProfile.Login         = poco.Login.ToString();
                appProfile.CurrentSalary = (Protos.Decimal)poco.CurrentSalary;
                appProfile.CurrentRate   = (Protos.Decimal)poco.CurrentRate;
                appProfile.Currency      = poco.Currency;
                appProfile.Country       = poco.Country;
                appProfile.Province      = poco.Province;
                appProfile.Street        = poco.Street;
                appProfile.City          = poco.City;
                appProfile.PostalCode    = poco.PostalCode;
            }
            AppProfileArray appProfileArray = new AppProfileArray();

            appProfileArray.AppProfile.AddRange(appProfileList);
            return(new Task <AppProfileArray>(() => appProfileArray));
        }
        public override Task <AllApplicantProfilePayload> GetAllApplicantProfile(Empty request, ServerCallContext context)
        {
            var Pocos = _logic.GetAll();

            _ = Pocos ?? throw new ArgumentNullException("  No Applicant Profile record was found");

            var AllApplicantProfilePayload = new AllApplicantProfilePayload();

            Pocos.ForEach(poco => AllApplicantProfilePayload.ApplicantProfiles.Add(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
            }));

            return(new Task <AllApplicantProfilePayload>(() => AllApplicantProfilePayload));
        }
 public ActionResult GetAllApplicantProfile()
 {
     return(Ok(_logic.GetAll()));
 }
Пример #30
0
 public List <ApplicantProfilePoco> GetAllApplicantProfile()
 {
     return(_pLogic.GetAll());
 }