Beispiel #1
0
        internal List <FieldInfoEventArgs> GetFieldInfo(UpdateKind status)
        {
            List <FieldInfoEventArgs> result = new List <FieldInfoEventArgs>();

            foreach (IFieldInfo fieldInfo in FieldList)
            {
                SqlPosition position = fieldInfo.IsAutoInc ? SqlPosition.None : SqlPosition.Update;
                if (IsKey(fieldInfo.NickName))
                {
                    position |= SqlPosition.Where;
                }
                FieldInfoEventArgs args = new FieldInfoEventArgs(fieldInfo, status, position);
                result.Add(args);
                OnSetFieldInfo(args);
            }
            return(result);
        }
Beispiel #2
0
        /// <summary>
        /// 触发设置字段信息事件
        /// </summary>
        /// <param name="e">字段信息参数</param>
        protected virtual void OnSetFieldInfo(FieldInfoEventArgs e)
        {
            TkDebug.AssertArgumentNull(e, "e", this);

            EventUtil.ExecuteEventHandler(fEventHandlers, SetFieldInfoEvent, this, e);
        }