partial void OnBudgetControlRulesChanging(global::Microsoft.Dynamics.DataEntities.BudgetControlRule value);
        public static BudgetControlRuleOverBudgetPermission CreateBudgetControlRuleOverBudgetPermission(string dataAreaId,
                                                                                                        string legalEntityId,
                                                                                                        string ruleName,
                                                                                                        string userGroupId,
                                                                                                        global::Microsoft.Dynamics.DataEntities.BudgetControlRule budgetControlRules,
                                                                                                        global::Microsoft.Dynamics.DataEntities.UserGroup systemUserGroups)
        {
            BudgetControlRuleOverBudgetPermission budgetControlRuleOverBudgetPermission = new BudgetControlRuleOverBudgetPermission();

            budgetControlRuleOverBudgetPermission.dataAreaId    = dataAreaId;
            budgetControlRuleOverBudgetPermission.LegalEntityId = legalEntityId;
            budgetControlRuleOverBudgetPermission.RuleName      = ruleName;
            budgetControlRuleOverBudgetPermission.UserGroupId   = userGroupId;
            if ((budgetControlRules == null))
            {
                throw new global::System.ArgumentNullException("budgetControlRules");
            }
            budgetControlRuleOverBudgetPermission.BudgetControlRules = budgetControlRules;
            if ((systemUserGroups == null))
            {
                throw new global::System.ArgumentNullException("systemUserGroups");
            }
            budgetControlRuleOverBudgetPermission.SystemUserGroups = systemUserGroups;
            return(budgetControlRuleOverBudgetPermission);
        }