Beispiel #1
0
        public void AddLog(int ChangeType, string data, string strKey, string strIdentifier)
        {
            LogQueue_Model m = new LogQueue_Model();

            m.strdata    = data;
            m.ChangeType = ChangeType;
            m.Identifier = strIdentifier;
            m.Key        = strKey;
            DBSynLog.AddLog(m);
        }
Beispiel #2
0
        public static bool AddLog(LogQueue_Model model)
        {
            string sql = @"if object_id(N'TAB_Sync_LogQueue',N'U') is not null
                            insert into TAB_Sync_LogQueue(ChangeType,Identifier,[Key],data) values(@ChangeType,@Identifier,@Key,@data);";

            model.data = Encoding.UTF8.GetBytes(model.strdata);
            using (var conn = GetConnection())
            {
                return(conn.Execute(sql, model) > 0);
            }
        }