Пример #1
0
 public void PostTimeEventSpanList([FromBody] Fantik list)
 {
     SQLiteController.Init();
     foreach (var lis in list.list)
     {
         SQLiteController.Insert(lis);
     }
 }
Пример #2
0
 public int PostLogin([FromBody] string value)
 {
     SQLiteController.Init();
     if (SQLiteController.CheckUser(value))
     {
         return(SQLiteController.SelectUser().Where(x => x.UserName == value).FirstOrDefault().Id);
     }
     else
     {
         SQLiteController.Insert(new UserSpan {
             UserName = value
         });
         return(SQLiteController.SelectUser().Where(x => x.UserName == value).FirstOrDefault().Id);
     }
 }
Пример #3
0
        public IEnumerable <TimeEventSpanJSON> GetTimeEventSpanList(int id)
        {
            SQLiteController.Init();
            var events = SQLiteController.SelectEvent(id);
            IEnumerable <TimeEventSpanJSON> retEvents = events.Select(x => new TimeEventSpanJSON
            {
                UserId    = x.UserId,
                Color     = x.Color,
                EventName = x.EventName,
                UserName  = x.UserName,
                Begin     = SQLiteController.DateTimeToString(x.Begin),
                End       = SQLiteController.DateTimeToString(x.End)
            });

            return(retEvents);
        }
 public string PostTimeEventSpan([FromBody] TimeEventSpan value)
 {
     SQLiteController.Init();
     SQLiteController.Insert(value);
     return("jrtq");
 }