示例#1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            User user = new User();

            user.UserName = txtUserId.Text;
            EmailPassword email = new EmailPassword();

            email.CheckUserName(user.UserName);
        }
示例#2
0
        public HttpResponseMessage Registration(EmailPassword login)
        {
            ModelsDB.Register emailPassword = new ModelsDB.Register();
            var logins = DB.Register.Where(p => p.Email == login.Email);

            if (logins != null)
            {
                emailPassword.Email    = login.Email;
                emailPassword.Password = login.Password;
                DB.Register.Add(emailPassword);
                DB.SaveChanges();
                return(new HttpResponseMessage(HttpStatusCode.OK));
            }
            return(new HttpResponseMessage(HttpStatusCode.BadRequest));
        }