public NewOrModifyItemProduce(SysItemQueryProduce item_query, string item_id)
        {
            InitializeComponent();
            flag        = 0;
            this.itemId = item_id;
            this.item   = item_query;

            //赋值是否启用下拉选择框
            dt_flag.Columns.Add(new DataColumn("flagid"));
            dt_flag.Columns.Add(new DataColumn("flagname"));
            var row2 = dt_flag.NewRow();

            row2["flagid"]   = "1";
            row2["flagname"] = "启用";
            dt_flag.Rows.Add(row2);
            var row3 = dt_flag.NewRow();

            row3["flagid"]   = "0";
            row3["flagname"] = "禁用";
            dt_flag.Rows.Add(row3);
            ComboboxTool.InitComboboxSource(_openflag, dt_flag, "lr");

            DataTable table = detectContract.GetDetItemAll("p", item_id);

            if (table.Rows.Count != 0)
            {
                this._itemname.Text = table.Rows[0][0].ToString();
                //赋值是否启用
                for (int i = 0; i < _openflag.Items.Count; i++)
                {
                    if ((_openflag.Items[i] as Label).Tag.ToString() == table.Rows[0][1].ToString())
                    {
                        _openflag.SelectedItem = _openflag.Items[i];
                        break;
                    }
                }
            }
        }
        public NewOrModifyItemProduce(SysItemQueryProduce item_query)
        {
            InitializeComponent();
            flag = 1;

            this.item = item_query;

            //赋值是否启用下拉选择框
            dt_flag.Columns.Add(new DataColumn("flagid"));
            dt_flag.Columns.Add(new DataColumn("flagname"));
            var row2 = dt_flag.NewRow();

            row2["flagid"]   = "1";
            row2["flagname"] = "启用";
            dt_flag.Rows.Add(row2);
            var row3 = dt_flag.NewRow();

            row3["flagid"]   = "0";
            row3["flagname"] = "禁用";
            dt_flag.Rows.Add(row3);
            ComboboxTool.InitComboboxSource(_openflag, dt_flag, "lr");
            _openflag.SelectedIndex = 1;
        }