Example #1
0
 public bool UpdateRoomMemberSetting(int rid, int mid, string setting, bool newValue)
 {
     try
     {
         RoomMember rSetting = new RoomMember();
         if (!rSetting.LoadByPrimaryKey(mid, rid))
         {
             rSetting.AddNew();
             rSetting.RoomID = rid;
             rSetting.MemberID = mid;
         }
         rSetting.SetColumn(setting, newValue);
         rSetting.Save();
     }
     catch (Exception ex)
     {
         return false;
     }
     return true;
 }