public int GetuncheckbillbyIdRom(int id) { DataTable data = DBconection.Instrance.ExecuteQuery("SELECT * FROM dbo.HoaDon WHERE id=" + id + " AND TrangThai='chua thanh toan'"); if (data.Rows.Count > 0) { Hoadon_BUS hd = new Hoadon_BUS(data.Rows[0]); return(hd.Idhoadon); } return(-1); }
public List <Hoadon_BUS> getlistClient() { List <Hoadon_BUS> list = new List <Hoadon_BUS>(); DataTable data = DBconection.Instrance.ExecuteQuery("SELECT * FROM hoadon"); foreach (DataRow item in data.Rows) { Hoadon_BUS p = new Hoadon_BUS(item); list.Add(p); } return(list); }