public static Product GetDataProductToExcel(OleDbDataReader reader) { Product pro = new Product(); pro.ProductID = MyConvert.ToInt32(reader["ProductID"]); pro.ProductName = MyConvert.ToString(reader["ProductName"]); pro.SupplierID = MyConvert.ToInt32(reader["SupplierID"]); pro.QuantityPerUnit = MyConvert.ToString(reader["ProductName"]); pro.UnitPrice = MyConvert.ToDouble(reader["UnitPrice"]); pro.UnitsInStock = MyConvert.ToInt16(reader["UnitsInStock"]); pro.UnitsOnOrder = MyConvert.ToInt16(reader["UnitsOnOrder"]); pro.Discontinued = MyConvert.ToBool(reader["Discontinued"]); return(pro); }