Пример #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <RoleEntity> DataTableToList(DataTable dt)
        {
            List <RoleEntity> modelList = new List <RoleEntity>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                RoleEntity model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = dal.DataRowToModel(dt.Rows[n]);
                    if (model != null)
                    {
                        modelList.Add(model);
                    }
                }
            }
            return(modelList);
        }
Пример #2
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public BWJS.Model.Role DataRowToModel(DataRow row)
 {
     return(dal.DataRowToModel(row));
 }