Winform怎样实现应用程序修改密码?解决思路

Winform怎样实现应用程序修改密码?
我在Form1中登录,登录成功后转到的主窗体Form2,在Form2中我点击按钮,转到窗体Form3,在Form3里我实现获取登录此程序的用户名和密码进行修改,Form3里有textbox1、textbox2、textbox3、textbox4这几个控件,我用来显示当前的用户名和旧密码、新密码还有新密码确认,我已实现在textbox1中显示当前的用户名,现在我需要在textbox2、textbox3和textbox4中输入旧密码还有新密码和新密码确认,假如旧密码正确就完成修改,将结果保存至数据库,旧密码错误就清空。我写的这段代码[code=C#][/code]SqlConnection conn = new SqlConnection("Data Source=(local);Initial Catalog=Manager;Integrated Security=true");
  conn.Open();
  string str = "select count(PassWord) from Account where UserName='"+textBox1.Text+"' and PassWord='"+textBox2.Text+"'";
  string strup = "update Account set PassWord='" + textBox4.Text + "' where UserName='" + textBox1.Text + "'";
  SqlCommand comm = new SqlCommand(str,conn);
  SqlDataReader reader = comm.ExecuteReader();
  SqlCommand commup = new SqlCommand(strup, conn);
不知道这有错误没,如果没错,请问后面我该怎么写了呢?有错的话请大家帮帮我啊,谢谢大家了。

------解决方案--------------------
上面的代码没有错误。继续往下写:
if (!reader.read())
{
MessageBox("旧密码输入不正确!","系统消息");
}
reader.close();
//判断新密码和确认新密码是否一致
if (textBox3.text != textBox4.text)
{
MessageBox("新密码和确认密码不一致!","系统消息");
conn.close();
return;
}
//修改密码
if (commup.Executenonquery()!= 0)
{
MessageBox("密码修改成功!","系统消息");
}
conn.close();
------解决方案--------------------
把楼上的稍微改了改……
C# code

if (!reader.read()) 
{ 
    MessageBox("旧密码输入不正确!","系统消息"); 
} 
else
{
   //判断新密码和确认新密码是否一致 
   if (textBox3.text != textBox4.text) 
   { 
     MessageBox("新密码和确认密码不一致!","系统消息"); 
     conn.close(); 
     return; 
   }
   else
   {
      //修改密码 
      if (commup.Executenonquery()!= 0) 
      { 
        MessageBox("密码修改成功!","系统消息"); 
      }
   } 
}
reader.close(); 
conn.close();