コード例 #1
0
        public EditUserDetailViewModel GetEditUserDetail()
        {
            var editUserDetail = new EditUserDetailViewModel();
            var user           = _userService.GetUser();
            var userDetail     = _userDetailRepository.GetAll(x => x.UserId == user.UserId).Include("Nationality").Include("DrivingLicense").FirstOrDefault();

            if (userDetail != null)
            {
                editUserDetail.ProfileImage           = userDetail.ProfileImage;
                editUserDetail.UserName               = user.UserName;
                editUserDetail.NameSurname            = userDetail.NameSurname;
                editUserDetail.BirthDate              = userDetail.BirthDate;
                editUserDetail.Gender                 = userDetail.Gender;
                editUserDetail.DrivingLicenseName     = userDetail.DrivingLicense.DrivingLicenseType;
                editUserDetail.NationalityName        = userDetail.Nationality.NationalityName;
                editUserDetail.NationalityId          = userDetail.NationalityId;
                editUserDetail.DrivingLicenseId       = userDetail.DrivingLicenseId;
                editUserDetail.numberOfUnreadMessages = _messageService.GetUnreadMessageCount();
                editUserDetail.ProfileImageFileName   = Path.GetFileName(userDetail.ProfileImage);
            }
            editUserDetail.DrivingLicenseList = _drivingLicenseService.GetDrivingLicenseList();
            editUserDetail.NationalityList    = _nationalityService.GetNationalityList();

            return(editUserDetail);
        }
コード例 #2
0
        public SearchJobAppliesToCompanyViewModel GetSearchAppliesFormData()
        {
            var editUserDetail = new SearchJobAppliesToCompanyViewModel();

            editUserDetail.DrivingLicenseList = _drivingLicenseService.GetDrivingLicenseList();
            editUserDetail.NationalityList    = _nationalityService.GetNationalityList();

            return(editUserDetail);
        }