示例#1
0
        public List <StaffViewModel> FindPossibleDRList()
        {
            string userId = User.Identity.GetUserId();
            var    s1     = StaffDepartmentDAO.GetStaffByUserId(userId);

            // find the possible DR candidate
            List <Staff> staffList = StaffDepartmentDAO.FindPossibleDRList(s1);

            // convert to plain data
            var svms = new List <StaffViewModel>();

            if (staffList != null)
            {
                foreach (var s in staffList)
                {
                    var svm = StaffDepartmentDAO.staffViewModelConverter(s);
                    svms.Add(svm);
                }
            }
            return(svms);
        }