private void editDispositionAdviceMenuItem_Click(object sender, EventArgs e) { if ((gridPanel == null) || (gridPanel.Selected_Row == null) || (gridPanel.Selected_Row.Length == 0)) { return; } Edit_Disposition_Advice_Form trackingBox = new Edit_Disposition_Advice_Form(); if (trackingBox.ShowDialog() == DialogResult.OK) { Cursor = Cursors.WaitCursor; int updated = 0; int typeid = trackingBox.Disposition_Type_ID; string notes = trackingBox.Disposition_Notes; string typeString = SobekCM_Library_Settings.Disposition_Term_Future(typeid); foreach (DataRow thisRow in gridPanel.Selected_Row) { int itemid = Convert.ToInt32(thisRow["ItemID"]); if (itemid > 0) { if (thisRow["Disposition_Date"] == DBNull.Value) { if (SobekCM_Database.Edit_Disposition_Advice(itemid, typeid, notes)) { thisRow["Disposition_Advice"] = typeString; //thisRow["Disposition_Advice_Notes"] = notes; } updated++; } } } Cursor = Cursors.Default; gridPanel.Refresh(); MessageBox.Show(updated + " records updated."); } }