示例#1
0
 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("");
 }
示例#2
0
        public override void Nested_InsertData()
        {
            _current               = new WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.Outcome();
            _current.CreatoDa      = SecurityManager.Instance.CurrentUser.Username;
            _current.DataCreazione = DateTime.Now;

            SaveOrUpdate();

            m_IdShowedObject = _current.Id;
        }
示例#3
0
        private void DoRowDoubleClick(GridView view, Point pt)
        {
            GridHitInfo info = view.CalcHitInfo(pt);

            if (info.InRowCell)
            {
                WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.Outcome label = view.GetRow(view.FocusedRowHandle) as WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.Outcome;
                SetSelectedId(label);
            }
        }
示例#4
0
        protected override void Nested_LoadDataFromDataSource()
        {
            OutcomeHandler h = new OutcomeHandler();

            _current = h.GetElementById(m_IdShowedObject.ToString()) as WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.Outcome;;

            if (_current == null)
            {
                throw new Exception("Elemento non trovato");
            }
        }
示例#5
0
        private void cmdOk_Click(object sender, EventArgs e)
        {
            _id = -1;

            if (gridView1.SelectedRowsCount != 1)
            {
                XtraMessageBox.Show("Selezionare almeno una causale esito appuntamento!", "Informazione", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.Outcome label = gridView1.GetRow(gridView1.FocusedRowHandle) as WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.Outcome;
            SetSelectedId(label);
        }
示例#6
0
 private void SetSelectedId(WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.Outcome label)
 {
     if (label != null)
     {
         _id = label.Id;
         this.DialogResult = DialogResult.OK;
         this.Close();
     }
     else
     {
         XtraMessageBox.Show("Selezionare una causale esito appuntamento!", "Informazione", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
示例#7
0
        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.Outcome label = View.GetRow(e.RowHandle) as WIN.SCHEDULING_APPLICATION.DOMAIN.ComboElements.Outcome;

                int color = label.Color;

                e.Appearance.BackColor = Color.FromArgb(color);
            }
        }