static void LoadFile(DataAccess da, int version_id, string filename, bool is_todo, bool is_missing, bool is_niex)
{
Console.WriteLine ("Loading {0}...", filename);
using (StreamReader reader = new StreamReader (filename)) {
string comment;
string line;
int n = 0;
while ((line = reader.ReadLine ()) != null) {
string name = line.Trim ();
comment = null;
if (is_todo) {
string [] parts = name.Split ('-');
name = parts [0].Trim ();
comment = parts [1].Trim ();
if (comment == "")
comment = null;
}
da.InsertMember (version_id, name, is_todo, is_missing, is_niex, false, null, comment);
n++;
if ((n % 1000) == 0)
Console.WriteLine (n);
}
}
}