Exemplo n.º 1
0
        private void OnCmbMotivationChange(object sender, EventArgs e)
        {
            // if the list is dropped down while the value is changed (not the case when a value from the list is clicked on)
            if (cmbMotivationGroup.cmbCombobox.DroppedDown)
            {
                // this is used to stop an 'Enter' key press triggering a search while a combo boxes list is dropped down
                MotivationGroupDroppedDown = true;
            }

            if (cmbMotivationDetail.cmbCombobox.DroppedDown)
            {
                // this is used to stop an 'Enter' key press triggering a search while a combo boxes list is dropped down
                MotivationDetailDroppedDown = true;
            }

            if ((Ict.Petra.Client.CommonControls.TCmbAutoPopulated)sender == cmbMotivationGroup)
            {
                if (cmbMotivationGroup.Text == string.Empty)
                {
                    cmbMotivationDetail.Filter = string.Empty;
                }
                else
                {
                    TFinanceControls.ChangeFilterMotivationDetailList(ref cmbMotivationDetail, cmbMotivationGroup.Text, false);
                    cmbMotivationDetail.Filter       += " OR " + AMotivationDetailTable.GetMotivationDetailCodeDBName() + " = ''";
                    cmbMotivationDetail.SelectedIndex = -1;
                }
            }
        }
        void UpdateMotivationDetail(object sender, EventArgs e)
        {
            String motivationGroup = cmbMotivGroup.GetSelectedString();

            TFinanceControls.ChangeFilterMotivationDetailList(ref cmbMotivDetail, motivationGroup);

            if (FsuppressChangeEvent == 0)
            {
                UpdateGrid(sender, e);
            }
        }