/// <summary> /// 取消指令 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnClose_Click(object sender, EventArgs e) { tagDP.ServiceName = tagServiceName; tagDP.AutoRegist = true; TagValues.Clear(); TagValues.Add(unitNo + "_SPEC_ACTION", null); tagDP.Attach(TagValues); StringBuilder sb = new StringBuilder(); sb.Append("RESET"); sb.Append(","); sb.Append("999999"); sb.Append(","); sb.Append("999999"); sb.Append(","); sb.Append("999999"); MessageBoxButtons btn = MessageBoxButtons.OKCancel; DialogResult dr = MessageBox.Show("确定要取消插料/退料指令操作吗?", "操作提示", btn); if (dr == DialogResult.OK) { tagDP.SetData(unitNo + " ", sb.ToString()); MessageBox.Show("指令已清除"); } }
void FrmCarEntry_Load(object sender, EventArgs e) { txtPacking.Text = PackingNo; tagDP.ServiceName = "iplature"; tagDP.AutoRegist = true; TagValues.Clear(); TagValues.Add("EV_NEW_PARKING_CARARRIVE", null); tagDP.Attach(TagValues); this.Text = string.Format("{0}到位", carType); if (carType == "框架车") { txtDirection.Enabled = false; txtDirection.Text = "东"; txtDirection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; cmbCarType.Enabled = false; //cmbCarType.SelectedText = "普通框架"; cmbCarType.Text = "普通框架"; cmbCarType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; } else if (carType == "社会车") { txtDirection.Text = ""; //cmbCarType.SelectedText = "一般社会车辆"; cmbCarType.Text = "一般社会车辆"; cmbCarType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; } else { cmbCarType.Text = "车辆出库车到位"; cmbCarType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; } BindCarDrection();//绑定方向 BindCarType(cmbCarType); //txtDirection.Text = ""; if (PackingNo.Contains("Z3")) { labTips.Text = "朝4-1门为南,朝4-4门为北"; } else if (PackingNo.Contains("Z5")) { labTips.Text = "朝7-1门为东,朝7-9门为西"; } }