private void LoadComboCartelle() { //preparo la combo delle zone cbocar.Properties.Items.Clear(); DocumentScopeHandler h = new DocumentScopeHandler(); //la riempio IList l = h.GetAll(); IList l1 = new ArrayList(); foreach (DocumentScope item in l) { if (!item.Descrizione.StartsWith("OLD")) { l1.Add(item); } } cbocar.Properties.Items.AddRange(l1); //seleziono quella iniziale cbocar.SelectedIndex = 0; }
public override void DoDelete() { if (_current == null) { return; } try { if (XtraMessageBox.Show("L'elemento sarà eliminato solamente se nel sistema non ci sono altri riferimenti all'elemento oppure se non è un elemento predefinito. Sicuro di voler procedere? ", "Elimina elemento", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { Nested_CheckSecurityForDeletion(); DocumentScopeHandler h = new DocumentScopeHandler(); h.Delete(_current); _mainForm.NavigatorUtility.NavigateToPrevious(); } } catch (AccessDeniedException) { XtraMessageBox.Show("Impossibile accedere alla funzionalità richiesta. Accesso negato", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (Exception ex) { ErrorHandler.Show(ex); } }
private void LoadGrid() { DocumentScopeHandler h = new DocumentScopeHandler(); IList l = h.GetAll(); gridControl1.DataSource = l; }
private void SaveOrUpdate() { _current.Descrizione = txtDescrizione.Text; _current.Color = cboColor.Color.ToArgb(); DocumentScopeHandler h = new DocumentScopeHandler(); h.SaveOrUpdate(_current); }
private void LoadListaCartelle() { lstCart.Items.Clear(); DocumentScopeHandler h = new DocumentScopeHandler(); foreach (WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.DocumentScope item in h.GetAll()) { lstCart.Items.Add(item); } }
protected override void Nested_LoadDataFromDataSource() { DocumentScopeHandler h = new DocumentScopeHandler(); _current = h.GetElementById(m_IdShowedObject.ToString()) as WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.DocumentScope; if (_current == null) { throw new Exception("Elemento non trovato"); } }
public void Initialize() { DocumentScopeHandler h = new DocumentScopeHandler(); DocumentScope s = h.GetElementById("1") as DocumentScope; if (!s.IsDefaultpathValid) { //prendo una locazione di default nel file sistem. string sp = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); s.DefaultPath = sp; h.SaveOrUpdate(s); } }
private void LoadEditors() { if (_current != null) { ////inserisco i parametri abituali txtsub.EditValue = _current.Subject; txtprot.EditValue = _current.Protocol; txtresp.EditValue = _current.Responsable; dtpdata.EditValue = _current.Date; foreach (Customer item in _current.Contacts) { lstcont.Items.Add(item); } foreach (AttachmentForDocument item in _current.Attachments) { lstatt.Items.Add(item, GetFileImageIndex(item)); } cbopri.EditValue = _current.Priority.ToString(); cbotip.EditValue = _current.Nature.ToString(); cbocau.EditValue = _current.Type; cboop.EditValue = _current.Operator; //ricalcolo la lista delle cartelle documenti se si tratta di aggiornamento DocumentScopeHandler h = new DocumentScopeHandler(); IList l = h.GetAll(); cbocar.Properties.Items.Clear(); cbocar.Properties.Items.AddRange(l); cbocar.EditValue = _current.Scope; //carico il corpo nell'editor using (MemoryStream ms = new MemoryStream(_current.Body.Document)) { rchbody.LoadDocument(ms, DevExpress.XtraRichEdit.DocumentFormat.Rtf); string a = rchbody.RtfText; } } }