public void InsertLicenseType(LicenseTypeDTO licenseType) { LicenseType newLicenseType = LicenseTypeFactory.CreateLicenseType(); LicenseTypeFactory.SetLicenseType(newLicenseType, licenseType.Name, licenseType.HasFile, licenseType.Description); _licenseTypeRepository.Add(newLicenseType); }
public void ModifyLicenseType(LicenseTypeDTO licenseType) { LicenseType updateLicenseType = _licenseTypeRepository.Get(licenseType.LicenseTypeId); //获取需要更新的对象。 LicenseTypeFactory.SetLicenseType(updateLicenseType, licenseType.Name, licenseType.HasFile, licenseType.Description); _licenseTypeRepository.Modify(updateLicenseType); }
public void DeleteLicenseType(LicenseTypeDTO licenseType) { LicenseType deleteLicenseType = _licenseTypeRepository.Get(licenseType.LicenseTypeId); //获取需要删除的对象。 _licenseTypeRepository.Remove(deleteLicenseType); //删除证照类型。 }