public static int Save(BOHolidayDetailsList entryList, bool adding)
        {
            tblHolidayDetails tblObj = new tblHolidayDetails();
            DataTable         dt     = tblObj.Table();
            int i = 0;

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

                newRow[tblHolidayDetails.HOLIDAYTYPE_FIELD] = entry.HolidayType;
                if (entry.HolidayDate.Equals(new DateTime()))
                {
                    newRow[tblHolidayDetails.HOLIDAYDATE_FIELD] = DBNull.Value;
                }
                else
                {
                    newRow[tblHolidayDetails.HOLIDAYDATE_FIELD] = entry.HolidayDate;
                }

                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);
        }
        public static int Save(BOHolidayDetails entry, bool adding)
        {
            tblHolidayDetails tblObj = new tblHolidayDetails();
            DataRow           newRow = tblObj.Table().NewRow();

            newRow[tblHolidayDetails.HOLIDAYID_FIELD]   = entry.HolidayID;
            newRow[tblHolidayDetails.HOLIDAYTYPE_FIELD] = entry.HolidayType;
            if (entry.HolidayDate.Equals(new DateTime()))
            {
                newRow[tblHolidayDetails.HOLIDAYDATE_FIELD] = DBNull.Value;
            }
            else
            {
                newRow[tblHolidayDetails.HOLIDAYDATE_FIELD] = entry.HolidayDate;
            }

            if (adding)
            {
                return(tblObj.AddToTable(newRow));
            }
            else
            {
                return(tblObj.UpdateTable(newRow));
            }
        }
      public static int Save(BOHolidayDetails entry, bool adding)
      {
          tblHolidayDetails tblObj = new tblHolidayDetails();
          DataRow newRow = tblObj.Table().NewRow();

              newRow[tblHolidayDetails.HOLIDAYID_FIELD] = entry.HolidayID;
              newRow[tblHolidayDetails.HOLIDAYTYPE_FIELD] = entry.HolidayType;
              if(entry.HolidayDate.Equals(new DateTime()))
                  newRow[tblHolidayDetails.HOLIDAYDATE_FIELD] = DBNull.Value;
              else
                  newRow[tblHolidayDetails.HOLIDAYDATE_FIELD] = entry.HolidayDate;

          if(adding)
              return tblObj.AddToTable(newRow);
          else
              return tblObj.UpdateTable(newRow);
      }
      public static int Save(BOHolidayDetailsList entryList, bool adding)
      {
          tblHolidayDetails tblObj = new tblHolidayDetails();
          DataTable dt = tblObj.Table();
          int i = 0;

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

              newRow[tblHolidayDetails.HOLIDAYTYPE_FIELD] = entry.HolidayType;
          if(entry.HolidayDate.Equals(new DateTime()))
              newRow[tblHolidayDetails.HOLIDAYDATE_FIELD] = DBNull.Value;
          else
              newRow[tblHolidayDetails.HOLIDAYDATE_FIELD] = entry.HolidayDate;

              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);
      }