Ejemplo n.º 1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <MobileSoft.Model.Unified.Tb_User_History> DataTableToList(DataTable dt)
        {
            List <MobileSoft.Model.Unified.Tb_User_History> modelList = new List <MobileSoft.Model.Unified.Tb_User_History>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                MobileSoft.Model.Unified.Tb_User_History model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model            = new MobileSoft.Model.Unified.Tb_User_History();
                    model.Id         = dt.Rows[n]["Id"].ToString();
                    model.UserId     = dt.Rows[n]["UserId"].ToString();
                    model.LogContent = dt.Rows[n]["LogContent"].ToString();
                    if (dt.Rows[n]["OprDate"].ToString() != "")
                    {
                        model.OprDate = DateTime.Parse(dt.Rows[n]["OprDate"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.Unified.Tb_User_History model)
 {
     dal.Update(model);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(MobileSoft.Model.Unified.Tb_User_History model)
 {
     dal.Add(model);
 }