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(); DocumentTypeHandler h = new DocumentTypeHandler(); 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() { DocumentTypeHandler h = new DocumentTypeHandler(); IList l = h.GetAll(); gridControl1.DataSource = l; }
private void SaveOrUpdate() { _current.Descrizione = txtDescrizione.Text; _current.Color = cboColor.Color.ToArgb(); _current.ProtocolCode = txtProt.Text; DocumentTypeHandler h = new DocumentTypeHandler(); h.SaveOrUpdate(_current); }
private void LoadListaCausali() { lstCau.Items.Clear(); DocumentTypeHandler h = new DocumentTypeHandler(); foreach (WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.DocumentType item in h.GetAll()) { lstCau.Items.Add(item); } }
protected override void Nested_LoadDataFromDataSource() { DocumentTypeHandler h = new DocumentTypeHandler(); _current = h.GetElementById(m_IdShowedObject.ToString()) as WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.DocumentType; if (_current == null) { throw new Exception("Elemento non trovato"); } }
private void LoadComboCausali() { //preparo la combo delle zone cbocau.Properties.Items.Clear(); DocumentTypeHandler h = new DocumentTypeHandler(); //la riempio cbocau.Properties.Items.AddRange(h.GetAll()); //seleziono quella iniziale cbocau.SelectedIndex = 0; }
private void ClearQueue() { Logger.Information("Version {@Version}", Settings.Version); if (Queue.IsEmpty || Company == null || Company.IsClosed) { return; } var handler = new DocumentTypeHandler(Company, Logger); while (Queue.TryDequeue(out var document) && Session.SessionActive) { handler.Handle(document); OnConnectorInformation(EventData("Busy")); } OnConnectorInformation(EventData("No more documents to process at the moment")); }