public static OrderDetail GetDataOrderDetailToExcel(OleDbDataReader reader) { OrderDetail odd = new OrderDetail(); odd.OrderID = MyConvert.ToInt32(reader["OrderID"]); odd.ProductID = MyConvert.ToInt32(reader["ProductID"]); odd.UnitPrice = MyConvert.ToDouble(reader["UnitPrice"]); odd.Quantity = MyConvert.ToInt16(reader["Quantity"]); odd.Discount = MyConvert.ToInt32(reader["Discount"]); return(odd); }
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); }