Macroscopic fundamental diagram (MFD) has been used for aggregate modeling of urban traffic network dynamics under stationary traffic assumption for dynamic taxi dispatching, vehicle relocation and dynamic pricing schemes to tackle the dimensionality problem of microscopic approaches. A city is assumed to be partitioned into several regions with each admits a well-defined MFD. Integrating state-dependent regional travel time function as an endogenous time-varying delay, the MFD model with time delay, is adopted to describe the traffic dynamics within a region. On the other hand, it is necessary to enable simultaneous route choice and departure time choice under the MFD framework for various applications such as vehicle dispatching and relocation. This paper presents an optimal control framework to model dynamic user equilibria (DUE) with simultaneous route choice behavior and departure time choice for general urban networks. Necessary conditions for the DUE are analytically derived through the lens of Pontryagin minimum principle. In contrast to existing analytical methods, the proposed method is applicable for general MFD systems without approximation schemes of the equilibrium solution. Numerical examples by time discretization are conducted to illustrate the characteristics of DUE and corresponding dynamic external costs.