예제 #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);
        }
예제 #2
0
        public bool EditOrganization()
        {
            Organization organization = GetOrganization();

            if (organization is LPU)
            {
                FormAddLPU FormAddLPU = new FormAddLPU(organization as LPU);
                return(FormAddLPU.ShowDialog() == System.Windows.Forms.DialogResult.OK);
            }
            else
            {
                FormAddOtherOrganization formAddOtherOrganization = new FormAddOtherOrganization(organization as Organization);
                return(formAddOtherOrganization.ShowDialog() == System.Windows.Forms.DialogResult.OK);
            }
        }
예제 #3
0
        private void ShowFormSubLPU(Organization organization)
        {
            bool result = false;

            if (organization is LPU)
            {
                FormAddLPU formAddLPU = new FormAddLPU(organization as LPU);
                result = (formAddLPU.ShowDialog() == System.Windows.Forms.DialogResult.OK);
            }
            else
            {
                FormAddOrganization formAddOrganization = new FormAddOrganization(organization);
                result = (formAddOrganization.ShowDialog() == System.Windows.Forms.DialogResult.OK);
            }

            if (result)
            {
                LoadTree();
            }
        }
        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 EditOrganization()
        {
            Organization organization = GetOrganization();

            if (organization is LPU)
            {
                FormAddLPU FormAddLPU = new FormAddLPU(organization as LPU);
                return (FormAddLPU.ShowDialog() == System.Windows.Forms.DialogResult.OK);
            }
            else
            {
                FormAddOtherOrganization formAddOtherOrganization = new FormAddOtherOrganization(organization as Organization);
                return (formAddOtherOrganization.ShowDialog() == System.Windows.Forms.DialogResult.OK);
            }
        }
예제 #6
0
        private void ShowFormSubLPU(Organization organization)
        {
            bool result = false;

            if (organization is LPU)
            {
                FormAddLPU formAddLPU = new FormAddLPU(organization as LPU);
                result = (formAddLPU.ShowDialog() == System.Windows.Forms.DialogResult.OK);
            }
            else
            {
                FormAddOrganization formAddOrganization = new FormAddOrganization(organization);
                result = (formAddOrganization.ShowDialog() == System.Windows.Forms.DialogResult.OK);
            }

            if (result)
                LoadTree();
        }