private void btnSearch_Click(object sender, EventArgs e) { var en = new ManageReceptionistEntity(); var re = new ManageReceptionistRepo(); en.Id = txtId.Text; en.Name = txtName.Text; en.Phone = txtPhone.Text; re.Search(en, mgvReceptionist); mgvReceptionist.ClearSelection(); }
private void btnRupdate_Click(object sender, EventArgs e) { if (MessageBox.Show("Are you sure?", "Confirmation", MessageBoxButtons.YesNo) == DialogResult.No) { return; } else { var en = new ManageReceptionistEntity(); var re = new ManageReceptionistRepo(); en.Id = txtRid.Text; en.Name = txtRname.Text; en.Age = txtRage.Text; en.Sex = txtRsex.Text; en.Reference = txtRreference.Text; en.Address = txtRaddress.Text; en.Phone = txtRphone.Text; re.Update(en); } }