You can create a service in AX which can return you all this information. You can call the service operation from your c# code .
The below link shows creating SO using sales order service but you can write your own service which will return you what you need
blogs.msdn.microsoft.com/.../calling-the-salesorderservice-on-ax-2012
Write custom service
technet.microsoft.com/.../hh509052.aspx;MSPPError=-2147217396
www.tech.alirazazaidi.com/custom-aif-service-in-dynamics-ax-2012-r3-from-scratch
community.dynamics.com/.../dynamics-ax2012-create-custom-service-using-x