public static EngineeringChangeOrderHeader CreateEngineeringChangeOrderHeader(string dataAreaId, string orderNumber, global::Microsoft.Dynamics.DataEntities.EngineeringChangeCategory engineeringChangeCategory, global::Microsoft.Dynamics.DataEntities.EngineeringChangePriority engineeringChangePriority)
        {
            EngineeringChangeOrderHeader engineeringChangeOrderHeader = new EngineeringChangeOrderHeader();

            engineeringChangeOrderHeader.dataAreaId  = dataAreaId;
            engineeringChangeOrderHeader.OrderNumber = orderNumber;
            if ((engineeringChangeCategory == null))
            {
                throw new global::System.ArgumentNullException("engineeringChangeCategory");
            }
            engineeringChangeOrderHeader.EngineeringChangeCategory = engineeringChangeCategory;
            if ((engineeringChangePriority == null))
            {
                throw new global::System.ArgumentNullException("engineeringChangePriority");
            }
            engineeringChangeOrderHeader.EngineeringChangePriority = engineeringChangePriority;
            return(engineeringChangeOrderHeader);
        }
 partial void OnEngineeringChangePriorityChanging(global::Microsoft.Dynamics.DataEntities.EngineeringChangePriority value);
        public static EngineeringChangeRequestHeader CreateEngineeringChangeRequestHeader(string requestNumber, global::Microsoft.Dynamics.DataEntities.Worker requesterWorker, global::Microsoft.Dynamics.DataEntities.EngineeringChangePriority engineeringChangePriority)
        {
            EngineeringChangeRequestHeader engineeringChangeRequestHeader = new EngineeringChangeRequestHeader();

            engineeringChangeRequestHeader.RequestNumber = requestNumber;
            if ((requesterWorker == null))
            {
                throw new global::System.ArgumentNullException("requesterWorker");
            }
            engineeringChangeRequestHeader.RequesterWorker = requesterWorker;
            if ((engineeringChangePriority == null))
            {
                throw new global::System.ArgumentNullException("engineeringChangePriority");
            }
            engineeringChangeRequestHeader.EngineeringChangePriority = engineeringChangePriority;
            return(engineeringChangeRequestHeader);
        }