コード例 #1
0
        private void tslblNew_Click(object sender, EventArgs e)
        {
            frmPopup frm = new frmPopup();

            frm.Action = "New";
            frm.ShowDialog();

            if (frm.DialogResult.Equals(DialogResult.OK))
            {
                DisplayData();
            }

            RefreshForm();
        }
コード例 #2
0
        private void tslblEdit_Click(object sender, EventArgs e)
        {
            if (idProduct > 0)
            {
                frmPopup frm = new frmPopup();
                frm.Action    = "Edit";
                frm.IdProduct = this.idProduct;
                frm.ShowDialog();

                if (frm.DialogResult.Equals(DialogResult.OK))
                {
                    DisplayData();
                }

                RefreshForm();
            }
            else
            {
                MessageBox.Show("Select a record");
            }
        }