public string GetMapInfoFromHttp(SCAppConstants.MapInfoDataType dataType)
        {
            string result = string.Empty;

            string[] action_targets = new string[]
            {
                "MapInfo"
            };
            StringBuilder sb = new StringBuilder();

            //sb.Append($"{nameof(SCAppConstants.MapInfoDataType)}={dataType}");
            sb.Append(dataType);
            result = app.GetWebClientManager().GetInfoFromServer(WebClientManager.OHxC_CONTROL_URI, action_targets, sb.ToString());
            return(result);
        }
 public CmdBLL(WindownApplication _app)
 {
     cmd_ohtcDAO      = _app.CMD_OHTCDao;
     cmd_mcsDao       = _app.CMD_MCSDao;
     vcmd_mcsDao      = _app.VCMD_MCSDao;
     webClientManager = _app.GetWebClientManager();
 }
Esempio n. 3
0
        public bool SendPortPriorityUpdate(string port_id, int priority)
        {
            string result = string.Empty;

            string[] action_targets = new string[]
            {
                "PortStation",
                "PriorityUpdate",
            };
            StringBuilder sb = new StringBuilder();

            sb.Append($"{nameof(port_id)}={port_id}").Append("&");
            sb.Append($"{nameof(priority)}={priority.ToString()}");
            byte[] byteArray = Encoding.UTF8.GetBytes(sb.ToString());
            result = app.GetWebClientManager().PostInfoToServer(WebClientManager.OHxC_CONTROL_URI, action_targets, WebClientManager.HTTP_METHOD.POST, byteArray);
            return(result == "OK");
        }
        public bool SendLinkStatusChange(string linkstatus, out string result)
        {
            result = string.Empty;
            string[] action_targets = new string[]
            {
                "ConnectionInfo",
                "LinkStatusChange",
            };
            StringBuilder sb = new StringBuilder();

            sb.Append($"{nameof(linkstatus)}={linkstatus}");
            byte[] byteArray = Encoding.UTF8.GetBytes(sb.ToString());
            result = app.GetWebClientManager().PostInfoToServer(WebClientManager.OHxC_CONTROL_URI, action_targets, WebClientManager.HTTP_METHOD.POST, byteArray);
            return(result == "OK");
        }
Esempio n. 5
0
 public SysExcuteQualityBLL(WindownApplication app)
 {
     webClientManager = app.GetWebClientManager();
     OlsonTimeZoneID  = WinFromUtility.TimeZoneInfoIDToOlsonTimeZoneID(TimeZoneInfo.Local);
 }
Esempio n. 6
0
 public SegmentBLL(WindownApplication _app)
 {
     app       = _app;
     OperateDB = new DB(app.SegmentDao);
     webAPI    = new WebAPI(app.GetWebClientManager());
 }