Пример #1
0
        //修改
        protected void Button1_Click(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(this.UserID.Value);
            string name = this.TextUsername.Text;
            //string password = this.TextPassword.Text;
            string phone = this.TextPhone.Text;
            string address = this.TextAddress.Text;
            string mail = this.TextMail.Text;
            //string type = this.TextUsertype.Text;

            QPS.NEW.BLL.Users us = new QPS.NEW.BLL.Users();
            NEW.Model.Users user = new NEW.Model.Users();
            user.Id = id;
            user.Username = name;
           // user.Password = password;
            user.Phone = phone;
            user.Mail = mail;

            if (us.UpdateUs(user))
            {
                Response.Write("<script>alert('修改成功!!');</script>");
            }
            else
            {
                Response.Write("<script>alert('修改失败!!');</script>");
            }
            


        }
Пример #2
0
        //修改
        protected void Button1_Click(object sender, EventArgs e)
        {
            int    id   = Convert.ToInt32(this.UserID.Value);
            string name = this.TextUsername.Text;
            //string password = this.TextPassword.Text;
            string phone   = this.TextPhone.Text;
            string address = this.TextAddress.Text;
            string mail    = this.TextMail.Text;

            //string type = this.TextUsertype.Text;

            QPS.NEW.BLL.Users us   = new QPS.NEW.BLL.Users();
            NEW.Model.Users   user = new NEW.Model.Users();
            user.Id       = id;
            user.Username = name;
            // user.Password = password;
            user.Phone = phone;
            user.Mail  = mail;

            if (us.UpdateUs(user))
            {
                Response.Write("<script>alert('修改成功!!');</script>");
            }
            else
            {
                Response.Write("<script>alert('修改失败!!');</script>");
            }
        }