public virtual void ESelectedEvent2(EEventArg2 arg) { if (EEvent != null) { EEvent(this, arg); } }
private void lvSupplierList_DoubleClick(object sender, EventArgs e) { if (lvSupplierList.Items.Count > 0) { // ArrayList checkedpersnsrvclist = new ArrayList(); ListViewItem oItem = (ListViewItem)lvSupplierList.SelectedItems[0]; // arrList = new ArrayList(); foreach (CSupplier oSupplier in arrList as ArrayList) { if (oSupplier.Cust_Id.Trim() == oItem.SubItems[2].Text.Trim()) { EEventArg2 arg = new EEventArg2(oSupplier); ESelectedEvent2(arg); break; } } this.Dispose(); } }
//private void btnSupplier_Click(object sender, EventArgs e) //{ // frmSupplierList ofrmSupplierList = new frmSupplierList(); // ofrmSupplierList.EEvent += new frmSupplierList.EEventhandler(ofrmSupplierList_EEvent); // ofrmSupplierList.ShowDialog(); //} void ofrmSupplierList_EEvent(object Sender, EEventArg2 e) { CSupplier obj = (CSupplier)e.Supplier; Displaydata(obj); }