コード例 #1
0
 public async t.Task <string> GetNoteTextAsync(NoteTaking o)
 {
     if (o.HasNote)
     {
         return(await _sQL.GetStringPropertyAsync(SQL.Note, "ID='" + o.ID + "'", "Content"));
     }
     return("");
 }
コード例 #2
0
        public async t.Task SetNoteTextAsync(NoteTaking o, string content)
        {
            if (o.HasNote)
            {
                if (content == "" || content == null)
                {
                    await _sQL.RemoveAsync(SQL.Note, o.ID);

                    o.HasNote = false;
                }
                else
                {
                    await _sQL.UpdateAsync(SQL.Note, o.ID, "Content", content);
                }
            }
            else
            {
                await _sQL.InsertNoteAsync(o.ID, content);

                o.HasNote = true;
            }
        }
コード例 #3
0
 public t.Task RemoveExtendedNoteAsync(NoteTaking o, DateTime time)
 {
     return(_sQL.RemoveAsync(SQL.Note, o.ID, "Time='" + time.ToString("yyyy-MM-dd HH:mm") + "'"));
 }
コード例 #4
0
 public t.Task SetExtentedNoteTextAsync(NoteTaking o, DateTime time, string content)
 {
     return(_sQL.ChangeStringPropertyAsync(SQL.ExtendedNote, "ID='" + o.ID + "' AND " + "Time='" + time.ToString("yyyy-MM-dd HH:mm") + "'", "Content", content));
 }
コード例 #5
0
 public t.Task <string> GetExtentedNoteTextAsync(NoteTaking o, DateTime time)
 => _sQL.GetStringPropertyAsync(SQL.ExtendedNote, "ID='" + o.ID + "' AND " + "Time='" + time.ToString("yyyy-MM-dd HH:mm") + "'", "Content");