Ejemplo n.º 1
0
        public static IDSRepositoryCollection CreateIDSRepositories(DataRow[] rowIDSRepositories)
        {
            if (rowIDSRepositories == null)
            {
                throw new System.ArgumentNullException("from function CreateIDSRepositories", "Parameter rowIDSRepository equals to null");
            }

            IDSRepositoryCollection repositories = new IDSRepositoryCollection();

            if (rowIDSRepositories.Length <= 0)
            {
                return(repositories);
            }

            lock (rowIDSRepositories) {
                try {
                    foreach (DataRow rowRepository in rowIDSRepositories)
                    {
                        repositories.Add(CreateIDSRepository(rowRepository));
                    }
                }
                catch (DataException ex) {
                    MessageBoxWinForm.Info("数据访问错误", ex.Message, "");
                }
            }

            return(repositories);
        }
Ejemplo n.º 2
0
        public IDSRepositoryCategory()
        {
            ID                   = "";
            ParentID             = "";
            RepositoryCatagoryID = "";
            Name                 = "";
            Description          = "";
            Phase                = "";

            Repositories = new IDSRepositoryCollection();
        }
Ejemplo n.º 3
0
        public IDSMountingScheme()
        {
            ID                = "";
            ParentID          = "";
            MountingSchemeID  = "";
            MountingType      = "";
            Usage             = "";
            FileName          = "";
            TubeRepositoryID  = "";
            Remark            = "";
            ProtectionEnabled = false;

            Repositories   = new IDSRepositoryCollection();
            TubeRepository = new IDSRepository();
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Deep Clone
        /// </summary>
        /// <returns></returns>
        public IDSRepositoryCollection Copy()
        {
            IDSRepositoryCollection repositories = new IDSRepositoryCollection();

            if (this.Count <= 0)
            {
                return(repositories);
            }
            else
            {
                foreach (IDSRepository repository in this)
                {
                    repositories.Add(repository.Copy());
                }
                return(repositories);
            }
        }