//QUERY_UNSIGN_CONTRACT_REQUEST;1;1QUERY_SIGN_REFUSE_REQUEST;1;1, #region 待办中的刷新以及其他事件 #region 绑定数据信息 /// <summary> /// 代办列表的数据量较小,可以自动刷新 /// </summary> /// <param name="isFlush"></param> private void BindUnsignData(bool isFlush) { if (UserHelper.ToDoList == null || isFlush == true) { //通过用户id查询 List <SHDJContract> unsignList = _sc.QueryUnsignContract(UserHelper.UserInfo.Id); //List<SHDJContract> unsignList = null; //while (unsignList == null) //{ // unsignList = _sc.QueryUnsignContract(UserHelper.UserInfo.Id); //} this.ToDoListView.AutoGenerateColumns = false; this.ToDoListView.DataSource = unsignList; UserHelper.ToDoList = unsignList; } else { this.ToDoListView.AutoGenerateColumns = false; this.ToDoListView.DataSource = UserHelper.ToDoList; } }
private void BindSignData() //绑定待办列表的个数 { try { //List<SHDJContract> list = new List<SHDJContract>(); //list = await _sc.QueryUnsignContract(UserHelper.UserInfo.Id); List <SHDJContract> list = null; while (list == null) { list = _sc.QueryUnsignContract(UserHelper.UserInfo.Id); } if (UserHelper.ToDoList != null && UserHelper.ToDoList.Count > 0 && // 数据有更新 -=> modify by gatieme for BUG... UserHelper.ToDoList.Count == list.Count) { this.Speech("您有新的提交方案需签字"); this.mainNotifyIcon.ShowBalloonTip(10000, "签字管理", "您有新的提交方案需签字", ToolTipIcon.None); return; } // else // 否则数据有更新 if (list != null) { UserHelper.ToDoList = list; } for (int i = 0; i < Application.OpenForms.Count; i++) { if (Application.OpenForms[i].Name == "SignManage") { ((SignManage)Application.OpenForms[i]).ToDoListView.DataSource = list; } } if (UserHelper.ToDoList.Count > 0) { this.Speech("您有新的提交方案需签字"); this.mainNotifyIcon.ShowBalloonTip(10000, "签字管理", "您有新的提交方案需签字", ToolTipIcon.None); MessageBox.Show("您有新的提交方案需签字!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); foreach (TreeNode n in this.treeView1.Nodes) { if (n.Text == "签字管理") { n.Text = "签字管理(" + UserHelper.ToDoList.Count + ")"; n.Nodes[0].Text = "待办列表(" + UserHelper.ToDoList.Count + ")"; } else if (n.Text.Contains("签字管理(")) { n.Text = "签字管理(" + UserHelper.ToDoList.Count + ")"; n.Nodes[0].Text = "待办列表(" + UserHelper.ToDoList.Count + ")"; } } } else { foreach (TreeNode n in this.treeView1.Nodes) { if (n.Name == "SignPressManage") { n.Text = "签字管理"; n.Nodes[0].Text = "待办列表"; } } } } catch (Exception e) { Logging.AddLog(e.Message + "Helloword" + e.TargetSite); } }