Пример #1
0
 protected EtlVariableInfo(EtlVariableInfo obj)
 {
     this.Name         = obj.Name;
     this.Modifier     = obj.Modifier;
     this.DefaultValue = obj.DefaultValue;
     this.Binding      = obj.Binding;
     this.IsSecure     = obj.IsSecure;
 }
 protected EtlVariableInfo(EtlVariableInfo obj)
 {
     this.Name = obj.Name;
     this.Modifier = obj.Modifier;
     this.DefaultValue = obj.DefaultValue;
     this.Binding = obj.Binding;
     this.IsSecure = obj.IsSecure;
 }
Пример #3
0
            private string EvaluateBoundVariable(EtlVariableInfo variableInfo)
            {
                switch (variableInfo.Binding)
                {
                case EtlVariableBinding.None:
                case EtlVariableBinding.Obsolete_Value:
                case EtlVariableBinding.Obsolete_String:
                    return(null);

                case EtlVariableBinding.EtlPackageId:
                    return(this.EtlPackageId);

                case EtlVariableBinding.EtlSessionId:
                    return(this.EtlSessionId);

                case EtlVariableBinding.ParentEtlSessionId:
                    return(this.ParentEtlSessionId);

                case EtlVariableBinding.UserName:
                    return(this.UserName);

                case EtlVariableBinding.EtlSessionDate:
                    return(GetISODate(this.StartDateTime));

                case EtlVariableBinding.EtlSessionDateTime:
                    return(GetISODateTime(this.StartDateTime));

                case EtlVariableBinding.EtlSessionYear:
                    return(this.StartDateTime.Year.ToString());

                case EtlVariableBinding.EtlSessionYear4:
                    return(this.StartDateTime.Year.ToString().PadLeft(2, '0'));

                case EtlVariableBinding.EtlSessionMonth:
                    return(this.StartDateTime.Month.ToString());

                case EtlVariableBinding.EtlSessionMonth2:
                    return(this.StartDateTime.Month.ToString().PadLeft(2, '0'));

                case EtlVariableBinding.EtlSessionDay:
                    return(this.StartDateTime.Day.ToString());

                case EtlVariableBinding.EtlSessionDay2:
                    return(this.StartDateTime.Day.ToString().PadLeft(2, '0'));

                case EtlVariableBinding.EtlSessionHour:
                    return(this.StartDateTime.Hour.ToString());

                case EtlVariableBinding.EtlSessionHour2:
                    return(this.StartDateTime.Hour.ToString().PadLeft(2, '0'));

                case EtlVariableBinding.EtlSessionMinute:
                    return(this.StartDateTime.Minute.ToString());

                case EtlVariableBinding.EtlSessionMinute2:
                    return(this.StartDateTime.Minute.ToString().PadLeft(2, '0'));

                case EtlVariableBinding.EtlSessionSecond:
                    return(this.StartDateTime.Second.ToString());

                case EtlVariableBinding.EtlSessionSecond2:
                    return(this.StartDateTime.Second.ToString().PadLeft(2, '0'));

                case EtlVariableBinding.EtlSessionUtcDate:
                    return(GetISODate(this.StartUtcDateTime));

                case EtlVariableBinding.EtlSessionUtcDateTime:
                    return(GetISODateTime(this.StartUtcDateTime));

                case EtlVariableBinding.EtlSessionUtcYear:
                    return(this.StartUtcDateTime.Year.ToString());

                case EtlVariableBinding.EtlSessionUtcYear4:
                    return(this.StartUtcDateTime.Year.ToString().PadLeft(2, '0'));

                case EtlVariableBinding.EtlSessionUtcMonth:
                    return(this.StartUtcDateTime.Month.ToString());

                case EtlVariableBinding.EtlSessionUtcMonth2:
                    return(this.StartUtcDateTime.Month.ToString().PadLeft(2, '0'));

                case EtlVariableBinding.EtlSessionUtcDay:
                    return(this.StartUtcDateTime.Day.ToString());

                case EtlVariableBinding.EtlSessionUtcDay2:
                    return(this.StartUtcDateTime.Day.ToString().PadLeft(2, '0'));

                case EtlVariableBinding.EtlSessionUtcHour:
                    return(this.StartUtcDateTime.Hour.ToString());

                case EtlVariableBinding.EtlSessionUtcHour2:
                    return(this.StartUtcDateTime.Hour.ToString().PadLeft(2, '0'));

                case EtlVariableBinding.EtlSessionUtcMinute:
                    return(this.StartUtcDateTime.Minute.ToString());

                case EtlVariableBinding.EtlSessionUtcMinute2:
                    return(this.StartUtcDateTime.Minute.ToString().PadLeft(2, '0'));

                case EtlVariableBinding.EtlSessionUtcSecond:
                    return(this.StartUtcDateTime.Second.ToString());

                case EtlVariableBinding.EtlSessionUtcSecond2:
                    return(this.StartUtcDateTime.Second.ToString().PadLeft(2, '0'));

                case EtlVariableBinding.TAB:
                    return("\t");

                case EtlVariableBinding.CR:
                    return("\r");

                case EtlVariableBinding.LF:
                    return("\n");

                case EtlVariableBinding.EmptyString:
                    return("");

                default:
                    throw new InvalidOperationException(string.Format(Properties.Resources.UnknownVariableBinding, variableInfo.Name, variableInfo.Binding));
                }
            }
            private string EvaluateBoundVariable(EtlVariableInfo variableInfo)
            {
                switch (variableInfo.Binding)
                {
                    case EtlVariableBinding.None:
                    case EtlVariableBinding.Obsolete_Value:
                    case EtlVariableBinding.Obsolete_String:
                        return null;

                    case EtlVariableBinding.EtlPackageId:
                        return this.EtlPackageId;

                    case EtlVariableBinding.EtlSessionId:
                        return this.EtlSessionId;

                    case EtlVariableBinding.ParentEtlSessionId:
                        return this.ParentEtlSessionId;

                    case EtlVariableBinding.UserName:
                        return this.UserName;

                    case EtlVariableBinding.EtlSessionDate:
                        return GetISODate(this.StartDateTime);

                    case EtlVariableBinding.EtlSessionDateTime:
                        return GetISODateTime(this.StartDateTime);

                    case EtlVariableBinding.EtlSessionYear:
                        return this.StartDateTime.Year.ToString();

                    case EtlVariableBinding.EtlSessionYear4:
                        return this.StartDateTime.Year.ToString().PadLeft(2, '0');

                    case EtlVariableBinding.EtlSessionMonth:
                        return this.StartDateTime.Month.ToString();

                    case EtlVariableBinding.EtlSessionMonth2:
                        return this.StartDateTime.Month.ToString().PadLeft(2, '0');

                    case EtlVariableBinding.EtlSessionDay:
                        return this.StartDateTime.Day.ToString();

                    case EtlVariableBinding.EtlSessionDay2:
                        return this.StartDateTime.Day.ToString().PadLeft(2, '0');

                    case EtlVariableBinding.EtlSessionHour:
                        return this.StartDateTime.Hour.ToString();

                    case EtlVariableBinding.EtlSessionHour2:
                        return this.StartDateTime.Hour.ToString().PadLeft(2, '0');

                    case EtlVariableBinding.EtlSessionMinute:
                        return this.StartDateTime.Minute.ToString();

                    case EtlVariableBinding.EtlSessionMinute2:
                        return this.StartDateTime.Minute.ToString().PadLeft(2, '0');

                    case EtlVariableBinding.EtlSessionSecond:
                        return this.StartDateTime.Second.ToString();

                    case EtlVariableBinding.EtlSessionSecond2:
                        return this.StartDateTime.Second.ToString().PadLeft(2, '0');

                    case EtlVariableBinding.EtlSessionUtcDate:
                        return GetISODate(this.StartUtcDateTime);

                    case EtlVariableBinding.EtlSessionUtcDateTime:
                        return GetISODateTime(this.StartUtcDateTime);

                    case EtlVariableBinding.EtlSessionUtcYear:
                        return this.StartUtcDateTime.Year.ToString();

                    case EtlVariableBinding.EtlSessionUtcYear4:
                        return this.StartUtcDateTime.Year.ToString().PadLeft(2, '0');

                    case EtlVariableBinding.EtlSessionUtcMonth:
                        return this.StartUtcDateTime.Month.ToString();

                    case EtlVariableBinding.EtlSessionUtcMonth2:
                        return this.StartUtcDateTime.Month.ToString().PadLeft(2, '0');

                    case EtlVariableBinding.EtlSessionUtcDay:
                        return this.StartUtcDateTime.Day.ToString();

                    case EtlVariableBinding.EtlSessionUtcDay2:
                        return this.StartUtcDateTime.Day.ToString().PadLeft(2, '0');

                    case EtlVariableBinding.EtlSessionUtcHour:
                        return this.StartUtcDateTime.Hour.ToString();

                    case EtlVariableBinding.EtlSessionUtcHour2:
                        return this.StartUtcDateTime.Hour.ToString().PadLeft(2, '0');

                    case EtlVariableBinding.EtlSessionUtcMinute:
                        return this.StartUtcDateTime.Minute.ToString();

                    case EtlVariableBinding.EtlSessionUtcMinute2:
                        return this.StartUtcDateTime.Minute.ToString().PadLeft(2, '0');

                    case EtlVariableBinding.EtlSessionUtcSecond:
                        return this.StartUtcDateTime.Second.ToString();

                    case EtlVariableBinding.EtlSessionUtcSecond2:
                        return this.StartUtcDateTime.Second.ToString().PadLeft(2, '0');

                    case EtlVariableBinding.TAB:
                        return "\t";

                    case EtlVariableBinding.CR:
                        return "\r";

                    case EtlVariableBinding.LF:
                        return "\n";

                    case EtlVariableBinding.EmptyString:
                        return "";

                    default:
                        throw new InvalidOperationException(string.Format(Properties.Resources.UnknownVariableBinding, variableInfo.Name, variableInfo.Binding));
                }
            }
        private void AddParameter()
        {
            var newVariable = new EtlVariableInfo();
            bndVariables.Add(newVariable);

            grdVariables.Rows[grdVariables.Rows.Count - 1].Cells[0].Selected = true;
        }