毕业论文

打赏
当前位置: 毕业论文 > 计算机论文 >

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

时间:2016-11-27 21:00来源:毕业论文
} else { sqlConnect(); string sql = select userpassword from usertable where userid = + label6.Text + ; SqlCommand cmd = new SqlCommand(sql, conn); if (textBox2.Text != cmd.ExecuteScalar().ToString().


                        }
                        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();
                            }   } ASP.NET客户信息管理系统的开发(19):http://www.751com.cn/jisuanji/lunwen_460.html
------分隔线----------------------------
推荐内容