private void OnIgnoreReminderStatInfo(WorkOrderReminderStatInfo item) { //string url = item.AccessPoint.Replace("http://115.236.175.110:17001/merchantservices", "http://localhost/SmartLife.CertManage.MerchantServices") + "/Pub/ReminderService/IgnoreReminder"; HttpAdapter.postAsyncAsJSON(item.AccessPoint + "/Pub/ReminderService/IgnoreReminder", new { ResponseAppType = "00001", ObjectType = "Merchant", ObjectKey = item.StationId, SourceTable = "Oca_ServiceWorkOrder", SourceColumn = "WorkOrderId", SourceType = item.SourceType }.ToStringObjectDictionary(), new { ApplicationId = Common.APPLICATION_ID, Token = MerchantVar.CurrentMerchant.Token, StationCode = MerchantVar.StationCode, StationId = item.StationId }.ToStringObjectDictionary(), (ret, res) => { //MessageBoxAdapter.ShowDebug(ret.ErrorMessage); }); }
private void OnClickReminderStatInfoWin(WorkOrderReminderStatInfo item) { TreeNode[] nodes = tvNav.Nodes.Find(item.SourceType, true); if (nodes.Length == 1) { tvNav.SelectedNode = nodes[0]; NodeSelect(nodes[0]); } raiseRemindTimer.Enabled = true; }
public void ReceiveReminderInfo(WorkOrderReminderInfo reminderInfo)//自定义方法用来使托盘图标闪烁 { _ReminderInfo = reminderInfo; _ReminderStatInfo = null; if (_ReminderInfo != null && frmWorkOrderNotify.IconFlickerFlag != false) //当托盘闪动图标为真时 { //xIcon.Icon = Properties.Resources.leblue;//托盘图标显示为图像 //iconTimer.Enabled = true;//启动托盘图标的Timer BeginInvoke(new Action(() => { lblMessage.Text = _ReminderInfo.RemindContent; //在cententInform中显示通知内容 ShowNewWindow(); //调用显示窗体方法 })); } }
public void ReceiveReminderStatInfo(WorkOrderReminderStatInfo reminderStatInfo)//自定义方法用来使托盘图标闪烁 { _ReminderInfo = null; _ReminderStatInfo = reminderStatInfo; if (_ReminderStatInfo != null && frmWorkOrderNotify.IconFlickerFlag != false) //当托盘闪动图标为真时 { //xIcon.Icon = Properties.Resources.leblue;//托盘图标显示为图像 //iconTimer.Enabled = true;//启动托盘图标的Timer BeginInvoke(new Action(() => { var typeItem = Common.sourceTypes.FirstOrDefault(item => item.Value.ToString() == _ReminderStatInfo.SourceType); lblMessage.Text = "您有" + _ReminderStatInfo.ReminderNum + "条" + typeItem.Text; ShowNewWindow();//调用显示窗体方法 })); } }
private void FetchReminderData() { if (MerchantVar.CurrentMerchant.AuthNodeInfos.Count > 0) { foreach (var nodeInfo in MerchantVar.CurrentMerchant.AuthNodeInfos) { string url = nodeInfo.AccessPoint + "/Pub/ReminderService/GetReminderStatGroupBySourceType"; if (SettingsVar.CurrentRemindType == RemindType.详细信息) { url = nodeInfo.AccessPoint + "/Pub/ReminderService/GetReminderItems"; } url += "/Oca_ServiceWorkOrder,WorkOrderId"; HttpAdapter.getSyncTo(url, null, new { ApplicationId = Common.APPLICATION_ID, Token = MerchantVar.CurrentMerchant.Token, StationId = nodeInfo.StationId }.ToStringObjectDictionary(), (ret, res) => { if ((bool)ret.Success) { foreach (var row in ret.rows) { dynamic item = new ExpandoObject(); DynamicAdapter.Parse(item, XElement.Parse(row.ToString())); if (SettingsVar.CurrentRemindType == RemindType.详细信息) { WorkOrderReminderInfo dataItem = (item.StringObjectDictionary as IDictionary <string, object>).FromDynamic <WorkOrderReminderInfo>(); if (queuesOfWorkOrderReminderInfo.Count(it => it.SourceType == dataItem.SourceType && it.SourceKey == dataItem.SourceKey) == 0) { //不存在 dataItem.AccessPoint = nodeInfo.AccessPoint; dataItem.StationId = nodeInfo.StationId; queuesOfWorkOrderReminderInfo.Enqueue(dataItem); } } else if (SettingsVar.CurrentRemindType == RemindType.统计信息) { WorkOrderReminderStatInfo dataItem = (item.StringObjectDictionary as IDictionary <string, object>).FromDynamic <WorkOrderReminderStatInfo>(); if (queuesOfWorkOrderReminderStatInfo.Count(it => it.SourceType == dataItem.SourceType) == 0) { dataItem.AccessPoint = nodeInfo.AccessPoint; dataItem.StationId = nodeInfo.StationId; queuesOfWorkOrderReminderStatInfo.Enqueue(dataItem); } else { WorkOrderReminderStatInfo xItem = queuesOfWorkOrderReminderStatInfo.SingleOrDefault(it => it.SourceType == dataItem.SourceType); if (xItem != null) { if (xItem.StationId == nodeInfo.StationId) { xItem.ReminderNum = dataItem.ReminderNum; } else { //不同区域 dataItem.AccessPoint = nodeInfo.AccessPoint; dataItem.StationId = nodeInfo.StationId; queuesOfWorkOrderReminderStatInfo.Enqueue(dataItem); } } } } } } }); } } }