public void Update(LabTestResult result)
        {
            var adapter = new test_resultsTableAdapter();

            try
            {
                DataRow resRow;
                using (adapter)
                {
                    resRow = adapter.GetData().FirstOrDefault(res => res.test_result_id == result.ResultId);
                }
                if (resRow != null)
                {
                    resRow[2] = result.TestResults;
                    using (adapter)
                    {
                        adapter.Update(resRow);
                    }
                }
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        public LabTestResult GetById(int id)
        {
            var adapter = new test_resultsTableAdapter();

            try
            {
                using (adapter)
                {
                    var result = adapter.GetData().FirstOrDefault(res => res.test_result_id == id);
                    return(this.GetTestFromRow(result));
                }
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        public IList <LabTestResult> GetAll()
        {
            var testList = new List <LabTestResult>();
            var adapter  = new test_resultsTableAdapter();

            try
            {
                using (adapter)
                {
                    foreach (var row in adapter.GetData().Rows)
                    {
                        var test = this.GetTestFromRow((cs3230f16bDataSet.test_resultsRow)row);
                        testList.Add(test);
                    }
                }
                return(testList);
            }
            catch (Exception e)
            {
                throw e;
            }
        }