⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usermodifyoperation.java

📁 该源代码实现了系统的进货
💻 JAVA
字号:
package operation;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;

import dataBase.DataBase;
import entity.OrderListCheck;

public class UserModifyOperation
{
	private ResultSet rs = null;

	private ArrayList list = null;

	private String sql = "";

	private DataBase db = null;

	public UserModifyOperation()
	{
		db = new DataBase();
	}

	public String PasswordModify(String CustomerID, String oldpassword,
			String newpassword)
	{
		sql = "select * from employeeinfo where EmployeeName = '" + CustomerID+ "' and Password = '" + oldpassword + "'";
		System.out.println(sql);
		try
		{
			rs = db.getResult(sql);
			while (rs.next())
			{
				String sql1="update employeeinfo set Password='"+newpassword+"' where EmployeeName = '" + CustomerID+ "' and Password = '" + oldpassword + "'";
				System.out.println(sql1);
				db.ExeQuery(sql1);
				return "密码已经修改";
			}
			rs.close();
			db.close();//

		} catch (SQLException e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
			System.out.println("customerpasswordmodify 错误");
		}
		return "密码修改**错误";
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -