public void Save(RetireSettingViewModel settings)
 {
     RetireDocumentSetting item = new RetireDocumentSetting(settings.Id)
                                      {
                                          RetireType = (RetireType) settings.RetireTypeId,
                                          Duration = settings.Duration,
                                      };
     _retireDocumentSettingRepository.Save(item);
 }
 private RetireSettingViewModel Map(RetireDocumentSetting setting)
 {
     if (setting == null) return null;
     else
         return new RetireSettingViewModel
                    {
                        Duration = setting.Duration,
                        Id = setting.Id,
                        IsActive = setting._Status == EntityStatus.Active ? true : false,
                        RetireTypeId = (int) setting.RetireType,
                        RetireTypeName=setting.RetireType.ToString(),
                    };
 }
예제 #3
0
 public RetireSettingDTO Map(RetireDocumentSetting setting)
 {
     if (setting == null) return null;
     return Mapper.Map<RetireDocumentSetting, RetireSettingDTO>(setting);
 }
예제 #4
0
        protected Guid AddRetireSetting(RetireType type, int duration)
        {
            RetireDocumentSetting pb = new RetireDocumentSetting(Guid.NewGuid())
            {
                Duration = duration,
                RetireType = type,
               

            };
            return _retireDocumentSettingRepository.Save(pb);
        }
 public void SetActive(Guid id)
 {
     RetireDocumentSetting retireDocumentSetting = new RetireDocumentSetting(id);
     _retireDocumentSettingRepository.SetActive(retireDocumentSetting);
 }
 public void SetDeleted(Guid id)
 {
     RetireDocumentSetting retireDocumentSetting = new RetireDocumentSetting(id);
     _retireDocumentSettingRepository.SetAsDeleted(retireDocumentSetting);
 }