Beispiel #1
0
        /// <summary>
        /// This method is used for Updating Job Category [GET]
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task <IActionResult> UpdateCategory(int id)
        {
            JobCategoryViewModel category = new JobCategoryViewModel();

            try
            {
                category = await _jobCategoryPageservices.getCategoryById(id);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            return(View(category));
        }
        /// <summary>
        /// THIS METHOD IS USED FOR ADDING NEW JOBPOST [GET]
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public IActionResult AddNewJobPost(int id)
        {
            JobPostViewModel model = new JobPostViewModel();

            try
            {
                //fetch job_title also automatically.
                model.job_title     = _jobCategoryPageservices.getCategoryById(id).Result.job_category_name;
                model.JobCategoryId = id;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            return(View(model));
        }