public int themTuyen(TuyenXe tx) { foreach (DataRow row in dao.LoadTram(tx.Tram1).Rows) { tx.Tram1 = row["ID_Tram"].ToString(); } foreach (DataRow row2 in dao.LoadTram(tx.Tram2).Rows) { tx.Tram2 = row2["ID_Tram"].ToString(); } return(dao.ThemTuyen(tx)); }