示例#1
0
        public string IsCanDelete()
        {
            MapAttrs attrs = new MapAttrs();

            attrs.Retrieve(MapAttrAttr.UIBindKey, this.No);
            if (attrs.Count != 0)
            {
                string err = "";
                foreach (MapAttr item in attrs)
                {
                    err += " @ " + item.MyPK + " " + item.Name;
                }
                return("err@如下实体字段在引用:" + err + "。您不能删除该表。");
            }
            return(null);
        }
示例#2
0
        protected override bool beforeDelete()
        {
            MapAttrs attrs = new MapAttrs();

            attrs.Retrieve(MapAttrAttr.UIBindKey, this.No);
            if (attrs.Count != 0)
            {
                string err = "";
                foreach (MapAttr item in attrs)
                {
                    err += " @ " + item.MyPK + " " + item.Name;
                }
                throw new Exception("@如下实体字段在引用:" + err + "。您不能删除该表。");
            }
            return(base.beforeDelete());
        }