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); }
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")); }
public List <ApplicantProfilePoco> GetAllApplicantProfile() { EFGenericRepository <ApplicantProfilePoco> ApplicantProfileRepo = new EFGenericRepository <ApplicantProfilePoco>(false); var Logic = new ApplicantProfileLogic(ApplicantProfileRepo); return(Logic.GetAll()); }
public List <ApplicantProfilePoco> GetAllApplicantProfile() { var logic = new ApplicantProfileLogic (new EFGenericRepository <ApplicantProfilePoco>(false)); return(logic.GetAll()); }
public List <ApplicantProfilePoco> GetAllApplicantProfile() { ApplicantProfileRepository <ApplicantProfilePoco> repo = new ApplicantProfileRepository <ApplicantProfilePoco>(false); ApplicantProfileLogic log = new ApplicantProfileLogic(repo); return(log.GetAll()); }
public List <ApplicantProfilePoco> GetAllApplicantProfile() { EFGenericRepository <ApplicantProfilePoco> applicantprofilerepo = new EFGenericRepository <ApplicantProfilePoco>(false); ApplicantProfileLogic _applicantprofilelogic = new ApplicantProfileLogic(applicantprofilerepo); return(_applicantprofilelogic.GetAll()); }
// 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()); }
public List <ApplicantProfilePoco> GetAllApplicantProfile() { List <ApplicantProfilePoco> applicantProfilePocos = new List <ApplicantProfilePoco>(); var logic = new ApplicantProfileLogic(new EFGenericRepository <ApplicantProfilePoco>(false)); applicantProfilePocos = logic.GetAll(); return(applicantProfilePocos); }
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)); }
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)); }
public IHttpActionResult GetAllApplicantProfile() { List <ApplicantProfilePoco> results = logic.GetAll(); if (results == null) { return(NotFound()); } return(Ok(results)); }
public IHttpActionResult GetApplicantProfile() { var getAll = _logic.GetAll(); if (getAll == null) { return(NotFound()); } return(Ok(getAll)); }
public ActionResult GetApplicantProfile() { var poco = _Logic.GetAll(); if (poco == null) { return(NotFound()); } return(Ok(poco)); }
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); } }
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()); } }
public ActionResult GetApplicantProfile() { List <ApplicantProfilePoco> applicantProfiles = _logic.GetAll(); if (applicantProfiles == null) { return(NotFound()); } else { return(Ok(applicantProfiles)); } }
public ActionResult GetAllApplicantProfiles() { var applicantprofiles = _logic.GetAll(); if (applicantprofiles == null) { return(NotFound()); } else { return(Ok(applicantprofiles)); } }
public IHttpActionResult GetAllApplicantProfile() { try { List <ApplicantProfilePoco> pocos = _logic.GetAll(); if (pocos == null) { return(NotFound()); } return(Ok(pocos)); } catch (Exception e) { return(InternalServerError(e)); } }
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")); }
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)); }
// 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())); }
public List <ApplicantProfilePoco> GetAllApplicantProfile() { return(_pLogic.GetAll()); }