Ejemplo n.º 1
0
        public void DeleteMessagesForUser(string userId)
        {
            var messages = (from m in _messageRepository.GetAll()
                            where m.ReceivingUserId == userId || m.SendingUserId == userId
                            select m).ToList();

            foreach (var m in messages)
            {
                foreach (var mr in m.MessageRecipients.ToList())
                {
                    _messageRecipientRepository.DeleteOnSubmit(mr);
                }

                _messageRepository.DeleteOnSubmit(m);
            }

            var messageRecipients = (from m in _messageRecipientRepository.GetAll()
                                     where m.UserId == userId
                                     select m).ToList();

            foreach (var m in messageRecipients)
            {
                _messageRecipientRepository.DeleteOnSubmit(m);
            }
        }
Ejemplo n.º 2
0
 public void DeleteCalendarItemType(CalendarItemType type)
 {
     if (type != null)
     {
         _calendarItemTypeRepository.DeleteOnSubmit(type);
     }
 }
Ejemplo n.º 3
0
 public void DeleteRoleUsers(List <PersonnelRoleUser> users)
 {
     foreach (var user in users)
     {
         _personnelRoleUsersRepository.DeleteOnSubmit(user);
     }
 }
Ejemplo n.º 4
0
        public void DeleteType(int typeId)
        {
            var type        = GetTypeById(typeId);
            var inventories = _inventoryRepository.GetAll().Where(x => x.TypeId == typeId);

            _inventoryRepository.DeleteAll(inventories);
            _inventoryTypesRepository.DeleteOnSubmit(type);
        }
Ejemplo n.º 5
0
        public void DeleteInvite(int inviteId)
        {
            var invite = GetInviteById(inviteId);

            if (invite != null)
            {
                _invitesRepository.DeleteOnSubmit(invite);
            }
        }
Ejemplo n.º 6
0
        public void DeleteUnitType(int unitTypeId)
        {
            var type = GetUnitTypeById(unitTypeId);

            if (type != null)
            {
                _unitTypesRepository.DeleteOnSubmit(type);
            }
        }
Ejemplo n.º 7
0
        public void DeleteCalendarAttendeeById(int calendarAttendeeId)
        {
            var item = GetCalendarAttendeeById(calendarAttendeeId);

            if (item != null)
            {
                _calendarItemAttendeeRepository.DeleteOnSubmit(item);
            }
        }
Ejemplo n.º 8
0
        public void DeletePOIType(int poiTypeId)
        {
            var type = _poiTypesRepository.GetAll().FirstOrDefault(x => x.PoiTypeId == poiTypeId);

            if (type != null)
            {
                _poiTypesRepository.DeleteOnSubmit(type);
            }
        }
Ejemplo n.º 9
0
        public void DeleteCallLog(int callLogId)
        {
            var log = GetCallLogById(callLogId);

            if (log != null)
            {
                _callLogsRepository.DeleteOnSubmit(log);
            }
        }
Ejemplo n.º 10
0
        public void RemoveUserFromAllLists(string userId)
        {
            var members = _distributionListMemberRepository.GetAll().Where(x => x.UserId == userId).ToList();

            foreach (var member in members)
            {
                _distributionListMemberRepository.DeleteOnSubmit(member);
            }
        }
Ejemplo n.º 11
0
        public void DeleteShiftGroupsByGroupId(int departmentGroupId)
        {
            var groups = _shiftGroupsRepository.GetAll().Where(x => x.DepartmentGroupId == departmentGroupId).ToList();

            foreach (var group in groups)
            {
                _shiftGroupsRepository.DeleteOnSubmit(group);
            }
        }
Ejemplo n.º 12
0
        public void DeleteAuditLogById(int auditLogId)
        {
            var auditLog = GetAuditLogById(auditLogId);

            if (auditLog != null)
            {
                _auditLogsRepository.DeleteOnSubmit(auditLog);
            }
        }
Ejemplo n.º 13
0
        public void DeleteLog(int logId)
        {
            var log = GetWorkLogById(logId);

            if (log != null)
            {
                _logsRepository.DeleteOnSubmit(log);
            }
        }
Ejemplo n.º 14
0
        public void DeleteCertificationTypeById(int certificationTypeId)
        {
            var type = GetCertificationTypeById(certificationTypeId);

            if (type != null)
            {
                _departmentCertificationTypeRepository.DeleteOnSubmit(type);
            }
        }
Ejemplo n.º 15
0
        public void DeleteUnit(int unitId)
        {
            var unit = _unitsRepository.GetAll().FirstOrDefault(x => x.UnitId == unitId);

            if (unit != null)
            {
                var states = _unitStatesRepository.GetAll().Where(x => x.UnitId == unitId);

                if (states != null && states.Any())
                {
                    _unitStatesRepository.DeleteAll(states);
                }

                _unitsRepository.DeleteOnSubmit(unit);
                _eventAggregator.SendMessage <DepartmentSettingsUpdateEvent>(new DepartmentSettingsUpdateEvent()
                {
                    DepartmentId = unit.DepartmentId
                });
            }
        }
Ejemplo n.º 16
0
 public void DeleteFollow(DepartmentProfileUserFollow follow)
 {
     _departmentProfileUserFollowRepository.DeleteOnSubmit(follow);
 }
Ejemplo n.º 17
0
        public void DeleteDistributionListsById(int distributionListId)
        {
            var list = GetDistributionListById(distributionListId);

            _distributionListRepository.DeleteOnSubmit(list);
        }
Ejemplo n.º 18
0
        public void DeleteProtocol(int id)
        {
            var procotol = GetProcotolById(id);

            _dispatchProtocolRepository.DeleteOnSubmit(procotol);
        }
Ejemplo n.º 19
0
 public void DeleteShiftSignup(ShiftSignup signup)
 {
     _shiftSignupRepository.DeleteOnSubmit(signup);
 }
Ejemplo n.º 20
0
 public void DeleteShift(Shift shift)
 {
     _shiftsRepository.DeleteOnSubmit(shift);
 }
Ejemplo n.º 21
0
 public void DeleteCertification(PersonnelCertification certification)
 {
     _personnelCertificationRepository.DeleteOnSubmit(certification);
 }
Ejemplo n.º 22
0
        public void DeleteRoleById(int roleId)
        {
            var role = GetRoleById(roleId);

            _personnelRolesRepository.DeleteOnSubmit(role);
        }
Ejemplo n.º 23
0
 public void DeleteDocument(Document document)
 {
     _documentRepository.DeleteOnSubmit(document);
 }
Ejemplo n.º 24
0
        public void DeleteCallQuickTemplate(int id)
        {
            var template = GetCallQuickTemplateById(id);

            _callQuickTemplateRepository.DeleteOnSubmit(template);
        }
Ejemplo n.º 25
0
 public void Delete(Note note)
 {
     _notesRepository.DeleteOnSubmit(note);
 }
Ejemplo n.º 26
0
 public void DeleteFile(File file)
 {
     _fileRepository.DeleteOnSubmit(file);
 }