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(); }
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"); } }