Hi Ogulcan,
I think it´s because you "destroy the content" (line 12 in your code snippet) of the dialog when open it. At first time pddepLayout1 is not part of the content. So it works. After first call pddepLayout1 is part of the content as you added it in line 89. So it will be destroyed and afterwards you can´t use it anymore. So I don´t know what´s the best approach in your case but maybe you should consider only destroying the content of pddepLayout1 and not the content of the complete dialog.
Best regards,
Sebastian