public static void AssignNotify(Guid newUserId, Guid? oldUserId, int leadId, string path)
		{
			AssignNotificationServiceClient client = null;

			try
			{
				client = new AssignNotificationServiceClient();

				client.AssignNotify(newUserId, oldUserId, leadId, path);
				client.Close();
			}
			catch (TimeoutException exception)
			{
				Guid guid = Logger.LogError(exception);

				if (client != null)
				{
					client.Abort();
				}
			}
			catch (CommunicationException exception)
			{
				Guid guid = Logger.LogError(exception);

				if (client != null)
				{
					client.Abort();
				}
			}
		}
Exemple #2
0
		public static void SendEmail(string text, string subject, string fromEmail, string cc, string bcc, string toEmail, string file)
		{
			AssignNotificationServiceClient client = null;

			try
			{
				client = new AssignNotificationServiceClient();
				client.SendEmail(text, subject, fromEmail, cc, bcc, toEmail, file);
				client.Close();
			}
			catch (TimeoutException exception)
			{
				Guid guid = Logger.LogError(exception);

				if (client != null)
				{
					client.Abort();
				}
			}
			catch (CommunicationException exception)
			{
				Guid guid = Logger.LogError(exception);

				if (client != null)
				{
					client.Abort();
				}
			}
		}
		public static bool RecoveryPassword(string userName, string email)
		{
			AssignNotificationServiceClient client = null;

			try
			{
				client = new AssignNotificationServiceClient();
				var isChange = client.ResoveryPassword(userName, email);
				client.Close();
				return isChange;
			}
			catch (TimeoutException exception)
			{
				Guid guid = Logger.LogError(exception);

				if (client != null)
				{
					client.Abort();
				}

				return false;
			}
			catch (CommunicationException exception)
			{
				Guid guid = Logger.LogError(exception);

				if (client != null)
				{
					client.Abort();
				}

				return false;
			}
		}