using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlServerCe;
using SinosysHardware.DataAccess;

namespace SinosysHardware.Business
{
    class OrderDetailsDB
    {
       
        /// <summary>
        /// Retrieve a Collection of OrderDetails objects
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        public  DataSet GetOrderDetails(int orderId)
        {
            string Sql = "SELECT OrderId, OrderDetailId, InventoryId, Quantity " +
                               "FROM OrderDetails " +
                               "WHERE OrderId = @OrderId";
            SqlCeParameter paras = new SqlCeParameter("@OrderId", orderId);
            HelperDB hdb=new HelperDB();
            DataSet Ds = hdb.GetDataSet(Sql, "OrderDetails", paras);
            return Ds;
           
        }
    }
}
