/*******************************************************************************
* Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
* 类的信息:
* 1.程序名称:F_PC_0206.cs
* 2.功能描述:生产线配置检验属性
* 编辑履历:
* 作者 日期 版本 修改内容
* 王鑫 2015/03/27 1.00 新建
*******************************************************************************/
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Windows.Forms;
using Dongke.IBOSS.PRD.Basics.BaseControls;
using Dongke.IBOSS.PRD.Basics.BaseResources;
using Dongke.IBOSS.PRD.Client.CommonModule;
using Dongke.IBOSS.PRD.Client.Controls;
using Dongke.IBOSS.PRD.Client.DataModels;
using Dongke.IBOSS.PRD.WCF.Proxys;
using Dongke.IBOSS.Basics.FlowSetting;
using Dongke.IBOSS.PRD.WCF.Proxys.PCModuleService;
using Dongke.IBOSS.PRD.WCF.DataModels;
namespace Dongke.IBOSS.PRD.Client.PCModule
{
///
/// 生产线配置检验属性
///
public partial class F_PC_0206 : FormBase
{
#region 成员
private FlowNode node;//传入的编辑的节点
private FlowBox control;//主父框架
//private DateTime dt_TempDateTime;//记录就要被修改的值//流入节点的关系名称//流出节点的关系名称
private ArrayList arr_InFlowLineList;//连入节点的名称
private ArrayList arr_OutFlowLineList;//连出节点的名称
//private string str_NodeTypeSeleBefor;
private GroupBox groupBox1;
private GroupBox GetDataOgrp;
private GroupBox groupBox2;
private Label label1;
private GroupBox groupBox3;
private TabControl tabControl;
private TabPage tabPage1;
private TabPage tabPage2;
private TabPage tabPage3;
private Dongke.IBOSS.PRD.Basics.BaseControls.C_Label c_Label1;
private Dongke.IBOSS.PRD.Basics.BaseControls.C_Label c_Label2;
private Dongke.IBOSS.PRD.Basics.BaseControls.C_Label c_Label3;
private Dongke.IBOSS.PRD.Basics.BaseControls.C_TextBox txtProcedureCode;
private Dongke.IBOSS.PRD.Basics.BaseControls.C_TextBox txtProcedureName;
private Dongke.IBOSS.PRD.Basics.BaseControls.C_RadioButton rbtnOne;
private Dongke.IBOSS.PRD.Basics.BaseControls.C_RadioButton rbtnMore;
private Dongke.IBOSS.PRD.Basics.BaseControls.C_RadioButton rBtnNoNeed;
private Dongke.IBOSS.PRD.Basics.BaseControls.C_RadioButton rBtnNeed;
private Dongke.IBOSS.PRD.Basics.BaseControls.C_TextBox txtRemarks;
private Dongke.IBOSS.PRD.Client.Controls.dkOrganizationSearchBox sbOrganizationID;
private C_DataGridView dgvGoods;
private C_DataGridView dgvUser;
private C_DataGridView dgvDefect;
private IContainer components;
private DKListBoxComboBox ddlProcessModelType;//之前选择定的节点类型
private string _goodsCodeValue;
private string _userCodeValue;
private string _defectCodeValue;
private string _JobsCodeValue;
private DataGridViewComboBoxColumn DefectID_NO;
private DataGridViewTextBoxColumn DefectID;
private DataGridViewTextBoxColumn DefectCode;
private DataGridViewTextBoxColumn DefectName;
private GroupBox groupBox4;
public RadioButton radioJobsPrice;
public RadioButton radioNotPrice;
private TabPage tabPage4;
private C_DataGridView dgvMissDefect;
private DataGridViewTextBoxColumn MissDefectID;
private DataGridViewTextBoxColumn MissDefectCode;
private DataGridViewTextBoxColumn MissDefectName;
private DataGridViewTextBoxColumn JobsID;
private DataGridViewTextBoxColumn JobsCode;
private DataGridViewTextBoxColumn JobsName;
private bool _ShowFlag = true;
private ProcedureEntity _procedureEntity = new ProcedureEntity();
private bool _IsEdit = false;
private bool _IsReadonlyCode = false;
#endregion
#region 属性
///
/// 只读工序编码
///
public bool IsReadOnlyCode
{
set
{
_IsReadonlyCode = value;
}
get
{
return _IsReadonlyCode;
}
}
#endregion
#region 构造函数
public F_PC_0206(FlowNode node, FlowBox control)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.btnSave.Text = ButtonText.BTN_SAVE;
this.btnCancel.Text = ButtonText.BTN_CANCEL;
this.groupBox4.Visible = false;
// 初始化
Init(node, control);
}
public F_PC_0206(FlowNode node, FlowBox control,bool isedit)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.btnSave.Text = ButtonText.BTN_SAVE;
this.btnCancel.Text = ButtonText.BTN_CANCEL;
this._IsEdit = isedit;
// this.txtProcedureCode.ReadOnly = true;
this.ddlProcessModelType.Enabled = false;
//xuwei fix 2019-10-17
//this.rBtnNeed.Enabled = false;
//this.rBtnNoNeed.Enabled = false;
this.groupBox4.Visible = false;
// 初始化
Init(node, control);
}
///
/// 初始化
///
private void Init(FlowNode node, FlowBox control)
{
this.node = node;
this.control = control;
this.arr_InFlowLineList = new ArrayList();
this.arr_OutFlowLineList = new ArrayList();
this.FormContentInit();
}
///
/// 填充节点信息到窗口中
///
public void FormContentInit()
{
this._procedureEntity = (ProcedureEntity)this.node.TagNonSerialized;
if (this._procedureEntity != null)
{
this.txtProcedureCode.Text = this._procedureEntity.ProcedureCode;
this.txtProcedureName.Text = this.node.Name; ;
this.txtRemarks.Text = this._procedureEntity.Remarks;
this.rbtnOne.Checked = (this._procedureEntity.CollectType == 2);
this.rbtnMore.Checked = (this._procedureEntity.CollectType == 1);
this.rBtnNeed.Checked = (this._procedureEntity.MustFlag == 1);
this.rBtnNoNeed.Checked = (this._procedureEntity.MustFlag == 0);
this.txtBarCodePrintCopies.DataValue = this._procedureEntity.BarCodePrintCopies;
}
}
#endregion
///
/// 清理所有正在使用的资源。
///
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
///
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
///
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(F_PC_0206));
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtBarCodePrintCopies = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DGV_Digital();
this.c_Label5 = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
this.c_Label4 = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
this.txtDisplayNo = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DGV_Digital();
this.lblDisplayNo = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
this.txtmisspriority = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DGV_Digital();
this.lblmisspriority = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.radioJobsPrice = new System.Windows.Forms.RadioButton();
this.radioNotPrice = new System.Windows.Forms.RadioButton();
this.ddlProcessModelType = new Dongke.IBOSS.PRD.Basics.BaseControls.DKListBoxComboBox();
this.sbOrganizationID = new Dongke.IBOSS.PRD.Client.Controls.dkOrganizationSearchBox();
this.txtRemarks = new Dongke.IBOSS.PRD.Basics.BaseControls.C_TextBox();
this.txtProcedureName = new Dongke.IBOSS.PRD.Basics.BaseControls.C_TextBox();
this.txtProcedureCode = new Dongke.IBOSS.PRD.Basics.BaseControls.C_TextBox();
this.c_Label3 = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
this.c_Label2 = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
this.c_Label1 = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Label();
this.GetDataOgrp = new System.Windows.Forms.GroupBox();
this.rbtnMore = new Dongke.IBOSS.PRD.Basics.BaseControls.C_RadioButton();
this.rbtnOne = new Dongke.IBOSS.PRD.Basics.BaseControls.C_RadioButton();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.rBtnNoNeed = new Dongke.IBOSS.PRD.Basics.BaseControls.C_RadioButton();
this.rBtnNeed = new Dongke.IBOSS.PRD.Basics.BaseControls.C_RadioButton();
this.label1 = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tabControl = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.dgvGoods = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView();
this.GoodsID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GoodsCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GoodsName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GoodsTypeName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.GoodsSpecification = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.dgvUser = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView();
this.User_NO = new System.Windows.Forms.DataGridViewComboBoxColumn();
this.UserID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.UserCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.UserName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.dgvDefect = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView();
this.DefectID_NO = new System.Windows.Forms.DataGridViewComboBoxColumn();
this.DefectID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DefectCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.DefectName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tabPage4 = new System.Windows.Forms.TabPage();
this.dgvMissDefect = new Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView();
this.MissDefectID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MissDefectCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.MissDefectName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.JobsID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.JobsCode = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.JobsName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.btnCancel = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Button();
this.btnSave = new Dongke.IBOSS.PRD.Basics.BaseControls.C_Button();
this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout();
this.GetDataOgrp.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.tabControl.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvGoods)).BeginInit();
this.tabPage2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvUser)).BeginInit();
this.tabPage3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvDefect)).BeginInit();
this.tabPage4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvMissDefect)).BeginInit();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.BackColor = System.Drawing.Color.Transparent;
this.groupBox1.Controls.Add(this.txtBarCodePrintCopies);
this.groupBox1.Controls.Add(this.c_Label5);
this.groupBox1.Controls.Add(this.c_Label4);
this.groupBox1.Controls.Add(this.txtDisplayNo);
this.groupBox1.Controls.Add(this.lblDisplayNo);
this.groupBox1.Controls.Add(this.txtmisspriority);
this.groupBox1.Controls.Add(this.lblmisspriority);
this.groupBox1.Controls.Add(this.groupBox4);
this.groupBox1.Controls.Add(this.ddlProcessModelType);
this.groupBox1.Controls.Add(this.sbOrganizationID);
this.groupBox1.Controls.Add(this.txtRemarks);
this.groupBox1.Controls.Add(this.txtProcedureName);
this.groupBox1.Controls.Add(this.txtProcedureCode);
this.groupBox1.Controls.Add(this.c_Label3);
this.groupBox1.Controls.Add(this.c_Label2);
this.groupBox1.Controls.Add(this.c_Label1);
this.groupBox1.Controls.Add(this.GetDataOgrp);
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(12, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(738, 157);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "基本属性";
//
// txtBarCodePrintCopies
//
this.txtBarCodePrintCopies.AllowNegative = false;
this.txtBarCodePrintCopies.BackColor = System.Drawing.SystemColors.Window;
this.txtBarCodePrintCopies.BackgroundColor = System.Drawing.SystemColors.Window;
this.txtBarCodePrintCopies.EditingControlFormattedValue = "";
this.txtBarCodePrintCopies.ErrorMessage = "";
this.txtBarCodePrintCopies.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtBarCodePrintCopies.ImeMode = System.Windows.Forms.ImeMode.Off;
this.txtBarCodePrintCopies.Location = new System.Drawing.Point(225, 131);
this.txtBarCodePrintCopies.MaxLength = 2;
this.txtBarCodePrintCopies.MaxValue = new decimal(new int[] {
10,
0,
0,
0});
this.txtBarCodePrintCopies.MinValue = new decimal(new int[] {
0,
0,
0,
0});
this.txtBarCodePrintCopies.Name = "txtBarCodePrintCopies";
this.txtBarCodePrintCopies.Number = new System.Drawing.Point(0, 0);
this.txtBarCodePrintCopies.Size = new System.Drawing.Size(69, 21);
this.txtBarCodePrintCopies.TabIndex = 21;
this.txtBarCodePrintCopies.TextValue = "";
//
// c_Label5
//
this.c_Label5.AutoSize = true;
this.c_Label5.BackColor = System.Drawing.Color.Transparent;
this.c_Label5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.c_Label5.Location = new System.Drawing.Point(143, 135);
this.c_Label5.Name = "c_Label5";
this.c_Label5.Size = new System.Drawing.Size(77, 12);
this.c_Label5.TabIndex = 20;
this.c_Label5.Text = "条码打印份数";
//
// c_Label4
//
this.c_Label4.AutoSize = true;
this.c_Label4.BackColor = System.Drawing.Color.Transparent;
this.c_Label4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.c_Label4.ForeColor = System.Drawing.Color.Blue;
this.c_Label4.Location = new System.Drawing.Point(143, 109);
this.c_Label4.Name = "c_Label4";
this.c_Label4.Size = new System.Drawing.Size(185, 12);
this.c_Label4.TabIndex = 19;
this.c_Label4.Text = "(同级别排序大的优先记录漏扫)";
//
// txtDisplayNo
//
this.txtDisplayNo.AllowNegative = false;
this.txtDisplayNo.BackColor = System.Drawing.SystemColors.Window;
this.txtDisplayNo.BackgroundColor = System.Drawing.SystemColors.Window;
this.txtDisplayNo.EditingControlFormattedValue = "";
this.txtDisplayNo.ErrorMessage = "";
this.txtDisplayNo.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtDisplayNo.ImeMode = System.Windows.Forms.ImeMode.Off;
this.txtDisplayNo.Location = new System.Drawing.Point(77, 132);
this.txtDisplayNo.MaxLength = 2;
this.txtDisplayNo.MaxValue = new decimal(new int[] {
99,
0,
0,
0});
this.txtDisplayNo.MinValue = new decimal(new int[] {
0,
0,
0,
0});
this.txtDisplayNo.Name = "txtDisplayNo";
this.txtDisplayNo.Number = new System.Drawing.Point(0, 0);
this.txtDisplayNo.Size = new System.Drawing.Size(60, 21);
this.txtDisplayNo.TabIndex = 18;
this.txtDisplayNo.TextValue = "";
//
// lblDisplayNo
//
this.lblDisplayNo.AutoSize = true;
this.lblDisplayNo.BackColor = System.Drawing.Color.Transparent;
this.lblDisplayNo.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblDisplayNo.Location = new System.Drawing.Point(17, 135);
this.lblDisplayNo.Name = "lblDisplayNo";
this.lblDisplayNo.Size = new System.Drawing.Size(53, 12);
this.lblDisplayNo.TabIndex = 17;
this.lblDisplayNo.Text = "显示顺序";
//
// txtmisspriority
//
this.txtmisspriority.AllowNegative = false;
this.txtmisspriority.BackColor = System.Drawing.SystemColors.Window;
this.txtmisspriority.BackgroundColor = System.Drawing.SystemColors.Window;
this.txtmisspriority.EditingControlFormattedValue = "";
this.txtmisspriority.ErrorMessage = "";
this.txtmisspriority.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtmisspriority.ImeMode = System.Windows.Forms.ImeMode.Off;
this.txtmisspriority.Location = new System.Drawing.Point(77, 106);
this.txtmisspriority.MaxLength = 1;
this.txtmisspriority.MaxValue = new decimal(new int[] {
9,
0,
0,
0});
this.txtmisspriority.MinValue = new decimal(new int[] {
0,
0,
0,
0});
this.txtmisspriority.Name = "txtmisspriority";
this.txtmisspriority.Number = new System.Drawing.Point(0, 0);
this.txtmisspriority.Size = new System.Drawing.Size(60, 21);
this.txtmisspriority.TabIndex = 16;
this.txtmisspriority.TextValue = "";
//
// lblmisspriority
//
this.lblmisspriority.AutoSize = true;
this.lblmisspriority.BackColor = System.Drawing.Color.Transparent;
this.lblmisspriority.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblmisspriority.Location = new System.Drawing.Point(6, 109);
this.lblmisspriority.Name = "lblmisspriority";
this.lblmisspriority.Size = new System.Drawing.Size(65, 12);
this.lblmisspriority.TabIndex = 15;
this.lblmisspriority.Text = "漏扫排序号";
//
// groupBox4
//
this.groupBox4.BackColor = System.Drawing.Color.Transparent;
this.groupBox4.Controls.Add(this.radioJobsPrice);
this.groupBox4.Controls.Add(this.radioNotPrice);
this.groupBox4.Location = new System.Drawing.Point(354, 49);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(165, 54);
this.groupBox4.TabIndex = 9;
this.groupBox4.TabStop = false;
this.groupBox4.Tag = "";
this.groupBox4.Text = "计件模式";
//
// radioJobsPrice
//
this.radioJobsPrice.AutoSize = true;
this.radioJobsPrice.Checked = true;
this.radioJobsPrice.Location = new System.Drawing.Point(71, 24);
this.radioJobsPrice.Name = "radioJobsPrice";
this.radioJobsPrice.Size = new System.Drawing.Size(83, 16);
this.radioJobsPrice.TabIndex = 1;
this.radioJobsPrice.TabStop = true;
this.radioJobsPrice.Text = "同工种策略";
this.radioJobsPrice.UseVisualStyleBackColor = true;
//
// radioNotPrice
//
this.radioNotPrice.AutoSize = true;
this.radioNotPrice.Location = new System.Drawing.Point(6, 24);
this.radioNotPrice.Name = "radioNotPrice";
this.radioNotPrice.Size = new System.Drawing.Size(59, 16);
this.radioNotPrice.TabIndex = 0;
this.radioNotPrice.Text = "不计件";
this.radioNotPrice.UseVisualStyleBackColor = true;
//
// ddlProcessModelType
//
this.ddlProcessModelType.BackColor = System.Drawing.Color.Yellow;
this.ddlProcessModelType.BackgroundColor = System.Drawing.SystemColors.Window;
this.ddlProcessModelType.DataSource = null;
this.ddlProcessModelType.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ddlProcessModelType.FormattingEnabled = true;
this.ddlProcessModelType.IsMustInput = true;
//
//
//
this.ddlProcessModelType.ListBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.ddlProcessModelType.ListBox.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ddlProcessModelType.ListBox.Location = new System.Drawing.Point(0, 0);
this.ddlProcessModelType.ListBox.Name = "";
this.ddlProcessModelType.ListBox.Size = new System.Drawing.Size(106, 136);
this.ddlProcessModelType.ListBox.TabIndex = 0;
this.ddlProcessModelType.Location = new System.Drawing.Point(411, 19);
this.ddlProcessModelType.Name = "ddlProcessModelType";
this.ddlProcessModelType.Size = new System.Drawing.Size(108, 20);
this.ddlProcessModelType.TabIndex = 5;
//
// sbOrganizationID
//
this.sbOrganizationID.BackColor = System.Drawing.Color.Transparent;
this.sbOrganizationID.CurrentUserOrganizationCode = null;
this.sbOrganizationID.DataSource = null;
this.sbOrganizationID.Enabled = true;
this.sbOrganizationID.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.sbOrganizationID.IsMustInput = true;
this.sbOrganizationID.IsOnlyDisplayEnd = false;
this.sbOrganizationID.Location = new System.Drawing.Point(525, 19);
this.sbOrganizationID.Name = "sbOrganizationID";
this.sbOrganizationID.OrganizationCode = "";
this.sbOrganizationID.OrganizationIDS = null;
this.sbOrganizationID.OrganizationName = "";
this.sbOrganizationID.PurviewType = ((byte)(0));
this.sbOrganizationID.Size = new System.Drawing.Size(202, 21);
this.sbOrganizationID.TabIndex = 6;
this.sbOrganizationID.TxtOrganizationBackColor = System.Drawing.SystemColors.Control;
//
// txtRemarks
//
this.txtRemarks.BackColor = System.Drawing.SystemColors.Window;
this.txtRemarks.BackgroundColor = System.Drawing.SystemColors.Window;
this.txtRemarks.ErrorMessage = "";
this.txtRemarks.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtRemarks.Location = new System.Drawing.Point(516, 106);
this.txtRemarks.MaxLength = 500;
this.txtRemarks.Multiline = true;
this.txtRemarks.Name = "txtRemarks";
this.txtRemarks.Size = new System.Drawing.Size(211, 45);
this.txtRemarks.TabIndex = 11;
//
// txtProcedureName
//
this.txtProcedureName.BackColor = System.Drawing.Color.Yellow;
this.txtProcedureName.BackgroundColor = System.Drawing.SystemColors.Window;
this.txtProcedureName.ErrorMessage = "必须输入项目";
this.txtProcedureName.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtProcedureName.HasError = true;
this.txtProcedureName.IsMustInput = true;
this.txtProcedureName.Location = new System.Drawing.Point(238, 20);
this.txtProcedureName.MaxLength = 50;
this.txtProcedureName.Name = "txtProcedureName";
this.txtProcedureName.Size = new System.Drawing.Size(108, 21);
this.txtProcedureName.TabIndex = 3;
//
// txtProcedureCode
//
this.txtProcedureCode.BackColor = System.Drawing.Color.Yellow;
this.txtProcedureCode.BackgroundColor = System.Drawing.SystemColors.Window;
this.txtProcedureCode.ErrorMessage = "必须输入项目";
this.txtProcedureCode.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtProcedureCode.HasError = true;
this.txtProcedureCode.IsMustInput = true;
this.txtProcedureCode.Location = new System.Drawing.Point(65, 20);
this.txtProcedureCode.MaxLength = 20;
this.txtProcedureCode.Name = "txtProcedureCode";
this.txtProcedureCode.RejectCharsPattern = "[^a-zA-Z0-9]";
this.txtProcedureCode.Size = new System.Drawing.Size(108, 21);
this.txtProcedureCode.TabIndex = 1;
//
// c_Label3
//
this.c_Label3.AutoSize = true;
this.c_Label3.BackColor = System.Drawing.Color.Transparent;
this.c_Label3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.c_Label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(39)))), ((int)(((byte)(39)))));
this.c_Label3.IsMustInput = true;
this.c_Label3.Location = new System.Drawing.Point(352, 23);
this.c_Label3.Name = "c_Label3";
this.c_Label3.Size = new System.Drawing.Size(53, 12);
this.c_Label3.TabIndex = 4;
this.c_Label3.Text = "工序类型";
//
// c_Label2
//
this.c_Label2.AutoSize = true;
this.c_Label2.BackColor = System.Drawing.Color.Transparent;
this.c_Label2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.c_Label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(39)))), ((int)(((byte)(39)))));
this.c_Label2.IsMustInput = true;
this.c_Label2.Location = new System.Drawing.Point(179, 23);
this.c_Label2.Name = "c_Label2";
this.c_Label2.Size = new System.Drawing.Size(53, 12);
this.c_Label2.TabIndex = 2;
this.c_Label2.Text = "工序名称";
//
// c_Label1
//
this.c_Label1.AutoSize = true;
this.c_Label1.BackColor = System.Drawing.Color.Transparent;
this.c_Label1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.c_Label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(39)))), ((int)(((byte)(39)))));
this.c_Label1.IsMustInput = true;
this.c_Label1.Location = new System.Drawing.Point(6, 23);
this.c_Label1.Name = "c_Label1";
this.c_Label1.Size = new System.Drawing.Size(53, 12);
this.c_Label1.TabIndex = 0;
this.c_Label1.Text = "工序编号";
//
// GetDataOgrp
//
this.GetDataOgrp.BackColor = System.Drawing.Color.Transparent;
this.GetDataOgrp.Controls.Add(this.rbtnMore);
this.GetDataOgrp.Controls.Add(this.rbtnOne);
this.GetDataOgrp.Location = new System.Drawing.Point(8, 49);
this.GetDataOgrp.Name = "GetDataOgrp";
this.GetDataOgrp.Size = new System.Drawing.Size(165, 54);
this.GetDataOgrp.TabIndex = 7;
this.GetDataOgrp.TabStop = false;
this.GetDataOgrp.Text = "采集方式";
//
// rbtnMore
//
this.rbtnMore.AutoSize = true;
this.rbtnMore.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rbtnMore.Location = new System.Drawing.Point(91, 24);
this.rbtnMore.Name = "rbtnMore";
this.rbtnMore.Size = new System.Drawing.Size(71, 16);
this.rbtnMore.TabIndex = 1;
this.rbtnMore.Text = "集中采集";
this.rbtnMore.UseVisualStyleBackColor = true;
//
// rbtnOne
//
this.rbtnOne.AutoSize = true;
this.rbtnOne.Checked = true;
this.rbtnOne.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rbtnOne.Location = new System.Drawing.Point(6, 24);
this.rbtnOne.Name = "rbtnOne";
this.rbtnOne.Size = new System.Drawing.Size(71, 16);
this.rbtnOne.TabIndex = 0;
this.rbtnOne.TabStop = true;
this.rbtnOne.Text = "单点采集";
this.rbtnOne.UseVisualStyleBackColor = true;
//
// groupBox2
//
this.groupBox2.BackColor = System.Drawing.Color.Transparent;
this.groupBox2.Controls.Add(this.rBtnNoNeed);
this.groupBox2.Controls.Add(this.rBtnNeed);
this.groupBox2.Location = new System.Drawing.Point(181, 49);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(165, 54);
this.groupBox2.TabIndex = 8;
this.groupBox2.TabStop = false;
this.groupBox2.Tag = "";
this.groupBox2.Text = "必须工序";
//
// rBtnNoNeed
//
this.rBtnNoNeed.AutoSize = true;
this.rBtnNoNeed.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rBtnNoNeed.Location = new System.Drawing.Point(93, 24);
this.rBtnNoNeed.Name = "rBtnNoNeed";
this.rBtnNoNeed.Size = new System.Drawing.Size(59, 16);
this.rBtnNoNeed.TabIndex = 1;
this.rBtnNoNeed.Text = "非必须";
this.rBtnNoNeed.UseVisualStyleBackColor = true;
//
// rBtnNeed
//
this.rBtnNeed.AutoSize = true;
this.rBtnNeed.Checked = true;
this.rBtnNeed.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.rBtnNeed.Location = new System.Drawing.Point(17, 24);
this.rBtnNeed.Name = "rBtnNeed";
this.rBtnNeed.Size = new System.Drawing.Size(47, 16);
this.rBtnNeed.TabIndex = 0;
this.rBtnNeed.TabStop = true;
this.rBtnNeed.Text = "必须";
this.rBtnNeed.UseVisualStyleBackColor = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(479, 106);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(29, 12);
this.label1.TabIndex = 10;
this.label1.Text = "备注";
//
// groupBox3
//
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox3.BackColor = System.Drawing.Color.Transparent;
this.groupBox3.Controls.Add(this.tabControl);
this.groupBox3.Location = new System.Drawing.Point(12, 175);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(738, 282);
this.groupBox3.TabIndex = 1;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "控制属性";
//
// tabControl
//
this.tabControl.Controls.Add(this.tabPage1);
this.tabControl.Controls.Add(this.tabPage2);
this.tabControl.Controls.Add(this.tabPage3);
this.tabControl.Controls.Add(this.tabPage4);
this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl.Location = new System.Drawing.Point(3, 17);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
this.tabControl.Size = new System.Drawing.Size(732, 262);
this.tabControl.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.dgvGoods);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Margin = new System.Windows.Forms.Padding(0);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(724, 236);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "检验产品";
this.tabPage1.UseVisualStyleBackColor = true;
//
// dgvGoods
//
this.dgvGoods.AllowUserToModifyRows = true;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.dgvGoods.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvGoods.CellBackColorNochanged = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.dgvGoods.CellBackColorReadOnly = System.Drawing.SystemColors.Control;
this.dgvGoods.CellHeight = 23;
this.dgvGoods.ChildNodeColumnName = null;
this.dgvGoods.ChildNodeColumnText = null;
this.dgvGoods.ColumnDeep = 1;
this.dgvGoods.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(58)))), ((int)(((byte)(70)))));
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvGoods.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvGoods.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dgvGoods.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.GoodsID,
this.GoodsCode,
this.GoodsName,
this.GoodsTypeName,
this.GoodsSpecification});
this.dgvGoods.ColumnTreeView = null;
this.dgvGoods.ContextMenuVisible = ((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags)((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.Refine | Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.FileOut)));
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvGoods.DefaultCellStyle = dataGridViewCellStyle3;
this.dgvGoods.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvGoods.DynamicColumnName = "";
this.dgvGoods.EnableHeadersVisualStyles = false;
this.dgvGoods.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvGoods.IsAutoCountSum = true;
this.dgvGoods.IsAutoResizeColumns = false;
this.dgvGoods.IsClickF12 = false;
this.dgvGoods.IsSubTotalFlag = false;
this.dgvGoods.Location = new System.Drawing.Point(0, 0);
this.dgvGoods.Name = "dgvGoods";
this.dgvGoods.RefreshAtHscroll = false;
this.dgvGoods.RowHeadersWidth = 50;
this.dgvGoods.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(159)))), ((int)(((byte)(39)))), ((int)(((byte)(39)))));
this.dgvGoods.RowsDefaultCellStyle = dataGridViewCellStyle4;
this.dgvGoods.RowTemplate.Height = 21;
this.dgvGoods.Size = new System.Drawing.Size(724, 236);
this.dgvGoods.SortOrderColumnName = null;
this.dgvGoods.TabIndex = 0;
this.dgvGoods.Tag = true;
this.dgvGoods.TotalSumColumns = null;
this.dgvGoods.ViewRowFilter = "";
this.dgvGoods.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.dgvGoods_CellBeginEdit);
this.dgvGoods.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvGoods_CellValueChanged);
//
// GoodsID
//
this.GoodsID.DataPropertyName = "GoodsID";
this.GoodsID.HeaderText = "GoodsID";
this.GoodsID.Name = "GoodsID";
this.GoodsID.Visible = false;
//
// GoodsCode
//
this.GoodsCode.DataPropertyName = "GoodsCode";
this.GoodsCode.HeaderText = "产品编码";
this.GoodsCode.Name = "GoodsCode";
this.GoodsCode.Resizable = System.Windows.Forms.DataGridViewTriState.True;
//
// GoodsName
//
this.GoodsName.DataPropertyName = "GoodsName";
this.GoodsName.HeaderText = "产品名称";
this.GoodsName.Name = "GoodsName";
this.GoodsName.ReadOnly = true;
this.GoodsName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// GoodsTypeName
//
this.GoodsTypeName.DataPropertyName = "GoodsTypeName";
this.GoodsTypeName.HeaderText = "产品类别";
this.GoodsTypeName.Name = "GoodsTypeName";
this.GoodsTypeName.ReadOnly = true;
this.GoodsTypeName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// GoodsSpecification
//
this.GoodsSpecification.DataPropertyName = "GoodsSpecification";
this.GoodsSpecification.HeaderText = "产品规格";
this.GoodsSpecification.Name = "GoodsSpecification";
this.GoodsSpecification.ReadOnly = true;
this.GoodsSpecification.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// tabPage2
//
this.tabPage2.Controls.Add(this.dgvUser);
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Margin = new System.Windows.Forms.Padding(0);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(724, 236);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "检验工号";
this.tabPage2.UseVisualStyleBackColor = true;
//
// dgvUser
//
this.dgvUser.AllowUserToModifyRows = true;
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle5;
this.dgvUser.CellBackColorNochanged = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.dgvUser.CellBackColorReadOnly = System.Drawing.SystemColors.Control;
this.dgvUser.CellHeight = 23;
this.dgvUser.ChildNodeColumnName = null;
this.dgvUser.ChildNodeColumnText = null;
this.dgvUser.ColumnDeep = 1;
this.dgvUser.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(58)))), ((int)(((byte)(70)))));
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
this.dgvUser.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dgvUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.User_NO,
this.UserID,
this.UserCode,
this.UserName});
this.dgvUser.ColumnTreeView = null;
this.dgvUser.ContextMenuVisible = ((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags)((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.Refine | Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.FileOut)));
this.dgvUser.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvUser.DynamicColumnName = "";
this.dgvUser.EnableHeadersVisualStyles = false;
this.dgvUser.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvUser.IsAutoCountSum = true;
this.dgvUser.IsAutoResizeColumns = false;
this.dgvUser.IsClickF12 = false;
this.dgvUser.IsSubTotalFlag = false;
this.dgvUser.Location = new System.Drawing.Point(0, 0);
this.dgvUser.Name = "dgvUser";
this.dgvUser.RefreshAtHscroll = false;
this.dgvUser.RowHeadersWidth = 50;
this.dgvUser.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(159)))), ((int)(((byte)(39)))), ((int)(((byte)(39)))));
this.dgvUser.RowsDefaultCellStyle = dataGridViewCellStyle7;
this.dgvUser.RowTemplate.Height = 21;
this.dgvUser.Size = new System.Drawing.Size(724, 236);
this.dgvUser.SortOrderColumnName = null;
this.dgvUser.TabIndex = 55;
this.dgvUser.Tag = true;
this.dgvUser.TotalSumColumns = null;
this.dgvUser.ViewRowFilter = "";
this.dgvUser.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.dgvUser_CellBeginEdit);
this.dgvUser.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvUser_CellValueChanged);
//
// User_NO
//
this.User_NO.DataPropertyName = "UserID";
this.User_NO.FillWeight = 200F;
this.User_NO.HeaderText = "工号";
this.User_NO.Name = "User_NO";
this.User_NO.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.User_NO.Visible = false;
this.User_NO.Width = 200;
//
// UserID
//
this.UserID.DataPropertyName = "UserID";
this.UserID.HeaderText = "工号ID";
this.UserID.Name = "UserID";
this.UserID.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.UserID.Visible = false;
//
// UserCode
//
this.UserCode.DataPropertyName = "UserCode";
this.UserCode.HeaderText = "工号";
this.UserCode.Name = "UserCode";
this.UserCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// UserName
//
this.UserName.DataPropertyName = "UserName";
this.UserName.HeaderText = "工号名称";
this.UserName.Name = "UserName";
this.UserName.ReadOnly = true;
this.UserName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.dgvDefect);
this.tabPage3.Location = new System.Drawing.Point(4, 22);
this.tabPage3.Margin = new System.Windows.Forms.Padding(0);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(724, 236);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "可检缺陷";
this.tabPage3.UseVisualStyleBackColor = true;
//
// dgvDefect
//
this.dgvDefect.AllowUserToModifyRows = true;
dataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.dgvDefect.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle8;
this.dgvDefect.CellBackColorNochanged = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.dgvDefect.CellBackColorReadOnly = System.Drawing.SystemColors.Control;
this.dgvDefect.CellHeight = 23;
this.dgvDefect.ChildNodeColumnName = null;
this.dgvDefect.ChildNodeColumnText = null;
this.dgvDefect.ColumnDeep = 1;
this.dgvDefect.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(58)))), ((int)(((byte)(70)))));
dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle9.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvDefect.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9;
this.dgvDefect.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dgvDefect.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.DefectID_NO,
this.DefectID,
this.DefectCode,
this.DefectName});
this.dgvDefect.ColumnTreeView = null;
this.dgvDefect.ContextMenuVisible = ((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags)((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.Refine | Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.FileOut)));
this.dgvDefect.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvDefect.DynamicColumnName = "";
this.dgvDefect.EnableHeadersVisualStyles = false;
this.dgvDefect.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvDefect.IsAutoCountSum = true;
this.dgvDefect.IsAutoResizeColumns = false;
this.dgvDefect.IsClickF12 = false;
this.dgvDefect.IsSubTotalFlag = false;
this.dgvDefect.Location = new System.Drawing.Point(0, 0);
this.dgvDefect.Name = "dgvDefect";
this.dgvDefect.RefreshAtHscroll = false;
this.dgvDefect.RowHeadersWidth = 50;
this.dgvDefect.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(159)))), ((int)(((byte)(39)))), ((int)(((byte)(39)))));
this.dgvDefect.RowsDefaultCellStyle = dataGridViewCellStyle10;
this.dgvDefect.RowTemplate.Height = 21;
this.dgvDefect.Size = new System.Drawing.Size(724, 236);
this.dgvDefect.SortOrderColumnName = null;
this.dgvDefect.TabIndex = 55;
this.dgvDefect.Tag = true;
this.dgvDefect.TotalSumColumns = null;
this.dgvDefect.ViewRowFilter = "";
this.dgvDefect.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.dgvDefect_CellBeginEdit);
this.dgvDefect.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvDefect_CellValueChanged);
//
// DefectID_NO
//
this.DefectID_NO.FillWeight = 200F;
this.DefectID_NO.HeaderText = "缺陷";
this.DefectID_NO.Name = "DefectID_NO";
this.DefectID_NO.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.DefectID_NO.Visible = false;
this.DefectID_NO.Width = 200;
//
// DefectID
//
this.DefectID.DataPropertyName = "DefectID";
this.DefectID.HeaderText = "DefectID";
this.DefectID.Name = "DefectID";
this.DefectID.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.DefectID.Visible = false;
//
// DefectCode
//
this.DefectCode.DataPropertyName = "DefectCode";
this.DefectCode.HeaderText = "缺陷编码";
this.DefectCode.Name = "DefectCode";
this.DefectCode.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// DefectName
//
this.DefectName.DataPropertyName = "DefectName";
this.DefectName.HeaderText = "缺陷名称";
this.DefectName.Name = "DefectName";
this.DefectName.ReadOnly = true;
this.DefectName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// tabPage4
//
this.tabPage4.Controls.Add(this.dgvMissDefect);
this.tabPage4.Location = new System.Drawing.Point(4, 22);
this.tabPage4.Name = "tabPage4";
this.tabPage4.Size = new System.Drawing.Size(724, 236);
this.tabPage4.TabIndex = 3;
this.tabPage4.Text = "漏检缺陷";
this.tabPage4.UseVisualStyleBackColor = true;
//
// dgvMissDefect
//
this.dgvMissDefect.AllowUserToModifyRows = true;
dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.dgvMissDefect.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11;
this.dgvMissDefect.CellBackColorNochanged = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.dgvMissDefect.CellBackColorReadOnly = System.Drawing.SystemColors.Control;
this.dgvMissDefect.CellHeight = 23;
this.dgvMissDefect.ChildNodeColumnName = null;
this.dgvMissDefect.ChildNodeColumnText = null;
this.dgvMissDefect.ColumnDeep = 1;
this.dgvMissDefect.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(58)))), ((int)(((byte)(70)))));
dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle12.ForeColor = System.Drawing.Color.White;
dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvMissDefect.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12;
this.dgvMissDefect.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dgvMissDefect.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.MissDefectID,
this.MissDefectCode,
this.MissDefectName,
this.JobsID,
this.JobsCode,
this.JobsName});
this.dgvMissDefect.ColumnTreeView = null;
this.dgvMissDefect.ContextMenuVisible = ((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags)((Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.Refine | Dongke.IBOSS.PRD.Basics.BaseControls.C_DataGridView.ContextMenuVisibleFlags.FileOut)));
this.dgvMissDefect.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvMissDefect.DynamicColumnName = "";
this.dgvMissDefect.EnableHeadersVisualStyles = false;
this.dgvMissDefect.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvMissDefect.IsAutoCountSum = true;
this.dgvMissDefect.IsAutoResizeColumns = false;
this.dgvMissDefect.IsClickF12 = false;
this.dgvMissDefect.IsSubTotalFlag = false;
this.dgvMissDefect.Location = new System.Drawing.Point(0, 0);
this.dgvMissDefect.Name = "dgvMissDefect";
this.dgvMissDefect.RefreshAtHscroll = false;
this.dgvMissDefect.RowHeadersWidth = 50;
this.dgvMissDefect.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing;
dataGridViewCellStyle13.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(159)))), ((int)(((byte)(39)))), ((int)(((byte)(39)))));
this.dgvMissDefect.RowsDefaultCellStyle = dataGridViewCellStyle13;
this.dgvMissDefect.RowTemplate.Height = 21;
this.dgvMissDefect.Size = new System.Drawing.Size(724, 236);
this.dgvMissDefect.SortOrderColumnName = null;
this.dgvMissDefect.TabIndex = 55;
this.dgvMissDefect.Tag = true;
this.dgvMissDefect.TotalSumColumns = null;
this.dgvMissDefect.ViewRowFilter = "";
this.dgvMissDefect.CellBeginEdit += new System.Windows.Forms.DataGridViewCellCancelEventHandler(this.dgvMissDefect_CellBeginEdit);
this.dgvMissDefect.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvMissDefect_CellValueChanged);
//
// MissDefectID
//
this.MissDefectID.DataPropertyName = "DefectID";
this.MissDefectID.HeaderText = "DefectID";
this.MissDefectID.Name = "MissDefectID";
this.MissDefectID.ReadOnly = true;
this.MissDefectID.Visible = false;
//
// MissDefectCode
//
this.MissDefectCode.DataPropertyName = "DefectCode";
this.MissDefectCode.HeaderText = "缺陷编码";
this.MissDefectCode.Name = "MissDefectCode";
//
// MissDefectName
//
this.MissDefectName.DataPropertyName = "DefectName";
this.MissDefectName.HeaderText = "缺陷名称";
this.MissDefectName.Name = "MissDefectName";
this.MissDefectName.ReadOnly = true;
//
// JobsID
//
this.JobsID.DataPropertyName = "JobsID";
this.JobsID.HeaderText = "JobsID";
this.JobsID.Name = "JobsID";
this.JobsID.ReadOnly = true;
this.JobsID.Visible = false;
//
// JobsCode
//
this.JobsCode.DataPropertyName = "JobsCode";
this.JobsCode.HeaderText = "责任工种编码";
this.JobsCode.Name = "JobsCode";
//
// JobsName
//
this.JobsName.DataPropertyName = "JobsName";
this.JobsName.HeaderText = "责任工种名称";
this.JobsName.Name = "JobsName";
this.JobsName.ReadOnly = true;
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.BackColor = System.Drawing.Color.Transparent;
this.btnCancel.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnCancel.BackgroundImage")));
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCancel.ForeColor = System.Drawing.Color.White;
this.btnCancel.Location = new System.Drawing.Point(665, 460);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(85, 30);
this.btnCancel.TabIndex = 5;
this.btnCancel.Text = "取消";
this.btnCancel.UseVisualStyleBackColor = false;
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnSave.BackColor = System.Drawing.Color.Transparent;
this.btnSave.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btnSave.BackgroundImage")));
this.btnSave.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.ForeColor = System.Drawing.Color.White;
this.btnSave.Location = new System.Drawing.Point(574, 460);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(85, 30);
this.btnSave.TabIndex = 4;
this.btnSave.Text = "保存";
this.btnSave.UseVisualStyleBackColor = false;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// F_PC_0206
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(762, 518);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnSave);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.IsSaveFormSize = false;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "F_PC_0206";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.StatusSizingGrip = false;
this.Text = "检验属性";
this.Load += new System.EventHandler(this.F_PC_0206_Load);
this.Controls.SetChildIndex(this.groupBox1, 0);
this.Controls.SetChildIndex(this.groupBox3, 0);
this.Controls.SetChildIndex(this.btnSave, 0);
this.Controls.SetChildIndex(this.btnCancel, 0);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.GetDataOgrp.ResumeLayout(false);
this.GetDataOgrp.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.tabControl.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvGoods)).EndInit();
this.tabPage2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvUser)).EndInit();
this.tabPage3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvDefect)).EndInit();
this.tabPage4.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvMissDefect)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
#region 事件
///
/// 保存按钮事件
///
///
///
private void btnSave_Click(object sender, EventArgs e)
{
try
{
#region 校验
#region 非空校验
if (string.IsNullOrEmpty(this.txtProcedureCode.Text.Trim()))
{
MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "工序编码"),
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.txtProcedureCode.Focus();
return;
}
if (string.IsNullOrEmpty(this.txtProcedureName.Text.Trim()))
{
MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "工序名称"),
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.txtProcedureName.Focus();
return;
}
if (string.IsNullOrEmpty(this.ddlProcessModelType.Text.Trim()))
{
MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "工序类型"),
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.ddlProcessModelType.Focus();
return;
}
if (sbOrganizationID.OrganizationID == null)
{
MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "组织机构"),
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.sbOrganizationID.Focus();
return;
}
#endregion
#region 规则检验
// 查询节点编码在本生产线中不重复
// string procedureCode = this.node.pr; //此工序的Code
int itemID = this.node.ItemID;
bool isError = false;
foreach (FlowNode flownode in this.control.AllNodes)
{
if (flownode.ItemID != itemID && flownode.Code == this.txtProcedureCode.Text.Trim())
{
isError = true;
break;
}
}
if (isError)
{
MessageBox.Show("工序编码在本生产线中已经存在!",
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.txtProcedureCode.Focus();
return;
}
//// 查询节点编码在本生产线中不重复
//int count = this.control.node.rrNodeList.OfType().Where(
// p => p.ProcedureEntity.ProcedureCode == this.txtProcedureCode.Text.Trim()
// && p.NodeListIndex != this.node.NodeListIndex
// ).Count();
//if (count > 0)
//{
// MessageBox.Show("工序编码在本生产线中已经存在!",
// this.Text,
// MessageBoxButtons.OK,
// MessageBoxIcon.Warning);
// this.txtProcedureCode.Focus();
// return;
//}
#endregion
#region 产品校验
if (this.dgvGoods.Rows.Count <= 1)
{
MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "生产产品"),
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.tabControl.SelectedIndex = 0;
this.dgvGoods.Focus();
return;
}
// 验证明细是否输入完整
foreach (DataGridViewRow row in this.dgvGoods.Rows)
{
if (row.IsNewRow)
{
continue;
}
// 产品编码
if (string.IsNullOrEmpty(row.Cells["GoodsID"].Value + ""))
{
MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "产品编码"),
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.tabControl.SelectedIndex = 0;
row.Cells["GoodsCode"].Selected = true;
return;
}
}
#endregion
#region 生产工号
if (this.dgvUser.Rows.Count <= 1)
{
MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "操作工号"),
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.tabControl.SelectedIndex = 1;
this.dgvUser.Focus();
return;
}
// 验证明细是否输入完整
for (int i = 0; i < this.dgvUser.Rows.Count; i++)
{
if (this.dgvUser.Rows[i].IsNewRow)
{
continue;
}
// 生产工号
if (string.IsNullOrEmpty(this.dgvUser.Rows[i].Cells["UserID"].Value + ""))
{
MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "生产工号"),
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.tabControl.SelectedIndex = 1;
this.dgvUser.Rows[i].Cells["UserID"].Selected = true;
return;
}
// 2层循环判断是否有重复的工号
for (int j = i + 1; j < this.dgvUser.Rows.Count; j++)
{
if (this.dgvUser.Rows[i].Cells["UserID"].Value + ""
== this.dgvUser.Rows[j].Cells["UserID"].Value + "")
{
MessageBox.Show("生产工号在列表中重复出现。",
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.tabControl.SelectedIndex = 1;
this.dgvUser.Rows[i].Cells["UserID"].Selected = true;
return;
}
}
}
#endregion
#region 可检缺陷
// 验证明细是否输入完整
DataTable dtDefect = this.dgvDefect.DataSource as DataTable;
for (int i = 0; i < dtDefect.Rows.Count; i++)
{
if (this.dgvDefect.Rows[i].IsNewRow)
{
continue;
}
// 存在缺陷不能为空
if (string.IsNullOrEmpty(this.dgvDefect.Rows[i].Cells["DefectID"].Value + ""))
{
MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "缺陷"),
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.tabControl.SelectedIndex = 2;
this.dgvDefect.Rows[i].Cells["DefectID"].Selected = true;
return;
}
// 2层循环判断是否有重复的工号
for (int j = i + 1; j < this.dgvDefect.Rows.Count; j++)
{
if (this.dgvDefect.Rows[i].Cells["DefectID"].Value + ""
== this.dgvDefect.Rows[j].Cells["DefectID"].Value + "")
{
MessageBox.Show("缺陷在列表中重复出现。",
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.tabControl.SelectedIndex = 2;
this.dgvDefect.Rows[i].Cells["DefectID"].Selected = true;
return;
}
}
}
#endregion
#region 存在缺陷对应责任工种
// 验证明细是否输入完整
for (int i = 0; i < this.dgvMissDefect.Rows.Count; i++)
{
if (this.dgvMissDefect.Rows[i].IsNewRow)
{
continue;
}
// 存在缺陷不能为空
if (string.IsNullOrEmpty(this.dgvMissDefect.Rows[i].Cells["MissDefectID"].Value + ""))
{
MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "缺陷"),
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.tabControl.SelectedIndex = 3;
this.dgvMissDefect.Rows[i].Cells["MissDefectCode"].Selected = true;
return;
}
// 责任工种不能为空
if (string.IsNullOrEmpty(this.dgvMissDefect.Rows[i].Cells["JobsID"].Value + ""))
{
MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "责任工种"),
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.tabControl.SelectedIndex = 3;
this.dgvMissDefect.Rows[i].Cells["JobsCode"].Selected = true;
return;
}
// 2层循环判断是否有重复的工号
for (int j = i + 1; j < dtDefect.Rows.Count; j++)// this.dgvDefect
{
if (this.dgvMissDefect.Rows[i].Cells["MissDefectID"].Value + "," + this.dgvMissDefect.Rows[i].Cells["JobsID"].Value
== this.dgvMissDefect.Rows[j].Cells["MissDefectID"].Value + "," + this.dgvMissDefect.Rows[j].Cells["JobsID"].Value)
{
MessageBox.Show("缺陷与责任工种的组合在列表中重复出现。",
this.Text,
MessageBoxButtons.OK,
MessageBoxIcon.Warning);
this.tabControl.SelectedIndex = 3;
this.dgvMissDefect.Rows[i].Selected = true;
this.dgvMissDefect.Rows[j].Selected = true;
return;
}
}
}
#endregion
#endregion
#region 工序节点赋值
this._procedureEntity.ProcedureCode = this.txtProcedureCode.Text.Trim();
this.node.Name = this.txtProcedureName.Text.Trim();
this._procedureEntity.ProcedureName = this.txtProcedureName.Text.Trim();
this._procedureEntity.ModelType = Convert.ToInt32(this.ddlProcessModelType.ListBox.SelectedValue);
this._procedureEntity.OrganizationID = (int)this.sbOrganizationID.OrganizationID;
this._procedureEntity.CollectType = rbtnMore.Checked ? 1 : 2;
this._procedureEntity.MustFlag = rBtnNeed.Checked ? 1 : 2;
if (this._procedureEntity.MustFlag == 1)
{ this.node.CanSkip = false; }
else { this.node.CanSkip = true; }
this._procedureEntity.DisplayNo = this.txtDisplayNo.Text.Trim() == "" ? 0 : Convert.ToInt32(this.txtDisplayNo.Text.Trim());
// 计件模式
//this.node.PieceType = rbtnMore.Checked ? 1 : 2;
// 特殊返工工序
//this.node.IsSpecialRework =
this._procedureEntity.Remarks = this.txtRemarks.Text.Trim();
// 生产产品
this._procedureEntity.ProcedureGoodsTable = this.dgvGoods.DataSource as DataTable;
this._procedureEntity.ProcedureGoodsTable.AcceptChanges();
// 操作工号表
this._procedureEntity.ProcedureUserTable = this.dgvUser.DataSource as DataTable;
this._procedureEntity.ProcedureUserTable.AcceptChanges();
// 缺陷
this._procedureEntity.ProcedureDefectTable = this.dgvDefect.DataSource as DataTable;
this._procedureEntity.ProcedureDefectTable.AcceptChanges();
// 漏检缺陷
this._procedureEntity.DefectProcedureJobsTable = this.dgvMissDefect.DataSource as DataTable;
this._procedureEntity.DefectProcedureJobsTable.AcceptChanges();
//漏扫排序号
this._procedureEntity.MissPriority = this.txtmisspriority.Text.Trim() == "" ? 0 : Convert.ToInt32(this.txtmisspriority.Text);
this._procedureEntity.BarCodePrintCopies = this.txtBarCodePrintCopies.DataValue.HasValue ? Convert.ToInt32(this.txtBarCodePrintCopies.DataValue) : 0;
#region 计件方式
this._procedureEntity.PieceType =
radioJobsPrice.Checked ? Constant.ProcedurePieceType.JobsPiece.GetHashCode() : Constant.ProcedurePieceType.NoPiece.GetHashCode();
#endregion
#endregion
if (this._IsEdit)
{
int result = PCModuleProxy.Service.SaveProcedureInfo(this._procedureEntity);
if (result > Constant.INT_IS_ZERO)
{
MessageBox.Show(string.Format(Messages.MSG_CMN_I001, this.txtProcedureName.Text.Trim(), Constant.OPERATE_SAVE),
this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
this.DialogResult = DialogResult.OK;
}
else if (result == Constant.RETURN_IS_DATACHANGED)
{
MessageBox.Show(Messages.MSG_CMN_W012,
this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
else
{
MessageBox.Show(string.Format(Messages.MSG_CMN_W001, this.txtProcedureName.Text.Trim(), Constant.OPERATE_SAVE),
this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
}
this.Close();
}
catch (Exception ex)
{
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 窗体加载事件-添加控件
///
///
///
private void F_PC_0206_Load(object sender, EventArgs e)
{
try
{
if (IsReadOnlyCode)
{
//this.txtProcedureCode.ReadOnly = true;
}
this.tabPage4.Parent = null;//隐藏缺陷漏检选项卡
#region 数据加载
this.dgvGoods.AutoGenerateColumns = false;
this.dgvUser.AutoGenerateColumns = false;
this.dgvDefect.AutoGenerateColumns = false;
this.dgvMissDefect.AutoGenerateColumns = false;
// 加载产品列表的结构
this.dgvGoods.DataSource = this._procedureEntity.ProcedureGoodsTable.Copy();
this.dgvGoods.IsSetInputColumnsColor = true;
// 加载操作工号表
this.dgvUser.DataSource = this._procedureEntity.ProcedureUserTable.Copy();
this.dgvUser.IsSetInputColumnsColor = true;
// 加载缺陷
this.dgvDefect.DataSource = this._procedureEntity.ProcedureDefectTable.Copy();
this.dgvDefect.IsSetInputColumnsColor = true;
// 加载漏检缺陷
this.dgvMissDefect.DataSource = this._procedureEntity.DefectProcedureJobsTable.Copy();
this.dgvMissDefect.IsSetInputColumnsColor = true;
this.ddlProcessModelType.DisplayMember = "ProcedureModelTypeName";
this.ddlProcessModelType.ValueMember = "ProcedureModelTypeID";
DataTable dtModelType = LogInUserInfo.CurrentUser.GetSystemParameterByName(Constant.SysCacheTable.TP_SYS_ProcedureModelType); //SystemModuleProxy.Service.GetSYSProcessModelType();
this.ddlProcessModelType.DataSource = dtModelType.Select("ProcedureModelTypeID<=0 and Valueflag=1").CopyToDataTable();
#endregion
#region 窗体赋值
if (string.IsNullOrEmpty(this._procedureEntity.ProcedureCode))
{
this.txtProcedureCode.Text = this._procedureEntity.NodeNo + "";
this._procedureEntity.ProcedureCode = this._procedureEntity.NodeNo + "";
}
else
{
this.txtProcedureCode.Text = this._procedureEntity.ProcedureCode;
}
this.txtProcedureName.Text = this.node.Name;
this.txtRemarks.Text = this._procedureEntity.Remarks;
this.ddlProcessModelType.ListBox.SelectedValue = this._procedureEntity.ModelType;
// 不是重复代码。必须要赋值2行
this.ddlProcessModelType.ListBox.SelectedValue = this._procedureEntity.ModelType;
this.sbOrganizationID.OrganizationID = this._procedureEntity.OrganizationID;
this.rbtnOne.Checked = (this._procedureEntity.CollectType == Constant.ProcedureCollectType.SinglePoint.GetHashCode());
this.rbtnMore.Checked = (this._procedureEntity.CollectType == Constant.ProcedureCollectType.Togather.GetHashCode());
this.rBtnNeed.Checked = (this._procedureEntity.MustFlag == Constant.ProcedureMustFlag.Yes.GetHashCode());
this.rBtnNoNeed.Checked = (this._procedureEntity.MustFlag == Constant.ProcedureMustFlag.NonMust.GetHashCode());
this.radioJobsPrice.Checked = (this._procedureEntity.PieceType == Constant.ProcedurePieceType.JobsPiece.GetHashCode());
this.radioNotPrice.Checked = (this._procedureEntity.PieceType == Constant.ProcedurePieceType.NoPiece.GetHashCode());
#endregion
this.txtmisspriority.Text = this._procedureEntity.MissPriority.ToString();
this.txtDisplayNo.Text = this._procedureEntity.DisplayNo.ToString();
}
catch (Exception ex)
{
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 值改变事件
///
///
///
private void dgvGoods_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
try
{
if (this.dgvGoods.Rows.Count <= 1)
{
return;
}
DataGridViewRow rowItem = this.dgvGoods.Rows[e.RowIndex];
DataGridViewColumn columnItem = this.dgvGoods.Columns[e.ColumnIndex];
// 用编号获取产品信息
if ("GoodsCode".Equals(columnItem.Name))
{
FormUtility.BindGoodsRowDataSource(this.dgvGoods,
e.RowIndex, columnItem.Name, _goodsCodeValue);
// 设置可输入单元格的颜色
this.dgvGoods.IsSetInputColumnsColor = true;
}
}
catch (Exception ex)
{
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 单元格开始编辑事件
///
///
///
private void dgvGoods_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
{
try
{
if (this.dgvGoods.Rows.Count <= 1 || !_ShowFlag)
{
return;
}
DataGridViewColumn columnItem = this.dgvGoods.Columns[e.ColumnIndex];
if ("GoodsCode".Equals(columnItem.Name))
{
_ShowFlag = false;
_goodsCodeValue = this.dgvGoods.Rows[e.RowIndex].Cells[columnItem.Name].Value + "";
}
_ShowFlag = true;
}
catch (Exception ex)
{
_ShowFlag = true;
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 可采集工号输入
///
///
///
private void dgvUser_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
{
try
{
if (this.dgvUser.Rows.Count <= 1)
{
return;
}
DataGridViewColumn columnItem = this.dgvUser.Columns[e.ColumnIndex];
if ("UserCode".Equals(columnItem.Name))
{
_userCodeValue = this.dgvUser.Rows[e.RowIndex].Cells[columnItem.Name].Value + "";
}
}
catch (Exception ex)
{
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 选择工号
///
///
///
private void dgvUser_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
try
{
if (this.dgvUser.Rows.Count <= 1 || !_ShowFlag)
{
return;
}
DataGridViewRow rowItem = this.dgvUser.Rows[e.RowIndex];
DataGridViewColumn columnItem = this.dgvUser.Columns[e.ColumnIndex];
// 用编号获取产品信息
if ("UserCode".Equals(columnItem.Name))
{
_ShowFlag = false;
FormUtility.BindUserRowDataSource(this.dgvUser,
e.RowIndex, columnItem.Name, _userCodeValue);
// 设置可输入单元格的颜色
this.dgvUser.IsSetInputColumnsColor = true;
}
_ShowFlag = true;
}
catch (Exception ex)
{
_ShowFlag = true;
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 缺陷输入
///
///
///
private void dgvDefect_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
{
try
{
if (this.dgvUser.Rows.Count <= 1)
{
return;
}
DataGridViewColumn columnItem = this.dgvDefect.Columns[e.ColumnIndex];
if ("DefectCode".Equals(columnItem.Name))
{
_defectCodeValue = this.dgvDefect.Rows[e.RowIndex].Cells[columnItem.Name].Value + "";
}
}
catch (Exception ex)
{
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 弹出窗体
///
///
///
private void dgvDefect_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
try
{
if (this.dgvDefect.Rows.Count <= 1 || !_ShowFlag)
{
return;
}
DataGridViewRow rowItem = this.dgvDefect.Rows[e.RowIndex];
DataGridViewColumn columnItem = this.dgvDefect.Columns[e.ColumnIndex];
// 用编号获取产品信息
if ("DefectCode".Equals(columnItem.Name))
{
_ShowFlag = false;
FormUtility.BindDefectRowDataSource(this.dgvDefect,
e.RowIndex, columnItem.Name, _defectCodeValue);
// 设置可输入单元格的颜色
this.dgvDefect.IsSetInputColumnsColor = true;
}
_ShowFlag = true;
}
catch (Exception ex)
{
_ShowFlag = true;
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 输入缺陷编码和名称
///
///
///
private void dgvMissDefect_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
{
try
{
if (this.dgvMissDefect.Rows.Count <= 1)
{
return;
}
DataGridViewColumn columnItem = this.dgvMissDefect.Columns[e.ColumnIndex];
if ("DefectCode".Equals(columnItem.Name))
{
_defectCodeValue = this.dgvMissDefect.Rows[e.RowIndex].Cells[columnItem.Name].Value + "";
}
else if ("JobsCode".Equals(columnItem.Name))
{
_JobsCodeValue = this.dgvMissDefect.Rows[e.RowIndex].Cells[columnItem.Name].Value + "";
}
}
catch (Exception ex)
{
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
///
/// 值改变事件
///
///
///
private void dgvMissDefect_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
try
{
if (this.dgvMissDefect.Rows.Count <= 1 || !_ShowFlag)
{
return;
}
DataGridViewRow rowItem = this.dgvMissDefect.Rows[e.RowIndex];
DataGridViewColumn columnItem = this.dgvMissDefect.Columns[e.ColumnIndex];
if ("MissDefectCode".Equals(columnItem.Name))
{
_ShowFlag = false;
FormUtility.BindDefectRowRepeatDataSource(this.dgvMissDefect,
e.RowIndex, columnItem.Name, _defectCodeValue);
// 设置可输入单元格的颜色
this.dgvMissDefect.IsSetInputColumnsColor = true;
}
if ("JobsCode".Equals(columnItem.Name))
{
_ShowFlag = false;
FormUtility.BindJobsOneRowDataSource(this.dgvMissDefect,
e.RowIndex, columnItem.Name, _JobsCodeValue);
// 设置可输入单元格的颜色
this.dgvMissDefect.IsSetInputColumnsColor = true;
}
_ShowFlag = true;
}
catch (Exception ex)
{
_ShowFlag = true;
// 对异常进行共通处理
ExceptionManager.HandleEventException(this.ToString(),
System.Reflection.MethodBase.GetCurrentMethod().Name, this.Text, ex);
}
}
#endregion
}
}