Exemplo n.º 1
0
        private void OPA_SALES_DESIGN_FORM_Click(object sender, EventArgs e)
        {
            frmMain frmmain = (frmMain)this.ParentForm;

            if (frmmain.CheckChildFrmExist("OPA_SALES_DESIGN_FORM") == true)
            {
                return;
            }
            OPA_SALES_DESIGN_FORM newFrm = new OPA_SALES_DESIGN_FORM();

            if (newFrm != null && !frmmain.ShowMDIChild(newFrm, newFrm))
            {
                newFrm.Dispose();
                newFrm = null;
            }
        }
Exemplo n.º 2
0
        private void mnuNewDesignForm_Click(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                if (DBGrid.CurrentRow == null)
                {
                    return;
                }

                EditDesignForm frm = new EditDesignForm();
                frm.Import(Convert.ToInt32(DBGrid.CurrentRow.Cells["Id"].Value));
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    frmMain frmmain = (frmMain)this.ParentForm;
                    if (frmmain.CheckChildFrmExist("OPA_SALES_DESIGN_FORM") == true)
                    {
                        return;
                    }
                    OPA_SALES_DESIGN_FORM newFrm = new OPA_SALES_DESIGN_FORM();
                    if (newFrm != null && !frmmain.ShowMDIChild(newFrm, newFrm))
                    {
                        newFrm.Dispose();
                        newFrm = null;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, clsTranslate.TranslateString("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }