Пример #1
0
        // GET: RecruitmentCandidate/Create
        public ActionResult Create()
        {
            var model = new RecruitmentCandidate()
            {
                LinkID = Guid.NewGuid()
            };

            return(View(model));
        }
Пример #2
0
 public ActionResult Edit(int id, FormCollection collection)
 {
     try
     {
         // TODO: Add update logic here
         var model = RecruitmentCandidate.GetById(id);
         TryUpdateModel(model);
         model.SaveOrUpDate();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Пример #3
0
 public ActionResult Create(FormCollection collection)
 {
     try
     {
         // TODO: Add insert logic here
         var model = new RecruitmentCandidate();
         TryUpdateModel(model);
         model.Insert();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Пример #4
0
        public ActionResult saveRecruitmentData(List <CandidateWorkExperience> work,
                                                List <CandidateTraining> train,
                                                List <CandidateEducation> edu,
                                                List <CandidateLanguage> lang,
                                                List <CandidateSkill> skill,
                                                List <CandidateReference> reference,
                                                RecruitmentCandidate candidate)
        {
            try
            {
                if (work != null && work.Count > 0)
                {
                    foreach (CandidateWorkExperience w in work)
                    {
                        w.Insert();
                    }
                }
                if (train != null && train.Count > 0)
                {
                    foreach (CandidateTraining t in train)
                    {
                        t.Insert();
                    }
                }
                if (edu != null && edu.Count > 0)
                {
                    foreach (CandidateEducation e in edu)
                    {
                        e.Insert();
                    }
                }
                if (lang != null && lang.Count > 0)
                {
                    foreach (CandidateLanguage l in lang)
                    {
                        l.Insert();
                    }
                }
                if (skill != null && skill.Count > 0)
                {
                    foreach (CandidateSkill s in skill)
                    {
                        s.Insert();
                    }
                }
                if (reference != null && reference.Count > 0)
                {
                    foreach (CandidateReference r in reference)
                    {
                        r.Insert();
                    }
                }

                candidate.Insert();
            }
            catch (Exception e)
            {
                return(new JsonResult()
                {
                    Data = new ResultModel()
                    {
                        StringResult = e.Message + e.StackTrace, ObjectResult = candidate
                    }
                });
            }
            return(new JsonResult()
            {
                Data = new ResultModel()
                {
                    JavascriptResult = "window.location.href = '/'"
                }
            });
        }
Пример #5
0
        public ActionResult CandidateListPreview(string jobPostId)
        {
            var models = new RecruitmentCandidate().GetObjectsValueFromExpression(x => x.JobField == jobPostId).ToList();

            return(PartialView("CandidateListPreview", models));
        }
Пример #6
0
 // GET: RecruitmentCandidate/Edit/5
 public ActionResult Edit(int id)
 {
     return(View(RecruitmentCandidate.GetById(id)));
 }
Пример #7
0
 // GET: RecruitmentCandidate
 public ActionResult Index()
 {
     return(View(RecruitmentCandidate.GetAll()));
 }