private void DocumentsUpdatesList_CommentFileClicked(object sender, int DocumentCommentFileID) { PhantomForm PhantomForm = new PhantomForm(); PhantomForm.Show(); DocumentsUploadForm DocumentsUploadForm = new DocumentsUploadForm(ref TopForm, ref InfiniumDocuments, DocumentCommentFileID, true); TopForm = DocumentsUploadForm; DocumentsUploadForm.ShowDialog(); PhantomForm.Close(); PhantomForm.Dispose(); TopForm = null; }
private void DocumentsUpdatesList_FileClicked(object sender, int DocumentFileID) { PhantomForm PhantomForm = new PhantomForm(); PhantomForm.Show(); try { DocumentsUploadForm DocumentsUploadForm = new DocumentsUploadForm(ref TopForm, ref InfiniumDocuments, DocumentFileID); TopForm = DocumentsUploadForm; DocumentsUploadForm.ShowDialog(); } catch (Exception ex) { InfiniumMessages.SendMessage("Ошибка скачивания файла документов UserID = " + Security.CurrentUserID + ", ID = " + DocumentFileID + " exception = " + ex.Message, 321); } PhantomForm.Close(); PhantomForm.Dispose(); TopForm = null; }
private void DocumentsUpdatesList_CommentsSendButtonClicked(object sender, int DocumentID, int DocumentCommentID, int DocumentCategoryID, string sText, bool bIsNew, DataTable FilesDataTable) { InfiniumDocuments.FM.bStopTransfer = false; int iCurrentFile = 0; if (sText.Length == 0 && FilesDataTable.Rows.Count == 0) { InfiniumTips.ShowTip(this, 50, 85, "Добавьте текст и/или файлы", 3000); return; } if (DocumentCommentID != -1)//edit { if (FilesDataTable.Select("IsNew = 1").Count() == 0) { CoverUpdatesList(); InfiniumDocuments.EditComment(DocumentCommentID, sText, FilesDataTable, ref iCurrentFile); ((InfiniumDocumentsUpdatesItem)sender).CloseCommentsTextBox(); FillUpdates(); DocumentsUpdatesList.InitializeItems(); GC.Collect(); if (bNeedSplash) { bC = true; } } else { PhantomForm PhantomForm = new PhantomForm(); PhantomForm.Show(); DocumentsUploadForm DocumentsUploadForm = new DocumentsUploadForm(ref TopForm, ref InfiniumDocuments, sText, FilesDataTable, DocumentCommentID); TopForm = DocumentsUploadForm; DocumentsUploadForm.ShowDialog(); if (DocumentsUploadForm.bOK) { ((InfiniumDocumentsUpdatesItem)sender).CloseCommentsTextBox(); } PhantomForm.Close(); PhantomForm.Dispose(); TopForm = null; CoverUpdatesList(); FillUpdates(); DocumentsUpdatesList.InitializeItems(); GC.Collect(); if (bNeedSplash) { bC = true; } } } else { if (FilesDataTable.Select("IsNew = 1").Count() == 0) { CoverUpdatesList(); InfiniumDocuments.AddComment(Security.CurrentUserID, sText, DocumentID, DocumentCategoryID, FilesDataTable, ref iCurrentFile); ((InfiniumDocumentsUpdatesItem)sender).CloseCommentsTextBox(); FillUpdates(); DocumentsUpdatesList.InitializeItems(); GC.Collect(); if (bNeedSplash) { bC = true; } } else { PhantomForm PhantomForm = new PhantomForm(); PhantomForm.Show(); DocumentsUploadForm DocumentsUploadForm = new DocumentsUploadForm(ref TopForm, ref InfiniumDocuments, sText, FilesDataTable, DocumentID, DocumentCategoryID); TopForm = DocumentsUploadForm; DocumentsUploadForm.ShowDialog(); if (DocumentsUploadForm.bOK) { ((InfiniumDocumentsUpdatesItem)sender).CloseCommentsTextBox(); } PhantomForm.Close(); PhantomForm.Dispose(); TopForm = null; CoverUpdatesList(); FillUpdates(); DocumentsUpdatesList.InitializeItems(); GC.Collect(); if (bNeedSplash) { bC = true; } } } }