public List <nhacungcapDTO> timkiem(String noidung) { List <nhacungcapDTO> listncc = new List <nhacungcapDTO>(); String query = String.Format("select * from nhacungcap where mancc like '%{0}%' or tenncc like '%{0}%'", noidung); DataTable data = new DataTable(); data = SQLconnect.Instance.ExecuteQuery(query); foreach (DataRow item in data.Rows) { nhacungcapDTO ncc = new nhacungcapDTO(item); listncc.Add(ncc); } return(listncc); }
public List <nhacungcapDTO> shownhacc() { List <nhacungcapDTO> listncc = new List <nhacungcapDTO>(); String query = "select * from nhacungcap"; DataTable data = new DataTable(); data = SQLconnect.Instance.ExecuteQuery(query); foreach (DataRow item in data.Rows) { nhacungcapDTO ncc = new nhacungcapDTO(item); listncc.Add(ncc); } return(listncc); }