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

            if (rowsCount > 0)
            {
                MobileSoft.Model.System.Tb_System_Log model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.System.Tb_System_Log();
                    //model.LogCode=dt.Rows[n]["LogCode"].ToString();
                    model.ManagerCode = dt.Rows[n]["ManagerCode"].ToString();
                    model.LocationIP  = dt.Rows[n]["LocationIP"].ToString();
                    if (dt.Rows[n]["LogTime"].ToString() != "")
                    {
                        model.LogTime = DateTime.Parse(dt.Rows[n]["LogTime"].ToString());
                    }
                    model.PNodeName   = dt.Rows[n]["PNodeName"].ToString();
                    model.OperateName = dt.Rows[n]["OperateName"].ToString();
                    model.OperateURL  = dt.Rows[n]["OperateURL"].ToString();
                    model.Memo        = dt.Rows[n]["Memo"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemple #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.System.Tb_System_Log model)
 {
     dal.Update(model);
 }
Exemple #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(MobileSoft.Model.System.Tb_System_Log model)
 {
     return(dal.Add(model));
 }