示例#1
0
 static public void LogWebRequests(string webRequestKey, string webRequestMethod)
 {
     using (PhotoMixQuery query = new PhotoMixQuery("LogWebRequests", CommandType.StoredProcedure))
     {
         query.Parameters.Add("@WebRequestKey", SqlDbType.VarChar, 100).Value    = webRequestKey;
         query.Parameters.Add("@WebRequestMethod", SqlDbType.VarChar, 100).Value = (webRequestMethod.Length > 100) ? webRequestMethod.Substring(0, 100) : webRequestMethod;
         int rows = query.Execute();
     }
 }
示例#2
0
 static public void CreateLogEntry(string domainName, DateTime eventTime,
                                   EventId eventId, string eventText)
 {
     using (PhotoMixQuery query = new PhotoMixQuery("CreateLogEntry"))
     {
         query.Parameters.Add("@DomainName", SqlDbType.VarChar, 256).Value = domainName;
         query.Parameters.Add("@EventTime", SqlDbType.DateTime).Value      = eventTime;
         query.Parameters.Add("@EventId", SqlDbType.Int).Value             = (int)eventId;
         query.Parameters.Add("@EventText", SqlDbType.VarChar, 2048).Value = (eventText.Length > 2048) ? eventText.Substring(0, 2048) : eventText;
         int rows = query.Execute();
     }
 }