protected void Page_Load(object sender, EventArgs e) { GetCtrlClass(); string szlab = Request["lab"]; string szCampus = Request["campus"]; string szRunState = Request["dwRunStat"]; string szRoom = Request["szRoom"]; string szDevCls = Request["szDevCls"]; m_szRoomSel = szRoom; //========================= UNILAB[] lab = GetAllLab(); if (lab != null && lab.Length > 0) { for (int i = 0; i < lab.Length; i++) { m_szLab += "<label><input class=\"enum\" type=\"" + "checkbox" + "\" name=\"" + "lab" + "\" value=\"" + lab[i].dwLabID.ToString() + "\" /> " + lab[i].szLabName.ToString() + "</label>"; } } UNICAMPUS[] camp = GetAllCampus(); if (camp != null && camp.Length > 0) { for (int i = 0; i < camp.Length; i++) { m_szCamp += "<label><input class=\"enum\" type=\"" + "checkbox" + "\" name=\"" + "campus" + "\" value=\"" + camp[i].dwCampusID.ToString() + "\" /> " + camp[i].szCampusName.ToString() + "</label>"; } } UNIDEVCLS[] devCls = GetDevCLS(0); if (devCls != null && devCls.Length > 0) { for (int i = 0; i < devCls.Length; i++) { m_szDevCls += "<label><input class=\"enum\" type=\"" + "checkbox" + "\" name=\"" + "szDevCls" + "\" value=\"" + devCls[i].dwClassID.ToString() + "\" /> " + devCls[i].szClassName.ToString() + "</label>"; } } FULLROOM[] roomList = GetAllFullRoom(); if (roomList != null && roomList.Length > 0) { for (int i = 0; i < roomList.Length; i++) { if ((uint)roomList[i].dwTotalDevNum > 0) { m_szRoom += "<label><input class=\"enum\" type=\"" + "checkbox" + "\" name=\"" + "szRoom" + "\" value=\"" + roomList[i].dwRoomID.ToString() + "\" /> " + roomList[i].szRoomName.ToString() + "</label>"; } } } REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; DEVREQ vrParameter = new DEVREQ(); if (szlab != null && szlab != "") { vrParameter.szLabIDs = szlab; } if (szCampus != null && szCampus != "") { vrParameter.szCampusIDs = szCampus; } if (szlab != null && szlab != "") { vrParameter.szLabIDs = szlab; } if (szRoom != null && szRoom != "") { vrParameter.szRoomIDs = szRoom; } if (szRunState != null && szRunState != "") { vrParameter.dwRunStat = CharListToUint(szRunState); } if (szDevCls != null && szDevCls != "") { vrParameter.szClassIDs = (szDevCls); } vrParameter.dwReqProp = (uint)DEVREQ.DWREQPROP.DEVREQ_NEEDDEVUSE; GetPageCtrlValue(out vrParameter.szReqExtInfo); UNIDEVICE[] vrResult; uResponse = m_Request.Device.Get(vrParameter, out vrResult); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS) { for (int i = 0; i < vrResult.Length; i++) { uint uState = (uint)vrResult[i].dwDevStat; uint uRunState = 0; uint uRunStateConst = (uint)vrResult[i].dwRunStat; if (vrResult[i].dwRunStat != null) { uRunState = (uint)vrResult[i].dwRunStat; } string szRunStateTitle = ""; if ((uRunState & (uint)UNIDEVICE.DWRUNSTAT.DEVSTAT_INUSE) > 0) { uRunState = (uint)UNIDEVICE.DWRUNSTAT.DEVSTAT_INUSE; szRunStateTitle = GetJustName((uint)UNIDEVICE.DWRUNSTAT.DEVSTAT_INUSE, "DEVICE_RunState"); } else { if (vrResult[i].dwRunStat != null) { uRunState = (uint)vrResult[i].dwRunStat; } else { uRunState = 0; } szRunStateTitle = GetJustName(uRunState, "DEVICE_RunState"); } string szState = "devRunState" + uRunState.ToString(); if (szRunStateTitle == "") { szRunStateTitle = GetJustNameEqual(0, "DEVICE_RunState"); } m_szOut += "<tr>"; m_szOut += "<td data-roomno=\"" + vrResult[i].szRoomNo.ToString() + "\" data-groupid=\"" + vrResult[i].dwUseGroupID.ToString() + "\" data-name=\"" + vrResult[i].szDevName.ToString() + "\" data-labid=\"" + vrResult[i].dwLabID.ToString() + "\" data-id=\"" + vrResult[i].dwDevID.ToString() + "\">" + "<img src=\"../../../themes/icon_s/" + szState + ".ico\" class=\"imgico\" />" + "</td>"; m_szOut += "<td class='lnkDevice' data-id='" + vrResult[i].dwDevID.ToString() + "'>" + vrResult[i].dwDevSN.ToString() + "</td>"; m_szOut += "<td>" + vrResult[i].szDevName.ToString() + "</td>"; string szModel = vrResult[i].szModel + "/" + vrResult[i].szSpecification; string szModelRes = ""; if (GetMinStr(szModel, out szModelRes)) { //型号规格 // m_szOut += "<td title=\"" + szModel + "\">" + szModelRes + "</td>"; } else { // m_szOut += "<td>" + szModel + "</td>"; } if (((uint)vrResult[i].dwCtrlMode & ((uint)UNIDEVICE.DWCTRLMODE.DEVCTRL_POWERCTRL)) > 0) { m_szOut += "<td>" + GetJustName((uint)vrResult[i].dwRunStat, "UNIDEVICE_DevStat") + "</td>"; } else { string szDevRunState = GetJustName(uRunState, "DEVICE_RunState"); if (szDevRunState == "") { szDevRunState = GetJustNameEqual(0, "DEVICE_RunState"); } m_szOut += "<td>" + szDevRunState + "</td>"; } // m_szOut += "<td>" + vrResult[i].szLabName.ToString() + "</td>"; UNIACCOUNT accAttend; // m_szOut += "<td>" + vrResult[i].szAttendantTel + "</td>"; DEVUSEINFO[] vtDevUseInfo = vrResult[i].DevUse; bool bIsUse = true; if (vtDevUseInfo == null || vtDevUseInfo.Length == 0) { bIsUse = false; } if (bIsUse) { m_szOut += "<td class='lnkAccount' data-id='" + vtDevUseInfo[0].dwAccNo + "'>" + vtDevUseInfo[0].szTrueName + "</td>"; } else { m_szOut += "<td>" + "" + "</td>"; } m_szOut += "<td>" + GetCtrlName((uint)vrResult[i].dwURLCtrl, (uint)vrResult[i].dwURLCtrlParam) + "</td>"; m_szOut += "<td>" + Get1970Date((uint)(vrResult[i].dwURLEndTime)) + "</td>"; // m_szOut += "<td class='thCenter'><div class='OPTD'></div></td>"; // m_szOut += "<td class='thCenter'><div class='OPTD OPTDBtnSet'></div></td>"; m_szOut += "<td class='thCenter'><div class='OPTD OPTDBtnRec'></div></td>"; m_szOut += "</tr>"; } UpdatePageCtrl(m_Request.Device); } PutBackValue(); }
protected void Page_Load(object sender, EventArgs e) { UNIDEVICE newDev; uint? uMax = 0; uint uID = PRDevice.DEVICE_BASE | PRDevice.MSREQ_DEVICE_SET + 1; if (GetMaxValue(ref uMax, uID, "dwDevSN")) { PutMemberValue("dwDevSN", uMax.ToString()); } if (IsPostBack) { GetHTTPObj(out newDev); // newDev.dwDevSN = GetDevSN(); newDev.dwProperty = CharListToUint(Request["dwProperty"]); newDev.dwPurchaseDate = DateToUint(Request["dwPurchaseDate"]); newDev.dwOpenRuleSN = null; UNIGROUP newUseGroup; if (NewGroup(newDev.szDevName.ToString() + "使用组", (uint)UNIGROUP.DWKIND.GROUPKIND_DEV, out newUseGroup)) { newDev.dwUseGroupID = newUseGroup.dwGroupID; } if (m_Request.Device.Set(newDev, out newDev) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "新建设备失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); } else { MessageBox("新建设备成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); return; } } m_szPorperty = GetInputHtmlFromXml(0, CONSTHTML.checkBox, "dwProperty", "UNIDEVICE_Property", true); if (Request["op"] == "set") { bSet = true; DEVREQ vrDevReq = new DEVREQ(); vrDevReq.dwDevID = Parse(Request["id"]); UNIDEVICE[] vtDev; if (m_Request.Device.Get(vrDevReq, out vtDev) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { if (vtDev.Length == 0) { MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { PutJSObj(vtDev[0]); } } } else { m_Title = "新建设备"; } }
protected void Page_Load(object sender, EventArgs e) { UNIDEVICE newDev; uint? uMax = 0; uint uID = PRDevice.DEVICE_BASE | PRDevice.MSREQ_DEVICE_SET; if (GetMaxValue(ref uMax, uID, "dwDevSN")) { } if (IsPostBack) { GetHTTPObj(out newDev); newDev.dwDevSN = GetDevSN(); newDev.dwProperty = CharListToUint(Request["dwProperty"]); UNIROOM room; if (GetRoomID(newDev.dwRoomID.ToString(), out room)) { newDev.dwLabID = room.dwLabID; } //newDev.dwPurchaseDate = DateToUint(Request["dwPurchaseDate"]); newDev.szExtInfo = GetDevExt(); UNIGROUP newUseGroup; if (NewGroup(newDev.szDevName.ToString() + "使用组", (uint)UNIGROUP.DWKIND.GROUPKIND_DEV, out newUseGroup)) { newDev.dwUseGroupID = newUseGroup.dwGroupID; } if (m_Request.Device.Set(newDev, out newDev) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "设置" + ConfigConst.GCDevName + "失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); } else { MessageBox("设置" + ConfigConst.GCDevName + "成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); DEVATTENDANT devAttendSet = new DEVATTENDANT(); devAttendSet.dwAttendantID = Parse(Request["dwAttendantID"]); devAttendSet.dwDevID = newDev.dwDevID; devAttendSet.dwLabID = newDev.dwLabID; if (devAttendSet.dwAttendantID != null) { UNIACCOUNT acc; if (GetAccByAccno(devAttendSet.dwAttendantID.ToString(), out acc)) { devAttendSet.szAttendantName = acc.szTrueName; } } devAttendSet.szAttendantTel = Request["szAttendantTel"]; m_Request.Device.AttendantSet(devAttendSet); return; } } m_szCtrlMode = GetAllInputHtml(CONSTHTML.option, "", "UNIDEVICE_CtrlMode"); UNIADMIN[] adminlist; if (GetAdmin(out adminlist) == true) { for (int i = 0; i < adminlist.Length; i++) { m_szManager += "<option value='" + adminlist[i].dwAccNo.ToString() + "'>" + adminlist[i].szTrueName + "</option>"; } } UNILAB[] vtLab = GetAllLab(); if (vtLab != null && vtLab.Length > 0) { for (int i = 0; i < vtLab.Length; i++) { m_szLab += "<option value='" + vtLab[i].dwLabID + "'>" + vtLab[i].szLabName + "</option>"; } } UNIROOM[] vtRoom = GetAllRoom(); if (vtRoom != null && vtRoom.Length > 0) { for (int i = 0; i < vtRoom.Length; i++) { m_szRoom += "<option value='" + vtRoom[i].dwRoomID + "'>" + vtRoom[i].szRoomName + "</option>"; } } UNIDEVKIND[] vtDevKind = GetAllDevKind(); if (vtDevKind != null && vtDevKind.Length > 0) { for (int i = 0; i < vtDevKind.Length; i++) { m_szDevKind += "<option value='" + vtDevKind[i].dwKindID + "'>" + vtDevKind[i].szKindName + "</option>"; } } m_szPorperty = GetInputHtmlFromXml(0, CONSTHTML.checkBox, "dwProperty", "UNIDEVICE_Property", true); if (Request["op"] == "set") { bSet = true; DEVREQ vrDevReq = new DEVREQ(); vrDevReq.dwDevID = Parse(Request["id"]); UNIDEVICE[] vtDev; if (m_Request.Device.Get(vrDevReq, out vtDev) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { if (vtDev.Length == 0) { MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { PutJSObj(vtDev[0]); m_Title = "修改【" + vtDev[0].szPCName + "】"; } } } else { m_Title = "新建" + ConfigConst.GCDevName; } }
protected void Page_Load(object sender, EventArgs e) { base.LoadPage(); string con = Request["con"]; string[] list = con.Split('&'); string clskey = ""; string labkey = ""; string mankey = ""; //string devcls = ""; string searchkey = ""; string pctrlId = ""; uint pctrlStar = 0; uint pctrlNeed = 15; uint showMode = 1; if (list != null && list.Length > 0) { searchkey = list[0]; mankey = list[1]; clskey = list[2]; labkey = list[3]; //devkind = subCon(list[2]); //devcls = subCon(list[3]); pctrlId = list[list.Length - 3]; pctrlStar = Convert.ToUInt32(list[list.Length - 3]); pctrlStar = pctrlStar > 0 ? pctrlStar - 1 : 0; pctrlNeed = Convert.ToUInt32(list[list.Length - 2]); if (!string.IsNullOrEmpty(list[list.Length - 1])) { showMode = Convert.ToUInt32(list[list.Length - 1]); } } REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; DEVREQ vrGet = new DEVREQ(); if (clskey != "") { vrGet.szClassIDs = clskey; } else { //临时 过滤掉非设备类别 vrGet.szClassIDs = "56,57,58,103795651"; } if (labkey != "") { vrGet.szLabIDs = labkey; } if (!string.IsNullOrEmpty(mankey)) { vrGet.szAttendantName = mankey; } if (!string.IsNullOrEmpty(searchkey)) { vrGet.szSearchKey = searchkey; } //分页 REQEXTINFO vrGetExtInfo = new REQEXTINFO(); vrGetExtInfo.dwNeedLines = pctrlNeed; vrGetExtInfo.dwStartLine = pctrlStar; vrGet.szReqExtInfo = vrGetExtInfo; UNIDEVICE[] vtResult; dwRlt rlt = new dwRlt(); rlt.needLines = (int)pctrlNeed; rlt.pageCtrlID = "pCtrl"; List <dwDevIntro> devs = new List <dwDevIntro>(); uResponse = m_Request.Device.Get(vrGet, out vtResult); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtResult.Length > 0) { for (int i = 0; i < vtResult.Length; i++) { dwDevIntro dev = new dwDevIntro(); dev.id = vtResult[i].dwDevID.ToString(); dev.name = vtResult[i].szDevName; dev.model = vtResult[i].szModel; dev.campus = vtResult[i].szCampusName; dev.col = vtResult[i].szDeptName; dev.cls = vtResult[i].szClassName; dev.lab = vtResult[i].szLabName; dev.manager = vtResult[i].szAttendantName; dev.phone = vtResult[i].szAttendantTel; dev.intro = vtResult[i].szCampusName.ToString() + "," + vtResult[i].szClassName.ToString(); dev.url = GetImgS(vtResult[i].dwDevSN); //仪器状态 if (Converter.GetDevStat(vtResult[i].dwDevStat)) { dev.devstat = Converter.GetDevRunStat(vtResult[i].dwRunStat); } else { dev.devstat = "<span style='color:red'>不可用</span>"; } devs.Add(dev); } //获取分页 REQEXTINFO new_ext; if (m_Request.Device.UTGetDetail(out new_ext) && new_ext.dwTotolLines != null && new_ext.dwTotolLines > 0) { rlt.totolLines = (int)new_ext.dwTotolLines; rlt.startLine = (int)new_ext.dwStartLine; } else { rlt.totolLines = vtResult.Length; rlt.startLine = 0; } } else { rlt.totolLines = 0; rlt.startLine = 0; } rlt.devs = devs; rlt.showMode = 0;//显示模式 0 模块 1 列表 Response.ContentType = "application/Json"; Response.Write(JsonConvert.SerializeObject(rlt)); }
protected void Page_Load(object sender, EventArgs e) { uClassKind = Parse(Request["dwClassKind"]); szDevNameURL = GetJustNameEqual(uClassKind, "DevClass_dwKind", false); string szlab = Request["lab"]; string szCampus = Request["campus"]; string szRunState = Request["dwRunStat"]; string szRoom = Request["szRoom"]; string szDevCls = Request["szDevCls"]; string szDevKinds = Request["szDevKinds"]; string szDevName = Request["szDevName"]; //========================= UNILAB[] lab = GetAllLab(); if (lab != null && lab.Length > 0) { for (int i = 0; i < lab.Length; i++) { m_szLab += "<label><input class=\"enum\" type=\"" + "checkbox" + "\" name=\"" + "lab" + "\" value=\"" + lab[i].dwLabID.ToString() + "\" /> " + lab[i].szLabName.ToString() + "</label>"; } } UNICAMPUS[] camp = GetAllCampus(); if (camp != null && camp.Length > 0) { for (int i = 0; i < camp.Length; i++) { m_szCamp += "<label><input class=\"enum\" type=\"" + "checkbox" + "\" name=\"" + "campus" + "\" value=\"" + camp[i].dwCampusID.ToString() + "\" /> " + camp[i].szCampusName.ToString() + "</label>"; } } UNIDEVKIND[] devKind = GetDevKindByKind((uint)UNIDEVCLS.DWKIND.CLSKIND_COMMONS); if (devKind != null && devKind.Length > 0) { for (int i = 0; i < devKind.Length; i++) { m_szDevKind += "<label><input class=\"enum\" type=\"" + "checkbox" + "\" name=\"" + "szDevKinds" + "\" value=\"" + devKind[i].dwKindID.ToString() + "\" /> " + devKind[i].szKindName.ToString() + "</label>"; } } REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; DEVREQ vrParameter = new DEVREQ(); if (szDevName != null && szDevName != "") { vrParameter.szSearchKey = szDevName; } if (szlab != null && szlab != "") { vrParameter.szLabIDs = szlab; } if (szRoom != null && szRoom != "") { vrParameter.szRoomIDs = szRoom; } if (szRunState != null && szRunState != "") { vrParameter.dwRunStat = CharListToUint(szRunState); } if (szDevCls != null && szDevCls != "") { vrParameter.szClassIDs = (szDevCls); } if (szDevKinds != null && szDevKinds != "") { vrParameter.szKindIDs = (szDevKinds); } vrParameter.dwProperty = (uint)DEVREQ.DWREQPROP.DEVREQ_NEEDDEVUSE; GetPageCtrlValue(out vrParameter.szReqExtInfo); vrParameter.dwClassKind = (uint)UNIDEVCLS.DWKIND.CLSKIND_COMMONS; UNIDEVICE[] vrResult; uResponse = m_Request.Device.Get(vrParameter, out vrResult); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS) { for (int i = 0; i < vrResult.Length; i++) { uint uState = (uint)vrResult[i].dwDevStat; uint uRunState = 0; uint uRunStateConst = (uint)vrResult[i].dwRunStat; if (vrResult[i].dwRunStat != null) { uRunState = (uint)vrResult[i].dwRunStat; } string szRunStateTitle = ""; if ((uRunState & (uint)UNIDEVICE.DWRUNSTAT.DEVSTAT_INUSE) > 0) { uRunState = (uint)UNIDEVICE.DWRUNSTAT.DEVSTAT_INUSE; szRunStateTitle = GetJustName((uint)UNIDEVICE.DWRUNSTAT.DEVSTAT_INUSE, "DEVICE_RunState"); } else { if (vrResult[i].dwRunStat != null) { uRunState = (uint)vrResult[i].dwRunStat; } else { uRunState = 0; } szRunStateTitle = GetJustName(uRunState, "DEVICE_RunState"); } string szState = "devRunState" + uRunState.ToString(); if (szRunStateTitle == "") { szRunStateTitle = GetJustNameEqual(0, "DEVICE_RunState"); } m_szOut += "<tr>"; m_szOut += "<td data-roomno=\"" + vrResult[i].szRoomNo.ToString() + "\" data-roomid=\"" + vrResult[i].dwRoomID.ToString() + "\" data-groupid=\"" + vrResult[i].dwUseGroupID.ToString() + "\" data-name=\"" + vrResult[i].szDevName.ToString() + "\" data-labid=\"" + vrResult[i].dwLabID.ToString() + "\" data-id=\"" + vrResult[i].dwDevID.ToString() + "\">" + vrResult[i].szDevName.ToString() + "</td>"; string szRoomState = GetJustName(uRunStateConst, "Unidcs_dwStatusDev"); if (szRoomState == "") { m_szOut += "<td>" + "未启用" + "</td>"; } else { m_szOut += "<td>" + szRoomState + "</td>"; } DEVUSEINFO[] vtDevUseInfo = vrResult[i].DevUse; bool bIsUse = true; if (vtDevUseInfo == null || vtDevUseInfo.Length > 0) { bIsUse = false; } if (bIsUse) { m_szOut += "<td class='lnkAccount' data-id='" + vtDevUseInfo[0].dwAccNo + "'>" + vtDevUseInfo[0].szTrueName + "</td>"; } else { m_szOut += "<td>" + "" + "</td>"; } string szTotalUseMin = ""; if (ConfigConst.GCDevLoginTime == 1) { if (bIsUse && vtDevUseInfo[0].dwBeginTime != null && (uint)vtDevUseInfo[0].dwBeginTime != 0) { uint uTotalUseMin = (Get1970Seconds(DateTime.Now.ToString("yyyy-MM-dd HH:mm")) - (uint)vtDevUseInfo[0].dwBeginTime); if (uTotalUseMin > 0 && uTotalUseMin <= 5184000) { szTotalUseMin = GetTimeForSecond(uTotalUseMin); } m_szOut += "<td>" + szTotalUseMin + "</td>"; } else { m_szOut += "<td></td>"; } } else { if (bIsUse) { szTotalUseMin = Get1970Date(vtDevUseInfo[0].dwBeginTime, "MM-dd HH:mm"); m_szOut += "<td>" + szTotalUseMin + "</td>"; } else { m_szOut += "<td>" + "" + "</td>"; } } if (ConfigConst.GCDevListCol == 1) { if (bIsUse && (uint)vtDevUseInfo[0].dwBeginTime != 0) { m_szOut += "<td>" + Get1970Date((uint)vtDevUseInfo[0].dwBeginTime, "MM-dd HH:mm") + "到" + Get1970Date((uint)vtDevUseInfo[0].dwLeaveTime, "MM-dd HH:mm") + "</td>"; } else { m_szOut += "<td></td>"; } } m_szOut += "<td class='thCenter'><div class='OPTD OPTDBtnRec'></div></td>"; m_szOut += "</tr>"; } UpdatePageCtrl(m_Request.Device); } PutBackValue(); }
protected void Page_Load(object sender, EventArgs e) { string szlab = Request["lab"]; string szCampus = Request["campus"]; string szRunState = Request["dwRunStat"]; string szRoom = Request["szRoom"]; string szDevCls = Request["szDevCls"]; //========================= string szDevName = Request["devName"]; UNICAMPUS[] camp = GetAllCampus(); if (camp != null && camp.Length > 0) { for (int i = 0; i < camp.Length; i++) { m_szCamp += "<label><input class=\"enum\" type=\"" + "checkbox" + "\" name=\"" + "campus" + "\" value=\"" + camp[i].dwCampusID.ToString() + "\" /> " + camp[i].szCampusName.ToString() + "</label>"; } } string szOP = Request["op"]; string szID = Request["id"]; if (szOP == "usable") { Usable(szID); } REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; DEVREQ vrParameter = new DEVREQ(); vrParameter.dwReqProp = (uint)DEVREQ.DWREQPROP.DEVREQ_NEEDDEVUSE; if (szCampus != null && szCampus != "") { vrParameter.szCampusIDs = szCampus; } if (szDevName != null && szDevName != "") { vrParameter.szSearchKey = szDevName; } GetPageCtrlValue(out vrParameter.szReqExtInfo); UNIDEVICE[] vrResult; uResponse = m_Request.Device.Get(vrParameter, out vrResult); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vrResult.Length > 0) { for (int i = 0; i < vrResult.Length; i++) { uint uState = (uint)vrResult[i].dwDevStat; uint uRunState = 0; uint uRunStateConst = (uint)vrResult[i].dwRunStat; if (vrResult[i].dwRunStat != null) { uRunState = (uint)vrResult[i].dwRunStat; } string szRunStateTitle = ""; if ((uRunState & (uint)UNIDEVICE.DWRUNSTAT.DEVSTAT_INUSE) > 0) { uRunState = (uint)UNIDEVICE.DWRUNSTAT.DEVSTAT_INUSE; szRunStateTitle = GetJustName((uint)UNIDEVICE.DWRUNSTAT.DEVSTAT_INUSE, "DEVICE_RunState"); } else { if (vrResult[i].dwRunStat != null) { uRunState = (uint)vrResult[i].dwRunStat; } else { uRunState = 0; } szRunStateTitle = GetJustName(uRunState, "DEVICE_RunState"); } string szState = "devRunState" + uRunState.ToString(); if (szRunStateTitle == "") { szRunStateTitle = GetJustNameEqual(0, "DEVICE_RunState"); } m_szOut += "<tr>"; m_szOut += "<td data-roomno=\"" + vrResult[i].szRoomNo.ToString() + "\" data-openrulesn=\"" + vrResult[i].dwOpenRuleSN.ToString() + "\" data-groupid=\"" + vrResult[i].dwUseGroupID.ToString() + "\" data-name=\"" + vrResult[i].szDevName.ToString() + "\" data-labid=\"" + vrResult[i].dwLabID.ToString() + "\" data-id=\"" + vrResult[i].dwDevID.ToString() + "\">" + "<img src=\"../../../themes/icon_s/" + szState + ".ico\" class=\"imgico\" />" + "</td>"; m_szOut += "<td data-id='" + vrResult[i].dwDevID.ToString() + "'>" + vrResult[i].szAssertSN.ToString() + "</td>"; m_szOut += "<td>" + vrResult[i].szDevName.ToString() + "</td>"; m_szOut += "<td>" + vrResult[i].szBuildingName.ToString() + "</td>"; m_szOut += "<td>" + vrResult[i].szCampusName.ToString() + "</td>"; DEVUSEINFO[] vtDevUseInfo = vrResult[i].DevUse; bool bIsUse = true; if (vtDevUseInfo == null || vtDevUseInfo.Length > 0) { bIsUse = false; } if (bIsUse) { if (vtDevUseInfo.Length > 0 && vtDevUseInfo[0].szTrueName != null) { m_szOut += "<td class='lnkAccount' data-id='" + vtDevUseInfo[0].dwAccNo + "'>" + vtDevUseInfo[0].szTrueName + "</td>"; } else { m_szOut += "<td></td>"; } } else { m_szOut += "<td>" + "" + "</td>"; } m_szOut += "<td>" + GetJustNameEqual(vrResult[i].dwDevStat, "UNIDEVICE_DevStat") + "</td>"; m_szOut += "<td class='thCenter'><div class='OPTD OPTDBtnRec'></div></td>"; m_szOut += "</tr>"; } UpdatePageCtrl(m_Request.Device); } PutBackValue(); }
protected void Page_Load(object sender, EventArgs e) { string szlab = Request["lab"]; //========================= UNILAB[] lab = GetAllLab(); if (lab != null && lab.Length > 0) { /* * if (string.IsNullOrEmpty(szlab)) * { * szlab = lab[0].dwLabID.ToString(); * } */ m_szLab += "<option value='0'>选择" + ConfigConst.GCLabName + "</option>"; for (int i = 0; i < lab.Length; i++) { m_szLab += "<option value='" + lab[i].dwLabID + "'"; if (szlab == lab[i].dwLabID.ToString()) { m_szLab += "checked='checked'"; } m_szLab += ">" + lab[i].szLabName + "</option>"; } } //========================= DEVREQ vrParameter = new DEVREQ(); UNIDEVICE[] vrResult; if (szlab != null && szlab != "0") { vrParameter.szLabIDs = szlab; } vrParameter.dwClassKind = (uint)UNIDEVCLS.DWKIND.CLSKIND_COMMONS; if (Request["delID"] != null) { DelDevAndRoom(Request["delID"]); } if (vrParameter.szReqExtInfo.szOrderKey == null || vrParameter.szReqExtInfo.szOrderKey == "") { vrParameter.szReqExtInfo.szOrderKey = "dwUnitPrice"; vrParameter.szReqExtInfo.szOrderMode = "asc"; } GetPageCtrlValue(out vrParameter.szReqExtInfo); if (m_Request.Device.Get(vrParameter, out vrResult) == REQUESTCODE.EXECUTE_SUCCESS) { UpdatePageCtrl(m_Request.Device); for (int i = 0; i < vrResult.Length; i++) { UNIROOM uniRoom = new UNIROOM(); m_szOut += "<tr>"; if (GetRoomID(vrResult[i].dwRoomID.ToString(), out uniRoom)) { m_szOut += "<td class=\"1\" data-roomno=" + vrResult[i].szRoomNo + " data-roomname=\"" + vrResult[i].szRoomName + "\" data-roomid=" + vrResult[i].dwRoomID.ToString() + " data-id=" + vrResult[i].dwDevID.ToString() + " ManGroupID=" + uniRoom.dwManGroupID.ToString() + ">" + vrResult[i].szRoomNo + "</td>"; } else { m_szOut += "<td class=\"1\" data-roomno=" + vrResult[i].szRoomNo + " data-roomname=\"" + vrResult[i].szRoomName + "\" data-roomid=" + vrResult[i].dwRoomID.ToString() + " data-id=" + vrResult[i].dwDevID.ToString() + " ManGroupID=" + vrResult[i].dwManGroupID.ToString() + ">" + vrResult[i].szRoomNo + "</td>"; } m_szOut += "<td>" + vrResult[i].szDevName + "</td>"; m_szOut += "<td>" + vrResult[i].dwMinUsers + "</td>"; m_szOut += "<td>" + vrResult[i].dwMaxUsers + "</td>"; m_szOut += "<td>" + vrResult[i].szKindName + "</td>"; m_szOut += "<td class='lnkLab' data-id='" + vrResult[i].dwLabID + "' title='查看" + ConfigConst.GCLabName + "信息'>" + vrResult[i].szLabName + "</td>"; DEVOPENRULE devOpenRule; if (getOpenRuleByID(vrResult[i].dwOpenRuleSN.ToString(), out devOpenRule)) { m_szOut += "<td>" + devOpenRule.szRuleName.ToString() + "</td>"; } else { m_szOut += "<td></td>"; } m_szOut += "<td>" + GetJustName((uint)vrResult[i].dwManMode, "Room_dwManMode") + "</td>"; m_szOut += "<td><div class='OPTD class2'></div></td>"; m_szOut += "</tr>"; } } PutBackValue(); }
protected void Page_Load(object sender, EventArgs e) { UNIBUILDING[] vtBuliding = getAllBuilding(); string szIsOutDoor = Request["isOutDoor"]; for (int i = 0; i < vtBuliding.Length; i++) { sz_building += GetInputItemHtml(CONSTHTML.option, "", vtBuliding[i].szBuildingName, vtBuliding[i].dwBuildingID.ToString()); } UNIDEVCLS[] vtClass = GetAllDevCls(); for (int i = 0; i < vtClass.Length; i++) { sz_DevCls += GetInputItemHtml(CONSTHTML.option, "", vtClass[i].szClassName, vtClass[i].dwClassID.ToString()); } UNILAB[] vtLab = GetAllLab(); for (int i = 0; i < vtLab.Length; i++) { sz_Lab += GetInputItemHtml(CONSTHTML.option, "", vtLab[i].szLabName, vtLab[i].dwLabID.ToString()); } if (IsPostBack) { UNIDEVICE setDevice; GetHTTPObj(out setDevice); UNIROOM setRoom = new UNIROOM(); setRoom.dwLabID = setDevice.dwLabID; setRoom.szRoomName = setDevice.szDevName; setRoom.szRoomNo = setDevice.szAssertSN; setDevice.dwDevSN = Parse(setDevice.szAssertSN); setRoom.dwCampusID = GetBuilding((uint)setDevice.dwBuildingID); setRoom.dwBuildingID = setDevice.dwBuildingID; UNIGROUP mangroup = new UNIGROUP(); if (NewGroup(setDevice.szDevName.ToString(), (uint)UNIGROUP.DWKIND.GROUPKIND_MAN, out mangroup)) { setRoom.dwManGroupID = mangroup.dwGroupID; } setRoom.dwOpenRuleSN = 1404; if (m_Request.Device.RoomSet(setRoom, out setRoom) == REQUESTCODE.EXECUTE_SUCCESS) { } setDevice.dwRoomID = setRoom.dwRoomID; UNIDEVKIND newKind = new UNIDEVKIND(); newKind.szKindName = setDevice.szDevName; newKind.dwProperty = 1; newKind.dwMinUsers = 1; newKind.dwMaxUsers = setDevice.dwMaxUsers; if (m_Request.Device.DevKindSet(newKind, out newKind) == REQUESTCODE.EXECUTE_SUCCESS) { } setDevice.dwKindID = newKind.dwKindID; if (m_Request.Device.Set(setDevice, out setDevice) == REQUESTCODE.EXECUTE_SUCCESS) { MessageBox("设置成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); return; } else { MessageBox(m_Request.szErrMessage, "设置失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); return; } } if (Request["op"] == "set") { bSet = true; DEVREQ vrGet = new DEVREQ(); string devID = Request["id"]; vrGet.dwDevID = Parse(Request["id"]); UNIDEVICE[] vtDev; if (m_Request.Device.Get(vrGet, out vtDev) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { if (vtDev.Length == 0) { MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { UNIDEVKIND devKind; if (GetDevKindByID(vtDev[0].dwKindID.ToString(), out devKind)) { if (((uint)devKind.dwProperty & (uint)UNIDEVKIND.DWPROPERTY.DEVPROP_SHARE) > 0) { PutMemberValue("isOutDoor", "1"); sz_Share = "1"; if (devKind.dwNationCode != null) { PutMemberValue("num", devKind.dwNationCode.ToString()); } else { PutMemberValue("num", "0"); } vtDev[0].dwMaxUsers = ((uint)vtDev[0].dwMaxUsers) / (uint)devKind.dwNationCode; } PutMemberValue("isOutDoor", "0"); } PutJSObj(vtDev[0]); m_Title = "修改【" + vtDev[0].szDevName + "】"; } } } else { m_Title = "新建"; } }
protected void Page_Load(object sender, EventArgs e) { UNIDEVICE newDev; uint? uMax = 0; uint uID = PRDevice.DEVICE_BASE | PRDevice.MSREQ_DEVICE_SET; if (GetMaxValue(ref uMax, uID, "dwDevSN")) { } if (IsPostBack) { GetHTTPObj(out newDev); // newDev.dwDevSN = GetDevSN(); newDev.dwProperty = CharListToUint(Request["dwProperty"]); newDev.dwManMode = CharListToUint(Request["dwManMode"]); UNIROOM newRoom = new UNIROOM(); newRoom.dwRoomID = newDev.dwRoomID; newRoom.dwLabID = newDev.dwLabID; newRoom.szRoomNo = newDev.szRoomNo; newRoom.szRoomName = newDev.szDevName; newRoom.dwOpenRuleSN = newDev.dwOpenRuleSN; newRoom.dwManMode = newDev.dwManMode; newRoom.szSubRooms = GetRoomNoCtrlList(Request["szSubRooms"]); if (m_Request.Device.RoomSet(newRoom, out newRoom) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "修改" + ConfigConst.GCSysKindRoom + "失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); return; } else { newDev.dwRoomID = newRoom.dwRoomID; } if (m_Request.Device.Set(newDev, out newDev) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "修改" + ConfigConst.GCSysKindRoom + "失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); return; } else { MessageBox("修改" + ConfigConst.GCSysKindRoom + "成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); } } uint uRoomMode = (uint)(UNIROOM.DWMANMODE.ROOMMAN_CAMERA | UNIROOM.DWMANMODE.ROOMMAN_DOORLOCK | UNIROOM.DWMANMODE.ROOMMAN_FREEINOUT); m_szRoomMode = GetInputHtml(uRoomMode, CONSTHTML.checkBox, "dwManMode", "Room_dwManMode"); DEVOPENRULE[] vtOpenRule = GetAllOpenRule(); if (vtOpenRule != null && vtOpenRule.Length > 0) { for (int i = 0; i < vtOpenRule.Length; i++) { m_szOpenRule += "<option value='" + vtOpenRule[i].dwRuleSN + "'>" + vtOpenRule[i].szRuleName + "</option>"; } } m_szCtrlMode = GetAllInputHtml(CONSTHTML.option, "", "UNIDEVICE_CtrlMode"); UNIADMIN[] adminlist; if (GetAdmin(out adminlist) == true) { for (int i = 0; i < adminlist.Length; i++) { m_szManager += "<option value='" + adminlist[i].dwAccNo.ToString() + "'>" + adminlist[i].szTrueName + "</option>"; } } UNILAB[] vtLab = GetAllLab(); if (vtLab != null && vtLab.Length > 0) { for (int i = 0; i < vtLab.Length; i++) { m_szLab += "<option value='" + vtLab[i].dwLabID + "'>" + vtLab[i].szLabName + "</option>"; } } UNIROOM[] vtRoom = GetAllRoom(); for (int i = 0; vtRoom != null && i < vtRoom.Length; i++) { m_szRooms += GetInputItemHtml(CONSTHTML.checkBox, "szSubRooms", vtRoom[i].szRoomName, vtRoom[i].szRoomNo); } UNICHANNELGATE[] vtChannel = GetAllChannelGate(); for (int i = 0; vtChannel != null && i < vtChannel.Length; i++) { //m_szRooms += GetInputItemHtml(CONSTHTML.checkBox, "szSubRooms", vtChannel[i].szChannelGateName, vtChannel[i].szChannelGateNo); } m_szPorperty = GetInputHtmlFromXml(0, CONSTHTML.checkBox, "dwProperty", "UNIDEVICE_Property", true); if (Request["op"] == "set") { bSet = true; DEVREQ vrDevReq = new DEVREQ(); vrDevReq.dwDevID = Parse(Request["id"]); UNIDEVICE[] vtDev; if (m_Request.Device.Get(vrDevReq, out vtDev) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { if (vtDev.Length == 0) { MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { PutJSObj(vtDev[0]); UNIROOM setRoom; if (GetRoomID(vtDev[0].dwRoomID.ToString(), out setRoom)) { PutMemberValue("szSubRooms", setRoom.szSubRooms.ToString()); } m_Title = "修改【" + vtDev[0].szDevName + "】"; } } } else { m_Title = "修改" + ConfigConst.GCSysKindRoom; } }
protected void Page_Load(object sender, EventArgs e) { string szlab = Request["lab"]; string szroom = null;// Request["room"]; //========================= UNILAB[] lab = GetAllLab(); if (lab != null && lab.Length > 0) { m_szLab += "<option value='0'>" + "全部" + "</option>"; for (int i = 0; i < lab.Length; i++) { m_szLab += "<option value='" + lab[i].dwLabID + "'"; if (szlab == lab[i].dwLabID.ToString()) { m_szLab += "checked='checked'"; } m_szLab += ">" + lab[i].szLabName + "</option>"; } } ROOMREQ reqRoom = new ROOMREQ(); UNIROOM[] room; m_Request.Device.RoomGet(reqRoom, out room); if (room != null && room.Length > 0) { { string szorgroom = szroom; szroom = room[0].dwRoomID.ToString(); for (int i = 0; i < room.Length; i++) { if (szorgroom == room[i].dwRoomID.ToString()) { szroom = szorgroom; break; } } } for (int i = 0; i < room.Length; i++) { m_szRoom += "<option value='" + room[i].dwRoomID + "'"; if (szroom == room[i].dwRoomID.ToString()) { m_szRoom += "checked='checked'"; } m_szRoom += ">" + room[i].szRoomName + "</option>"; } } //========================= DEVREQ vrParameter = new DEVREQ(); GetHTTPObj(out vrParameter); if (szroom != null) { m_szOpts += "机房号:" + szroom; //vrParameter.szRoomIDs = (szroom); } if (szlab != null) { m_szOpts += "实验室:" + szlab; vrParameter.szLabIDs = (szlab); } if (vrParameter.szLabIDs == "0") { vrParameter.szLabIDs = null; } if (vrParameter.szRoomIDs == "") { vrParameter.szRoomIDs = null; } if (Request["delID"] != null) { Del(Request["delID"], Request["delParentID"]); } uint uDevSN = Parse(Request["szDevSN"]); if (uDevSN != 0) { vrParameter.dwDevSN = uDevSN; } UNIDEVICE[] vrResult; //vrParameter.dwProperty = (uint)(UNIDEVKIND.DWPROPERTY.DEVPROP_EXCLUSIVE | UNIDEVKIND.DWPROPERTY.DEVPROP_SHARE); GetPageCtrlValue(out vrParameter.szReqExtInfo); if (m_Request.Device.Get(vrParameter, out vrResult) == REQUESTCODE.EXECUTE_SUCCESS) { for (int i = 0; i < vrResult.Length; i++) { m_szOut += "<tr>"; m_szOut += "<td data-id='" + vrResult[i].dwDevID.ToString() + "' data-kindid='" + vrResult[i].dwKindID.ToString() + "' data-labid='" + vrResult[i].dwLabID.ToString() + "'>" + vrResult[i].dwDevSN + "</td>"; // m_szOut += "<td>" + vrResult[i]..ToString() + "</td>"; // m_szOut += "<td class='lnkDevice' data-id='" + vrResult[i].dwDevID + "'>" + vrResult[i].szPCName.ToString() + "</td>"; m_szOut += "<td>" + vrResult[i].szDevName + "</td>"; m_szOut += "<td>" + vrResult[i].szIP.ToString() + "</td>"; m_szOut += "<td>" + vrResult[i].szKindName + "</td>"; m_szOut += "<td>" + vrResult[i].szModel + "</td>"; m_szOut += "<td>" + vrResult[i].szSpecification + "</td>"; m_szOut += "<td>" + vrResult[i].dwUnitPrice + "</td>"; m_szOut += "<td>" + DateToStr(vrResult[i].dwPurchaseDate) + "</td>"; m_szOut += "<td class='lnkLab' data-id='" + vrResult[i].dwLabID + "'>" + vrResult[i].szLabName + "</td>"; m_szOut += "<td class='lnkRoom' data-id='" + vrResult[i].dwRoomID + "'>" + vrResult[i].szRoomName + "</td>"; m_szOut += "<td><div class='OPTD'></div></td>"; m_szOut += "</tr>"; } UpdatePageCtrl(m_Request.Device); } PutBackValue(); }
protected void Page_Load(object sender, EventArgs e) { UNICAMPUS[] vtCamp = GetAllCampus(); szCamp += GetInputItemHtml(CONSTHTML.option, "", "全部", "0"); if (vtCamp != null && vtCamp.Length > 0) { for (int i = 0; i < vtCamp.Length; i++) { szCamp += GetInputItemHtml(CONSTHTML.option, "", vtCamp[i].szCampusName, vtCamp[i].dwCampusID.ToString()); } } UNIDEVCLS[] vtKind = GetAllDevCls(); szKinds += GetInputItemHtml(CONSTHTML.option, "", "全部", "0"); for (int i = 0; vtKind != null && i < vtKind.Length; i++) { szKinds += GetInputItemHtml(CONSTHTML.option, "", vtKind[i].szClassName.ToString(), vtKind[i].dwClassID.ToString()); } UNIBUILDING[] vtBuilding = getAllBuilding(); szBuilding += GetInputItemHtml(CONSTHTML.option, "", "全部", "0"); for (int i = 0; i < vtBuilding.Length; i++) { if (vtBuilding[i].dwCampusID.ToString() == vtCamp[0].dwCampusID.ToString()) { szBuilding += GetInputItemHtml(CONSTHTML.option, "", vtBuilding[i].szBuildingName.ToString(), vtBuilding[i].dwBuildingID.ToString()); } } CODINGTABLE[] vtCodeing = getCodeTableByType((uint)CODINGTABLE.DWCODETYPE.CODE_YARDRESVKIND); for (int i = 0; vtCodeing != null && i < vtCodeing.Length; i++) { szYardKind += GetInputItemHtml(CONSTHTML.radioButton, "dwKind", vtCodeing[i].szCodeName, vtCodeing[i].szCodeSN); } UNILAB newLab; if (IsPostBack) { REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; string szCheckIDs = Request["ID"]; string[] szCheckIDList = szCheckIDs.Split(','); for (int i = 0; i < szCheckIDList.Length; i++) { uint uTempID = Parse(szCheckIDList[i]); if (uTempID == 0) { continue;; } YARDRESVCHECKINFOREQ vrPar = new YARDRESVCHECKINFOREQ(); vrPar.dwCheckID = uTempID; vrPar.dwNeedYardResv = 1; YARDRESVCHECKINFO[] vtRes; uResponse = m_Request.Reserve.GetYardResvCheckInfo(vrPar, out vtRes); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS == vtRes.Length > 0) { if (i > 0) { CHECKTYPE checktype = new CHECKTYPE(); if (GetCheckType((uint)vtRes[0].dwCheckKind, out checktype)) { if ((checktype.dwMainKind & (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_SERVICE) > 0) { continue; } } else { continue; } } uResponse = CheckAll(vtRes); } } if (uResponse == REQUESTCODE.EXECUTE_SUCCESS) { Session["checkid"] = szCheckIDs; MessageBox("审核通过", "", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); } else { MessageBox(m_Request.szErrMessage, "审核失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } } if (Request["op"] == "set") { bSet = true; REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; YARDRESVCHECKINFOREQ vrPar = new YARDRESVCHECKINFOREQ(); string szCheckIDs = Request["ID"]; PutMemberValue("ID", szCheckIDs); string[] szCheckIDList = szCheckIDs.Split(','); vrPar.dwCheckID = Parse(szCheckIDList[0]); vrPar.dwNeedYardResv = 1; string szCheckURl = Request["checkstate"]; if (szCheckURl != null && szCheckURl != "") { PutMemberValue("szCheckURl", szCheckURl); } YARDRESVCHECKINFO[] vtRes; uResponse = m_Request.Reserve.GetYardResvCheckInfo(vrPar, out vtRes); if (uResponse != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else if (vtRes.Length > 0 && vtRes[0].YardResv.dwActivitySN != null) { YARDRESV yardResv = vtRes[0].YardResv; szMemoYardResv = vtRes[0].YardResv.szMemo; uint uResvPro = (uint)yardResv.dwProperty; if ((uResvPro & (uint)UNIRESERVE.DWPROPERTY.RESVPROP_PROFIT) > 0) { PutMemberValue("resvPro1", "1"); } else { PutMemberValue("resvPro1", "2"); } if ((uResvPro & (uint)UNIRESERVE.DWPROPERTY.RESVPROP_UNOPEN) > 0) { PutMemberValue("resvPro2", "1"); } else { PutMemberValue("resvPro2", "2"); } PutMemberValue("YardActivitySN", yardResv.dwActivitySN.ToString()); PutMemberValue("dwKind", yardResv.dwKind.ToString()); if (vtRes[0].YardResv.szCycRule == "") { yardResv.szCycRule = Get1970Date(yardResv.dwBeginTime) + "至" + Get1970Date(yardResv.dwEndTime) + ";"; } PutHTTPObj(yardResv); if (vtRes.Length == 0) { MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else if (vtRes.Length > 0) { YARDRESVCHECKINFOREQ vrParCheck = new YARDRESVCHECKINFOREQ(); vrParCheck.dwResvID = vtRes[0].dwResvID; vrPar.dwNeedYardResv = 1; YARDRESVCHECKINFO[] vtResCheck; uResponse = m_Request.Reserve.GetYardResvCheckInfo(vrParCheck, out vtResCheck); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtResCheck.Length > 0) { szPreCheckDetail += "<table>"; for (int m = 0; m < vtResCheck.Length; m++) { if ((vtResCheck[m].dwCheckStat & ((uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_OK)) > 0) { UNIDEPT dept; string szDept = ""; szPreCheckDetail += "<tr>"; if (GetDeptByID(vtResCheck[m].dwCheckDeptID.ToString(), out dept)) { szDept = dept.szName.ToString(); } szPreCheckDetail += "<td>" + szDept + "</td>"; szPreCheckDetail += "<td>" + vtResCheck[m].szCheckName + "</td>"; szPreCheckDetail += "<td>" + Get1970Date(vtResCheck[m].dwCheckTime) + "</td>"; szPreCheckDetail += "<td>" + vtResCheck[m].szCheckDetail + "</td>"; szPreCheckDetail += "<td>" + vtResCheck[m].szAdminName + "</td>"; szPreCheckDetail += "</tr>"; } } szPreCheckDetail += "</table>"; } CHECKTYPEREQ vrGetcheckTypeTemp = new CHECKTYPEREQ(); vrGetcheckTypeTemp.dwCheckKind = vtRes[0].dwCheckKind; CHECKTYPE[] vtCheckTypeTemp; if (m_Request.Admin.CheckTypeGet(vrGetcheckTypeTemp, out vtCheckTypeTemp) == REQUESTCODE.EXECUTE_SUCCESS && vtCheckTypeTemp != null && vtCheckTypeTemp.Length > 0) { ArrayList listDev = new ArrayList(); string[] szDevIDList = (vtRes[0].YardResv.dwDevID.ToString() + "," + vtRes[0].YardResv.szSpareDevIDs).Split(','); for (int k = 0; k < szDevIDList.Length && szDevIDList[k] != ""; k++) { DEVREQ vrGetDev = new DEVREQ(); vrGetDev.dwDevID = Parse(szDevIDList[k]); UNIDEVICE[] vtDev; uResponse = m_Request.Device.Get(vrGetDev, out vtDev); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtDev != null && vtDev.Length > 0) { listDev.Add(vtDev[0]); } } if ((((uint)vtCheckTypeTemp[0].dwMainKind) & ((uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_DEVMAN)) > 0) { if (listDev.Count > 0) { for (int i = 0; i < listDev.Count; i++) { UNIDEVICE objDev = (UNIDEVICE)listDev[i]; szDevList += GetInputItemHtml(CONSTHTML.option, "", objDev.szDevName.ToString(), objDev.dwDevID.ToString()); } szIsCheck = "true"; PutMemberValue("devID", vtRes[0].YardResv.dwDevID.ToString()); } } } } szResvDevName = vtRes[0].YardResv.szDevName; szResvDevDept = vtRes[0].YardResv.szDeptName; szApplyName = vtRes[0].szApplicantName; szActivity = vtRes[0].YardResv.szActivityName; szPeople = vtRes[0].YardResv.dwMinAttendance.ToString() + "-" + vtRes[0].YardResv.dwMaxAttendance.ToString() + "人"; szOrganiger = vtRes[0].YardResv.szOrganization; szOrganization = vtRes[0].YardResv.szOrganization; PutMemberValue("dwCheckID", vtRes[0].dwCheckID.ToString()); szPreDate = vtRes[0].YardResv.dwPreDate.ToString(); szResvBegin = Get1970Date(vtRes[0].YardResv.dwBeginTime, "HHmm"); szResvEnd = Get1970Date(vtRes[0].YardResv.dwEndTime, "HHmm"); PutMemberValue("dwSecurityLevel", vtRes[0].YardResv.dwSecurityLevel.ToString()); szLeveal = GetJustNameEqual(vtRes[0].YardResv.dwActivityLevel, "Yard_ActivityLevel"); szSecurityLevel = GetJustNameEqual(vtRes[0].YardResv.dwSecurityLevel, "Yard_dwSecurityLevel"); szDirectors = GetJustNameEqual(vtRes[0].YardResv.dwCheckKinds, "Yard_dwDirectors"); uint uCheckKinds = (uint)vtRes[0].YardResv.dwCheckKinds; CHECKTYPEREQ vrCheckTypeReq = new CHECKTYPEREQ(); vrCheckTypeReq.dwMainKind = (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_SERVICE; CHECKTYPE[] vtCheckType; if (m_Request.Admin.CheckTypeGet(vrCheckTypeReq, out vtCheckType) == REQUESTCODE.EXECUTE_SUCCESS && vtCheckType != null && vtCheckType.Length > 0) { for (int m = 0; m < vtCheckType.Length; m++) { if ((uCheckKinds & (uint)vtCheckType[m].dwCheckKind) > 0) { szServiceType += vtCheckType[m].szCheckName + ","; } } } if ((vtRes[0].YardResv.dwProperty & ((uint)UNIRESERVE.DWPROPERTY.RESVPROP_NEEDVIDEO)) > 0) { szNeedCameor = "需要"; } UNIACCOUNT accno; if (GetAccByAccno(vtRes[0].dwApplicantID.ToString(), out accno)) { accno.szTrueName = accno.szTrueName + "(" + accno.szLogonName + ")"; PutMemberValue("szTrueName", accno.szTrueName); szMemo = vtRes[0].YardResv.szMemo; string[] szMemoList = szMemo.Split('$'); if (szMemoList != null && szMemoList.Length > 0) { szMemo = szMemoList[0]; szMemoExt = szMemoList[0].Replace("&", ","); } } szResvTime = vtRes[0].YardResv.szCycRule; if (szResvTime == "") { szResvTime = Get1970Date(vtRes[0].YardResv.dwBeginTime) + "至" + Get1970Date(vtRes[0].YardResv.dwEndTime) + ";"; } if (vtRes[0].YardResv.szApplicationURL != null && vtRes[0].YardResv.szApplicationURL != "") { PutMemberValue("szApplicationURL", vtRes[0].YardResv.szApplicationURL); } m_Title = "审核"; } } else { m_Title = "审核"; } }
protected void Page_Load(object sender, EventArgs e) { UNIDEVICE newDev; uint? uMax = 0; uint uID = PRDevice.DEVICE_BASE | PRDevice.MSREQ_DEVICE_SET; if (GetMaxValue(ref uMax, uID, "dwDevSN")) { } if (IsPostBack) { GetHTTPObj(out newDev); newDev.dwDevSN = GetDevSN(); // newDev.dwProperty = CharListToUint(Request["dwProperty"]); uint uProperty = CharListToUint(Request["dwProperty2"]); if ((uProperty & (uint)UNIDEVICE.DWPROPERTY.DEVPROP_MAIN) > 0) { if (newDev.dwProperty == null) { newDev.dwProperty = 0; } newDev.dwProperty = (uint)newDev.dwProperty | (uint)UNIDEVICE.DWPROPERTY.DEVPROP_MAIN; } newDev.dwManMode = CharListToUint(Request["dwManMode"]); UNIGROUP newUseGroup; if (NewGroup(newDev.szDevName.ToString() + "使用组", (uint)UNIGROUP.DWKIND.GROUPKIND_DEV, out newUseGroup)) { newDev.dwUseGroupID = newUseGroup.dwGroupID; } else { return; } UNIGROUP newManGroup; UNIROOM newRoom = new UNIROOM(); if (NewGroup(newDev.szDevName.ToString() + "管理组", (uint)UNIGROUP.DWKIND.GROUPKIND_MAN, out newManGroup)) { newRoom.dwManGroupID = newManGroup.dwGroupID; } else { return; } newRoom.dwLabID = newDev.dwLabID; newRoom.szRoomNo = newDev.szRoomNo; newRoom.szRoomName = newDev.szDevName; newRoom.dwOpenRuleSN = newDev.dwOpenRuleSN; newRoom.dwBuildingID = 100440025; newRoom.dwCampusID = 1; newRoom.dwManMode = newDev.dwManMode; newRoom.dwInClassKind = (uint)UNIDEVCLS.DWKIND.CLSCOMMONS_MULTIPLE; if (m_Request.Device.RoomSet(newRoom, out newRoom) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "新建资源失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); return; } else { newDev.dwRoomID = newRoom.dwRoomID; } if (m_Request.Device.Set(newDev, out newDev) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "新建资源失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); return; } else { MessageBox("新建资源成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); UNIACCOUNT accInfo; if (newDev.dwAttendantID != null && GetAccByAccno(newDev.dwAttendantID.ToString(), out accInfo) == true) { DEVATTENDANT devAttendSet = new DEVATTENDANT(); devAttendSet.dwAttendantID = accInfo.dwAccNo; devAttendSet.szAttendantName = accInfo.szTrueName; devAttendSet.dwDevID = newDev.dwDevID; devAttendSet.dwLabID = newDev.dwLabID; m_Request.Device.AttendantSet(devAttendSet); return; } } } uint uRoomMode = (uint)(UNIROOM.DWMANMODE.ROOMMAN_CAMERA | UNIROOM.DWMANMODE.ROOMMAN_DOORLOCK | UNIROOM.DWMANMODE.ROOMMAN_FREEINOUT); m_szRoomMode = GetInputHtml(uRoomMode, CONSTHTML.checkBox, "dwManMode", "Room_dwManMode"); DEVOPENRULE[] vtOpenRule = GetAllOpenRule(); if (vtOpenRule != null && vtOpenRule.Length > 0) { for (int i = 0; i < vtOpenRule.Length; i++) { m_szOpenRule += "<option value='" + vtOpenRule[i].dwRuleSN + "'>" + vtOpenRule[i].szRuleName + "</option>"; } } m_szCtrlMode = GetAllInputHtml(CONSTHTML.option, "", "UNIDEVICE_CtrlMode"); UNIADMIN[] adminlist; if (GetAdmin(out adminlist) == true) { for (int i = 0; i < adminlist.Length; i++) { m_szManager += "<option value='" + adminlist[i].dwAccNo.ToString() + "'>" + adminlist[i].szTrueName + "</option>"; } } UNILAB[] vtLab = GetAllLab(); if (vtLab != null && vtLab.Length > 0) { for (int i = 0; i < vtLab.Length; i++) { m_szLab += "<option value='" + vtLab[i].dwLabID + "'>" + vtLab[i].szLabName + "</option>"; } } m_szPorperty = GetInputHtmlFromXml(0, CONSTHTML.checkBox, "dwProperty", "UNIDEVICE_Property", true); if (Request["op"] == "set") { bSet = true; DEVREQ vrDevReq = new DEVREQ(); vrDevReq.dwDevID = Parse(Request["id"]); UNIDEVICE[] vtDev; if (m_Request.Device.Get(vrDevReq, out vtDev) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { if (vtDev.Length == 0) { MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { PutJSObj(vtDev[0]); m_Title = "修改【" + vtDev[0].szPCName + "】"; } } } else { m_Title = "新建资源"; } }
protected void Page_Load(object sender, EventArgs e) { UNIDEVICE newDev; uint? uMax = 0; uint uID = PRDevice.DEVICE_BASE | PRDevice.MSREQ_DEVICE_SET; if (GetMaxValue(ref uMax, uID, "dwDevSN")) { } if (IsPostBack) { GetHTTPObj(out newDev); newDev.dwProperty = CharListToUint(Request["dwProperty"]); newDev.dwPurchaseDate = DateToUint(Request["dwPurchaseDate"]); newDev.szExtInfo = GetDevExt(); UNIDEVKIND devKind = new UNIDEVKIND(); //newDev.dwKindID = devKind.dwKindID; if (m_Request.Device.Set(newDev, out newDev) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "修改" + ConfigConst.GCDevName + "失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); } else { /* * if (!NewDevKind(out devKind)) * { * MessageBox(m_Request.szErrMessage, "修改" + ConfigConst.GCDevName + "失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); * return; * } * */ MessageBox("修改" + ConfigConst.GCDevName + "成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); DEVATTENDANT devAttendSet = new DEVATTENDANT(); devAttendSet.dwAttendantID = Parse(Request["dwAttendantID"]); devAttendSet.dwDevID = newDev.dwDevID; devAttendSet.dwLabID = newDev.dwLabID; if (devAttendSet.dwAttendantID != null) { UNIACCOUNT acc; if (GetAccByAccno(devAttendSet.dwAttendantID.ToString(), out acc)) { devAttendSet.szAttendantName = acc.szTrueName; } } devAttendSet.szAttendantTel = Request["szAttendantTel"]; m_Request.Device.AttendantSet(devAttendSet); return; } } m_szCtrlMode = GetAllInputHtml(CONSTHTML.option, "", "UNIDEVICE_CtrlMode"); ACCREQ accGet = new ACCREQ(); accGet.dwIdent = (uint)UNIACCOUNT.DWIDENT.EXTIDENT_MANAGER; UNIACCOUNT[] vtAcc; m_Request.Account.Get(accGet, out vtAcc); if (vtAcc != null && vtAcc.Length > 0) { for (int i = 0; i < vtAcc.Length; i++) { m_szManager += "<option value='" + vtAcc[i].dwAccNo.ToString() + "'>" + vtAcc[i].szTrueName + "</option>"; } } UNIADMIN[] adminlist; if (GetAdmin(out adminlist) == true) { } UNILAB[] vtLab = GetAllLab(); if (vtLab != null && vtLab.Length > 0) { for (int i = 0; i < vtLab.Length; i++) { m_szLab += "<option value='" + vtLab[i].dwLabID + "'>" + vtLab[i].szLabName + "</option>"; } } UNIROOM[] vtRoom = GetAllRoom(); if (vtRoom != null && vtRoom.Length > 0) { for (int i = 0; i < vtRoom.Length; i++) { m_szRoom += "<option value='" + vtRoom[i].dwRoomID + "'>" + vtRoom[i].szRoomName + "</option>"; } } UNIDEVCLS[] vtDevCls = GetAllDevCls(); if (vtDevCls != null && vtDevCls.Length > 0) { for (int i = 0; i < vtDevCls.Length; i++) { m_szDevCls += "<option value='" + vtDevCls[i].dwClassID + "'>" + vtDevCls[i].szClassName + "</option>"; } } UNIDEVKIND[] vtDevKind = GetAllDevKind(); if (vtDevKind != null && vtDevKind.Length > 0) { for (int i = 0; i < vtDevKind.Length; i++) { m_szDevKind += "<option value='" + vtDevKind[i].dwKindID + "'>" + vtDevKind[i].szKindName + "</option>"; } } m_szPorperty = GetInputHtmlFromXml(0, CONSTHTML.checkBox, "dwProperty", "UNIDEVICE_Property", true); m_szKindPorperty = GetInputHtmlFromXml(0, CONSTHTML.checkBox, "dwKindProperty", "DevKind_dwProperty", true); if (Request["op"] == "set") { bSet = true; DEVREQ vrDevReq = new DEVREQ(); vrDevReq.dwDevID = Parse(Request["id"]); UNIDEVICE[] vtDev; if (m_Request.Device.Get(vrDevReq, out vtDev) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { if (vtDev.Length == 0) { MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { PutJSObj(vtDev[0]); ContDevExt(vtDev[0].szExtInfo.ToString()); UNIDEVKIND getDevKind = new UNIDEVKIND(); if (vtDev[0].dwKindID != null && GetDevKindByID(vtDev[0].dwKindID.ToString(), out getDevKind)) { ViewState["dwKindProperty"] = UintToCharList(getDevKind.dwProperty, "DevKind_dwProperty"); ViewState["dwUsableNum"] = getDevKind.dwUsableNum.ToString(); ViewState["szProducer"] = getDevKind.szProducer.ToString(); ViewState["szNation"] = getDevKind.dwNationCode.ToString(); } m_Title = "修改【" + vtDev[0].szPCName + "】"; } } } else { m_Title = "新建" + ConfigConst.GCDevName; } }
protected void Page_Load(object sender, EventArgs e) { string szlab = Request["lab"]; //========================= uClassKind = (Parse(Request["classkind"])); szDevName = GetJustNameEqual(uClassKind, "DevClass_dwKind", false); uClassKindGet = uClassKind - 1; UNIDEVICE newDev; if (IsPostBack) { GetHTTPObj(out newDev); newDev.dwDevSN = GetDevSN(); newDev.dwProperty = CharListToUint(Request["dwProperty"]); newDev.dwManMode = CharListToUint(Request["dwManMode"]); UNIGROUP newUseGroup; if (NewGroup(newDev.szDevName.ToString() + "使用组", (uint)UNIGROUP.DWKIND.GROUPKIND_DEV, out newUseGroup)) { newDev.dwUseGroupID = newUseGroup.dwGroupID; } else { return; } UNIGROUP newManGroup; UNIROOM newRoom = new UNIROOM(); if (NewGroup(newDev.szDevName.ToString() + "管理组", (uint)UNIGROUP.DWKIND.GROUPKIND_MAN, out newManGroup)) { newRoom.dwManGroupID = newManGroup.dwGroupID; } else { return; } newRoom.dwLabID = newDev.dwLabID; newRoom.szRoomNo = newDev.szRoomNo; newRoom.szRoomName = newDev.szDevName; newRoom.dwOpenRuleSN = newDev.dwOpenRuleSN; newRoom.dwManMode = newDev.dwManMode; newRoom.dwInClassKind = uClassKind;// newRoom.szSubRooms = GetRoomNoCtrlList(Request["szSubRooms"]); if (m_Request.Device.RoomSet(newRoom, out newRoom) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "新建" + szDevName + "失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); return; } else { newDev.dwRoomID = newRoom.dwRoomID; } if (m_Request.Device.Set(newDev, out newDev) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "新建" + szDevName + "失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); return; } else { MessageBox("新建" + szDevName + "成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); } } UNIROOM[] vtRoom = GetAllRoom(); for (int i = 0; vtRoom != null && i < vtRoom.Length; i++) { m_szRooms += GetInputItemHtml(CONSTHTML.checkBox, "szSubRooms", vtRoom[i].szRoomName, vtRoom[i].szRoomNo); } UNICHANNELGATE[] vtChannel = GetAllChannelGate(); for (int i = 0; vtChannel != null && i < vtChannel.Length; i++) { // m_szRooms += GetInputItemHtml(CONSTHTML.checkBox, "szSubRooms", vtChannel[i].szChannelGateName, vtChannel[i].szChannelGateNo); } uint uRoomMode = (uint)(UNIROOM.DWMANMODE.ROOMMAN_CAMERA | UNIROOM.DWMANMODE.ROOMMAN_DOORLOCK | UNIROOM.DWMANMODE.ROOMMAN_FREEINOUT); m_szRoomMode = GetInputHtml(uRoomMode, CONSTHTML.checkBox, "dwManMode", "Room_dwManMode"); DEVOPENRULE[] vtOpenRule = GetAllOpenRule(); if (vtOpenRule != null && vtOpenRule.Length > 0) { for (int i = 0; i < vtOpenRule.Length; i++) { m_szOpenRule += "<option value='" + vtOpenRule[i].dwRuleSN + "'>" + vtOpenRule[i].szRuleName + "</option>"; } } m_szCtrlMode = GetAllInputHtml(CONSTHTML.option, "", "UNIDEVICE_CtrlMode"); UNIADMIN[] adminlist; if (GetAdmin(out adminlist) == true) { for (int i = 0; i < adminlist.Length; i++) { m_szManager += "<option value='" + adminlist[i].dwAccNo.ToString() + "'>" + adminlist[i].szTrueName + "</option>"; } } UNILAB[] vtLab = GetAllLab(); if (vtLab != null && vtLab.Length > 0) { for (int i = 0; i < vtLab.Length; i++) { m_szLab += "<option value='" + vtLab[i].dwLabID + "'>" + vtLab[i].szLabName + "</option>"; } } m_szPorperty = GetInputHtmlFromXml(0, CONSTHTML.checkBox, "dwProperty", "UNIDEVICE_Property", true); if (Request["op"] == "set") { bSet = true; DEVREQ vrDevReq = new DEVREQ(); vrDevReq.dwDevID = Parse(Request["id"]); UNIDEVICE[] vtDev; if (m_Request.Device.Get(vrDevReq, out vtDev) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { if (vtDev.Length == 0) { MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { PutJSObj(vtDev[0]); m_Title = "修改【" + vtDev[0].szDevName + "】"; } } } else { m_Title = "新建" + szDevName; } }
protected void Page_Load(object sender, EventArgs e) { string szGroupID = Request["dwID"]; UNIGROUP[] groupList = GetGroupByID(uint.Parse(szGroupID)); if (groupList == null || groupList.Length == 0) { return; } UNIGROUP setGroup = groupList[0]; GROUPMEMBER[] groupMemberList = setGroup.szMembers; if (groupMemberList != null && groupMemberList.Length > 0) { for (int i = 0; i < groupMemberList.Length; i++) { string szNameTemp = groupMemberList[i].szName; if (szNameTemp == null || szNameTemp == "") { continue; } /* * if (szNameTemp.IndexOf('(') > -1) * { * continue; * } * string szName=szNameTemp.Substring(0,szNameTemp.IndexOf('(')); */ string szName = szNameTemp; m_szGroupMemberList += GetInputItemHtml(CONSTHTML.checkBox, "groupMemberList", szName, groupMemberList[i].dwMemberID.ToString()); } } DEVREQ devReq = new DEVREQ(); devReq.dwClassKind = (uint)UNIDEVCLS.DWKIND.CLSKIND_COMMONS; UNIDEVICE[] deviceList; if (m_Request.Device.Get(devReq, out deviceList) == REQUESTCODE.EXECUTE_SUCCESS && deviceList != null && deviceList.Length > 0) { for (int i = 0; i < deviceList.Length; i++) { if (szGroupID != deviceList[i].dwUseGroupID.ToString()) { m_szDeviceList += GetInputItemHtml(CONSTHTML.checkBox, "groupList", deviceList[i].szDevName, deviceList[i].dwUseGroupID.ToString()); } } } if (IsPostBack) { string szgroupMember = Request["groupMemberList"]; string szgroup = Request["groupList"]; if (szgroupMember == null || szgroupMember == "" || szgroup == null || szgroup == "") { MessageBox("复制失败,未选中对象", "提示", MSGBOX.ERROR, MSGBOX_ACTION.OK); } else { string[] szgroupMemberList = szgroupMember.Split(','); string[] szgroupList = szgroup.Split(','); for (int i = 0; i < szgroupMemberList.Length; i++) { UNIACCOUNT accinfo; if (GetAccByAccno(szgroupMemberList[i], out accinfo)) { for (int j = 0; j < szgroupList.Length; j++) { uint uGroupID = Parse(szgroupList[j]); AddGroupMember(uGroupID, accinfo.dwAccNo, (uint)GROUPMEMBER.DWKIND.MEMBERKIND_PERSONAL, accinfo.szTrueName + "(" + accinfo.szLogonName + "," + accinfo.szDeptName + ")"); } } } MessageBox("复制成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); } return; } m_Title = "复制免预约使用人员"; }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { ADMINCHECK check = new ADMINCHECK(); UNIACTIVITYPLAN setActiviPlan; GetHTTPObj(out setActiviPlan); if (setActiviPlan.dwActivityPlanID != null && (uint)setActiviPlan.dwActivityPlanID > 0) { check.dwSubjectID = setActiviPlan.dwActivityPlanID; check.dwSubjectType = (uint)ADMINCHECK.DWSUBJECTTYPE.CHECK_ACTIVITYPLAN; UNIRESERVE setResv; if (GetResvByID(setActiviPlan.dwResvID.ToString(), out setResv)) { check.dwApplicantID = setResv.dwOwner; check.szApplicantName = setResv.szOwnerName; check.dwCheckStat = (uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_ADMINOK; if (m_Request.Admin.AdminCheck(check) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "审核失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); } else { ACTIVITYPLANREQ vrGet = new ACTIVITYPLANREQ(); vrGet.dwGetType = (uint)ACTIVITYPLANREQ.DWGETTYPE.ACTIVITYPLANGET_BYID; vrGet.szGetKey = setActiviPlan.dwActivityPlanID.ToString(); UNIACTIVITYPLAN[] vtRes; if (m_Request.Reserve.GetActivityPlan(vrGet, out vtRes) == REQUESTCODE.EXECUTE_SUCCESS && vtRes != null && vtRes.Length > 0) { vtRes[0].dwStatus = setActiviPlan.dwStatus | (uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_ADMINFAIL; m_Request.Reserve.SetActivityPlan(vtRes[0], out vtRes[0]); MessageBox("审核成功", "审核成功", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); return; } } } } } DEVREQ devGet = new DEVREQ(); devGet.dwClassKind = (uint)UNIDEVCLS.DWKIND.CLSKIND_COMMONS; UNIDEVICE[] vtDev; if (m_Request.Device.Get(devGet, out vtDev) == REQUESTCODE.EXECUTE_SUCCESS && vtDev != null && vtDev.Length > 0) { for (int i = 0; i < vtDev.Length; i++) { if (((uint)vtDev[i].dwProperty & ((uint)UNIDEVICE.DWPROPERTY.DEVPROP_MAIN)) > 0) { szDevList += GetInputItemHtml(CONSTHTML.option, "", vtDev[i].szDevName, vtDev[i].dwDevID.ToString()); } } } if (Request["op"] == "set") { bSet = true; ACTIVITYPLANREQ vrGet = new ACTIVITYPLANREQ(); vrGet.dwGetType = (uint)ACTIVITYPLANREQ.DWGETTYPE.ACTIVITYPLANGET_BYID; vrGet.szGetKey = Request["id"]; UNIACTIVITYPLAN[] vtRes; if (m_Request.Reserve.GetActivityPlan(vrGet, out vtRes) == REQUESTCODE.EXECUTE_SUCCESS && vtRes != null && vtRes.Length > 0) { szFile = vtRes[0].szApplicationURL.ToString(); if ((vtRes[0].dwStatus & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_CLOSED) > 0) { vtRes[0].dwStatus = (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_CLOSED; } else if ((vtRes[0].dwStatus & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_OPENING) > 0) { vtRes[0].dwStatus = (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_OPENING; } else if ((vtRes[0].dwStatus & (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_UNOPEN) > 0) { vtRes[0].dwStatus = (uint)UNIACTIVITYPLAN.DWSTATUS.ACTIVITYPLANSTAT_UNOPEN; } Logger.trace("活动活动成果" + vtRes[0].szActivityPlanName); UNIDEVICE setDev; if (vtRes[0].dwDevID != null && getDevByID(vtRes[0].dwDevID.ToString(), out setDev)) { PutMemberValue("devName", setDev.szDevName.ToString()); } string szBeginTime = GetTimeStr(vtRes[0].dwBeginTime); ViewState["dwBeginTime"] = szBeginTime; string szEndTime = GetTimeStr(vtRes[0].dwEndTime); ViewState["dwEndTime"] = szEndTime; string szEnrollDeadline = GetDateStr(vtRes[0].dwEnrollDeadline); ViewState["szEnrollDeadline"] = szEnrollDeadline; string szActivityDate = GetDateStr(vtRes[0].dwActivityDate); ViewState["szActivityDate"] = szActivityDate; //vtRes[0].szIntroInfo = ""; PutHTTPObj(vtRes[0]); } } else { } }