private void FillMain() { RefEntryList = CustRefEntries.GetEntryListForReference(RefCur.PatNum); gridMain.BeginUpdate(); gridMain.ListGridColumns.Clear(); GridColumn col = new GridColumn("PatNum", 65); gridMain.ListGridColumns.Add(col); col = new GridColumn("Last Name", 120); gridMain.ListGridColumns.Add(col); col = new GridColumn("First Name", 120); gridMain.ListGridColumns.Add(col); col = new GridColumn("Date Entry", 0); col.TextAlign = HorizontalAlignment.Center; gridMain.ListGridColumns.Add(col); gridMain.ListGridRows.Clear(); GridRow row; for (int i = 0; i < RefEntryList.Count; i++) { row = new GridRow(); Patient pat = Patients.GetLim(RefEntryList[i].PatNumCust); row.Cells.Add(pat.PatNum.ToString()); row.Cells.Add(pat.LName); row.Cells.Add(pat.FName); row.Cells.Add(RefEntryList[i].DateEntry.ToShortDateString()); gridMain.ListGridRows.Add(row); } gridMain.EndUpdate(); }
private void butDeleteAll_Click(object sender, EventArgs e) { if (!MsgBox.Show(this, MsgBoxButtons.YesNo, "Delete Reference Entry?")) { return; } CustRefEntries.Delete(CustRefEntryCur.CustRefEntryNum); DialogResult = DialogResult.OK; }
private void butOK_Click(object sender, EventArgs e) { CustRefEntryCur.Note = textNote.Text; CustRefEntries.Update(CustRefEntryCur); DialogResult = DialogResult.OK; }