Esempio n. 1
0
 public static void deleteAllGroups()
 {
     using (HikeChatsDb context = new HikeChatsDb(App.MsgsDBConnectionstring))
     {
         context.groupInfo.DeleteAllOnSubmit <GroupInfo>(context.GetTable <GroupInfo>());
         MessagesTableUtils.SubmitWithConflictResolve(context);
     }
 }
Esempio n. 2
0
 public static void deleteGroupWithId(string groupId)
 {
     using (HikeChatsDb context = new HikeChatsDb(App.MsgsDBConnectionstring))
     {
         context.groupInfo.DeleteAllOnSubmit <GroupInfo>(DbCompiledQueries.GetGroupInfoForID(context, groupId));
         MessagesTableUtils.SubmitWithConflictResolve(context);
     }
 }
Esempio n. 3
0
 public static void SetGroupAlive(string groupId)
 {
     using (HikeChatsDb context = new HikeChatsDb(App.MsgsDBConnectionstring))
     {
         GroupInfo cObj = DbCompiledQueries.GetGroupInfoForID(context, groupId).FirstOrDefault();
         if (cObj == null)
         {
             return;
         }
         cObj.GroupAlive = true;
         MessagesTableUtils.SubmitWithConflictResolve(context);
     }
 }
Esempio n. 4
0
 public static bool updateGroupName(string groupId, string groupName)
 {
     using (HikeChatsDb context = new HikeChatsDb(App.MsgsDBConnectionstring))
     {
         GroupInfo cObj = DbCompiledQueries.GetGroupInfoForID(context, groupId).FirstOrDefault();
         if (cObj == null)
         {
             return(false);
         }
         cObj.GroupName = groupName;
         MessagesTableUtils.SubmitWithConflictResolve(context);
     }
     return(true);
 }