Ejemplo n.º 1
0
        public TableContentDomain(Authentication authentication, CremaDataSet dataSet, DataBase dataBase, string itemPath, string itemType)
            : base(authentication.ID, dataBase.ID, itemPath, itemType)
        {
            if (dataSet.HasChanges() == true)
            {
                throw new ArgumentException(Resources.Exception_UnsavedDataCannotEdit, nameof(dataSet));
            }
            this.dataSet = dataSet;

            foreach (var item in this.dataSet.Tables)
            {
                var view = item.AsDataView();
                this.views.Add(item.TableName, view);
            }
        }
Ejemplo n.º 2
0
        public TableContentDomain(Authentication authentication, CremaDataSet dataSet, DataBase dataBase, string itemPath, string itemType)
            : base(authentication.ID, dataBase.ID, itemPath, itemType)
        {
            if (dataSet.HasChanges() == true)
            {
                throw new ArgumentException("저장되지 않은 데이터는 편집할 수 없습니다.");
            }
            this.dataSet = dataSet;

            foreach (var item in this.dataSet.Tables)
            {
                var view = item.AsDataView();
                this.views.Add(item.TableName, view);
            }
        }