Example #1
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            var en = new DoctorAppoinmentEntity();
            var re = new DoctorAppoinmentRepo();

            en.Name   = txtName.Text;
            en.Id     = txtId.Text;
            en.Date   = dtpDate.Value.ToString("yyyy-MM-dd");
            en.Doctor = txtDoctorName.Text;

            re.Search(en, mgvAppointment);
        }
Example #2
0
        public void Search(DoctorAppoinmentEntity en, MetroGrid grid)
        {
            var sql = "select id,name,age,sex,date,time from appointment where id = '" + en.Id + "' or name = '" + en.Name + "' or date = '" + en.Date + "' or doctor ='" + en.Doctor + "'";

            DataAccess.PopulateGridView(grid, sql);
        }