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);
            string strBooksNo = this.myDataGridViewHead.CurrentRow.Cells["电子帐册号"].Value.ToString();

            foreach (Form childFrm in this.MdiParent.MdiChildren)
            {
                if (childFrm.Name == "FormMaterialsOutInput")
                {
                    FormMaterialsOutInput inputForm = (FormMaterialsOutInput)childFrm;
                    if (inputForm.giOrderID != 0 && inputForm.giOrderID == iOrderID)
                    {
                        bHave = true;
                        childFrm.Activate();
                        break;
                    }
                }
            }
            if (!bHave)
            {
                FormMaterialsOutInput objForm = new FormMaterialsOutInput();
                objForm.MdiParent  = this.MdiParent;
                objForm.giOrderID  = iOrderID;
                objForm.strBooksNo = strBooksNo;
                objForm.Show();
            }
        }
Example #2
0
        //料件出库录入
        private void FormMaterialsOut_Click(object sender, EventArgs e)
        {
            FormMaterialsOutInput objForm = new FormMaterialsOutInput();

            objForm.MdiParent = this;
            objForm.Show();
        }
        public override void tool1_Add_Click(object sender, EventArgs e)
        {
            base.tool1_Add_Click(sender, e);
            FormMaterialsOutInput objForm = new FormMaterialsOutInput();

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