Exemple #1
0
        protected string ReturnIslWeekDayAndDDMM(DateTime DateInput)
        {
            string DateOutput;

            DateOutput = DateInput.ToString("dddd", new CultureInfo("is-IS")).Substring(0, 3);
            DateOutput = DateOutput.ToUpper().Substring(0, 1) + DateOutput.Substring(1, 2);
            DateOutput = DateOutput + " " + string.Format("{0:dd.MM}", DateInput);
            return(DateOutput);
        }
        protected override void Execute(CodeActivityContext executionContext)
        {
            ITracingService             tracingService = executionContext.GetExtension <ITracingService>();
            IWorkflowContext            context        = executionContext.GetExtension <IWorkflowContext>();
            IOrganizationServiceFactory serviceFactory = executionContext.GetExtension <IOrganizationServiceFactory>();
            IOrganizationService        service        = serviceFactory.CreateOrganizationService(context.UserId);

            string   dateInput     = DateInput.Get <string>(executionContext);
            DateTime formattedDate = new DateTime();

            DateTime.TryParse(dateInput, out formattedDate);
            DateOutput.Set(executionContext, formattedDate);
        }