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

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