Exemple #1
0
        public ActionResult EmpDetail(int?id)
        {
            if (!id.HasValue)
            {
                return(null);
            }

            Employee employee = _uow.Employees.GetById(id.Value);

            if (employee == null)
            {
                return(null);
            }

            if (string.IsNullOrEmpty(employee.img))
            {
                employee.img = FileManipulation.GetFileFullPath(serverPath, placeholderImageFileName);
            }
            else
            {
                employee.img = FileManipulation.GetFileFullPath(serverPath, employee.img);
            }

            return(PartialView("_EmployeeDetail", employee));
        }
Exemple #2
0
        public ActionResult Detail(int?id)
        {
            if (id == null)
            {
                return(RedirectToAction("Index"));
            }

            Employee employee = _uow.Employees.GetById(id.Value);

            if (string.IsNullOrEmpty(employee.img))
            {
                employee.img = FileManipulation.GetFileFullPath(serverPath, placeholderImageFileName);
            }
            else
            {
                employee.img = FileManipulation.GetFileFullPath(serverPath, employee.img);
            }

            return(View(employee));
        }