Esempio n. 1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Jium.Model.product> DataTableToList(DataTable dt)
        {
            List <Jium.Model.product> modelList = new List <Jium.Model.product>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                Jium.Model.product model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = dal.DataRowToModel(dt.Rows[n]);
                    if (model != null)
                    {
                        modelList.Add(model);
                    }
                }
            }
            return(modelList);
        }