Esempio n. 1
0
        public ActionResult Index(int Id)
        {
            if (!ViewBag.AllowView)
            {
                ViewBag.Error = "You are not Authorize to use this Page";
                return(PartialView("_partialviewNotFound"));
            }
            List <EmpTrainingDTO> Record = _employeeTrainingService.GetAllTrainingOfEmployeeWithId(Id);

            foreach (var data in Record)
            {
                string cname = _countryService.GetCountryName(data.TrainingCountry);
                data.CountryName = cname;
            }
            ViewBag.EmployeeDetail = _employeeService.GetEmployeeDetails(Id);
            ViewBag.SideBar        = _moduleService.AdminEmployeeDetailsMenu(Id);
            return(View(Record));
        }
        public ActionResult Training()
        {
            //if (!ViewBag.AllowView)
            //{
            //    ViewBag.Error = "You are not Authorize to use this Page";
            //    return PartialView("_partialviewNotFound");
            //}
            int empCode = Convert.ToInt32(Session["EmpCode"]);

            ListOfDatas(empCode);
            List <EmpTrainingDTO> res = _employeeTrainingService.GetAllTrainingOfEmployeeWithId(empCode);

            foreach (var data in res)
            {
                string cname = _countryService.GetCountryName(data.TrainingCountry);
                data.CountryName = cname;
            }
            return(View(res));
        }