public void Reset(int id) { DALT_Base_Teacher db = new DALT_Base_Teacher(); T_Base_Teacher teacher = db.GetTeacher(id); string pwd = MD5Class.UserMd5(teacher.TeaId); teacher.PassWord = pwd; bool res = db.Update(teacher); if (res) { string tmp = "{\"statusCode\":\"200\",\"message\":\"重置密码成功\",\"navTabId\":\"teacherList\",\"rel\":\"teacherList\",\"callbackType\":\"\",\"forwardUrl\":\"\"}"; Response.Write(tmp); } else { string tmp = "{\"statusCode\":\"300\",\"message\":\"重置密码失败\",\"navTabId\":\"teacherList\",\"rel\":\"teacherList\",\"callbackType\":\"\",\"forwardUrl\":\"\"}"; Response.Write(tmp); } }
public void EditSave(T_Base_Teacher teacher) { DALT_Base_Teacher db = new DALT_Base_Teacher(); T_Base_Teacher teacher2 = db.GetTeacher(teacher.Id); teacher.PassWord = teacher2.PassWord; bool res = db.Update(teacher); if (res) { string tmp = "{\"statusCode\":\"200\",\"message\":\"修改成功\",\"navTabId\":\"TeacherList\",\"rel\":\"TeacherList\",\"callbackType\":\"closeCurrent\",\"forwardUrl\":\"\"}"; Response.Write(tmp); } else { string tmp = "{\"statusCode\":\"300\",\"message\":\"修改失败\",\"navTabId\":\"TeacherList\",\"rel\":\"TeacherList\",\"callbackType\":\"closeCurrent\",\"forwardUrl\":\"\"}"; Response.Write(tmp); } }