private void gridMainLeft_DoubleClick(object sender, EventArgs e) { DataRow dr = gridItemView.GetFocusedDataRow(); int itemID = Convert.ToInt32(dr["ItemID"]); int manufactureID = Convert.ToInt32(dr["ManufacturerID"]); int storeId = Convert.ToInt32(lkAccount.EditValue); int unitID = Convert.ToInt32(dr["UnitID"]); int Supplierid = 0; using (Modals.CostSheet costSheet = new Modals.CostSheet(itemID, manufactureID, Supplierid, unitID, storeId, isConfirmation)) { costSheet.ShowDialog(this.Owner); } rgPricing_EditValueChanged(null, null); }
// Dialog Box private void simpleButton1_Click(object sender, EventArgs e) { DataRow dr = gridItemView.GetFocusedDataRow(); int itemID = Convert.ToInt32(dr["ItemID"]); int manufactureID = Convert.ToInt32(dr["ManufacturerID"]); int storeId = Convert.ToInt32(lkAccount.EditValue); int unitID = Convert.ToInt32(dr["UnitID"]); int Supplierid = 0; if (!BLL.Settings.IsCenter) { Supplierid = Convert.ToInt32(dr["SupplierID"]); } using (Modals.CostSheet costSheet = new Modals.CostSheet(itemID, manufactureID, Supplierid, unitID, storeId, isConfirmation)) { costSheet.ShowDialog(this.Owner); } rgPricing_EditValueChanged(null, null); }