Exemplo n.º 1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <MobileSoft.Model.System.Tb_System_RolePope> DataTableToList(DataTable dt)
        {
            List <MobileSoft.Model.System.Tb_System_RolePope> modelList = new List <MobileSoft.Model.System.Tb_System_RolePope>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                MobileSoft.Model.System.Tb_System_RolePope model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.System.Tb_System_RolePope();
                    //model.IID=dt.Rows[n]["IID"].ToString();
                    model.PNodeCode = dt.Rows[n]["PNodeCode"].ToString();
                    model.RoleCode  = dt.Rows[n]["RoleCode"].ToString();
                    model.Functions = dt.Rows[n]["Functions"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.System.Tb_System_RolePope model)
 {
     dal.Update(model);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(MobileSoft.Model.System.Tb_System_RolePope model)
 {
     return(dal.Add(model));
 }