/// <summary> /// 显示工作清单 /// </summary> /// <param name="o"></param> public void UpdatePgongzuoqingdan(object o) { List <JJQingdanInfo> list = o as List <JJQingdanInfo>; //加载工作清单 panel_gongzuoqingdan.Controls.Clear(); //记载是否已经显示了ABC类 List <string> list_leibie = new List <string>(); for (int i = 0; i < list.Count; i++) { var info = list[i]; UCMessage myuc = new UCMessage(info); myuc._updatemaindata = UCmain_Load; //判断INFO的类别,给myuc的lbl_leibie赋值,但是如果已经出现过,就不赋值 string str_lei = Regex.Match(info._qingzhonghuanji, @".类").Value; if (!list_leibie.Contains(str_lei)) { myuc.lbl_leixing.Text = str_lei; //改颜色 A红B黄C绿D黑 if (str_lei.Equals("A类")) { myuc.lbl_leixing.ForeColor = Color.Red; } if (str_lei.Equals("B类")) { myuc.lbl_leixing.ForeColor = Color.Gold; } if (str_lei.Equals("C类")) { myuc.lbl_leixing.ForeColor = Color.Green; } if (str_lei.Equals("D类")) { myuc.lbl_leixing.ForeColor = Color.Black; } list_leibie.Add(str_lei); } else { myuc.lbl_leixing.Text = string.Empty; } panel_gongzuoqingdan.Controls.Add(myuc); panel_gongzuoqingdan.Controls.SetChildIndex(myuc, 0); } //刷新工作清单总数 //lbl_gongzuoqingdan.Text = $"工作清单 {qingdannum}项"; lbl_gongzuoqingdan.Text = $"工作清单 共{panel_gongzuoqingdan.Controls.Count}项"; }
/// <summary> /// 在我的主页中显示任务待办 /// </summary> /// <param name="o"></param> public void UpdatePdaiban(object o) { panel_daibanrenwu.Controls.Clear(); List <JJTaskInfo> list_daiban = o as List <JJTaskInfo>; for (int i = list_daiban.Count - 1; i >= 0; i--) { JJTaskInfo info = list_daiban[i]; UCMessage myuc = new UCMessage(info); panel_daibanrenwu.Controls.Add(myuc); } //显示待办任务数量 gb_daibairenwu.Text = $"待办任务 共{panel_daibanrenwu.Controls.Count}项"; }
/// <summary> /// 在我的主页显示通知公告 /// </summary> /// <param name="o"></param> public void UpdatePtongzhi(object o) { /*刷新通知公告*/ panel_tongzhi.Controls.Clear(); var list_tongzhi = o as List <JJTongzhiInfo>; //dgv_tongzhi.DataSource = null; //dgv_tongzhi.DataSource = mydt; for (int i = list_tongzhi.Count - 1; i >= 0; i--) { JJTongzhiInfo info = list_tongzhi[i]; UCMessage myuc = new UCMessage(info); panel_tongzhi.Controls.Add(myuc); } //显示通知公告,显示多少项,红几项,黄几项 gb_tongzhigonggao.Text = $"通知公告 共{panel_tongzhi.Controls.Count}项"; }
private void UClishiziliao_Load(object sender, EventArgs e) { panel_my.Controls.Clear(); //var list = _mycontroller.GetLishiziilao(); //foreach (JJQingdanInfo info in list) //{ // UCMessage myuc = new UCMessage(info); // myuc._updatemaindata = UClishiziliao_Load; // panel_my.Controls.Add(myuc); //} var list = _mycontroller.GetLishiziliao(); foreach (JJQingdanInfo info in list) { UCMessage myuc = new UCMessage(info); myuc._updatemaindata = UClishiziliao_Load; panel_my.Controls.Add(myuc); } }