void btnAdd_Click(object sender, EventArgs e) { if (this.frmTitle == null) { this.frmTitle = new FrmBuyReceiveFieldTitle(); new FrmStyle(this.frmTitle).SetPopFrmStyle(this); this.frmTitle.AffterSave += new FrmBuyReceiveFieldTitle.AffterSaveDelegate(frmTitle_AffterSave); } this.frmTitle.NewFieldTitle(this.FormatID); this.frmTitle.ShowDialog(); }
void dgrdv_CellContentClick(object sender, DataGridViewCellEventArgs e) { int irow = e.RowIndex; int icol = e.ColumnIndex; if ((irow == -1) || (icol == -1)) { return; } if (this.dgrdv.Columns[icol].Name == this.ColumnBtnEdit.Name) { long FieldTitleID = (long)this.dtblFieldTitles.DefaultView[irow]["FieldTitleID"]; if (this.frmTitle == null) { this.frmTitle = new FrmBuyReceiveFieldTitle(); new FrmStyle(this.frmTitle).SetPopFrmStyle(this); this.frmTitle.AffterSave += new FrmBuyReceiveFieldTitle.AffterSaveDelegate(frmTitle_AffterSave); } this.frmTitle.EditFieldTitle(FieldTitleID); this.frmTitle.ShowDialog(); } }