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

            if (rowsCount > 0)
            {
                MobileSoft.Model.SQMSys.Tb_Sys_Log model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.SQMSys.Tb_Sys_Log();
                    //model.LogCode=dt.Rows[n]["LogCode"].ToString();
                    if (dt.Rows[n]["StreetCode"].ToString() != "")
                    {
                        model.StreetCode = new Guid(dt.Rows[n]["StreetCode"].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);
        }
示例#2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.SQMSys.Tb_Sys_Log model)
 {
     dal.Update(model);
 }
示例#3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(MobileSoft.Model.SQMSys.Tb_Sys_Log model)
 {
     return(dal.Add(model));
 }