private void dgvRemoveHistory_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex == -1) { return; } var form = new RemoveStockDetailForm(); form.RemoveStockID = Convert.ToInt32(((DataRowView)stockRemoveBindingSource[e.RowIndex]).Row[0]); form.ShowDialog(); }
private void removeStock_Click(object sender, EventArgs e) { var form = new RemoveStockDetailForm(); form.RemoveStockID = 0; var result = form.ShowDialog(); if (result == System.Windows.Forms.DialogResult.Yes) { stockTableAdapter.FillByType(farmManageDataSet.Stock, Convert.ToByte(cbxType.SelectedValue)); stockRemoveTableAdapter.Fill(farmManageDataSet.StockRemove); } }
private void btnRemoveStock_Click(object sender, EventArgs e) { var form = new RemoveStockDetailForm(); form.RemoveStockID = 0; var result = form.ShowDialog(); if (result == System.Windows.Forms.DialogResult.Yes) { this.FillRemove(); this.stockTableAdapter.FillByPK(farmManageDataSet.Stock, StockID); } }