public AIOMusic( AIOCommonInfo info ) { // // TODO: Add constructor logic here // SetCommonInfo( info ); }
public AIOMusic(AIOCommonInfo info) { // // TODO: Add constructor logic here // SetCommonInfo(info); }
public void GetCommonInfo2(AIOCommonInfo info) { info.ratings = this.ratingField1.Ratings; info.comment = txtComment.Text.Trim(); info.createdDate = lblCreatedDate.Text; info.path = txtPath.Text.Trim(); }
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; }
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); }
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 ); }
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); }
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); }
//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; }
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); }
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); }
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; } }
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; }
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); }
public void SetCommonInfo(AIOCommonInfo info) { SetCommonInfo(info.ID, info.ratings, info.icon, info.comment, info.path, info.createdDate); }
public AIOBook(AIOCommonInfo info) { SetCommonInfo(info); }