I am inside script task of SSIS. Need to do following transformations:

```switch(LeadTime)
{

case: 1

WM1 = DAY1
WM2 = DAY2
WM3 = DAY3
WM4 = DAY4
WM5 = DAY5
WM6 = DAY6
WM7 = DAY7

case: 2

WM1 = DAY1 + DAY2
WM2 = DAY2 + DAY3
WM3 = DAY3 + DAY4
WM4 = DAY4 + DAY5
WM5 = DAY5 + DAY6
WM6 = DAY6 + DAY7
WM7 = DAY7 + DAY1

case: 3

WM1 = DAY1 + DAY2 + DAY3
WM2 = DAY2 + DAY3 + DAY4
WM3 = DAY3 + DAY4 + DAY5
WM4 = DAY4 + DAY5 + DAY6
WM5 = DAY5 + DAY6 + DAY7
WM6 = DAY6 + DAY7 + DAY1
WM7 = DAY7 + DAY1 + DAY2

..................

case: 7

WM1 = DAY1 + DAY2 + DAY3 + DAY4 + DAY5 + DAY6 + DAY7
WM2 = DAY2 + DAY3 + DAY4 + DAY5 + DAY6 + DAY7 + DAY1
WM3 = DAY3 + DAY4 + DAY5 + DAY6 + DAY7 + DAY1 + DAY2
WM4 = DAY4 + DAY5 + DAY6 + DAY7 + DAY1 + DAY2 + DAY3
WM5 = DAY5 + DAY6 + DAY7 + DAY1 + DAY2 + DAY3 + DAY4
WM6 = DAY6 + DAY7 + DAY1 + DAY2 + DAY3 + DAY4 + DAY5
WM7 = DAY7 + DAY1 + DAY2 + DAY3 + DAY4 + DAY5 + DAY6

}```

Is it possible to build a good loop around all this and getting the same result? Need help with the logic of this

This is what I could come up with

```case: 7

{
WM1 += Array[i];
WM2 += Array[i];
...
WM7 += Array[i];
}```
Jun 11, 2022 in C# 169 views

## Compress existing PDF using C# programming using freeware libraries

I've been looking for ways to compress ...READ MORE

## Object Oriented Programming Basic Concept(C#)

We are aware that the default modifier ...READ MORE

## Trying to upload files using Selenium(C#)

You can try using Javascript Executor to ...READ MORE

## Deploy my Windows 10 IOT core application locally!

Of course, you, can! That is, in ...READ MORE

## How do backend of these really cool games work?

Most of the games these days don't ...READ MORE

## R programming logic

Use gsub to match the substring that we want ...READ MORE