예제 #1
0
        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);
        }
예제 #2
0
 public void UpdateByDriverID(DriverInfo driverInfo)
 {
     DataAccess.UpdateByDriverID(driverInfo.DriverID, driverInfo.DriverCode, driverInfo.DriverName, driverInfo.DriverLicence, driverInfo.NRCNo, driverInfo.PhoneNo, driverInfo.Address);
 }
예제 #3
0
 public void Insert(DriverInfo driverInfo)
 {
     DataAccess.Insert(driverInfo.DriverID, driverInfo.DriverCode, driverInfo.DriverName, driverInfo.DriverLicence, driverInfo.NRCNo, driverInfo.PhoneNo, driverInfo.Address);
 }