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

            if (rowsCount > 0)
            {
                MobileSoft.Model.System.Tb_System_Error model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.System.Tb_System_Error();
                    if (dt.Rows[n]["ErrorCode"].ToString() != "")
                    {
                        model.ErrorCode = new Guid(dt.Rows[n]["ErrorCode"].ToString());
                    }
                    if (dt.Rows[n]["ErrorTime"].ToString() != "")
                    {
                        model.ErrorTime = DateTime.Parse(dt.Rows[n]["ErrorTime"].ToString());
                    }
                    model.ErrorURL     = dt.Rows[n]["ErrorURL"].ToString();
                    model.ErrorSource  = dt.Rows[n]["ErrorSource"].ToString();
                    model.ErrorMessage = dt.Rows[n]["ErrorMessage"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Example #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.System.Tb_System_Error model)
 {
     dal.Update(model);
 }
Example #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(MobileSoft.Model.System.Tb_System_Error model)
 {
     dal.Add(model);
 }