Ejemplo n.º 1
0
        public static GenericSvcResult SuspendService(int serviceId, bool sendEmail)
        {
            GenericSvcResult result = new GenericSvcResult();

            try
            {
                Service svc = GetRawCustomerService(serviceId);
                //
                ES.TaskManager.StartTask(SystemTasks.SOURCE_SPF, SystemTasks.SVC_SUSPEND);
                ES.TaskManager.WriteParameter("Service", svc.ServiceName);
                //
                SuspendOverdueInvoicesTask task = new SuspendOverdueInvoicesTask();
                // obtain result
                result = task.SuspendService(serviceId, sendEmail);
            }
            catch (Exception ex)
            {
                ES.TaskManager.WriteError(ex);
            }
            finally
            {
                ES.TaskManager.CompleteTask();
            }
            //
            return(result);
        }
Ejemplo n.º 2
0
		public static GenericSvcResult SuspendService(int serviceId, bool sendEmail)
		{
			GenericSvcResult result = new GenericSvcResult();

			try
			{
				Service svc = GetRawCustomerService(serviceId);
				//
				ES.TaskManager.StartTask(SystemTasks.SOURCE_SPF, SystemTasks.SVC_SUSPEND);
				ES.TaskManager.WriteParameter("Service", svc.ServiceName);
				//
				SuspendOverdueInvoicesTask task = new SuspendOverdueInvoicesTask();
				// obtain result
				result = task.SuspendService(serviceId, sendEmail);
			}
			catch (Exception ex)
			{
				ES.TaskManager.WriteError(ex);
			}
			finally
			{
				ES.TaskManager.CompleteTask();
			}
			//
			return result;
		}