private void btnSearch_Click(object sender, EventArgs e)
        {
            var en = new UpdateTestEntity();
            var re = new UpdateTestRepo();

            en.PatientName = txtName.Text;
            en.TestId      = txtTestNo.Text;
            en.Date        = dtpDate.Value.ToString("yyyy-MM-dd");

            re.Search(mgvUpdateTest, en);
        }
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Are you sure?", "Confirmation", MessageBoxButtons.YesNo) == DialogResult.No)
            {
                return;
            }
            else
            {
                var en = new UpdateTestEntity();
                var re = new UpdateTestRepo();

                en.TestId = mgvUpdateTest.CurrentRow.Cells["id"].Value.ToString();

                re.Delete(en);
                re.LoadAll(mgvUpdateTest);
            }
        }
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Are you sure?", "Confirmation", MessageBoxButtons.YesNo) == DialogResult.No)
            {
                return;
            }
            else
            {
                var en = new UpdateTestEntity();
                var re = new UpdateTestRepo();

                en.TestId      = mgvUpdateTest.CurrentRow.Cells["id"].Value.ToString();
                en.PatientName = mgvUpdateTest.CurrentRow.Cells["name"].Value.ToString();
                en.Age         = int.Parse(mgvUpdateTest.CurrentRow.Cells["age"].Value.ToString());
                en.Sex         = mgvUpdateTest.CurrentRow.Cells["sex"].Value.ToString();
                en.Reference   = mgvUpdateTest.CurrentRow.Cells["reference"].Value.ToString();
                en.Date        = DateTime.Parse(mgvUpdateTest.CurrentRow.Cells["date"].Value.ToString()).ToString("yyyy-MM-dd");

                re.Update(en, mgvUpdateTest);
            }
        }