Ejemplo n.º 1
0
        protected override void resetSlavesOfModifiedProperty(ResetSlavesAttribute att)
        {
            //should be overridden
            //we need reset slaves chain
            FilterObjectbase fo = Current as FilterObjectbase;

            att.Slaves.ToList().ForEach(
                s =>
            {
                fo.GetFilterFieldByPath(s)?.Reset();
            }
                );
        }
Ejemplo n.º 2
0
        protected override void GetFieldDisplayText(object sender, xwcs.core.db.binding.CustomColumnDisplayTextEventArgs e)
        {
            try {
                FilterObjectbase fo = this[e.ListSourceRowIndex] as FilterObjectbase;
                if (fo != null)
                {
                    ICriteriaTreeNode cn = fo.GetFilterFieldByPath(e.Column.FieldName);
                    if (cn.HasCriteria())
                    {
                        string cond = cn.GetCondition().LegacyToString();
                        e.DisplayText = cond;
                    }
                }
            }
#if DEBUG_TRACE_LOG_ON
            catch (Exception ex) {
                SLogManager.getInstance().getClassLogger(GetType()).Debug(ex.ToString());
#else
            catch (Exception) {
#endif
            } //just silently skip problems
        }
Ejemplo n.º 3
0
        private void setupRle(IDataBindingSource src, RepositoryItem ri, string fn)
        {
            //first detach eventual old
            if (Ri != null)
            {
                Ri.KeyPress -= repItemKeyPressHandler;
            }
            Src       = src;
            Ri        = ri;
            FieldName = fn;
            //get field
            RepositoryItemTextEdit rte = Ri as RepositoryItemTextEdit;

            if (rte != null)
            {
                FilterObjectbase fo = src.Current as FilterObjectbase;
                if (fo != null)
                {
                    ICriteriaTreeNode cn = fo.GetFilterFieldByPath(FieldName);
                    if (cn.HasCriteria())
                    {
                        string cond = cn.GetCondition().LegacyToString();
                        rte.NullValuePrompt = cond;
                    }
                }
            }

            ri.KeyPress += repItemKeyPressHandler;

            //in case of button edit set it editable by hand
            RepositoryItemButtonEdit ribe = (ri as RepositoryItemButtonEdit);

            if (ribe != null)
            {
                ribe.TextEditStyle = TextEditStyles.Standard;
            }
        }