|
@@ -47,8 +47,12 @@ namespace UAS_MES.PublicForm
|
|
|
if (LogicHandler.CheckUserLogin(UserName.Text, pwd.Text, out ErrorMessage))
|
|
|
{
|
|
|
ErrorMessage = "";
|
|
|
- string SQL = "update employee set em_password = '"+newpwd.Text+"' where em_code='"+UserName.Text+"' ";
|
|
|
- dh.ExecuteSql(SQL, "update");
|
|
|
+ String[] password = new string[1];
|
|
|
+ String[] username = new string[1];
|
|
|
+ password[0] = newpwd.Text;
|
|
|
+ username[0] = UserName.Text;
|
|
|
+ string SQL1 = "update employee set em_password = :passowrd where em_code= :emcode ";
|
|
|
+ dh.BatchInsert(SQL1, new string[] { "passowrd", "emcode" }, password, username);
|
|
|
MessageBox.Show("修改密码成功");
|
|
|
Close();
|
|
|
}
|