コード例 #1
0
ファイル: SqliteCategory.cs プロジェクト: nolith/tasque
 public SqliteCategory(SqliteBackend backend, string name)
 {
     this.backend = backend;
     string command = String.Format("INSERT INTO Categories (Name, ExternalID) values ('{0}', '{1}'); SELECT last_insert_rowid();", name, string.Empty);
     this.id = Convert.ToInt32 (backend.Database.ExecuteScalar(command));
     //Logger.Debug("Inserted category named: {0} with id {1}", name, id);
 }
コード例 #2
0
ファイル: SqliteCategory.cs プロジェクト: nolith/tasque
        public SqliteCategory(SqliteBackend backend, string name)
        {
            this.backend = backend;
            string command = String.Format("INSERT INTO Categories (Name, ExternalID) values ('{0}', '{1}'); SELECT last_insert_rowid();", name, string.Empty);

            this.id = Convert.ToInt32(backend.Database.ExecuteScalar(command));
            //Logger.Debug("Inserted category named: {0} with id {1}", name, id);
        }
コード例 #3
0
 public SqliteCategory(SqliteBackend backend, string name)
     : base(name)
 {
     var command = string.Format (
         "INSERT INTO Categories (Name, ExternalID) values ('{0}', '{1}'); SELECT last_insert_rowid();",
         name, string.Empty);
     backend.Database.ExecuteScalar (command);
     //Debug.WriteLine("Inserted category named: {0} with id {1}", name, id);
 }
コード例 #4
0
ファイル: SqliteTask.cs プロジェクト: mono-soc-2012/Tasque
        public SqliteTask(SqliteBackend backend, int id, int category, string name, 
		                   long dueDate, long completionDate, int priority, int state)
            : base(name, TaskNoteSupport.Multiple)
        {
            this.backend = backend;
            this.id = id;
            DueDate = Database.ToDateTime (dueDate);
            CompletionDate = Database.ToDateTime (completionDate);
            Priority = (TaskPriority)priority;
            State = (TaskState)state;
        }
コード例 #5
0
ファイル: SqliteTask.cs プロジェクト: nolith/tasque
 public SqliteTask(SqliteBackend backend, int id, int category, string name,
                   long dueDate, long completionDate, int priority, int state)
 {
     this.backend        = backend;
     this.id             = id;
     this.category       = category;
     this.name           = name;
     this.dueDate        = dueDate;
     this.completionDate = completionDate;
     this.priority       = priority;
     this.state          = state;
 }
コード例 #6
0
ファイル: SqliteTask.cs プロジェクト: nolith/tasque
        public SqliteTask(SqliteBackend backend, int id, int category, string name, 
		                   long dueDate, long completionDate, int priority, int state)
        {
            this.backend = backend;
            this.id = id;
            this.category = category;
            this.name = name;
            this.dueDate = dueDate;
            this.completionDate = completionDate;
            this.priority = priority;
            this.state = state;
        }
コード例 #7
0
ファイル: SqliteTask.cs プロジェクト: nolith/tasque
 public SqliteTask(SqliteBackend backend, string name)
 {
     this.backend = backend;
     Logger.Debug("Creating New Task Object : {0} (id={1})", name, id);
     name = backend.SanitizeText (name);
     this.name = name;
     this.dueDate =  Database.FromDateTime(DateTime.MinValue);
     this.completionDate = Database.FromDateTime(DateTime.MinValue);
     this.category = 0;
     this.priority = (int)(TaskPriority.None);
     this.state = (int)TaskState.Active;
     string command = String.Format("INSERT INTO Tasks (Name, DueDate, CompletionDate, Priority, State, Category, ExternalID) values ('{0}','{1}', '{2}','{3}', '{4}', '{5}', '{6}'); SELECT last_insert_rowid();",
                         name, dueDate, completionDate,
                         priority, state, category, string.Empty);
     this.id = Convert.ToInt32 (backend.Database.ExecuteScalar (command));
 }
コード例 #8
0
ファイル: SqliteTask.cs プロジェクト: nolith/tasque
        public SqliteTask(SqliteBackend backend, string name)
        {
            this.backend = backend;
            Logger.Debug("Creating New Task Object : {0} (id={1})", name, id);
            name                = backend.SanitizeText(name);
            this.name           = name;
            this.dueDate        = Database.FromDateTime(DateTime.MinValue);
            this.completionDate = Database.FromDateTime(DateTime.MinValue);
            this.category       = 0;
            this.priority       = (int)(TaskPriority.None);
            this.state          = (int)TaskState.Active;
            string command = String.Format("INSERT INTO Tasks (Name, DueDate, CompletionDate, Priority, State, Category, ExternalID) values ('{0}','{1}', '{2}','{3}', '{4}', '{5}', '{6}'); SELECT last_insert_rowid();",
                                           name, dueDate, completionDate,
                                           priority, state, category, string.Empty);

            this.id = Convert.ToInt32(backend.Database.ExecuteScalar(command));
        }
コード例 #9
0
ファイル: SqliteTask.cs プロジェクト: mono-soc-2012/Tasque
        public SqliteTask(SqliteBackend backend, string name)
            : base(backend.SanitizeText (name), TaskNoteSupport.Multiple)
        {
            if (backend == null)
                throw new ArgumentNullException ("backend");

            name = backend.SanitizeText (name);
            this.backend = backend;
            Debug.WriteLine ("Creating New Task Object : {0} (id={1})", name, id);
            var dueDate = Database.FromDateTime (DueDate);
            var completionDate = Database.FromDateTime (CompletionDate);
            var priority = (int)Priority;
            var state = (int)State;
            var command = string.Format ("INSERT INTO Tasks (Name, DueDate, CompletionDate, Priority, State, Category, ExternalID) values ('{0}','{1}', '{2}','{3}', '{4}', '{5}', '{6}'); SELECT last_insert_rowid();",
                                name, dueDate, completionDate, priority, state, 0, string.Empty);
            id = Convert.ToInt32 (backend.Database.ExecuteScalar (command));
        }
コード例 #10
0
ファイル: SqliteCategory.cs プロジェクト: nolith/tasque
 public SqliteCategory(SqliteBackend backend, int id)
 {
     this.backend = backend;
     this.id = id;
 }
コード例 #11
0
ファイル: SqliteCategory.cs プロジェクト: nolith/tasque
 public SqliteCategory(SqliteBackend backend, int id)
 {
     this.backend = backend;
     this.id      = id;
 }