Ejemplo n.º 1
0
        public void SendNewDepartmentLinkMail(DepartmentLink link)
        {
            var sourceDepartment = _departmentsService.GetDepartmentById(link.DepartmentId);
            var targetDepartment = _departmentsService.GetDepartmentById(link.DepartmentLinkId);
            var managingProfile  = _userProfileService.GetProfileByUserId(targetDepartment.ManagingUserId);

            _emailProvider.SendNewDepartmentLinkMail(managingProfile.FullName.AsFirstNameLastName, sourceDepartment.Name, "", managingProfile.User.Email, targetDepartment.DepartmentId);
        }
Ejemplo n.º 2
0
        public async Task <bool> SendNewDepartmentLinkMailAsync(DepartmentLink link)
        {
            var sourceDepartment = await _departmentsService.GetDepartmentByIdAsync(link.DepartmentId);

            var targetDepartment = await _departmentsService.GetDepartmentByIdAsync(link.DepartmentLinkId);

            var managingProfile = await _userProfileService.GetProfileByUserIdAsync(targetDepartment.ManagingUserId);

            await _emailProvider.SendNewDepartmentLinkMail(managingProfile.FullName.AsFirstNameLastName, sourceDepartment.Name, "", managingProfile.User.Email, targetDepartment.DepartmentId);

            return(false);
        }
Ejemplo n.º 3
0
        public DepartmentLink Save(DepartmentLink link)
        {
            _departmentLinksRepository.SaveOrUpdate(link);

            return(link);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Load Department list
 /// </summary>
 protected void LoadDepartmentLink()
 {
     DepartmentLink.DataSource = _dm.GetDepartments();
     DepartmentLink.DataBind();
 }
Ejemplo n.º 5
0
 public async Task <DepartmentLink> SaveAsync(DepartmentLink link, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(await _departmentLinksRepository.SaveOrUpdateAsync(link, cancellationToken));
 }