private void GetPOutPortInfo() { _poutport = new OutPort(pindexno); _poutport.GetCustInfo(); int onesum = 0; int twosum = 0; int threesum = 0; Dictionary <string, Color> ciginfo = _poutport.GetCigInfo(ref onesum, ref twosum, ref threesum); labponesum.Text = onesum.ToString(); labptwosum.Text = twosum.ToString(); labpthreesum.Text = threesum.ToString(); labponetwosum.Text = (onesum + twosum).ToString(); labelX31.Text = _poutport["INDEXNO"]; foreach (Control control in this.panel4.Controls) { if (control is LabelX && control.Tag != null) { if (_poutport.ContainsKey(control.Tag.ToString())) { ((LabelX)control).Text = _poutport[control.Tag.ToString()]; } } } itemPanel2.BeginUpdate(); itemPanel2.Items.Clear(); foreach (var s in ciginfo) { LabelItem labelItem = new LabelItem(); labelItem.Text = s.Key.Replace("(", " ").Replace(")", ""); labelItem.Font = new System.Drawing.Font("黑体", 14); if (s.Key.Contains("*")) { labelItem.ForeColor = Color.Red; } else { labelItem.ForeColor = s.Value; } labelItem.BorderSide = eBorderSide.All; labelItem.BorderType = eBorderType.Bump; labelItem.TextLineAlignment = StringAlignment.Center; labelItem.Width = 225; labelItem.Height = 25; //labelItem.WordWrap = true; itemPanel2.Items.Add(labelItem); } itemPanel2.EndUpdate(); }
private void GetNOutPortInfo() { _noutport = new OutPort(nindexno); _noutport.GetCustInfo(); int onesum = 0; int twosum = 0; int threesum = 0; Dictionary <string, Color> ciginfo = _noutport.GetCigInfo(ref onesum, ref twosum, ref threesum); labnonesum.Text = onesum.ToString(); labntwosum.Text = twosum.ToString(); labnthreesum.Text = threesum.ToString(); labnonetwosum.Text = (onesum + twosum).ToString(); labelX29.Text = _noutport["INDEXNO"]; foreach (Control control in this.panel5.Controls) { if (control is LabelX && control.Tag != null) { if (_noutport.ContainsKey(control.Tag.ToString())) { ((LabelX)control).Text = _noutport[control.Tag.ToString()]; } } } if ((!string.IsNullOrEmpty(labncustname.Text)) && (labncustname.Text.Contains("×")) && (labncustname.Text != NCustName)) { NCustName = labncustname.Text; SoundPlayer player = new SoundPlayer(); player.SoundLocation = Application.StartupPath + "\\Sound\\下一订单.wav"; player.Load(); player.Play(); } itemPanel3.BeginUpdate(); itemPanel3.Items.Clear(); foreach (var s in ciginfo) { LabelItem labelItem = new LabelItem(); labelItem.Text = s.Key.Replace("(", " ").Replace(")", ""); labelItem.Font = new System.Drawing.Font("黑体", 14); if (s.Key.Contains("*")) { labelItem.ForeColor = Color.Red; } else { labelItem.ForeColor = s.Value; } labelItem.BorderSide = eBorderSide.All; labelItem.BorderType = eBorderType.Bump; labelItem.TextLineAlignment = StringAlignment.Center; labelItem.Width = 225; labelItem.Height = 25; labelItem.WordWrap = true; itemPanel3.Items.Add(labelItem); } itemPanel3.EndUpdate(); }
/// <summary> /// 获取上层皮带监控信息 /// </summary> private void GetUpPutInfo() { //上层皮带当前客户信息 GetUpCustIndex(); _outport = new OutPort(upindexno); _outport.GetOutPortInfo(); labelX2.Text = _outport["INDEXNO"]; foreach (Control control in this.panel6.Controls) { if (control is LabelX && control.Tag != null) { if (_outport.ContainsKey(control.Tag.ToString())) { ((LabelX)control).Text = _outport[control.Tag.ToString()]; } } } //上层皮带当前客户的卷烟明细 itemPanel1.BeginUpdate(); itemPanel1.Items.Clear(); _outport = new OutPort(upindexno); LabelItem titlelabelItem = new LabelItem(); titlelabelItem.Text = "当前客户"; titlelabelItem.TextLineAlignment = StringAlignment.Center; titlelabelItem.ItemAlignment = eItemAlignment.Center; titlelabelItem.Width = itemPanel1.Width; titlelabelItem.Font = new System.Drawing.Font("黑体", 20); titlelabelItem.ForeColor = Color.Yellow; titlelabelItem.TextLineAlignment = StringAlignment.Center; titlelabelItem.Width = itemPanel1.Width; titlelabelItem.Height = 35; itemPanel1.Items.Add(titlelabelItem); List <string> ciginfo = _outport.GetUpCigInfo(); foreach (string s in ciginfo) { LabelItem labelItem = new LabelItem(); labelItem.Text = s.Replace("(", " ").Replace(")", ""); labelItem.Font = new System.Drawing.Font("黑体", 18); if (s.Contains("*")) { labelItem.ForeColor = Color.Red; } else { labelItem.ForeColor = Color.Red; } labelItem.BorderSide = eBorderSide.All; labelItem.BorderType = eBorderType.Bump; labelItem.TextLineAlignment = StringAlignment.Center; labelItem.Width = 305; labelItem.Height = 35; //labelItem.WordWrap = true; itemPanel1.Items.Add(labelItem); } itemPanel1.EndUpdate(); //上层皮带下一客户的卷烟明细 itemPanel2.BeginUpdate(); itemPanel2.Items.Clear(); titlelabelItem = new LabelItem(); titlelabelItem.Text = "下一客户"; titlelabelItem.Font = new System.Drawing.Font("黑体", 20); titlelabelItem.ForeColor = Color.Yellow; titlelabelItem.TextLineAlignment = StringAlignment.Center; titlelabelItem.ItemAlignment = eItemAlignment.Center; titlelabelItem.Width = itemPanel1.Width; titlelabelItem.Height = 35; itemPanel2.Items.Add(titlelabelItem); _poutport = new OutPort(uppindexno); ciginfo = _poutport.GetUpCigInfo(); foreach (string s in ciginfo) { LabelItem labelItem = new LabelItem(); labelItem.Text = s.Replace("(", " ").Replace(")", ""); labelItem.Font = new System.Drawing.Font("黑体", 18); if (s.Contains("*")) { labelItem.ForeColor = Color.Red; } else { labelItem.ForeColor = Color.Yellow; } labelItem.BorderSide = eBorderSide.All; labelItem.BorderType = eBorderType.Bump; labelItem.TextLineAlignment = StringAlignment.Center; labelItem.Width = 305; labelItem.Height = 35; itemPanel2.Items.Add(labelItem); } itemPanel2.EndUpdate(); }
private void GetDownPutInfo() { GetDownCustIndex(); _outport = new OutPort(downindexno); _outport.GetOutPortInfo(); labelX5.Text = _outport["INDEXNO"]; foreach (Control control in this.panel5.Controls) { if (control is LabelX && control.Tag != null) { if (_outport.ContainsKey(control.Tag.ToString())) { ((LabelX)control).Text = _outport[control.Tag.ToString()]; } } } //下层当前客户卷烟 itemPanel3.BeginUpdate(); itemPanel3.Items.Clear(); _outport = new OutPort(downindexno); LabelItem titlelabelItem = new LabelItem(); titlelabelItem.Text = "当前客户"; titlelabelItem.Font = new System.Drawing.Font("黑体", 20); titlelabelItem.ForeColor = Color.Aqua; titlelabelItem.TextLineAlignment = StringAlignment.Center; titlelabelItem.Width = 305; titlelabelItem.Height = 35; itemPanel3.Items.Add(titlelabelItem); List <string> ciginfo = _outport.GetDownCigInfo(); foreach (string s in ciginfo) { LabelItem labelItem = new LabelItem(); labelItem.Text = s.Replace("(", " ").Replace(")", ""); labelItem.Font = new System.Drawing.Font("黑体", 18); if (s.Contains("*")) { labelItem.ForeColor = Color.Red; } else { labelItem.ForeColor = Color.Red; } labelItem.BorderSide = eBorderSide.All; labelItem.BorderType = eBorderType.Bump; labelItem.TextLineAlignment = StringAlignment.Center; labelItem.Width = 305; labelItem.Height = 35; labelItem.WordWrap = true; itemPanel3.Items.Add(labelItem); } itemPanel3.EndUpdate(); //下层下一客户卷烟 itemPanel4.BeginUpdate(); itemPanel4.Items.Clear(); titlelabelItem = new LabelItem(); titlelabelItem.Text = "下一客户"; titlelabelItem.Font = new System.Drawing.Font("黑体", 20); titlelabelItem.ForeColor = Color.Aqua; titlelabelItem.TextLineAlignment = StringAlignment.Center; titlelabelItem.Width = 305; titlelabelItem.Height = 35; itemPanel4.Items.Add(titlelabelItem); _noutport = new OutPort(downpindexno); ciginfo = _noutport.GetDownCigInfo(); foreach (string s in ciginfo) { LabelItem labelItem = new LabelItem(); labelItem.Text = s.Replace("(", " ").Replace(")", ""); labelItem.Font = new System.Drawing.Font("黑体", 18); if (s.Contains("*")) { labelItem.ForeColor = Color.Red; } else { labelItem.ForeColor = Color.Aqua; } labelItem.BorderSide = eBorderSide.All; labelItem.BorderType = eBorderType.Bump; labelItem.TextLineAlignment = StringAlignment.Center; labelItem.Width = 305; labelItem.Height = 35; labelItem.WordWrap = true; itemPanel4.Items.Add(labelItem); } itemPanel4.EndUpdate(); }