Ejemplo n.º 1
0
        public static async void DeleteRemindItem(int num)
        {
            string tag = "";

            using (var conn = new SQLiteConnection(new SQLitePlatformWinRT(), App.RemindListDBPath))
            {
                var list  = conn.Table <DataBaseModel>();
                var array = list.Where(i => i.Num == num);
                PasswordCredential user = GetCredential.getCredential("ZSCY");
                string             stuNum, idNum;

                stuNum = user.UserName;
                idNum  = user.Password;
                foreach (var item in array)
                {
                    tag += item.Id_system;
                    RemindBackupModel remind = new RemindBackupModel()
                    {
                        StuNum = stuNum,
                        Id     = item.Id,
                        IdNum  = idNum
                    };
                    await NetWork.getHttpWebRequest(Api.DeleteRemindApi, RemindWebRequest.deleteRemind(remind), 0, true);

                    conn.Delete <DataBaseModel>(item.Num);
                }
            }
            string[] TagArray = tag.Split(',');
            RemindSystemUtil.DeleteRemind(TagArray);
        }
Ejemplo n.º 2
0
        public static async Task <ObservableCollection <RemindBackupModel> > SyncRemindList()
        {
            ObservableCollection <RemindBackupModel> remindList = new ObservableCollection <RemindBackupModel>();
            List <KeyValuePair <string, string> >    paramList  = RemindWebRequest.getRemind();
            string json = await NetWork.getHttpWebRequest(Api.GetRemindApi, paramList, 0, true);

            GetRemindJsonToModel(ref remindList, json);
            return(remindList);
        }