public ScheduleWF(IOrganizationService service, new_incidentservice target, new_incidentserviceparameter paramters, new_flightoccurrence orginalFlightOccurrence, IEmailTemplate iEmailTemplate) : base(service, target, paramters, orginalFlightOccurrence, iEmailTemplate) { }
public CashierWF(IOrganizationService service, new_incidentservice target, new_incidentserviceparameter paramters, new_flightoccurrence orginalFlightOccurrence, IEmailTemplate iEmailTemplate) : base(service, target, paramters, orginalFlightOccurrence, iEmailTemplate) { }
public void Excute(new_incidentservice new_incidentservice) { SubjectEmailSender email = new SubjectEmailSender(_service, new_incidentservice); HelperEvent helper = new HelperEvent(_service, new_incidentservice); var parameters = helper.GetParamters(); var originalFlight = helper.GetOriginalFlight(); var israelWF = new IsraelWF(_service, new_incidentservice, parameters, originalFlight, _wfemailTemp); var callCenterWF = new CallCenterWF(_service, new_incidentservice, parameters, originalFlight, _wfemailTemp); var cashierWF = new CashierWF(_service, new_incidentservice, parameters, originalFlight, _wfemailTemp); var groupWF = new GroupWF(_service, new_incidentservice, parameters, originalFlight, _wfemailTemp); var foodWF = new FoodWF(_service, new_incidentservice, parameters, originalFlight, _wfemailTemp); var customerRelationWF = new CustomerRelationWF(_service, new_incidentservice, parameters, originalFlight, _wfemailTemp); var scheduleWF = new ScheduleWF(_service, new_incidentservice, parameters, originalFlight, _wfemailTemp); var cargoWF = new CargoWF(_service, new_incidentservice, parameters, originalFlight, _wfemailTemp); var crewsWF = new CrewsWF(_service, new_incidentservice, parameters, originalFlight, _wfemailTemp); var sundorWF = new SundorWF(_service, new_incidentservice, parameters, originalFlight, _wfemailTemp); email.Attach(israelWF); email.Attach(callCenterWF); email.Attach(cashierWF); email.Attach(groupWF); email.Attach(foodWF); email.Attach(customerRelationWF); email.Attach(scheduleWF); email.Attach(cargoWF); email.Attach(crewsWF); email.Attach(sundorWF); email.SendEmailsToTeams(_userid); }
public Observer(IOrganizationService service, new_incidentservice target, new_incidentserviceparameter paramters, new_flightoccurrence orginalFlightOccurrence, IEmailTemplate configEmailTemplate) { _service = service; _target = target; _paramters = paramters; _orginalFlightOccurrence = orginalFlightOccurrence; _emailTemplate = configEmailTemplate; }
public OpenClosedCalculator(IOrganizationService service, new_incidentservice target, new_incidentservice preImage, new_incidentserviceparameter paramters) { _calcs = new List<ParticipantOnCalculator>(); _service = service; _target = target; _preImage = preImage; _paramters = paramters; _callCenterHelper = new CallCenterHelper(_paramters); _cashierHelper = new CashierHelper(_paramters); }
public OpenClosedCalculator(IOrganizationService service, new_incidentservice target, new_incidentservice preImage, new_incidentserviceparameter paramters) { _calcs = new List <ParticipantOnCalculator>(); _service = service; _target = target; _preImage = preImage; _paramters = paramters; _callCenterHelper = new CallCenterHelper(_paramters); _cashierHelper = new CashierHelper(_paramters); }
protected void ExecutePreCreate(LocalPluginContext localContext) { if (localContext == null) { throw new ArgumentNullException("localContext"); } IPluginExecutionContext context = localContext.PluginExecutionContext; Entity targetEntity = (Entity)context.InputParameters["Target"]; IncidentServiceEventCalc calc = new IncidentServiceEventCalc(localContext.OrganizationService, true); new_incidentservice new_servicecostTarget = targetEntity.ToEntity <Xrm.new_incidentservice>(); calc.CalcIncidentService(new_servicecostTarget, null); }
protected void ExecutePreUpdate(LocalPluginContext localContext) { if (localContext == null) { throw new ArgumentNullException("localContext"); } IPluginExecutionContext context = localContext.PluginExecutionContext; Entity targetEntity, preEntity; targetEntity = (Entity)context.InputParameters["Target"]; preEntity = (Entity)context.PreEntityImages[preImageAlias]; IncidentServiceEventCalc calc = new IncidentServiceEventCalc(localContext.OrganizationService, false); var new_servicecostTarget = targetEntity.ToEntity <Xrm.new_incidentservice>(); new_incidentservice new_servicecostImage = preEntity.ToEntity <Xrm.new_incidentservice>(); calc.CalcIncidentService(new_servicecostTarget, new_servicecostImage); }
public XrmCostTaxi(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public XrmCostArrivalFLT(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public SubjectEmailSender(IOrganizationService service, new_incidentservice target) { _observers = new List<Observer>(); _service = service; _target = target; }
public XrmCostIsraelStation(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public XrmCostHotMeal(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public XrmTotalCostMeals(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public XrmCostTOTALhotels(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public XrmTotalNumberOfcasesrelatedtotheFlight(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public XrmDecoratorV2(new_incidentservice new_incidentservice) { // _context = context; _new_incidentservice = new_incidentservice; }
public XrmCostTotalCallCenter(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public XrmCostCrews(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public XrmCostNightWithBreakfast(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public XrmCostNightSummerAndHolidays(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public SubjectEmailSender(IOrganizationService service, new_incidentservice target) { _observers = new List <Observer>(); _service = service; _target = target; }
public XrmCostGroundOperations(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public void CalcIncidentService(new_incidentservice target, new_incidentservice preImage) { var paramters = GetParamters(); CalcService calcService = new CalcService(_service, target, preImage, paramters); if (IsHasAleady(calcService)) { throw new InvalidPluginExecutionException("Service Event For This Flight Already Exist"); } // Israel Section // var costBreakfast = new CostBreakfast(calcService, 7, new XrmCostBreakfast(target)); var costCoffeeAndCake = new CostCoffeeAndCake(calcService, 8, new XrmCostCoffeeAndCake(target)); var costHotMeal = new CostHotMeal(calcService, 9, new XrmCostHotMeal(target)); var totalCostMeals = new TotalCostMeals(calcService, 10, new XrmTotalCostMeals(target)); var costbus = new CostBus(calcService, 11, new XrmCostBus(target)); var costtaxi = new CostTaxi(calcService, 12, new XrmCostTaxi(target)); var costTOTALtransportation = new CostTOTALtransportation(calcService, 13, new XrmCostTOTALtransportation(target)); var costNightMostOfTheYear = new CostNightMostOfTheYear(calcService, 14, new XrmCostNightMostOfTheYear(target)); var costNightSummerAndHolidays = new CostNightSummerAndHolidays(calcService, 15, new XrmCostNightSummerAndHolidays(target)); var costNightWithBreakfast = new CostNightWithBreakfast(calcService, 16, new XrmCostNightWithBreakfast(target)); var costNightWithLunch = new CostNightWithLunch(calcService, 17, new XrmCostNightWithLunch(target)); var costNightWithDinner = new CostNightWithDinner(calcService, 18, new XrmCostNightWithDinner(target)); var costTOTALhotels = new CostTOTALhotels(calcService, 19, new XrmCostTOTALhotels(target)); //calc var costIsraelStation = new CostIsraelStation(calcService, 20, new XrmCostIsraelStation(target));//calc // Call Center // var costTotalCost1 = new CostTotalCost1(calcService, 21, new XrmTotalCost1(target)); var costTotalCost2 = new CostTotalCost2(calcService, 22, new XrmTotalCost2(target)); var costTotalCost3 = new CostTotalCost3(calcService, 23, new XrmTotalCost3(target)); var costTotalCost4 = new CostTotalCost4(calcService, 24, new XrmTotalCost4(target)); var costTotalCost5 = new CostTotalCost5(calcService, 25, new XrmTotalCost5(target)); var costTotalCallCenter = new CostTotalCallCenter(calcService, 26, new XrmCostTotalCallCenter(target)); // Cashier // var costTotalCost6 = new CostTotalCost6(calcService, 27, new XrmTotalCost6(target)); var costTotalCost7 = new CostTotalCost7(calcService, 28, new XrmTotalCost7(target)); var costTotalCost8 = new CostTotalCost8(calcService, 29, new XrmTotalCost8(target)); var costTotalCost9 = new CostTotalCost9(calcService, 30, new XrmTotalCost9(target)); var costTotalCost10 = new CostTotalCost10(calcService, 31, new XrmTotalCost10(target)); var costTotalCostCashier = new CostTotalCostCashier(calcService, 32, new XrmCostTotalCostCashier(target)); //GroundOperation var costArrivalFLT = new CostArrivalFLT(calcService, 33, new XrmCostArrivalFLT(target)); var costDepartureFLT = new CostDepartureFLT(calcService, 34, new XrmCostDepartureFLT(target)); var costGroundOperations = new CostGroundOperations(calcService, 35, new XrmCostGroundOperations(target)); //CustomerRelations var costCompensations = new CostCompensations(calcService, 36, new XrmCostCompensations(target)); var costNumberOfPassengerCompensated = new CostNumberOfPassengerCompensated(calcService, 37, new XrmCostNumberOfPassengerCompensated(target)); var totalNumberOfcasesrelatedtotheFlight = new TotalNumberOfcasesrelatedtotheFlight(calcService, 38, new XrmTotalNumberOfcasesrelatedtotheFlight(target)); var costTotalPassengerflighttkt = new CostTotalPassengerflighttkt(calcService, 39, new XrmCostTotalPassengerflighttkt(target)); //Crews var costCrews = new CostCrews(calcService, 40, new XrmCostCrews(target)); //Sunder var costSunder = new CostSunder(calcService, 41, new XrmCostSunder(target)); //all var costForIncidentService = new CostForIncidentService(calcService, 100, new XrmCostForIncidentService(target)); totalCostMeals.AddDependency("CostBreakfast", costBreakfast).AddDependency("CostCoffeeAndCake", costCoffeeAndCake).AddDependency("CostHotMeal", costHotMeal); costTOTALtransportation.AddDependency("TotalBus", costbus).AddDependency("TotalTaxi", costtaxi); costIsraelStation.AddDependency("TOTALhotels", costTOTALhotels).AddDependency("TOTALtransportation", costTOTALtransportation); costTOTALhotels.AddDependency("TotalCostNightMostOfTheYear", costNightMostOfTheYear) .AddDependency("TotalCostNightSummerAndHolidays", costNightSummerAndHolidays) .AddDependency("TotalCostNightWithBreakfast", costNightWithBreakfast) .AddDependency("TotalCostNightWithLunch", costNightWithLunch) .AddDependency("TotalCostNightWithDinner", costNightWithDinner); costTotalCallCenter.AddDependency("TotalCost1", costTotalCost1) .AddDependency("TotalCost2", costTotalCost2) .AddDependency("TotalCost3", costTotalCost3) .AddDependency("TotalCost4", costTotalCost4) .AddDependency("TotalCost5", costTotalCost5); costTotalCostCashier.AddDependency("TotalCost6", costTotalCost6) .AddDependency("TotalCost7", costTotalCost7) .AddDependency("TotalCost8", costTotalCost8) .AddDependency("TotalCost9", costTotalCost9) .AddDependency("TotalCost10", costTotalCost10); costGroundOperations.AddDependency("TotalCostArrival", costArrivalFLT).AddDependency("TotalCostDepartureCost", costDepartureFLT); costForIncidentService.AddDependency("costIsraelStation", costIsraelStation) .AddDependency("costTotalCallCenter", costTotalCallCenter) .AddDependency("costTotalCostCashier", costTotalCostCashier) .AddDependency("costGroundOperations", costGroundOperations) .AddDependency("costCrews", costCrews) .AddDependency("costSunder", costSunder); //register israel section calcService.Register(costBreakfast); calcService.Register(costCoffeeAndCake); calcService.Register(costHotMeal); calcService.Register(totalCostMeals); calcService.Register(costbus); calcService.Register(costtaxi); //--- dependency--- calcService.Register(costTOTALtransportation); calcService.Register(costNightMostOfTheYear); calcService.Register(costNightSummerAndHolidays); calcService.Register(costNightWithBreakfast); calcService.Register(costNightWithLunch); calcService.Register(costNightWithDinner); //--- dependency--- calcService.Register(costTOTALhotels); //--- dependency--- calcService.Register(costIsraelStation); //register callcenter calcService.Register(costTotalCost1); calcService.Register(costTotalCost2); calcService.Register(costTotalCost3); calcService.Register(costTotalCost4); calcService.Register(costTotalCost5); //--- dependency--- calcService.Register(costTotalCallCenter); //register Cashier calcService.Register(costTotalCost6); calcService.Register(costTotalCost7); calcService.Register(costTotalCost8); calcService.Register(costTotalCost9); calcService.Register(costTotalCost10); //--- dependency--- calcService.Register(costTotalCostCashier); calcService.Register(costArrivalFLT); calcService.Register(costDepartureFLT); calcService.Register(costGroundOperations); calcService.Register(costCompensations); calcService.Register(costNumberOfPassengerCompensated); calcService.Register(totalNumberOfcasesrelatedtotheFlight); calcService.Register(costTotalPassengerflighttkt); calcService.Register(costCrews); calcService.Register(costSunder); calcService.Register(costForIncidentService); // calc all calcService.CalcAll(); }
public CalcService(IOrganizationService service, new_incidentservice target, new_incidentservice preImage, new_incidentserviceparameter paramters) : base(service, target, preImage, paramters) { }
public XrmCostSunder(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public XrmCostDepartureFLT(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public XrmCostNightMostOfTheYear(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public XrmCostTotalCostCashier(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public HelperEvent(IOrganizationService service, new_incidentservice target) { _service = service; _target = target; }
public XrmCostTotalPassengerflighttkt(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
public XrmCostTOTALtransportation(new_incidentservice new_incidentservice) : base(new_incidentservice) { }
/// <summary> /// Executes the workflow activity. /// </summary> /// <param name="executionContext">The execution context.</param> protected override void Execute(CodeActivityContext executionContext) { // Create the tracing service ITracingService tracingService = executionContext.GetExtension <ITracingService>(); if (tracingService == null) { throw new InvalidPluginExecutionException("Failed to retrieve tracing service."); } tracingService.Trace("Entered NewClaimCreateMailToLowsuit.Execute(), Activity Instance Id: {0}, Workflow Instance Id: {1}", executionContext.ActivityInstanceId, executionContext.WorkflowInstanceId); // Create the context IWorkflowContext context = executionContext.GetExtension <IWorkflowContext>(); if (context == null) { throw new InvalidPluginExecutionException("Failed to retrieve workflow context."); } tracingService.Trace("NewClaimCreateMailToLowsuit.Execute(), Correlation Id: {0}, Initiating User: {1}", context.CorrelationId, context.InitiatingUserId); IOrganizationServiceFactory serviceFactory = executionContext.GetExtension <IOrganizationServiceFactory>(); IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId); try { // TODO: Implement your custom Workflow business logic. Entity target = (Entity)context.InputParameters["Target"]; new_incidentservice new_incidentservice = target.ToEntity <new_incidentservice>(); SubjectEmailSender email = new SubjectEmailSender(service, new_incidentservice); HelperEvent helper = new HelperEvent(service, new_incidentservice); var parameters = helper.GetParamters(); var originalFlight = helper.GetOriginalFlight(); EntityReference emailTemplate = EmailTemplate.Get <EntityReference>(executionContext); EntityReference user = FromUser.Get <EntityReference>(executionContext); WFEmailTemplate wfemailTemp = new WFEmailTemplate(emailTemplate); var israelWF = new IsraelWF(service, new_incidentservice, parameters, originalFlight, wfemailTemp); var callCenterWF = new CallCenterWF(service, new_incidentservice, parameters, originalFlight, wfemailTemp); var cashierWF = new CashierWF(service, new_incidentservice, parameters, originalFlight, wfemailTemp); var groupWF = new GroupWF(service, new_incidentservice, parameters, originalFlight, wfemailTemp); var foodWF = new FoodWF(service, new_incidentservice, parameters, originalFlight, wfemailTemp); var customerRelationWF = new CustomerRelationWF(service, new_incidentservice, parameters, originalFlight, wfemailTemp); var scheduleWF = new ScheduleWF(service, new_incidentservice, parameters, originalFlight, wfemailTemp); var cargoWF = new CargoWF(service, new_incidentservice, parameters, originalFlight, wfemailTemp); var crewsWF = new CrewsWF(service, new_incidentservice, parameters, originalFlight, wfemailTemp); var sundorWF = new SundorWF(service, new_incidentservice, parameters, originalFlight, wfemailTemp); email.Attach(israelWF); email.Attach(callCenterWF); email.Attach(cashierWF); email.Attach(groupWF); email.Attach(foodWF); email.Attach(customerRelationWF); email.Attach(scheduleWF); email.Attach(cargoWF); email.Attach(crewsWF); email.Attach(sundorWF); email.SendEmailsToTeams(user.Id); } catch (FaultException <OrganizationServiceFault> e) { tracingService.Trace("Exception: {0}", e.ToString()); // Handle the exception. throw; } tracingService.Trace("Exiting NewClaimCreateMailToLowsuit.Execute(), Correlation Id: {0}", context.CorrelationId); }
public XrmCostCompensations(new_incidentservice new_incidentservice) : base(new_incidentservice) { }