예제 #1
0
        bool ExelConverter.Core.Settings.ILogIn.LogIn()
        {
            if (authenticated)
            {
                return(authenticated);
            }

            if (this.IsDesignMode())
            {
                authenticated = true;
            }
            else
            {
                LogInView lv  = new LogInView();
                var       res = lv.ShowDialog();
                authenticated = (res == null ? false : res.Value);
                if (authenticated)
                {
                    lv.Client.SetAsDefault();
                    alphaEntities.ProviderConnectionString          = lv.Client.ConnectionStringMain;
                    exelconverterEntities2.ProviderConnectionString = lv.Client.ConnectionStringApp;
                }
            }
            return(authenticated);
        }
예제 #2
0
        bool ExelConverter.Core.Settings.ILogIn.LogIn()
        {
            if (authenticated)
                return authenticated;

            if (this.IsDesignMode())
            {
                authenticated = true;
            } else
            {
                LogInView lv = new LogInView();
                var res = lv.ShowDialog();
                authenticated = (res == null ? false : res.Value);
                if (authenticated)
                {
                    lv.Client.SetAsDefault();
                    alphaEntities.ProviderConnectionString = lv.Client.ConnectionStringMain;
                    exelconverterEntities2.ProviderConnectionString = lv.Client.ConnectionStringApp;
                }
            }
            return authenticated;
        }