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

            if (rowsCount > 0)
            {
                MobileSoft.Model.SQMSys.Tb_Sys_PowerNodeTemp model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model              = new MobileSoft.Model.SQMSys.Tb_Sys_PowerNodeTemp();
                    model.UserRoles    = dt.Rows[n]["UserRoles"].ToString();
                    model.PNodeCode    = dt.Rows[n]["PNodeCode"].ToString();
                    model.PNodeName    = dt.Rows[n]["PNodeName"].ToString();
                    model.URLPage      = dt.Rows[n]["URLPage"].ToString();
                    model.URLTarget    = dt.Rows[n]["URLTarget"].ToString();
                    model.BackTitleImg = dt.Rows[n]["BackTitleImg"].ToString();
                    model.Narrate      = dt.Rows[n]["Narrate"].ToString();
                    if (dt.Rows[n]["InPopedom"].ToString() != "")
                    {
                        model.InPopedom = int.Parse(dt.Rows[n]["InPopedom"].ToString());
                    }
                    model.Functions = dt.Rows[n]["Functions"].ToString();
                    if (dt.Rows[n]["NodeType"].ToString() != "")
                    {
                        model.NodeType = int.Parse(dt.Rows[n]["NodeType"].ToString());
                    }
                    if (dt.Rows[n]["PNodeSort"].ToString() != "")
                    {
                        model.PNodeSort = int.Parse(dt.Rows[n]["PNodeSort"].ToString());
                    }
                    if (dt.Rows[n]["IsDelete"].ToString() != "")
                    {
                        model.IsDelete = int.Parse(dt.Rows[n]["IsDelete"].ToString());
                    }
                    model.PrentPNodeCode = dt.Rows[n]["PrentPNodeCode"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
예제 #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.SQMSys.Tb_Sys_PowerNodeTemp model)
 {
     dal.Update(model);
 }
예제 #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(MobileSoft.Model.SQMSys.Tb_Sys_PowerNodeTemp model)
 {
     dal.Add(model);
 }