Package com.ebspos.model

Examples of com.ebspos.model.Employee.update()


  public void save() {
    try {
      Employee m = getModel(Employee.class);
      if (m.getLong("id") != null) {
        m.set("upd_time",new Timestamp((new Date()).getTime()));
        m.update();
      } else {
        m.set("pwd",MD5.getMD5ofStr("123456"));
        m.set("upd_time",new Timestamp((new Date()).getTime()));
        m.save();
      }
View Full Code Here


    Record po = getCurrentUser();
    Employee e = Employee.dao.findById(po.get("id"));
    String pwd1 = e.getStr("pwd");
    if (MD5.getMD5ofStr(oldpwd).equals(pwd1)) {
      e.set("pwd", MD5.getMD5ofStr(pwd));
      e.update();
      toDwzJson(200, "重置密码成功!密码为<br><h3><b style='color:red;'>" + pwd
          + "</b></h3><br>请牢记!");
    } else {
      toDwzJson(300, "旧密码输入错误!");
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.