Example #1
0
        private void CardTreeForm_Load(object sender, EventArgs e)
        {
            ITreeNDat dat = NewValue as ITreeNDat;

            if (dat != null)
            {
                old_parent      = dat.Parent_FPn;
                chkRoot.Enabled = ((BaseDat)dat).IsNew && old_parent != null;
                chkRoot.Checked = (dat.Parent_FPn == null);
                BindControls(this);
            }
            chkRoot_CheckedChanged(this, EventArgs.Empty);
        }
Example #2
0
        private static List <BaseDat> GetChildren(List <BaseDat> lst, BaseDat dat)
        {
            PathTreeN      path = (dat is ITreeNDat) ? ((ITreeNDat)dat).FPn : null;
            List <BaseDat> ret  = lst.FindAll(delegate(BaseDat dt)
            {
                return(
                    ((dt is ITreeNDat) && (((ITreeNDat)dt).FPn.Parent == path))
                    ||
                    ((dt is ICardNDat) && (((ICardNDat)dt).FPn.Parent == path))
                    );
            });

            return(ret);
        }
Example #3
0
        public override string ToString()
        {
            string fp = "";

            if (_value is string && PathTreeN.IsPathTreeN((string)_value))
            {
                fp = (string)_value;
            }
            else if (_value is PathTreeN)
            {
                fp = ((PathTreeN)_value).ToString();
            }
            string ret = null;

            if (_value == null)
            {
                ret = string.Format("({0} is null)"
                                    , Column
                                    );
            }
            else if (string.IsNullOrEmpty(_value.ToString()))
            {
                return("");
            }
            else
            {
                ret = string.Format("({0} = '{1}')"
                                    , Column
                                    , fp
                                    );
            }

            if (_IsFull && !string.IsNullOrEmpty(fp))
            {
                ret += string.Format(" OR ({0} like '{1}:%')"
                                     , Column
                                     , fp
                                     );
                ret = string.Format("({0})", ret);
            }

            return(ret);
        }
Example #4
0
 public FilterTreeN(string table, PathTreeN FP, bool IsFull) : this(table, "FPn", FP, IsFull)
 {
 }
Example #5
0
 public FilterTreeN(PathTreeN FP, bool IsFull) : this("", "FPn", FP, IsFull)
 {
 }