示例#1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <MesWeb.Model.Procedure> DataTableToList(DataTable dt)
        {
            List <MesWeb.Model.Procedure> modelList = new List <MesWeb.Model.Procedure>();
            int rowsCount = dt.Rows.Count;

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