示例#1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Maticsoft.Model.CMS_ActionLog> DataTableToList(DataTable dt)
        {
            List <Maticsoft.Model.CMS_ActionLog> modelList = new List <Maticsoft.Model.CMS_ActionLog>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                Maticsoft.Model.CMS_ActionLog model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Maticsoft.Model.CMS_ActionLog();
                    if (dt.Rows[n]["Id"].ToString() != "")
                    {
                        model.Id = int.Parse(dt.Rows[n]["Id"].ToString());
                    }
                    model.Name        = dt.Rows[n]["Name"].ToString();
                    model.Description = dt.Rows[n]["Description"].ToString();
                    model.Time        = dt.Rows[n]["Time"].ToString();
                    model.Type        = dt.Rows[n]["Type"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
示例#2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Maticsoft.Model.CMS_ActionLog model)
 {
     return(dal.Update(model));
 }
示例#3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(Maticsoft.Model.CMS_ActionLog model)
 {
     return(dal.Add(model));
 }