示例#1
0
        /// <summary>
        /// Cargamos el Formulario de Autenticación
        /// </summary>
        private void LoadAuthenticationForm()
        {
            FRM_AuthenticationForm_ASPNet wAuthForm = new FRM_AuthenticationForm_ASPNet("health_sec_ws");

            wAuthForm.Auth_Title_Image = null;
            wAuthForm.Auth_Title_Text  = "Autenticación";
            wAuthForm.InitCredentials(storage.StorageObject.User, storage.StorageObject.Password);

            if (wAuthForm.ShowDialog() == DialogResult.OK)
            {
                storage.StorageObject.User     = FormBase.Principal.Identity.Name;
                storage.StorageObject.Password = wAuthForm.Password;
                storage.Save();
            }
            else
            {
                this.Close();
            }
        }
示例#2
0
        /// <summary>
        /// Cargamos el Formulario de Autenticación
        /// </summary>
        void LoadAuthenticationForm()
        {
            FRM_AuthenticationForm_ASPNet wAuthForm = new FRM_AuthenticationForm_ASPNet();


            wAuthForm.Auth_Title_Image = null;

            wAuthForm.Auth_Title_Text = "Autenticación";
            wAuthForm.InitCredentials(frmMain.storage.StorageObject.User, frmMain.storage.StorageObject.Password);
            string usr = string.Empty;

            if (wAuthForm.ShowDialog() == DialogResult.OK)
            {
                usr = frmMain.Principal.Identity.Name;
                frmMain.storage.StorageObject.User     = FormBase.Principal.Identity.Name;
                frmMain.storage.StorageObject.Password = wAuthForm.Password;
                frmMain.storage.Save();
            }
            else
            {
                this.Close();
            }
        }