Example #1
0
        public ActionResult CreateExperience()
        {
            SetExperienceViewBag();     //ViewBag values set for all dropdowns in the Employee Experience
            var empExperienceViewBO = new EmployeeExperienceViewBO();

            empExperienceViewBO.EmployeeExperienceViewModels = new EmployeeExperienceViewModels();
            return(PartialView("_CreateEditExperience", empExperienceViewBO.EmployeeExperienceViewModels));
        }
Example #2
0
        public ActionResult GetExperienceList(ResourceSubMenuBO e)
        {
            var employeeExperience = new EmployeeExperienceViewBO();

            employeeExperience.EmployeeExperienceViewModels = new EmployeeExperienceViewModels();
            employeeExperience.EmployeeExpereienceList      = bl.GetExperienceList(employeeExperience.EmployeeExperienceViewModels); //Gets List of Experience for a particular Employee
            return(PartialView("_ExperienceList", employeeExperience.EmployeeExpereienceList));
        }
Example #3
0
        public ActionResult EditExperience(int id)
        {
            string error;

            SetExperienceViewBag();     //ViewBag values set for all dropdowns in the Experience
            var empExperienceViewBO = new EmployeeExperienceViewBO();

            empExperienceViewBO.EmployeeExperienceViewModels = bl.EditExperience(id, out error); //Gets details for edit Experience
            if (empExperienceViewBO.EmployeeExperienceViewModels == null)                        //When the selected Experience is not exist
            {
                //return Json(new
                //{
                //    success = false,
                //    errorMsg = error
                //});
                TempData["Error"] = error;
                return(RedirectToAction("ExperienceIndex", empExperienceViewBO));                           //Returns the "ExperienceIndex"
            }
            return(PartialView("_CreateEditExperience", empExperienceViewBO.EmployeeExperienceViewModels)); //Partially returns the "_CreateEditExperience"
        }
Example #4
0
        /// <summary>
        /// Displays an Index page for "Resource Experience"
        /// </summary>
        /// <param name="id: EmployeeID"></param>
        /// <returns></returns>
        public ActionResult ExperienceIndex(int id)
        {
            string error;

            ViewBag.CurrentTab = "Experience";                          //Sets the "Experience" tab as active
            SetExperienceViewBag();
            EmployeeViewBO employeeBO = bl.EditEmployee(id, out error); //Gets the EmployeeID for update the Experience for a particular Employee

            var employeeExperienceViewBO = new EmployeeExperienceViewBO();

            employeeExperienceViewBO.EmployeeID = employeeBO.EmployeeID;        //Gets EmployeeID

            employeeExperienceViewBO.EmployeeExperienceViewModels            = new EmployeeExperienceViewModels();
            employeeExperienceViewBO.EmployeeExperienceViewModels.ResourceID = employeeBO.EmployeeID;                                       //Sets the EmployeeID to update the "Experience"
            employeeExperienceViewBO.EmployeeExpereienceList = bl.GetExperienceList(employeeExperienceViewBO.EmployeeExperienceViewModels); //Gets List of all Experience for a particular Employee

            employeeExperienceViewBO.ResourceSubMenuBO            = new ResourceSubMenuBO();                                                //Sets the values for "ResourceSubMenuBO" models
            employeeExperienceViewBO.ResourceSubMenuBO.FName      = employeeBO.FirstName;
            employeeExperienceViewBO.ResourceSubMenuBO.LName      = employeeBO.LastName;
            employeeExperienceViewBO.ResourceSubMenuBO.EmployeeID = employeeBO.EmployeeID;

            return(View(employeeExperienceViewBO));
        }