Esempio n. 1
0
        /// <summary>
        /// Query data list
        /// </summary>
        public static List <ColoPay.Model.SysManage.ErrorLog> DataTableToList(DataTable dt)
        {
            List <ColoPay.Model.SysManage.ErrorLog> modelList = new List <ColoPay.Model.SysManage.ErrorLog>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                ColoPay.Model.SysManage.ErrorLog model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new ColoPay.Model.SysManage.ErrorLog();
                    if (dt.Rows[n]["ID"].ToString() != "")
                    {
                        model.ID = int.Parse(dt.Rows[n]["ID"].ToString());
                    }
                    if (dt.Rows[n]["OPTime"].ToString() != "")
                    {
                        model.OPTime = DateTime.Parse(dt.Rows[n]["OPTime"].ToString());
                    }
                    model.Url        = dt.Rows[n]["Url"].ToString();
                    model.Loginfo    = dt.Rows[n]["Loginfo"].ToString();
                    model.StackTrace = dt.Rows[n]["StackTrace"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Esempio n. 2
0
 /// <summary>
 /// Update a record
 /// </summary>
 public static void Update(ColoPay.Model.SysManage.ErrorLog model)
 {
     dal.Update(model);
 }
Esempio n. 3
0
 /// <summary>
 /// Add a record
 /// </summary>
 public static int Add(ColoPay.Model.SysManage.ErrorLog model)
 {
     return(dal.Add(model));
 }