public frmFrameEditSuppliesUsed(forAddEditSupplies addEditSuppliesVals, frmFrameEdit pfrmFrameEdit) { InitializeComponent(); this.addEditSuppliesVals = addEditSuppliesVals; this.pFrmFrameEdit = pfrmFrameEdit; this.supplyItemsId = addEditSuppliesVals.supplyItemsId; this.measureAOG = addEditSuppliesVals.measureA_OG; this.measureBOG = addEditSuppliesVals.measureB_OG; }
private void btnEdit_Click(object sender, EventArgs e) { try { int currRowIndex = datagridFrameList.SelectedRows[0].Index; int selectedFrameItemId = Int32.Parse(datagridFrameList.Rows[currRowIndex].Cells["frameItemID"].Value.ToString()); String frameName = datagridFrameList.Rows[currRowIndex].Cells["Frame"].Value.ToString(); String frameDimension = datagridFrameList.Rows[currRowIndex].Cells["Dimension"].Value.ToString(); String frameDescription = datagridFrameList.Rows[currRowIndex].Cells["frameDescription"].Value.ToString(); double unitSalesPrice = Double.Parse(datagridFrameList.Rows[currRowIndex].Cells["Unit Price"].Value.ToString()); frmFrameEdit formEditFrame = new frmFrameEdit(selectedFrameItemId, frameName, frameDimension, frameDescription, unitSalesPrice); formEditFrame.ShowDialog(); suppliesUsed_Loader(); } catch { } }
//--------------Initial Load-------------- //----for programming initializer //NOTE!!!! GET DATA FROM dtSuppliesList TO PASS THROUGH PARENT FORM public frmFrameAddSuppliesUsed(frmFrameEdit pFrmFrameEdit, int frameItemId) { InitializeComponent(); this.pFrmFrameEdit = pFrmFrameEdit; this.frameItemId = frameItemId; }