Example #1
0
        private void OuterDocumentsList_EditClicked(object sender, int DocumentID, int DocumentCategoryID)
        {
            if (InfiniumDocuments.IsAccessGrantedOuter(Security.CurrentUserID, DocumentID) == false)
            {
                InfiniumTips.ShowTip(this, 50, 85, "Недостаточно прав для изменения документа", 3600);
                return;
            }

            PhantomForm PhantomForm = new PhantomForm();

            PhantomForm.Show();

            CreateOuterDocumentForm CreateDocumentForm = new CreateOuterDocumentForm(ref TopForm, ref InfiniumDocuments, DocumentID);

            TopForm = CreateDocumentForm;

            CreateDocumentForm.ShowDialog();

            InfiniumDocuments.FillOuterDocuments(GetFilter());
            OuterDocumentsList.InitializeItems();

            PhantomForm.Close();
            PhantomForm.Dispose();

            TopForm = null;
        }
Example #2
0
        private void CreateDocumentButton_Click(object sender, EventArgs e)
        {
            if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Исходящий документ")
            {
                PhantomForm PhantomForm = new PhantomForm();
                PhantomForm.Show();

                CreateOuterDocumentForm CreateDocumentForm = new CreateOuterDocumentForm(ref TopForm, ref InfiniumDocuments);

                TopForm = CreateDocumentForm;

                CreateDocumentForm.ShowDialog();

                if (CreateDocumentForm.bCanceled == false)
                {
                    InfiniumDocuments.FillOuterDocuments(GetFilter());
                    OuterDocumentsList.InitializeItems();
                    OuterDocumentsList.BringToFront();
                }

                PhantomForm.Close();
                PhantomForm.Dispose();

                TopForm = null;
            }

            if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Внутренний документ")
            {
                PhantomForm PhantomForm = new PhantomForm();
                PhantomForm.Show();

                CreateInnerDocumentForm CreateDocumentForm = new CreateInnerDocumentForm(ref TopForm, ref InfiniumDocuments);

                TopForm = CreateDocumentForm;

                CreateDocumentForm.ShowDialog();

                if (CreateDocumentForm.bCanceled == false)
                {
                    InfiniumDocuments.FillInnerDocuments(GetFilter());
                    InnerDocumentsList.InitializeItems();
                    InnerDocumentsList.BringToFront();
                }

                PhantomForm.Close();
                PhantomForm.Dispose();

                TopForm = null;
            }

            if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Входящий документ")
            {
                PhantomForm PhantomForm = new PhantomForm();
                PhantomForm.Show();

                CreateIncomeDocumentForm CreateDocumentForm = new CreateIncomeDocumentForm(ref TopForm, ref InfiniumDocuments);

                TopForm = CreateDocumentForm;

                CreateDocumentForm.ShowDialog();

                if (CreateDocumentForm.bCanceled == false)
                {
                    InfiniumDocuments.FillIncomeDocuments(GetFilter());
                    IncomeDocumentsList.InitializeItems();
                    IncomeDocumentsList.BringToFront();
                }
                PhantomForm.Close();
                PhantomForm.Dispose();

                TopForm = null;
            }
        }