示例#1
0
    private DateTime RetrieveSystemCurrentDateTime()
    {
        SettingProvider provider = null;

        try
        {
            provider            = new SettingProvider();
            provider.AppManager = this.mAppManager;
            return(provider.GetSystemDateTime());
        }
        catch { throw; }
        finally
        {
            if (provider != null)
            {
                provider.Dispose();
            }
        }
    }
    private DateTime RetrieveCurrentDateTime()
    {
        SettingProvider provider = null;

        try
        {
            // Create provider and get data.
            provider            = new SettingProvider();
            provider.AppManager = this.mAppManager;

            return(DateTime.Parse(provider.GetSystemUtcDateTime().ToString("MM/dd/yyyy")));
        }
        catch { throw; }
        finally
        {
            if (provider != null)
            {
                provider.Dispose();
            }
        }
    }