If (Form:C1466.Picture#Null:C1517) & (Form:C1466.currentEnt#Null:C1517)
	var $pictureEntity : cs:C1710.PicturesEntity
	
	$pictureEntity:=ds:C1482.Pictures.new()
	
	$pictureEntity.People_ID:=Form:C1466.currentEnt.ID
	$pictureEntity.Picture:=Form:C1466.Picture
	$pictureEntity.Thumbnail:=GenerateThumbnail
	
	$result:=$pictureEntity.save()
	If ($result.success)
		Form:C1466.Picture:=Form:C1466.Picture*0
		Form:C1466.EntSel:=ds:C1482.People.all()
	Else 
		ALERT:C41("something went wrong")
	End if 
	
Else 
	ALERT:C41("登録するエンティティが選択されていないか、登録するピクチャーがありません")
End if 