public bool IsUserNameExist(string Name) { var isExist = false; var user = _medicineRepository.GetByName(Name); if (user != null) { isExist = true; } return(isExist); }
private void btnSearch_Click(object sender, EventArgs e) { bindingSource1.DataSource = reposioryMedicine.GetByName(txtTenThuoc.Text.Trim()); }