Esempio n. 1
0
        private List <BusinessDebug> DataTable2BusinessDebugs(DataTable dt)
        {
            List <BusinessDebug> list = new List <BusinessDebug>();

            foreach (DataRow dr in dt.Rows)
            {
                BusinessDebug debug = DataRow2BusinessDebug(dr);
                list.Add(debug);
            }
            return(list);
        }
Esempio n. 2
0
        private BusinessDebug DataRow2BusinessDebug(DataRow dr)
        {
            BusinessDebug debug = new BusinessDebug();

            debug.DebugID       = dr["DebugID"].ToInt64();
            debug.SystemName    = dr["SystemName"].ToString();
            debug.ModuleName    = dr["ModuleName"].ToString();
            debug.CategoryName  = dr["CategoryName"].ToString();
            debug.DebugMessage  = dr["DebugMessage"].ToString();
            debug.DebugText     = dr["DebugText"].ToString();
            debug.DebugDateTime = dr["DebugDateTime"].ToDateTime();
            return(debug);
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                long debugID = this.Request.QueryString["ID"].ToInt64();

                IDebugManager debugger = DebugManagerFactory.CreateDebugManager("");
                BusinessDebug debug    = debugger.GetDebug(debugID);

                if (debug == null)
                {
                    this.ResponseRedirect("访问的数据不存在!错误代码:001");
                    return;
                }

                List <IDataItem> list = debug.ToDataItem();
                this.SetControlValue(list);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 添加调试信息
        /// </summary>
        /// <param name="businessDebug">调试信息</param>
        /// <returns>返回调试信息</returns>
        public BusinessDebug AddDebug(BusinessDebug businessDebug)
        {
            SqlParameterCollection spc = DB.CreateSqlParameterCollection();

            spc.Add("@SystemName", businessDebug.SystemName);
            spc.Add("@ModuleName", businessDebug.ModuleName);
            spc.Add("@CategoryName", businessDebug.CategoryName);
            spc.Add("@DebugMessage", businessDebug.DebugMessage);
            spc.Add("@DebugText", businessDebug.DebugText);

            businessDebug.DebugDateTime = DateTime.Now;

            spc.Add("@DebugDateTime", businessDebug.DebugDateTime);

            string sql = "insert into g_BusinessDebug(SystemName, ModuleName, CategoryName, DebugMessage, DebugText, DebugDateTime)"
                         + "values(@SystemName, @ModuleName, @CategoryName, @DebugMessage, @DebugText, @DebugDateTime)";

            DB.ExecuteNonQuerySql(sql, spc);

            businessDebug.DebugID = DB.ExeSqlForObject("select max(DebugID) from g_BusinessDebug", null).ToInt64();
            return(businessDebug);
        }