private void ItemQulified_Click(object sender, EventArgs e) { List <SNControlEntity> list_control = SNControlFactory.GetByPlanStatonSn(CompanyCode, PlineCode, StationCode, PlanCode, SN); foreach (SNControlEntity lst in list_control) { string control_script = list_control.First <SNControlEntity>().CONTROL_SCRIPT; if (lst.CONTROL_SCRIPT == "工序完工模块") { MessageBox.Show("工序完工模块没有操作完成,请重新进行"); return; } DialogResult drt = MessageBox.Show(control_script + "没有报完成,要继续吗?", "提示", MessageBoxButtons.YesNo); if (drt == DialogResult.No) { return; } } ProductSnFactory.HandleStationComplete(CompanyCode, PlineCode, StationCode, PlanCode, SN, "A"); RMESEventArgs args = new RMESEventArgs(); args.MessageHead = "SCP"; SendDataChangeMessage(args); }
private void ItemFailed_Click(object sender, EventArgs e) { //List<SNControlEntity> list_control = SNControlFactory.GetByPlanStatonSn(CompanyCode, PlineCode, StationCode, PlanCode, SN); List <SNControlEntity> list_control = SNControlFactory.GetByPlanStatonSn(CompanyCode, PlineCode, StationCode, PlanCode, SN); if (list_control.Count > 0) { string control_script = list_control.First <SNControlEntity>().CONTROL_SCRIPT; DialogResult drt = MessageBox.Show(control_script + "没有报完成,要继续吗?", "提示", MessageBoxButtons.YesNo); if (drt == DialogResult.No) { return; } } ProductSnFactory.HandleStationComplete(CompanyCode, PlineCode, StationCode, PlanCode, SN, "B"); RMESEventArgs args = new RMESEventArgs(); args.MessageHead = "SCP"; SendDataChangeMessage(args); }