void btnAdd_Click(object sender, EventArgs e) { if (frmApppendTitle == null) { frmApppendTitle = new JERPApp.Define.Finance.FrmAccountTitle(); new FrmStyle(frmApppendTitle).SetPopFrmStyle(this); frmApppendTitle.AffterSelected += new JERPApp.Define.Finance.FrmAccountTitle.AffterSelectedDelegate(frmApppendTitle_AffterSelected); } frmApppendTitle.ShowDialog(); }
void dgrdv_CellContextMenuStripNeeded(object sender, DataGridViewCellContextMenuStripNeededEventArgs e) { int irow = e.RowIndex; int icol = e.ColumnIndex; if ((irow == -1) || (icol == -1)) { return; } if ((this.dgrdv.Columns[icol].Name == this.ColumnAccountTypeName.Name) || (this.dgrdv.Columns[icol].Name == this.ColumnAccountTitleName.Name)) { this.dgrdv.CurrentCell = this.dgrdv[icol, irow]; if (frmAccountTitle == null) { frmAccountTitle = new JERPApp.Define.Finance.FrmAccountTitle(); new FrmStyle(frmAccountTitle).SetPopFrmStyle(this); frmAccountTitle.AffterSelected += new JERPApp.Define.Finance.FrmAccountTitle.AffterSelectedDelegate(frmAccountTitle_AffterSelected); } frmAccountTitle.ShowDialog(); } }