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.Booking.BedType label = view.GetRow(view.FocusedRowHandle) as WIN.SCHEDULING_APPLICATION.DOMAIN.Booking.BedType; SetSelectedId(label); } }
//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.Booking.BedType(); _current.CreatoDa = SecurityManager.Instance.CurrentUser.Username; _current.DataCreazione = DateTime.Now; SaveOrUpdate(); m_IdShowedObject = _current.Id; }
protected override void Nested_LoadDataFromDataSource() { BedTypeHandler h = new BedTypeHandler(); _current = h.GetElementById(m_IdShowedObject.ToString()) as WIN.SCHEDULING_APPLICATION.DOMAIN.Booking.BedType; if (_current == null) { throw new Exception("Elemento non trovato"); } }
private void SetSelectedId(WIN.SCHEDULING_APPLICATION.DOMAIN.Booking.BedType label) { if (label != null) { _id = label.Id; this.DialogResult = DialogResult.OK; this.Close(); } else { XtraMessageBox.Show("Selezionare un tipo letto!", "Informazione", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private void cmdOk_Click(object sender, EventArgs e) { _id = -1; if (gridView1.SelectedRowsCount != 1) { XtraMessageBox.Show("Selezionare almeno una causale!", "Informazione", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } WIN.SCHEDULING_APPLICATION.DOMAIN.Booking.BedType label = gridView1.GetRow(gridView1.FocusedRowHandle) as WIN.SCHEDULING_APPLICATION.DOMAIN.Booking.BedType; SetSelectedId(label); }