1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
public int RaiseCloseDemandAdminEvent(Guid instanceId)
{
//// Raise the event to the workflow
ThreadPool.QueueUserWorkItem(JustCloseTheDemandAdmin,
new DemandeEvolutionEventArgs(instanceId, "Jim"));
}
public void JustCloseTheDemandAdmin(object o)
{
DemandeEvolutionEventArgs args = o as DemandeEvolutionEventArgs;
if (DemandAdminClosed != null)
DemandAdminClosed(null, args);
}
void IWorkflowService.CloseDemandAdmin(Guid ticketID,string username)
{
// Update ticket on the DB
clsUser currentUser = new clsUser();
currentUser.Login = username;
currentUser.Type = "Admin";
if (currentUser.IsRegitered() == 0)
currentUser.Insert();
WorkflowHelpers.ExaminateTicketAdmin(WorkflowEnvironment.WorkflowInstanceId.ToString(), username);
WorkflowHelpers.UpdateTicket(WorkflowEnvironment.WorkflowInstanceId.ToString(), TicketStatus.Closed);
} |
Partager