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