public void Delete(long id, long userId)
        {
            var sitePersonnelLookup = _unitOfWork.SitePersonnelLookupRepository.GetById(id);

            sitePersonnelLookup.IsActive = CommonHelperAppService.DeleteEntity();

            _unitOfWork.SitePersonnelLookupRepository.Update(sitePersonnelLookup);
            _unitOfWork.Save();

            // Audit
            _auditLogAppService.Audit(
                AppConstants.ActionTypeDelete,
                AppConstants.SitePersonnelLookupTableName,
                userId,
                sitePersonnelLookup.Id);
        }
Esempio n. 2
0
        public void Delete(long id, long userId)
        {
            var budgetPeriod = _unitOfWork.BudgetPeriodRepository.GetById(id);

            budgetPeriod.IsActive = CommonHelperAppService.DeleteEntity();

            _unitOfWork.BudgetPeriodRepository.Update(budgetPeriod);
            _unitOfWork.Save();

            // Audit
            _auditLogAppService.Audit(
                AppConstants.ActionTypeDelete,
                AppConstants.BudgetPeriodTableName,
                userId,
                budgetPeriod.Id);
        }
        public void Delete(long id, long userId)
        {
            var subSite = _unitOfWork.SubSiteRepository.GetById(id);

            subSite.IsActive = CommonHelperAppService.DeleteEntity();

            _unitOfWork.SubSiteRepository.Update(subSite);
            _unitOfWork.Save();

            // Audit
            _auditLogAppService.Audit(
                AppConstants.ActionTypeDelete,
                AppConstants.SubSiteTableName,
                userId,
                subSite.Id);
        }
        public void Delete(long id, long userId)
        {
            var company = _unitOfWork.CompanyRepository.GetById(id);

            company.IsActive = CommonHelperAppService.DeleteEntity();

            _unitOfWork.CompanyRepository.Update(company);
            _unitOfWork.Save();

            // Audit
            _auditLogAppService.Audit(
                AppConstants.ActionTypeDelete,
                AppConstants.CompanyTableName,
                userId,
                company.Id);
        }
Esempio n. 5
0
        public void Delete(long id, long userId)
        {
            var user = _unitOfWork.UserRepository.GetById(id);

            user.IsActive = CommonHelperAppService.DeleteEntity();

            _unitOfWork.UserRepository.Update(user);
            _unitOfWork.Save();

            // Audit
            _auditLogAppService.Audit(
                AppConstants.ActionTypeDelete,
                AppConstants.UserTableName,
                userId,
                user.Id);
        }
Esempio n. 6
0
        public void Delete(long id, long userId)
        {
            var leaveProfile = _unitOfWork.PersonnelLeaveProfileRepository.GetById(id);

            leaveProfile.IsActive = CommonHelperAppService.DeleteEntity();

            _unitOfWork.PersonnelLeaveProfileRepository.Update(leaveProfile);
            _unitOfWork.Save();

            // Audit
            _auditLogAppService.Audit(
                AppConstants.ActionTypeDelete,
                AppConstants.PersonnelLeaveProfileTableName,
                userId,
                leaveProfile.Id);
        }
Esempio n. 7
0
        public void Delete(long id, long userId)
        {
            var systemAccessRole = _unitOfWork.SystemAccessRoleRepository.GetById(id);

            // trip flag to 'Delete'
            systemAccessRole.IsActive = CommonHelperAppService.DeleteEntity();

            _unitOfWork.SystemAccessRoleRepository.Update(systemAccessRole);
            _unitOfWork.Save();

            // Audit
            _auditLogAppService.Audit(
                AppConstants.ActionTypeDelete,
                AppConstants.SystemAccessRoleTableName,
                userId,
                systemAccessRole.Id);
        }
        public void Delete(long id, long userId)
        {
            var leaveRequest = _unitOfWork.LeaveRequestRepository.GetById(id);

            leaveRequest.IsActive   = CommonHelperAppService.DeleteEntity();
            leaveRequest.IsApproved = false; // this may or may not need to be done. Ask.

            _unitOfWork.LeaveRequestRepository.Update(leaveRequest);
            _unitOfWork.Save();

            // Audit
            _auditLogAppService.Audit(
                AppConstants.ActionTypeDelete,
                AppConstants.LeaveRequestTableName,
                userId,
                leaveRequest.Id);
        }