void menuItem_Click(object sender, EventArgs e) { try { System.Windows.Forms.MenuItem item = (System.Windows.Forms.MenuItem)sender; System.Windows.Forms.DataGridViewRow row = (System.Windows.Forms.DataGridViewRow)item.Tag; int queueId = int.Parse(row.Cells["TRANS ID"].Value.ToString()); switch (item.Text) { case "Hold": objERPDba.SetHoldReqFlagStatus(queueId, true); break; case "Resume": objERPDba.SetHoldReqFlagStatus(queueId, false); break; default: break; } } catch (Exception ex) { Console.WriteLine(ex.Message); } }
private void btnHold_Click(object sender, RoutedEventArgs e) { if (objERPDba == null) { objERPDba = new ERPDba(); } objERPDba.SetHoldReqFlagStatus(QueueId, true); this.Close(); }