2009-10-10 13:46:36 PDT
in LibraryDal.cs:IsFileInPathTable(string FullPath)<br>
...<br>
following 2 lines:<br>
cmd.CommandText = "SELECT * from paths where file='@FILEPATH'";<br>
cmd.Parameters.Add(new SQLiteParameter(@"FILEPATH", FullPath));
Should be: <br>
cmd.CommandText = "SELECT * from paths where file=@FILEPATH";<br>
cmd.Parameters.Add(new SQLiteParameter("@FILEPATH", FullPath));
<br><br>
In frmMain.cs/ShowAddBookForm(string AddThisFile)<br>
...<br>
if (rc == DialogResult.OK)<br>
{<br>
//TODO: add the book to the db<br>
if (myBooksDb.IsBookExists(oFrm.BookInfo.ISBN))<br>
myBooksDb.UpdateExitingBook(oFrm.BookInfo);<br>
else<br>
myBooksDb.InsertNewBook(oFrm.BookInfo);<br>
}<br>
else if (rc == DialogResult.Ignore)<br>
{<br>
//TODO: add file to ignore list<br>
DbPath path = new DbPath();<br>
path.File = AddThisFile;<br>
myBooksDb.AddToIgnorePaths(path);<br>
}<br>
<br>
These changes let us add/ignore new files, and recognize the registered ones.<br>
-s.