private void gridMain_CellDoubleClick(object sender, UI.ODGridClickEventArgs e) { CustReference refCur = CustReferences.GetOne(PIn.Long(RefTable.Rows[e.Row]["CustReferenceNum"].ToString())); FormReferenceEdit FormRE = new FormReferenceEdit(refCur); FormRE.ShowDialog(); FillMain(true); }
private void butOK_Click(object sender, EventArgs e) { if (gridMain.SelectedIndices.Length < 1) { MsgBox.Show(this, "Select at least one reference."); return; } SelectedCustRefs = new List <CustReference>(); for (int i = 0; i < gridMain.SelectedIndices.Length; i++) { CustReference custRef = CustReferences.GetOne(PIn.Long(RefTable.Rows[gridMain.SelectedIndices[i]]["CustReferenceNum"].ToString())); custRef.DateMostRecent = DateTime.Now; CustReferences.Update(custRef); SelectedCustRefs.Add(custRef); } DialogResult = DialogResult.OK; }