コード例 #1
0
        private string ResolveNGetPropetyValue(string format, string propertyName)
        {
            string configValue     = null;
            string cmdLineArgValue = ChoEnvironment.GetCmdLineArgValue(propertyName);

            if (!cmdLineArgValue.IsNullOrWhiteSpace())
            {
                return(cmdLineArgValue);
            }

            configValue = ChoETLFramework.GetConfigValue(propertyName);
            if (!configValue.IsNullOrWhiteSpace())
            {
                try
                {
                    if (format.IsNullOrWhiteSpace())
                    {
                        return(configValue);
                    }
                    else
                    {
                        return(ChoUtility.Format(format, configValue));
                    }
                }
                catch { }
            }

            return(propertyName);
        }
コード例 #2
0
        private DateTime GetNowTime()
        {
            DateTime now = DateTime.Now;

            string nowText = ChoETLFramework.GetConfigValue("NOW");

            if (!nowText.IsNullOrWhiteSpace())
            {
                try
                {
                    now = Convert.ToDateTime(nowText);
                }
                catch { }
            }

            return(now);
        }
コード例 #3
0
        private DateTime GetTodaysDate()
        {
            DateTime today = DateTime.Today;

            string todayText = ChoETLFramework.GetConfigValue("TODAY");

            if (!todayText.IsNullOrWhiteSpace())
            {
                try
                {
                    today = Convert.ToDateTime(todayText);
                }
                catch { }
            }

            return(today);
        }