protected void Page_Load(object sender, EventArgs e) { UNITEACHERREQ vrParameter = new UNITEACHERREQ(); UNITEACHER[] vrResult; string delID = Request["delID"]; if (delID != null && delID != "") { UNITEACHER tecacheDel = new UNITEACHER(); tecacheDel.dwAccNo = Parse(Request["delID"]); m_Request.Account.TeacherDel(tecacheDel); } GetHTTPObj(out vrParameter); GetPageCtrlValue(out vrParameter.szReqExtInfo); if (m_Request.Account.TeacherGet(vrParameter, out vrResult) == REQUESTCODE.EXECUTE_SUCCESS) { for (int i = 0; i < vrResult.Length; i++) { m_szOut += "<tr>"; m_szOut += "<td data-id='" + vrResult[i].dwAccNo.ToString() + "'>" + vrResult[i].szPID + "</td>"; m_szOut += "<td>" + vrResult[i].szTrueName + "</td>"; m_szOut += "<td>" + vrResult[i].szDeptName + "</td>"; m_szOut += "<td>" + vrResult[i].szHandPhone + "</td>"; m_szOut += "<td>" + vrResult[i].szEmail + "</td>"; m_szOut += "<td><div class='OPTD'></div></td>"; m_szOut += "</tr>"; } UpdatePageCtrl(m_Request.Account); } PutBackValue(); }
protected void Page_Load(object sender, EventArgs e) { string szTerm = Request["term"]; string szType = Request["Type"]; string szIdent = Request["ident"]; Response.CacheControl = "no-cache"; UNITEACHERREQ vrGet = new UNITEACHERREQ(); UNITEACHER[] vtAccount; if (szType == null || szType == "") { vrGet.szTrueName = szTerm; } else if (szType.ToLower() == "logonname") { vrGet.szPID = szTerm; } else if (szType.ToLower() == "truename") { vrGet.szTrueName = szTerm; } uint dwIdent = ToUint(Request["dwIdent"]); vrGet.szReqExtInfo.dwNeedLines = 10; //最多10条 if (m_Request.Account.TeacherGet(vrGet, out vtAccount) == REQUESTCODE.EXECUTE_SUCCESS && vtAccount != null) { MyString szOut = new MyString(); szOut += "["; for (int i = 0; i < vtAccount.Length; i++) { if (szType == null || szType.ToLower() == "truename") { szOut += "{\"id\":\"" + vtAccount[i].dwAccNo + "\",\"label\": \"" + vtAccount[i].szTrueName + "(" + vtAccount[i].szPID + "," + vtAccount[i].szDeptName + ")" + "\",\"szLogonName\": \"" + vtAccount[i].szPID.ToString() + "\",\"szTrueName\": \"" + vtAccount[i].szTrueName + "\",\"szHandPhone\": \"" + vtAccount[i].szHandPhone + "\",\"szDeptName\": \"" + vtAccount[i].szDeptName + "\",\"szTel\": \"" + vtAccount[i].szTel + "\",\"szEmail\": \"" + vtAccount[i].szEmail + "\"}"; } else { szOut += "{\"id\":\"" + vtAccount[i].dwAccNo + "\",\"label\": \"" + vtAccount[i].szTrueName + "(" + vtAccount[i].szPID + "," + vtAccount[i].szDeptName + ")" + "\",\"szLogonName\": \"" + vtAccount[i].szPID.ToString() + "\",\"szTrueName\": \"" + vtAccount[i].szTrueName + "\",\"szHandPhone\": \"" + vtAccount[i].szHandPhone + "\",\"szDeptName\": \"" + vtAccount[i].szDeptName + "\",\"szTel\": \"" + vtAccount[i].szTel + "\",\"szEmail\": \"" + vtAccount[i].szEmail + "\"}"; // //szOut += "{\"id\":\"" + vtAccount[i].dwAccNo + "\",\"label\": \"" + vtAccount[i].szTrueName + "\"}"; } if (i < vtAccount.Length - 1) { szOut += ","; } } szOut += "]"; Response.Write(szOut); } else { Response.Write("[{}]"); } }
protected void Page_Load(object sender, EventArgs e) { UNITEACHER newValue; if (IsPostBack) { GetHTTPObj(out newValue); if (m_Request.Account.TeacherSet(newValue, out newValue) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "设置教师失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); } else { UNIACCOUNT accinfo = new UNIACCOUNT(); if (GetAccByAccno(newValue.dwAccNo.ToString(), out accinfo)) { accinfo.dwIdent = accinfo.dwIdent | (uint)UNIACCOUNT.DWIDENT.EXTIDENT_TEACHER; REQUESTCODE uResponse = m_Request.Account.Set(accinfo, out accinfo); } MessageBox("设置教师成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); return; } } if (Request["op"] == "set") { bSet = true; UNITEACHERREQ vrGet = new UNITEACHERREQ(); vrGet.dwAccNo = Parse(Request["dwID"]); UNITEACHER[] vtRes; if (m_Request.Account.TeacherGet(vrGet, out vtRes) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { if (vtRes.Length == 0) { MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { PutJSObj(vtRes[0]); m_Title = "修改【" + vtRes[0].szTrueName + "】"; } } } else { m_Title = "教师"; } }
protected void Page_Load(object sender, EventArgs e) { uint dwYearTerm = Parse(Request["YearTerm"]); Response.CacheControl = "no-cache"; UNITEACHERREQ vrGet = new UNITEACHERREQ(); UNITEACHER[] vtAccount; if (dwYearTerm != 0) { vrGet.dwYearTerm = dwYearTerm; } vrGet.dwReqProp = (uint)UNITEACHERREQ.DWREQPROP.DEVREQ_NEEDCOURSE; vrGet.szReqExtInfo.dwNeedLines = 100; //最多10条 if (m_Request.Account.TeacherGet(vrGet, out vtAccount) == REQUESTCODE.EXECUTE_SUCCESS && vtAccount != null) { MyString szOut = new MyString(); szOut += "["; for (int i = 0; i < vtAccount.Length; i++) { { szOut += "{\"id\":\"" + vtAccount[i].dwAccNo + "\",\"label\": \"" + vtAccount[i].szTrueName + "(" + vtAccount[i].szPID + "," + vtAccount[i].szDeptName + ")" + "\",\"szLogonName\": \"" + vtAccount[i].szPID.ToString() + "\",\"szTrueName\": \"" + vtAccount[i].szTrueName + "\",\"szHandPhone\": \"" + vtAccount[i].szHandPhone + "\",\"szDeptName\": \"" + vtAccount[i].szDeptName + "\",\"szTel\": \"" + vtAccount[i].szTel + "\",\"szEmail\": \"" + vtAccount[i].szEmail + "\"}"; } if (i < vtAccount.Length - 1) { szOut += ","; } } szOut += "]"; Response.Write(szOut); } else { Response.Write("[{}]"); } }