예제 #1
0
        public static Employee GetDataEmployeeToExcel(OleDbDataReader reader)
        {
            Employee emp = new Employee();

            emp.EmployeeID   = MyConvert.ToInt32(reader["EmployeeID"].ToString());
            emp.EmployeeName = MyConvert.ToString(reader["Name"].ToString());
            emp.HireDate     = MyConvert.ToDateTime(reader["HireDate"].ToString());
            emp.BirthDate    = MyConvert.ToDateTime(reader["BirthDate"].ToString());
            emp.Address      = MyConvert.ToString(reader["Address"].ToString());
            emp.PostalCode   = MyConvert.ToString(reader["PostalCode"].ToString());
            emp.Country      = MyConvert.ToString(reader["Country"].ToString());
            emp.HomePhone    = MyConvert.ToString(reader["HomePhone"].ToString());
            return(emp);
        }
예제 #2
0
        public static Order GetDataOrderToExcel(OleDbDataReader reader)
        {
            Order od = new Order();

            od.OrderID        = MyConvert.ToInt32(reader["OrderID"]);
            od.CustomerID     = MyConvert.ToString(reader["CustomerID"]);
            od.EmployeeID     = MyConvert.ToInt32(reader["EmployeeID"]);
            od.OrderDate      = MyConvert.ToDateTime(reader["OrderDate"]);
            od.RequiredDate   = MyConvert.ToDateTime(reader["RequiredDate"]);
            od.ShippedDate    = MyConvert.ToDateTime(reader["ShippedDate"]);
            od.Freight        = MyConvert.ToDouble(reader["Freight"]);
            od.ShipAddress    = MyConvert.ToString(reader["ShipAddress"]);
            od.ShipPostalCode = MyConvert.ToString(reader["ShipPostalCode"]);
            od.Status         = MyConvert.ToString(reader["Status"]);
            return(od);
        }