예제 #1
0
		static LogEventType()
		{
			ADD = new LogEventType() { Name = "ADD" };
			MODIFY = new LogEventType() { Name = "MODIFY" };
			LOGIN = new LogEventType() { Name = "LOGIN" };
			DELETE = new LogEventType() { Name = "DELETE" };
			COPY = new LogEventType() { Name = "COPY" };
			EXPORT = new LogEventType() { Name = "EXPORT" };
			LOAD = new LogEventType() { Name = "LOAD" };
			RESET = new LogEventType() { Name = "RESET" };
			LOGOUT = new LogEventType() { Name = "LOGOUT" };
			SEARCH = new LogEventType() { Name = "SEARCH" };
		}
예제 #2
0
		/// <summary>
		/// Given a log section and log event type, returns vicidial's event_code values.  For each combination of event_section and event_type, vicidial stores
		/// a composite string into event_code field of log.  To avoid having to enter these event_code values manually, this method provides such a string
		/// for 99% of the combinations.<br/>
		/// <br/>
		/// For example, campaign clone has event_section='CAMPAIGN', event_type='COPY', and event_code='ADMIN COYP CAMPAIGN' (typo is correct)<br/>
		/// <br/>
		/// When using the AddLog method, the developer can optionally pass NULL on the event_code and the this value will be generated automatically.<br/>
		/// <br/>
		/// In once instance, adding a DNC to campaign, metadata is included in the event_code, such as adding number to a campaign dnc list.
		/// <br/>
		/// The log has event_section='CAMPAIGN', event_type='ADD', and event_code='ADMIN ADD NUMBER TO CAMPAIGN DNC LIST 10003'.
		/// In this case, the Vicidial.Data developer should pass an explicit value for event_code when calling AddLog(...) method to remain consistent.
		/// 
		/// </summary>
		/// <param name="section"></param>
		/// <param name="type"></param>
		/// <returns></returns>
		public string GetEventCode(LogEventSection section, LogEventType type)
		{
			string key = String.Format("{0}_{1}", section.Name, type.Name);
			if (_logEventCodes.ContainsKey(key))
				return _logEventCodes[key];

			return String.Empty;

		}