Ejemplo n.º 1
0
        public ActionResult CareerDelete(CareerEditViewModel delete_career)
        {
            var careers = db.Career.SingleOrDefault(r => r.ID == delete_career.ID);

            db.Career.Remove(careers);
            db.SaveChanges();

            return RedirectToAction("Career");
        }
Ejemplo n.º 2
0
        public ActionResult CareerCreateSubmit(CareerEditViewModel create_career)
        {
            Career careers = new Career
            {
                JobTitle = create_career.JobTitle,
                //CategoryName = create_career.CategoryName,
                Location = create_career.Location,
                Experience = create_career.Experience,
                Education = create_career.Education,
                WorkType = create_career.WorkType,
                VacancyNubmer = create_career.VacancyNubmer,
                CreateDate = DateTime.Now,
                Description = create_career.Description,
                Qualification = create_career.Qualification,
            };

            db.Career.Add(careers);
            db.SaveChanges();

            return RedirectToAction("Career");
        }
Ejemplo n.º 3
0
        public ActionResult CareerDeleteConfirm(int id)
        {
            var careers = db.Career.SingleOrDefault(r => r.ID == id);

            CareerEditViewModel _career = new CareerEditViewModel
            {
                JobTitle = careers.JobTitle,
                //CategoryName = careers.CategoryName,
                Location = careers.Location,
                Experience = careers.Experience,
                Education = careers.Education,
                WorkType = careers.WorkType,
                VacancyNubmer = careers.VacancyNubmer,
                //CreateDate = careers.CreateDate,
                Description = careers.Description,
                Qualification = careers.Qualification,
            };
            return View(_career);
        }
Ejemplo n.º 4
0
        public ActionResult CareerSubmit(CareerEditViewModel submit_career)
        {
            var careers = db.Career.SingleOrDefault(r => r.ID == submit_career.ID);

            careers.JobTitle = submit_career.JobTitle;
            //careers.CategoryName = submit_career.CategoryName;
            careers.Location = submit_career.Location;
            careers.Experience = submit_career.Experience;
            careers.Education = submit_career.Education;
            careers.WorkType = submit_career.WorkType;
            careers.VacancyNubmer = submit_career.VacancyNubmer;
            careers.CreateDate = DateTime.Now;
            careers.Description = submit_career.Description;
            careers.Qualification = submit_career.Qualification;

            db.SaveChanges();

            return RedirectToAction("Career");
        }