コード例 #1
0
        public bool Load(Guid entityGuid, CommonEntityBase commonObject)
        {
            if (commonObject == null)
            {
                throw new Exception("Common object not initialized");
            }

            DataRow loadedDataRow;

            if (commonObject.HasReadOnlyFields)
            {
                loadedDataRow = DataAccessProvider.Load(this.ViewName, entityGuid);
            }
            else
            {
                loadedDataRow = DataAccessProvider.Load(this.TableName, entityGuid);
            }

            return(commonObject.Load(loadedDataRow));
        }