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.ColumnMemo.Name) { this.dgrdv.CurrentCell = this.dgrdv[icol, irow]; //if (frmRequire == null) //{ // frmRequire = new JERPApp.Define.Product.FrmSaleOrderRequire(); // new FrmStyle(frmRequire).SetPopFrmStyle(this); // frmRequire.AffterConfirm += new JERPApp.Define.Product.FrmSaleOrderRequire.AffterConfirmDelegate(frmRequire_AffterConfirm); //} //frmRequire.ShowDialog(); } if ((this.dgrdv.Columns[icol].DataPropertyName == "PrdCode") || (this.dgrdv.Columns[icol].DataPropertyName == "PrdName") || (this.dgrdv.Columns[icol].DataPropertyName == "PrdSpec") || (this.dgrdv.Columns[icol].DataPropertyName == "Model")) { this.dgrdv.CurrentCell = this.dgrdv[icol, irow]; if (frmPrd == null) { this.frmPrd = new JERPApp.Define.Product.FrmFinishedPrd(); new FrmStyle(this.frmPrd).SetPopFrmStyle(this); this.frmPrd.AffterSelected += frmPrd_AffterSelected; } this.frmPrd.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.ColumnBadTypeID.Name) { if (frmBadType == null) { frmBadType = new JERPApp.Define.Product.FrmBadType(); new FrmStyle(frmBadType).SetPopFrmStyle(this); frmBadType.AffterSave += this.SetBadTypeSrc; } frmBadType.ShowDialog(); } if ((this.dgrdv.Columns[icol].DataPropertyName == "PrdCode") || (this.dgrdv.Columns[icol].DataPropertyName == "PrdName") || (this.dgrdv.Columns[icol].DataPropertyName == "PrdSpec") || (this.dgrdv.Columns[icol].DataPropertyName == "Model")) { this.dgrdv.CurrentCell = this.dgrdv[icol, irow]; if (frmPrd == null) { this.frmPrd = new JERPApp.Define.Product.FrmFinishedPrd(); new FrmStyle(this.frmPrd).SetPopFrmStyle(this); this.frmPrd.AffterSelected += frmPrd_AffterSelected; } this.frmPrd.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].DataPropertyName == "PrdCode") || (this.dgrdv.Columns[icol].DataPropertyName == "PrdName") || (this.dgrdv.Columns[icol].DataPropertyName == "PrdSpec") || (this.dgrdv.Columns[icol].DataPropertyName == "Model")) { if (this.dgrdv[this.ColumnPlanQty.Name, irow].Value != DBNull.Value) { return; } this.dgrdv.CurrentCell = this.dgrdv[icol, irow]; if (frmPrd == null) { this.frmPrd = new JERPApp.Define.Product.FrmFinishedPrd(); new FrmStyle(this.frmPrd).SetPopFrmStyle(this); this.frmPrd.AffterSelected += new JERPApp.Define.Product.FrmFinishedPrd.AffterSelectedDelegate(frmPrd_AffterSelected); } this.frmPrd.ShowDialog(); } }
void btnAddPrd_Click(object sender, EventArgs e) { if (frmAddPrd == null) { this.frmAddPrd = new JERPApp.Define.Product.FrmFinishedPrd(); new FrmStyle(this.frmAddPrd).SetPopFrmStyle(this); this.frmAddPrd.AffterSelected += frmAddPrd_AffterSelected; } this.frmAddPrd.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].DataPropertyName == "PrdID") { this.dgrdv.CurrentCell = this.dgrdv[icol, irow]; if (frmPrd == null) { this.frmPrd = new JERPApp.Define.Product.FrmFinishedPrd(); new FrmStyle(this.frmPrd).SetPopFrmStyle(this); this.frmPrd.AffterSelected += frmPrd_AffterSelected; } this.frmPrd.ShowDialog(); } }