Ejemplo n.º 1
0
        public bool AddOrganization()
        {
            FormFirstStepAddOrganization formFirstStepAddOrganization = new FormFirstStepAddOrganization(this);

            if (formFirstStepAddOrganization.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                Organization organization = Organization.CreateItem(_typeOrg);
                if (organization is LPU)
                {
                    FormSecondStepAddOrganization formSecondStepAddOrganization = new FormSecondStepAddOrganization(organization as LPU);
                    if (formSecondStepAddOrganization.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        FormAddLPU formAddLPU = new FormAddLPU(organization as LPU);
                        return(formAddLPU.ShowDialog() == System.Windows.Forms.DialogResult.OK);
                    }
                }
                else
                {
                    FormAddOtherOrganization formAddOtherOrganization = new FormAddOtherOrganization(organization);
                    return(formAddOtherOrganization.ShowDialog() == System.Windows.Forms.DialogResult.OK);
                }
            }

            return(false);
        }
        public bool AddOrganization()
        {
            FormFirstStepAddOrganization formFirstStepAddOrganization = new FormFirstStepAddOrganization(this);
            if (formFirstStepAddOrganization.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                Organization organization = Organization.CreateItem(_typeOrg);
                if (organization is LPU)
                {
                    FormSecondStepAddOrganization formSecondStepAddOrganization = new FormSecondStepAddOrganization(organization as LPU);
                    if (formSecondStepAddOrganization.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        FormAddLPU formAddLPU = new FormAddLPU(organization as LPU);
                        return (formAddLPU.ShowDialog() == System.Windows.Forms.DialogResult.OK);                            
                    }
                }
                else
                {
                    FormAddOtherOrganization formAddOtherOrganization = new FormAddOtherOrganization(organization);
                    return (formAddOtherOrganization.ShowDialog() == System.Windows.Forms.DialogResult.OK);
                }
            }

            return false;
        }