ASP.NET客户信息管理系统的开发(19)_毕业论文

毕业论文移动版

毕业论文 > 计算机论文 >

ASP.NET客户信息管理系统的开发(19)


                        }
                        else
                        {
                            sqlConnect();
                            string sql = "select userpassword from usertable where userid = '" + label6.Text + "'";
                            SqlCommand cmd = new SqlCommand(sql, conn);                         
                            if (textBox2.Text != cmd.ExecuteScalar().ToString().Trim())
                            {
                                MessageBox.Show("原密码错误");
                                return;
                             }
                                else
                            {
                                string sq4 = "update usertable set userpassword='" + textBox3.Text.Trim() + "'where userid='" + label6.Text + "'";
                                SqlCommand cmd1 = new SqlCommand(sq4, conn);
                                cmd1.ExecuteNonQuery();
                                MessageBox.Show("修改成功");
                                sqlClose();
                            }   } (责任编辑:qin)