Esempio n. 1
0
 private void FormPatientPortal_Load(object sender, EventArgs e)
 {
     _userWebCur = UserWebs.GetByFKeyAndType(_patCur.PatNum, UserWebFKeyType.PatientPortal);
     if (_userWebCur == null)
     {
         _isNew               = true;
         _userWebCur          = new UserWeb();
         _userWebCur.UserName = UserWebs.CreateUserNameFromPat(_patCur, UserWebFKeyType.PatientPortal);
         _userWebCur.FKey     = _patCur.PatNum;
         _userWebCur.FKeyType = UserWebFKeyType.PatientPortal;
         _userWebCur.RequireUserNameChange = true;
         _userWebCur.Password = "";
         UserWebs.Insert(_userWebCur);
     }
     _userWebOld             = _userWebCur.Copy();
     textOnlineUsername.Text = _userWebCur.UserName;
     textOnlinePassword.Text = "";
     if (_userWebCur.Password != "")           //if a password was already filled in
     {
         butGiveAccess.Text = "Remove Online Access";
         //We do not want to show the password hash that is stored in the database so we will fill the online password with asterisks.
         textOnlinePassword.Text     = "********";
         textOnlinePassword.ReadOnly = false;
         textOnlineUsername.ReadOnly = false;
     }
     textPatientPortalURL.Text = PrefC.GetString(PrefName.PatientPortalURL);
 }
Esempio n. 2
0
        public static UserWeb CreateUserWeb(long fKey, UserWebFKeyType fKeyType, string userName = "", string password = "", bool requireUserNameChange = false,
                                            bool requirePasswordChange = false, string passwordResetCode = "", DateTime dateTimeLastLogin = default(DateTime))
        {
            UserWeb userWeb = new UserWeb()
            {
                IsNew    = true,
                FKey     = fKey,
                FKeyType = fKeyType,
                UserName = userName,
                Password = password,
                RequireUserNameChange = requireUserNameChange,
                RequirePasswordChange = requirePasswordChange,
                PasswordResetCode     = passwordResetCode,
                DateTimeLastLogin     = dateTimeLastLogin,
            };

            UserWebs.Insert(userWeb);
            return(userWeb);
        }