예제 #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <HXD.MS.Entity.UserRole> DataTableToList(DataTable dt)
        {
            List <HXD.MS.Entity.UserRole> modelList = new List <HXD.MS.Entity.UserRole>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                HXD.MS.Entity.UserRole 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.UserRole DataRowToModel(DataRow row)
 {
     return(dal.DataRowToModel(row));
 }