private void onSubmit_Click(object sender, EventArgs e)
        {
            SightingHistoryProcessing sightings = new SightingHistoryProcessing(connection);
            //string thestart = StartDate.Value.ToShortDateString();
            string thestart = StartDate.Value.Year + "-" + StartDate.Value.Month + "-" + StartDate.Value.Day;
            string theEnd = EndDate.Value.Year + "-" + EndDate.Value.Month + "-" + EndDate.Value.Day;

            //check if all three are checked
            if(ByDate.Checked && Tag.Checked && NoTag.Checked)
            {
                //using query get by interval
                sightinghistorygrid.Rows.Clear();
                sightinghistorygrid.Refresh();

                List<TrackingEntry> dateTagNoTag = new List<TrackingEntry>();
                dateTagNoTag = sightings.filterTagDate(thestart, theEnd);

                if(dateTagNoTag == null)
                {
                    MessageBox.Show("No Records found", "Sighting History");
                    return;
                }

                foreach(var item in dateTagNoTag)
                {
                    int index = sightinghistorygrid.Rows.Add();
                    DataGridViewRow row = sightinghistorygrid.Rows[index];
                    row.Cells["Column1"].Value = item.species;
                    row.Cells["Column2"].Value = item.tagNumber;
                    row.Cells["Column3"].Value = item.entryDate;
                    row.Cells["Column4"].Value = item.taggerName;
                    row.Cells["Column5"].Value = item.taggerID;

                }

            }
            //check if tag and no tag is checked - NO date
            else if(Tag.Checked && NoTag.Checked && !ByDate.Checked)
            {
                //using query getall
                sightinghistorygrid.Rows.Clear();
                sightinghistorygrid.Refresh();

                List<TrackingEntry> TagNoTag = new List<TrackingEntry>();
                TagNoTag = sightings.filterTagNoTag();

                if (TagNoTag == null)
                {
                    MessageBox.Show("No Records found", "Sighting History");
                    return;
                }

                foreach (var item in TagNoTag)
                {
                    int index = sightinghistorygrid.Rows.Add();
                    DataGridViewRow row = sightinghistorygrid.Rows[index];
                    row.Cells["Column1"].Value = item.species;
                    row.Cells["Column2"].Value = item.tagNumber;
                    row.Cells["Column3"].Value = item.entryDate;
                    row.Cells["Column4"].Value = item.taggerName;
                    row.Cells["Column5"].Value = item.taggerID;

                }
            }
            //check if date and tag are checked
            else if (Tag.Checked && ByDate.Checked && !NoTag.Checked)
            {
                sightinghistorygrid.Rows.Clear();
                sightinghistorygrid.Refresh();

                List<TrackingEntry> dateTag = new List<TrackingEntry>();
                dateTag = sightings.filterTagDate(thestart, theEnd);

                if (dateTag == null)
                {
                    MessageBox.Show("No Records found", "Sighting History");
                    return;
                }

                foreach (var item in dateTag)
                {
                    int index = sightinghistorygrid.Rows.Add();
                    DataGridViewRow row = sightinghistorygrid.Rows[index];
                    row.Cells["Column1"].Value = item.species;
                    row.Cells["Column2"].Value = item.tagNumber;
                    row.Cells["Column3"].Value = item.entryDate;
                    row.Cells["Column4"].Value = item.taggerName;
                    row.Cells["Column5"].Value = item.taggerID;

                }

            }
            //check if date and no tag are checked
            else if (NoTag.Checked && ByDate.Checked && !Tag.Checked)
            {
                sightinghistorygrid.Rows.Clear();
                sightinghistorygrid.Refresh();
                List<TrackingEntry> dateNoTag = new List<TrackingEntry>();
                dateNoTag = sightings.filterNoTagDate(thestart, theEnd);

                if (dateNoTag == null)
                {
                    MessageBox.Show("No Records found", "Sighting History");
                    return;
                }

                foreach (var item in dateNoTag)
                {
                    int index = sightinghistorygrid.Rows.Add();
                    DataGridViewRow row = sightinghistorygrid.Rows[index];
                    row.Cells["Column1"].Value = item.species;
                    row.Cells["Column2"].Value = item.tagNumber;
                    row.Cells["Column3"].Value = item.entryDate;
                    row.Cells["Column4"].Value = item.taggerName;
                    row.Cells["Column5"].Value = item.taggerID;

                }
            }
            //check if only date checked
            if (ByDate.Checked)
            {
                sightinghistorygrid.Rows.Clear();
                sightinghistorygrid.Refresh();
                List<TrackingEntry> datelist = new List<TrackingEntry>();

                datelist = sightings.filterByDate(thestart, theEnd);

                if (datelist == null)
                {
                    MessageBox.Show("No Records found", "Sighting History");
                    return;
                }

                foreach (TrackingEntry item in datelist)
                {
                    int index = sightinghistorygrid.Rows.Add();
                    DataGridViewRow row = sightinghistorygrid.Rows[index];
                    row.Cells["Column1"].Value = item.species;
                    row.Cells["Column2"].Value = item.tagNumber;
                    row.Cells["Column3"].Value = item.entryDate;
                    row.Cells["Column4"].Value = item.taggerName;
                    row.Cells["Column5"].Value = item.taggerID;

                }
            }
            //check if tag checked
            else if (Tag.Checked && !ByDate.Checked && !NoTag.Checked)
            {
                sightinghistorygrid.Rows.Clear();
                sightinghistorygrid.Refresh();

                List<TrackingEntry> taggedlist = new List<TrackingEntry>();

                taggedlist = sightings.filterByTag();

                if (taggedlist == null)
                {
                    MessageBox.Show("No Records found", "Sighting History");
                    return;
                }

                foreach (TrackingEntry item in taggedlist)
                {
                    int index = sightinghistorygrid.Rows.Add();
                    DataGridViewRow row = sightinghistorygrid.Rows[index];
                    row.Cells["Column1"].Value = item.species;
                    row.Cells["Column2"].Value = item.tagNumber;
                    row.Cells["Column3"].Value = item.entryDate;
                    row.Cells["Column4"].Value = item.taggerName;
                    row.Cells["Column5"].Value = item.taggerID;

                }
            }
            //check if no tag checked
            else if (NoTag.Checked && !ByDate.Checked && !Tag.Checked)
            {
                sightinghistorygrid.Rows.Clear();
                sightinghistorygrid.Refresh();
                List<TrackingEntry> notaglist = new List<TrackingEntry>();

                notaglist = sightings.filterByNoTag();

                if (notaglist == null)
                {
                    MessageBox.Show("No Records found", "Sighting History");
                    return;
                }
                foreach (TrackingEntry item in notaglist)
                {
                    int index = sightinghistorygrid.Rows.Add();
                    DataGridViewRow row = sightinghistorygrid.Rows[index];
                    row.Cells["Column1"].Value = item.species;
                    row.Cells["Column2"].Value = item.tagNumber;
                    row.Cells["Column3"].Value = item.entryDate;
                    row.Cells["Column4"].Value = item.taggerName;
                    row.Cells["Column5"].Value = item.taggerID;

                }
            }
        }