} //BtnAddNewCatogeryClick void BtnUpdateClick(object sender, EventArgs e) { int iIndex; string strItemId; iIndex = lstCatogery.SelectedIndex; if (iIndex < 0) { return; } frmAddNewMasterItem frmTmp = new frmAddNewMasterItem(); strItemId = lstItemsID.Items[iIndex].ToString(); frmTmp.loadItem(strItemId, this.refCon); frmTmp.Show(); frmTmp = null; this.Close(); } //BtnUpdateClick
void BtnUpdateClick(object sender, EventArgs e) { int iIndex; string strItemId; iIndex = lstCatogery.SelectedIndex; if (iIndex <0) return; frmAddNewMasterItem frmTmp = new frmAddNewMasterItem(); strItemId = lstItemsID.Items[iIndex].ToString(); frmTmp.loadItem(strItemId, this.refCon); frmTmp.Show(); frmTmp = null; this.Close(); }