Beispiel #1
0
        public ActionResult Apply(int?id)
        {
            // id = application id
            Job_Application job_app    = js.Get_Job_Application_By_ID(id);
            OpenJobs        jobPosting = js.Get_Posting_By_ID(job_app.JobID);
            int             Job_ID     = jobPosting.Job_ID;

            Question[] AppQuestions    = js.getQuestionsByJobID(Job_ID);
            Question[] PreAppQuestions = js.Get_PreApp_Questions();

            ViewBag.Application_ID = id;

            ApplicationModel qView = new ApplicationModel();

            foreach (Question q in AppQuestions)
            {
                qView.ApplicationQuestions.Add(new QuestionAnswer {
                    fullQuestion = q.FullQuestion,
                    questionID   = q.QuestionID,
                    answer       = ""
                });
            }
            foreach (Question q in PreAppQuestions)
            {
                qView.PreApplicationQuestions.Add(new QuestionAnswer
                {
                    fullQuestion = q.FullQuestion,
                    questionID   = q.QuestionID,
                    answer       = ""
                });
            }


            return(View(qView));
        }
Beispiel #2
0
        // GET: JobsPosting/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            OpenJobModel jobModel = new OpenJobModel();

            jobModel.Job = js.Get_Posting_By_ID(id);
            jobModel.ApplicationQuestions = js.getQuestionsByJobID(jobModel.Job.Job_ID).ToList();
            //OpenJobs job = js.Get_Posting_By_ID(id);
            if (jobModel == null)
            {
                return(HttpNotFound());
            }
            return(View(jobModel));
        }
        public ActionResult QuestionDetails(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Question[] question = js.getQuestionsByJobID(id);

            if (question == null)
            {
                return(HttpNotFound());
            }
            return(View(question));
        }