Пример #1
0
        public bool userCodeRequestSession(EmailConformation conf)
        {
            this.emailConf = conf;
            string        userName   = this.emailConf.LoggedUName;
            UserLoginData loginTable = db.UserLoginDatas.SingleOrDefault(x => x.username == userName);

            if (loginTable != null)
            {
                this.sendEmail(loginTable.email);
                loginTable.verfication = this.FinalPass;
                db.SubmitChanges();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #2
0
        private void checkVerification()
        {
            DB_contextDataContext db        = new DB_contextDataContext();
            UserLoginData         userTable = db.UserLoginDatas.SingleOrDefault(x => x.username == this.userBox.Text);

            if (userTable != null)
            {
                EmailConformation confForm = new EmailConformation();
                if (userTable.confirmVerification == null)
                {
                    this.Hide();
                    confForm.trackUser(this.userBox.Text, this);
                    confForm.Show();
                }
                else
                {
                    this.isChecked = true;
                }
            }
        }