Approving and Posting a Gen journal in Dynamics AX 2012

Hi all,

i want to create, approve and post a general journal through code ,i used the calsses for creating ,

i got the code for creating a journal (internet), but i dont know how to approve and post through code

can someone pls help me

Regards ,