コード例 #1
0
 public AIOMusic( AIOCommonInfo info )
 {
     //
     // TODO: Add constructor logic here
     //
     SetCommonInfo( info );
 }
コード例 #2
0
 public AIOMusic(AIOCommonInfo info)
 {
     //
     // TODO: Add constructor logic here
     //
     SetCommonInfo(info);
 }
コード例 #3
0
 public void GetCommonInfo2(AIOCommonInfo info)
 {
     info.ratings = this.ratingField1.Ratings;
     info.comment = txtComment.Text.Trim();
     info.createdDate = lblCreatedDate.Text;
     info.path = txtPath.Text.Trim();
 }
コード例 #4
0
 public void LoadDetails(AIOCommonInfo info)
 {
     this.ratingField1.Ratings = info.ratings;
     this.txtComment.Text = info.comment;
     this.lblCreatedDate.Text = info.createdDate;
     this.txtPath.Text = info.path;
 }
コード例 #5
0
 public virtual void UpdateInfo(AIOCommonInfo info)
 {
     string sql = "UPDATE Common SET ratings = ?, comment = ?, icon = ?, path = ? WHERE ID = ?";
     OleDbCommand cmd = aioDb.CreateSqlWithParam(sql, new object[] {info.ratings, info.comment, info.icon, info.path, info.ID});
     //ExecuteIt
     aioDb.ExecuteCommand(cmd);
 }
コード例 #6
0
 public override void UpdateInfo(AIOCommonInfo info)
 {
     base.UpdateInfo (info);
     AIOMusic music = (AIOMusic)info;
     string sql = "update Music set Name = ?, ArtistID = ?, AlbumID = ? where ID =?";
     OleDbCommand cmd = aioDb.CreateSqlWithParam( sql, new object[] {music.name, music.artist, music.album, music.ID} );
     aioDb.ExecuteCommand( cmd );
 }
コード例 #7
0
        public virtual void UpdateInfo(AIOCommonInfo info)
        {
            string       sql = "UPDATE Common SET ratings = ?, comment = ?, icon = ?, path = ? WHERE ID = ?";
            OleDbCommand cmd = aioDb.CreateSqlWithParam(sql, new object[] { info.ratings, info.comment, info.icon, info.path, info.ID });

            //ExecuteIt
            aioDb.ExecuteCommand(cmd);
        }
コード例 #8
0
        public override void UpdateInfo(AIOCommonInfo info)
        {
            base.UpdateInfo(info);
            AIOMusic     music = (AIOMusic)info;
            string       sql   = "update Music set Name = ?, ArtistID = ?, AlbumID = ? where ID =?";
            OleDbCommand cmd   = aioDb.CreateSqlWithParam(sql, new object[] { music.name, music.artist, music.album, music.ID });

            aioDb.ExecuteCommand(cmd);
        }
コード例 #9
0
        //Get all
        public AIOCommonInfo GetCommonInfo()
        {
            AIOCommonInfo info = new AIOCommonInfo();
            info.ratings = this.ratingField1.Ratings;
            info.comment = txtComment.Text.Trim();
            info.createdDate = lblCreatedDate.Text;
            info.path = txtPath.Text.Trim();

            return info;
        }
コード例 #10
0
        public override void UpdateInfo(AIOCommonInfo info)
        {
            base.UpdateInfo (info);

            AIOBook book = (AIOBook)info;
            //Be careful: year is a SQL Keyword. Put it into square brackets.
            string sql = "UPDATE Book SET title = ?, authorID = ?, genreID = ?, publisherID = ?, [year] = ? WHERE ID = ?";
            OleDbCommand cmd = aioDb.CreateSqlWithParam(sql, new object[] {book.title, book.authorID, book.genreID, book.publisherID, book.year, book.ID});

            //Execute it
            aioDb.ExecuteCommand(cmd);
        }
コード例 #11
0
        public override void UpdateInfo(AIOCommonInfo info)
        {
            base.UpdateInfo(info);

            AIOBook book = (AIOBook)info;
            //Be careful: year is a SQL Keyword. Put it into square brackets.
            string       sql = "UPDATE Book SET title = ?, authorID = ?, genreID = ?, publisherID = ?, [year] = ? WHERE ID = ?";
            OleDbCommand cmd = aioDb.CreateSqlWithParam(sql, new object[] { book.title, book.authorID, book.genreID, book.publisherID, book.year, book.ID });

            //Execute it
            aioDb.ExecuteCommand(cmd);
        }
コード例 #12
0
        private void ApplySynchronization_R(AIONode subroot, string parentPath)
        {
            if (subroot == null)
            {
                return;
            }

/*
 *                      if (subroot.childNode != null)
 *                      {
 *                              DirectoryInfo dir = new DirectoryInfo(parentPath + @"\" + subroot.data.Name);
 *                              if (dir.Exists == false)
 *                                      dir.Create();
 *
 *                              ApplySynchronization_R(subroot.childNode, parentPath + @"\" + subroot.data.Name);
 *                      }*/

            //Apply to subroot
            AIONode current = subroot;

            while (current != null)
            {
                //Apply to folder
                if (current.data.isFile == false)
                {
                    DirectoryInfo dir = new DirectoryInfo(parentPath + @"\" + current.data.Name);
                    if (dir.Exists == false)
                    {
                        dir.Create();
                    }

                    //if (current.Equals(subroot) == false)
                    ApplySynchronization_R(current.childNode, parentPath + @"\" + current.data.Name);
                }
                else
                {
                    //Get file path
                    AIOCommonInfo info = controller.Select(current.data.ID);
                    currentProcessingFile = info.path;

                    //Copy the file to new directory
                    FileInfo file = new FileInfo(info.path);
                    file.CopyTo(parentPath + @"\" + file.Name, bOverwrite);
                }
                //Next
                current = current.nextNode;
            }
        }
コード例 #13
0
        public virtual AIOCommonInfo Select(string ID)
        {
            string sql = "SELECT * FROM Common WHERE ID = '" + ID + "'";
            DataTable table = aioDb.ExecuteSelect(sql);
            object [] obj = table.Rows[0].ItemArray;
            //ID - ratings - comment - icon - path - createdDate
            //0 - 1 - 2 - 3 - 4 - 5
            AIOCommonInfo info = new AIOCommonInfo();

            info.ID = ID;
            info.ratings = Convert.ToInt32(obj[1]);
            info.comment = obj[2].ToString();
            info.icon = Convert.ToInt32(obj[3]);
            info.path = obj[4].ToString();
            info.createdDate = obj[5].ToString();

            return info;
        }
コード例 #14
0
        public virtual AIOCommonInfo Select(string ID)
        {
            string    sql   = "SELECT * FROM Common WHERE ID = '" + ID + "'";
            DataTable table = aioDb.ExecuteSelect(sql);

            object [] obj = table.Rows[0].ItemArray;
            //ID - ratings - comment - icon - path - createdDate
            //0 - 1 - 2 - 3 - 4 - 5
            AIOCommonInfo info = new AIOCommonInfo();

            info.ID          = ID;
            info.ratings     = Convert.ToInt32(obj[1]);
            info.comment     = obj[2].ToString();
            info.icon        = Convert.ToInt32(obj[3]);
            info.path        = obj[4].ToString();
            info.createdDate = obj[5].ToString();

            return(info);
        }
コード例 #15
0
 public void SetCommonInfo(AIOCommonInfo info)
 {
     SetCommonInfo(info.ID, info.ratings, info.icon, info.comment, info.path, info.createdDate);
 }
コード例 #16
0
 public void SetCommonInfo(AIOCommonInfo info)
 {
     SetCommonInfo(info.ID, info.ratings, info.icon, info.comment, info.path, info.createdDate);
 }
コード例 #17
0
 public AIOBook(AIOCommonInfo info)
 {
     SetCommonInfo(info);
 }
コード例 #18
0
 public AIOBook(AIOCommonInfo info)
 {
     SetCommonInfo(info);
 }