Exemple #1
0
        public DTO.User Fetch(string _email)
        {
            DAL.UserDB dalProvider = new DAL.UserDB();
            var        user        = dalProvider.GetUser(_email);
            var        userDTO     = new DTO.User(user);

            return(userDTO);
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            DAL.UserDB userDB = new DAL.UserDB();
            int        a      = userDB.ChangeWhere(UserName_box.Text, where_box.Text);

            a += userDB.ChangeNumber(UserName_box.Text, Number_box.Text);
            if (a > 0)
            {
                MessageBox.Show("修改成功!", "提示", MessageBoxButtons.OK);
            }
            else
            {
                MessageBox.Show("修改失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            Data.User = userDB.SelectUser(Data.User.UserName);
            this.Close();
        }