Esempio n. 1
0
        private void UpdateDateTableEntity(object data)
        {
            DataTableEntity tableEntity = data as DataTableEntity;

            tableEntity.LoadData();
            //if (tableEntity.IsAllowUpdatePrimaryKey()) {
            //    tableEntity.SetRawPrimaryKeys(GetRawKeys(tableEntity));
            //}
        }
Esempio n. 2
0
        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name="data">数据对象</param>
        /// <returns>受影响行数</returns>
        public int Update(object data)
        {
            DataTableEntity entity = data as DataTableEntity;

            if (entity != null)
            {
                return(Update(data, entity.GetUpdateFields()));
            }
            else
            {
                return(Update(data, null));
            }
        }