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

            PhantomForm PhantomForm = new PhantomForm();

            PhantomForm.Show();

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

            TopForm = CreateDocumentForm;

            CreateDocumentForm.ShowDialog();

            InfiniumDocuments.FillIncomeDocuments(GetFilter());
            IncomeDocumentsList.InitializeItems();

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

            TopForm = null;
        }
コード例 #2
0
        private void IncomeDocumentsList_DeleteClicked(object sender, int DocumentID, int DocumentCategoryID)
        {
            if (InfiniumDocuments.IsAccessGrantedIncome(Security.CurrentUserID, DocumentID) == false)
            {
                InfiniumTips.ShowTip(this, 50, 85, "Недостаточно прав для изменения документа", 3600);
                return;
            }

            bool OK = LightMessageBox.Show(ref TopForm, true,
                                           "Удалить выбранный документ?", "Удаление");

            if (!OK)
            {
                return;
            }

            CoverDocumentsList();

            InfiniumDocuments.RemoveIncomeDocument(DocumentID);
            InfiniumDocuments.FillIncomeDocuments(GetFilter());
            IncomeDocumentsList.InitializeItems();

            if (bNeedSplash)
            {
                bC = true;
            }
        }
コード例 #3
0
        private void MenuFilterButton_Click(object sender, EventArgs e)
        {
            if (bNeedSplash)
            {
                Thread T = new Thread(delegate()
                {
                    SplashWindow.CreateCoverSplash(InnerDocumentsList.Top + UpdatePanel.Top, InnerDocumentsList.Left + UpdatePanel.Left,
                                                   InnerDocumentsList.Height, InnerDocumentsList.Width);
                });
                T.Start();

                while (!SplashWindow.bSmallCreated)
                {
                    ;
                }
            }

            if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Внутренний документ")
            {
                InfiniumDocuments.FillInnerDocuments(GetFilter());
                InnerDocumentsList.InitializeItems();
                InnerDocumentsList.BringToFront();
            }

            if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Входящий документ")
            {
                InfiniumDocuments.FillIncomeDocuments(GetFilter());
                IncomeDocumentsList.InitializeItems();
                IncomeDocumentsList.BringToFront();
            }

            if (CategoriesComboBox.GetItemText(CategoriesComboBox.SelectedItem) == "Исходящий документ")
            {
                InfiniumDocuments.FillOuterDocuments(GetFilter());
                OuterDocumentsList.InitializeItems();
                OuterDocumentsList.BringToFront();
            }


            if (bNeedSplash)
            {
                bC = true;
            }
        }
コード例 #4
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;
            }
        }