public XmlDocument SetUserCamManage(XmlDocument Doc) { XmlTools XmlOp = new XmlTools(); XmlDocument Response = XmlOp.XmlCreate(); string cuId, cuLevel, startTime, endTime, schduleCreatTime; int action; List <string> camId, id; cuId = XmlOp.GetInnerText(Doc, "cuId"); cuLevel = XmlOp.GetInnerText(Doc, "cuLevel"); action = Int16.Parse(XmlOp.GetInnerText(Doc, "action")); startTime = XmlOp.GetInnerText(Doc, "startTime"); endTime = XmlOp.GetInnerText(Doc, "endTime"); schduleCreatTime = XmlOp.GetInnerText(Doc, "schduleCreatTime"); camId = XmlOp.GetInnerTextList(Doc, "camId"); id = XmlOp.GetInnerTextList(Doc, "id"); XmlOp.ElementAdd(Response, null, "response"); XmlOp.SetNodeAttribute(Response, "response", 0, "command", "SetUserCamManage"); XmlOp.ElementAdd(Response, "response", "result"); XmlOp.SetNodeAttribute(Response, "result", 0, "code", "0"); XmlOp.SetNodeInnerText(Response, "result", 0, "success"); XmlOp.ElementAdd(Response, "response", "parameters"); XmlOp.ElementAdd(Response, "parameters", "cuId"); XmlOp.SetNodeInnerText(Response, "cuId", 0, cuId); Response.Save("D://SetUserCamManage-response.xml"); return(Response); }
public XmlDocument AlarmResSubscribe(XmlDocument Doc) { XmlTools XmlOp = new XmlTools(); XmlDocument Response = XmlOp.XmlCreate(); string muId, muName; int action; List <string> id = new List <string>(); List <string> type = new List <string>(); muId = XmlOp.GetInnerText(Doc, "muId"); muName = XmlOp.GetInnerText(Doc, "muName"); action = Int16.Parse(XmlOp.GetInnerText(Doc, "action")); id = XmlOp.GetInnerTextList(Doc, "id"); type = XmlOp.GetInnerTextList(Doc, "type"); XmlOp.ElementAdd(Response, null, "response"); XmlOp.SetNodeAttribute(Response, "response", 0, "command", "AlarmResSubscribe"); XmlOp.ElementAdd(Response, "response", "result"); XmlOp.SetNodeAttribute(Response, "result", 0, "code", "0"); XmlOp.SetNodeInnerText(Response, "result", 0, "success"); XmlOp.ElementAdd(Response, "response", "parameters"); XmlOp.ElementAdd(Response, "parameters", "muId"); XmlOp.SetNodeInnerText(Response, "muId", 0, muId); Response.Save("D://AlarmResSubscribe-response.xml"); return(Response); }
public XmlDocument ReqCamResState(XmlDocument Doc) { XmlTools XmlOp = new XmlTools(); XmlDocument Response = XmlOp.XmlCreate(); string muId; List <string> resId; muId = XmlOp.GetInnerText(Doc, "muId"); resId = XmlOp.GetInnerTextList(Doc, "resId"); XmlOp.ElementAdd(Response, null, "response"); XmlOp.SetNodeAttribute(Response, "response", 0, "command", "ReqCamResState"); XmlOp.ElementAdd(Response, "response", "result"); XmlOp.SetNodeAttribute(Response, "result", 0, "code", "0"); XmlOp.SetNodeInnerText(Response, "result", 0, "success"); XmlOp.ElementAdd(Response, "response", "parameters"); XmlOp.ElementAdd(Response, "parameters", "group"); for (int i = 0; i < resId.Count; i++) { XmlOp.ElementAdd(Response, "group", "URL"); XmlOp.ElementAdd(Response, "URL", "resId", i); XmlOp.SetNodeInnerText(Response, "resId", i, resId[i]); XmlOp.ElementAdd(Response, "URL", "state", i); XmlOp.SetNodeInnerText(Response, "state", i, "online"); } Response.Save("D://ReqCamResState-response.xml"); return(Response); }
public XmlDocument QueryAlarmRes(XmlDocument Doc) { XmlTools XmlOp = new XmlTools(); XmlDocument Response = XmlOp.XmlCreate(); string muId, muName; List <string> id = new List <string>(); List <string> type = new List <string>(); muId = XmlOp.GetInnerText(Doc, "muId"); muName = XmlOp.GetInnerText(Doc, "muName"); id = XmlOp.GetInnerTextList(Doc, "id"); type = XmlOp.GetInnerTextList(Doc, "type"); XmlOp.ElementAdd(Response, null, "response"); XmlOp.SetNodeAttribute(Response, "response", 0, "command", "QueryAlarmRes"); XmlOp.ElementAdd(Response, "response", "result"); XmlOp.SetNodeAttribute(Response, "result", 0, "code", "0"); XmlOp.SetNodeInnerText(Response, "result", 0, "success"); XmlOp.ElementAdd(Response, "response", "parameters"); XmlOp.ElementAdd(Response, "parameters", "group"); for (int i = 0; i < 5; i++) { XmlOp.ElementAdd(Response, "group", "URL"); XmlOp.ElementAdd(Response, "URL", "id", i); XmlOp.SetNodeInnerText(Response, "id", i, "00000" + i); XmlOp.ElementAdd(Response, "URL", "type", i); XmlOp.SetNodeInnerText(Response, "type", i, "00000" + i); XmlOp.ElementAdd(Response, "URL", "time", i); XmlOp.SetNodeInnerText(Response, "URL/time", i, DateTime.Today.ToString("yyyy-MM-dd hh:mm:ss")); XmlOp.ElementAdd(Response, "URL", "state", i); XmlOp.SetNodeInnerText(Response, "state", i, "0"); XmlOp.ElementAdd(Response, "URL", "alarmHisRecord", i); XmlOp.SetNodeInnerText(Response, "alarmHisRecord", i, "0"); XmlOp.ElementAdd(Response, "URL", "url", i); XmlOp.ElementAdd(Response, "url", "resId", i); XmlOp.SetNodeInnerText(Response, "url/resId", i, "000000"); XmlOp.ElementAdd(Response, "url", "time", i); XmlOp.SetNodeInnerText(Response, "url/time", i, DateTime.Today.ToString("yyyy-MM-dd hh:mm:ss")); } Response.Save("D://QueryAlarmRes-response.xml"); return(Response); }
public XmlDocument ReportAlarmInfo(XmlDocument Doc) { XmlTools XmlOp = new XmlTools(); XmlDocument Response = XmlOp.XmlCreate(); string muId, muName; List <string> id, type, startTime, endTime; muId = XmlOp.GetInnerText(Doc, "muId"); muName = XmlOp.GetInnerText(Doc, "muName"); id = XmlOp.GetInnerTextList(Doc, "id"); type = XmlOp.GetInnerTextList(Doc, "type"); startTime = XmlOp.GetInnerTextList(Doc, "startTime"); endTime = XmlOp.GetInnerTextList(Doc, "endTime"); XmlOp.ElementAdd(Response, null, "response"); XmlOp.SetNodeAttribute(Response, "response", 0, "command", "ReportAlarmInfo"); XmlOp.ElementAdd(Response, "response", "result"); XmlOp.SetNodeAttribute(Response, "result", 0, "code", "0"); XmlOp.SetNodeInnerText(Response, "result", 0, "success"); XmlOp.ElementAdd(Response, "response", "muId"); XmlOp.SetNodeInnerText(Response, "muId", 0, muId); XmlOp.ElementAdd(Response, "response", "parameters"); XmlOp.ElementAdd(Response, "parameters", "group"); for (int i = 0; i < 5; i++) { XmlOp.ElementAdd(Response, "group", "URL"); XmlOp.ElementAdd(Response, "URL", "id", i); XmlOp.SetNodeInnerText(Response, "id", i, "00000" + i); XmlOp.ElementAdd(Response, "URL", "type", i); XmlOp.SetNodeInnerText(Response, "type", i, "00000" + i); XmlOp.ElementAdd(Response, "URL", "startTime", i); XmlOp.SetNodeInnerText(Response, "startTime", i, DateTime.Today.ToString("yyyy-MM-dd hh:mm:ss")); XmlOp.ElementAdd(Response, "URL", "endTime", i); XmlOp.SetNodeInnerText(Response, "endTime", i, DateTime.Today.ToString("yyyy-MM-dd hh:mm:ss")); XmlOp.ElementAdd(Response, "URL", "message", i); XmlOp.SetNodeInnerText(Response, "message", i, "No message"); } Response.Save("D://ReportAlarmInfo-response.xml"); return(Response); }
public XmlDocument ResTransOrder(XmlDocument Doc) { XmlTools XmlOp = new XmlTools(); XmlDocument Response = XmlOp.XmlCreate(); string muId; List <string> resId; muId = XmlOp.GetInnerText(Doc, "muId"); resId = XmlOp.GetInnerTextList(Doc, "resId"); XmlOp.ElementAdd(Response, null, "response"); XmlOp.SetNodeAttribute(Response, "response", 0, "command", "ResTransOrder"); XmlOp.ElementAdd(Response, "response", "result"); XmlOp.SetNodeAttribute(Response, "result", 0, "code", "0"); XmlOp.SetNodeInnerText(Response, "result", 0, "success"); XmlOp.ElementAdd(Response, "response", "parameters"); XmlOp.ElementAdd(Response, "parameters", "muId"); XmlOp.SetNodeInnerText(Response, "muId", 0, muId); Response.Save("D://ResTransOrder-response.xml"); return(Response); }