public void ShowProductEdit(string strItemID) { frmEditProduct myEditProduct = new frmEditProduct(); myEditProduct.Edit(strItemID); myEditProduct.ShowDialog(); myEditProduct.Dispose(); }
public void ShowProductNew() { frmEditProduct myEditProduct = new frmEditProduct(); myEditProduct.New(); myEditProduct.ShowDialog(); myEditProduct.Dispose(); }
protected override void New() { base.New(); frmEditProduct myEditProduct = new frmEditProduct(); myEditProduct.strType = tvType.SelectedNode.Tag.ToString(); myEditProduct.New(); if (myEditProduct.ShowDialog() == DialogResult.OK) { BindData(); } myEditProduct.Dispose(); }
protected override void Edit() { if (gvBase.FocusedRowHandle < 0) { return; } base.Edit(); DataRow dr = gvBase.GetDataRow(gvBase.FocusedRowHandle); frmEditProduct myEditProduct = new frmEditProduct(); myEditProduct.Edit(dr["F_ID"].ToString()); if (myEditProduct.ShowDialog() == DialogResult.OK) { BindData(); } myEditProduct.Dispose(); }