public PromotionResult ClaimWorkListItem(string userId) { PromotionResult promotionResult = WorkListBusinessRules.CanClaimWorkListItem(userId); if (!promotionResult.Success) { Log4NetHelper.Log(promotionResult.Message, LogLevel.WARN, EntityFormalNamePlural, WidgetId, HttpContext.Current.User.Identity.Name, null); return(promotionResult); } switch (WidgetStatus) { case WidgetStatus.Created: promotionResult = PromoteToIntegrating(); break; case WidgetStatus.Integrated: promotionResult = PromoteToApproving(); break; } if (promotionResult.Success) { CurrentWorkerId = userId; } Log4NetHelper.Log(promotionResult.Message, LogLevel.INFO, EntityFormalNamePlural, WidgetId, HttpContext.Current.User.Identity.Name, null); return(promotionResult); }
public PromotionResult ClaimWorkListItem(string userId) { PromotionResult promotionResult = WorkListBusinessRules.CanClaimWorkListItem(userId); if (!promotionResult.Success) { return(promotionResult); } switch (WorkOrderStatus) { case WorkOrderStatus.Rejected: promotionResult = PromoteToProcessing(); break; case WorkOrderStatus.Created: promotionResult = PromoteToProcessing(); break; case WorkOrderStatus.Processed: promotionResult = PromoteToCertifying(); break; case WorkOrderStatus.Certified: promotionResult = PromoteToApproving(); break; } if (promotionResult.Success) { CurrentWorkerId = userId; } Log4NetHelper.Log(promotionResult.Message, LogLevel.INFO, EntityFormalNamePlural, Id, HttpContext.Current.User.Identity.Name, null); return(promotionResult); }