//page visit data proceed public void pageInfoDataProceed(PageInfo obj) { if (settings["repolicy"].Equals("1") && Utility.isNetWorkConnected()) { Post post = new Post((int)UMSAgent.UMSApi.DataType.PAGEINFODATA, obj); post.stateChanged += new Post.stateChangedHandler(this.getData); post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.PAGEINFODATA)); } else { FileSave.saveFile((int)UMSAgent.UMSApi.DataType.PAGEINFODATA, obj); } }
//page visit data proceed public void pageInfoDataProceed(PageInfo obj) { if ("1".Equals(ApplicationSettings.GetSetting <string>(SettingKeys.REPORT_POLICY)) && Utility.isNetWorkConnected()) { Post post = new Post((int)UMSAgent.UMSApi.DataType.PAGEINFODATA, obj); post.stateChanged += new Post.stateChangedHandler(this.getData); post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.PAGEINFODATA)); } else { FileSave.saveFile((int)UMSAgent.UMSApi.DataType.PAGEINFODATA, obj); } }
//event data proceed public void eventDataProceed(string eventid, string pagename, string lable = "", int acc = 1, double count = 0.0) { Event obj = model.getEventInfo(eventid, pagename, lable, acc); if (settings["repolicy"].Equals("1") && Utility.isNetWorkConnected()) { Post post = new Post((int)UMSAgent.UMSApi.DataType.EVENTDATA, obj); post.stateChanged += new Post.stateChangedHandler(this.getData); post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.EVENTDATA)); } else { FileSave.saveFile((int)UMSAgent.UMSApi.DataType.EVENTDATA, obj); } }
//client data proceed public void clientDataProceed() { ClientData obj = model.getClientData(); if (Utility.isNetWorkConnected()) { Post post = new Post((int)UMSAgent.UMSApi.DataType.CLIENTDATA, obj); post.stateChanged += new Post.stateChangedHandler(this.getData); post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.CLIENTDATA)); } else { FileSave.saveFile((int)UMSAgent.UMSApi.DataType.CLIENTDATA, obj); } }
//tag data proceed public void tagDataProceed(string tags) { Tag obj = model.getTagData(tags); if (settings["repolicy"].Equals("1") && Utility.isNetWorkConnected()) { Post post = new Post((int)UMSAgent.UMSApi.DataType.TAGDATA, obj); post.stateChanged += new Post.stateChangedHandler(this.getData); post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.TAGDATA)); } else { FileSave.saveFile((int)UMSAgent.UMSApi.DataType.TAGDATA, obj); } }
//event data proceed public void eventDataProceed(string eventid, string pagename, string lable = "", int acc = 1) { Event obj = model.getEventInfo(eventid, pagename, lable, acc); if ("1".Equals(ApplicationSettings.GetSetting <string>(SettingKeys.REPORT_POLICY)) && Utility.isNetWorkConnected()) { Post post = new Post((int)UMSAgent.UMSApi.DataType.EVENTDATA, obj); post.stateChanged += new Post.stateChangedHandler(this.getData); post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.EVENTDATA)); } else { FileSave.saveFile((int)UMSAgent.UMSApi.DataType.EVENTDATA, obj); } }