Beispiel #1
0
        public override void tool1_Modify_Click(object sender, EventArgs e)
        {
            //base.tool1_Modify_Click(sender, e);
            bool bHave    = false;
            int  iOrderID = Convert.ToInt32(this.myDataGridViewHead.CurrentRow.Cells["归并后成品id"].Value);

            foreach (Form childFrm in this.MdiParent.MdiChildren)
            {
                if (childFrm.Name == "FormMergeRelationProductInput")
                {
                    FormMergeRelationProductInput inputForm = (FormMergeRelationProductInput)childFrm;
                    if (inputForm.giOrderID != 0 && inputForm.giOrderID == iOrderID)
                    {
                        bHave = true;
                        childFrm.Activate();
                        break;
                    }
                }
            }
            if (!bHave)
            {
                FormMergeRelationProductInput objForm = new FormMergeRelationProductInput();
                objForm.MdiParent = this.MdiParent;
                objForm.giOrderID = iOrderID;
                objForm.Show();
            }
        }
Beispiel #2
0
        public override void tool1_Add_Click(object sender, EventArgs e)
        {
            //base.tool1_Add_Click(sender, e);
            FormMergeRelationProductInput objForm = new FormMergeRelationProductInput();

            objForm.MdiParent = this.MdiParent;
            objForm.giOrderID = 0;
            objForm.Show();
        }