Esempio n. 1
0
 public void removeDocument(String file)
 {
     if (recentDocumentList.Remove(file))
     {
         if (DocumentRemoved != null)
         {
             DocumentRemoved.Invoke(this, file);
         }
     }
 }
Esempio n. 2
0
 public void removeDocument(String file)
 {
     file = normalizePath(file);
     if (recentDocumentList.Remove(file))
     {
         if (DocumentRemoved != null)
         {
             DocumentRemoved.Invoke(file);
         }
     }
 }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitializeLanguage();
                RemoveFilters();
                InitializeContent();
            }
            else
            {
                if (!string.IsNullOrEmpty(this.HiddenDocumentRemoved.Value))
                {
                    InfoDocumento infoDoc = (from info in DocumentRemoved
                                             where info.docNumber.Equals(IdDocument)
                                             select info).FirstOrDefault();
                    switch (Command)
                    {
                    case REMOVE_DOCUMENT:
                        if (DocumentManager.RemoveDocument(UserManager.GetInfoUser(), infoDoc))
                        {
                            LoadDocumentRemoved();
                            GrdDocumentsRemoved_Bind();
                            this.UpPanelGrdDocumentsRemoved.Update();
                        }
                        else
                        {
                            ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "ajaxDialogModal('ErrorRemoveDocumentRemoved', 'error', '','');", true);
                        }
                        break;

                    case RESTORE_DOCUMENT:
                        if (DocumentManager.RestoreDocument(UserManager.GetInfoUser(), infoDoc))
                        {
                            LoadDocumentRemoved();
                            GrdDocumentsRemoved_Bind();
                            this.UpPanelGrdDocumentsRemoved.Update();
                        }
                        else
                        {
                            ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "ajaxDialogModal('ErrorRemoveDocumentRemoved', 'error', '','');", true);
                        }
                        break;

                    case REMOVE_ALL_DOUCUMENT:
                        bool docInCestino = false;
                        if (DocumentManager.RemoveAllDocuments(out docInCestino, UserManager.GetInfoUser(), DocumentRemoved.ToArray()))
                        {
                            if (docInCestino)
                            {
                                //Ci sono ancora documenti nel cestino
                                this.BtnDocumentsRemovedSearch.Enabled        = true;
                                this.BtnDocumentsRemovedRemoveFilters.Enabled = false;
                            }
                            else
                            {
                                this.BtnDocumentsRemovedSearch.Enabled        = false;
                                this.BtnDocumentsRemovedRemoveFilters.Enabled = false;
                                this.BtnRemoveAllDocuments.Visible            = false;
                                this.BtnExportDocumentsRemoved.Visible        = false;
                            }
                            LoadDocumentRemoved();
                            GrdDocumentsRemoved_Bind();
                            this.UpPanelGrdDocumentsRemoved.Update();
                        }
                        else
                        {
                            ScriptManager.RegisterStartupScript(this, this.GetType(), "ajaxDialogModal", "ajaxDialogModal('ErrorRemoveDocumentRemoved', 'error', '','');", true);
                        }
                        break;
                    }
                    RemoveIdDocument();
                    RemoveCommand();
                    this.HiddenDocumentRemoved.Value = string.Empty;
                    return;
                }
            }
            RefreshScript();
        }
 private void documents_ItemRemoved(object sender, ItemRemovedEventArgs <IDocument> e)
 {
     DocumentRemoved.Raise(this, e);
 }
Esempio n. 5
0
 private void OnDocumentRemoved(DocumentEventArgs e)
 {
     DocumentRemoved?.Invoke(this, e);
 }
 protected virtual void OnDocumentRemoved(DocumentEventArgs e)
 {
     DocumentRemoved?.Invoke(this, e);
 }