private void ShowRecord(int SupplierID, int PrdID) { DateTime DateBegin = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); DateTime DateEnd = DateTime.Now; if (frmRecord == null) { frmRecord = new FrmOutSrcInventoryRecord(); new FrmStyle(frmRecord).SetPopFrmStyle(this); } frmRecord.StoreRecord(SupplierID, PrdID, DateBegin, DateEnd); frmRecord.ShowDialog(); }
void dgrdv_CellContentClick(object sender, DataGridViewCellEventArgs e) { int irow = e.RowIndex; int icol = e.ColumnIndex; if ((irow == -1) || (icol == -1)) { return; } int PrdID = (int)this.dtblRpt.DefaultView[irow]["PrdID"]; if (this.dgrdv.Columns[icol].Name == this.ColumnSupplyQty.Name) { if (frmSupply == null) { frmSupply = new FrmOutSrcSupplyItemRecord(); new FrmStyle(frmSupply).SetPopFrmStyle(this); } frmSupply.SupplyRecord(this.ctrlSupplierID.CompanyID, PrdID, this.dtpDateBegin.Value, this.dtpDateEnd.Value); frmSupply.ShowDialog(); } if ((this.dgrdv.Columns[icol].Name == this.ColumnIntoQty.Name) || (this.dgrdv.Columns[icol].Name == this.ColumnOutQty.Name)) { if (frmRecord == null) { frmRecord = new FrmOutSrcInventoryRecord(); new FrmStyle(frmRecord).SetPopFrmStyle(this); } frmRecord.StoreRecord(this.ctrlSupplierID.CompanyID, PrdID, this.dtpDateBegin.Value, this.dtpDateEnd.Value); frmRecord.ShowDialog(); } }