Exemple #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <GZS.Model.Menu.SystemTemTabM> DataTableToList(DataTable dt)
        {
            List <GZS.Model.Menu.SystemTemTabM> modelList = new List <GZS.Model.Menu.SystemTemTabM>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                GZS.Model.Menu.SystemTemTabM model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new GZS.Model.Menu.SystemTemTabM();
                    if (dt.Rows[n]["userid"].ToString() != "")
                    {
                        model.userid = int.Parse(dt.Rows[n]["userid"].ToString());
                    }
                    model.levelName = dt.Rows[n]["levelName"].ToString();
                    model.menuCode  = dt.Rows[n]["menuCode"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemple #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(GZS.Model.Menu.SystemTemTabM model)
 {
     return(dal.Update(model));
 }
Exemple #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(GZS.Model.Menu.SystemTemTabM model)
 {
     return(dal.Add(model));
 }