public DriverCollections SelectList() { DriverCollections collection = new DriverCollections(); IDataReader Reader = DataAccess.SelectList(); while (Reader.Read()) { DriverInfo driverinfo = new DriverInfo(); driverinfo.DriverID = Convert.ToString(Reader["DriverID"]); driverinfo.DriverCode = Convert.ToString(Reader["DriverCode"]); driverinfo.DriverName = Convert.ToString(Reader["DriverName"]); driverinfo.DriverLicence = Convert.ToString(Reader["DriverLicence"]); driverinfo.NRCNo = Convert.ToString(Reader["NRCNo"]); driverinfo.PhoneNo = Convert.ToString(Reader["PhoneNo"]); driverinfo.Address = Convert.ToString(Reader["Address"]); collection.Add(driverinfo); } Reader.Close(); return(collection); }
public void UpdateByDriverID(DriverInfo driverInfo) { DataAccess.UpdateByDriverID(driverInfo.DriverID, driverInfo.DriverCode, driverInfo.DriverName, driverInfo.DriverLicence, driverInfo.NRCNo, driverInfo.PhoneNo, driverInfo.Address); }
public void Insert(DriverInfo driverInfo) { DataAccess.Insert(driverInfo.DriverID, driverInfo.DriverCode, driverInfo.DriverName, driverInfo.DriverLicence, driverInfo.NRCNo, driverInfo.PhoneNo, driverInfo.Address); }