protected override void Nested_PrepareForCreation() { _current = null; layoutControl1.Visible = true; //commandBar1.CustomGUI_SetInterfaceState(WIN.SCHEDULING_APP.GUI.Utility.GUIState.Creazione); //commandBar1.Custom_SetFunctionName("Creazione nuova causale"); commandBar1.Custom_SetIdentifier(""); }
private void DoRowDoubleClick(GridView view, Point pt) { GridHitInfo info = view.CalcHitInfo(pt); if (info.InRowCell) { WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.DocumentScope label = view.GetRow(view.FocusedRowHandle) as WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.DocumentScope; SetSelectedId(label); } }
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"); } }
private void cmdOk_Click(object sender, EventArgs e) { _id = -1; if (gridView1.SelectedRowsCount != 1) { XtraMessageBox.Show("Selezionare almeno una cartella documento!", "Informazione", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.DocumentScope label = gridView1.GetRow(gridView1.FocusedRowHandle) as WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.DocumentScope; SetSelectedId(label); }
private void SetSelectedId(WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.DocumentScope label) { if (label != null) { _id = label.Id; this.DialogResult = DialogResult.OK; this.Close(); } else { XtraMessageBox.Show("Selezionare una cartella documento!", "Informazione", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private void gridView1_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e) { if (e.RowHandle < 0) { return; } GridView View = sender as GridView; if (e.Column.FieldName == "Descrizione") { WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.DocumentScope label = View.GetRow(e.RowHandle) as WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.DocumentScope; int color = label.Color; e.Appearance.BackColor = Color.FromArgb(color); } }
//protected override void Nested_PostLoadingActions() //{ // commandBar1.Custom_SetFunctionName(string.Format("Visualizzazione causale: {0}", _current.Descrizione)); // commandBar1.CustomGUI_SetInterfaceState(GUIState.Visualizzazione); //} #endregion #region Salvataggio public override void Nested_InsertData() { _current = new WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.DocumentScope(); _current.CreatoDa = SecurityManager.Instance.CurrentUser.Username; _current.ProtocolCode = txtProtocol.Text; _current.DataCreazione = DateTime.Now; _current.Responsable = txtResp.Text; _current.ResponsableProtocolCode = txtRespProtocol.Text; _current.Visibility = SerializeVisibility(); if (hyperLinkEdit1.EditValue != null) { _current.DefaultPath = hyperLinkEdit1.EditValue.ToString(); } SaveOrUpdate(); m_IdShowedObject = _current.Id; }