public static BOPushNotificationList GetAllList()
 {
     BOPushNotificationList itemObjs = null;
     tblPushNotification tblObj = new tblPushNotification();
     DataTable dt = tblObj.GetAllData();
     if (dt.Rows.Count > 0)
     {
         itemObjs = new BOPushNotificationList();
         foreach(DataRow dr in dt.Rows)
         {
             itemObjs.Add(FillDataRecord(dr));
         }
     }
     return itemObjs;
 }
 public static BOPushNotificationList GetAllList(int startIndex, int length, string whereClause)
 {
     BOPushNotificationList itemObjs = null;
     tblPushNotification tblObj = new tblPushNotification();
     DataTable dt = tblObj.GetAllData(startIndex, length, whereClause, null);
     if (dt.Rows.Count > 0)
     {
         itemObjs = new BOPushNotificationList();
         foreach(DataRow dr in dt.Rows)
         {
             itemObjs.Add(FillDataRecord(dr));
         }
     }
     return itemObjs;
 }
 public static int Save(BOPushNotificationList list, bool adding)
 {
    return tblPushNotificationDBManager.Save(list,adding);
 }
      public static int Save(BOPushNotificationList entryList, bool adding)
      {
          tblPushNotification tblObj = new tblPushNotification();
          DataTable dt = tblObj.Table();
          int i = 0;

          foreach(BOPushNotification entry in entryList)
          {
              DataRow newRow = tblObj.Table().NewRow();

                  newRow[tblPushNotification.ID_FIELD] = entry.ID;
                  newRow[tblPushNotification.TITLE_FIELD] = entry.Title;
                  newRow[tblPushNotification.DESCRIPTION_FIELD] = entry.Description;
          if(entry.CretaedOn.Equals(new DateTime()))
              newRow[tblPushNotification.CRETAEDON_FIELD] = DBNull.Value;
          else
              newRow[tblPushNotification.CRETAEDON_FIELD] = entry.CretaedOn;
                  newRow[tblPushNotification.CREATEDBYID_FIELD] = entry.CreatedByID;
                  newRow[tblPushNotification.ISSENT_FIELD] = entry.IsSent;

              dt.Rows.Add(newRow);
              i++;
          }

          //if(adding): Commented out at the moment. KS 28th Aug 2012
              return tblObj.AddToTable(dt);
          //else
              //return tblObj.UpdateTable(dt);
      }