private void btnAdd_Click(object sender, EventArgs e) { frmProduct ofrmProduct = new frmProduct(); ofrmProduct.RefreshParent += new System.EventHandler(this.RefreshParent); if (ofrmProduct.ShowDialog(new Product(), FormDisplayType.Add)) { RefreshList(); } }
private void ViewProduct() { frmProduct ofrmProduct = new frmProduct(); ofrmProduct.RefreshParent += new System.EventHandler(this.RefreshParent); Product oProduct = GetSelectedRowRecords(); if (ofrmProduct.ShowDialog(oProduct, FormDisplayType.View)) { RefreshList(); } }
private void btnDelete_Click(object sender, EventArgs e) { frmProduct ofrmProduct = new frmProduct(); ofrmProduct.RefreshParent += new System.EventHandler(this.RefreshParent); Product oProduct = GetSelectedRowRecords(); if (ofrmProduct.ShowDialog(oProduct, FormDisplayType.Delete)) { RefreshList(); } }