private int GetEnterPriseFormIndex(EnterpriseForm enterpriseForm)
        {
            int result = 0;

            foreach (IndexedEnterpriseForm indexForm in ComboBoxExecutive.Items)
            {
                if (indexForm.Name == enterpriseForm.Name)
                {
                    result = indexForm.Index;
                }
            }

            return(result);
        }
        private EnterpriseForm GetEnterpriseForm(int selectedIndex)
        {
            EnterpriseForm result = new EnterpriseForm();

            foreach (IndexedEnterpriseForm form in Bizz.IndexedEnterpriseForms)
            {
                if (form.Index == selectedIndex)
                {
                    result = form;
                    break;
                }
            }

            return(result);
        }
        private void ComboBoxEnterpriseForm_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (ComboBoxEnterpriseForm.SelectedIndex >= 0)
            {
                EnterpriseForm form = new EnterpriseForm((EnterpriseForm)ComboBoxEnterpriseForm.SelectedItem);
                if (CBZ.TempProject.EnterpriseForm.Id != form.Id)
                {
                    CBZ.TempProject.EnterpriseForm = form;

                    //Set CBZ.UcMainEdited
                    if (!CBZ.UcMainEdited)
                    {
                        CBZ.UcMainEdited = true;
                    }
                }
            }
            else
            {
                CBZ.TempProject.EnterpriseForm = new EnterpriseForm();
            }
        }