private void butOK_Click(object sender, System.EventArgs e) { if (listProv.SelectedIndex == -1) { MsgBox.Show(this, "Please select a provider first."); return; } NoteCur.ProcTime = strBTime.ToString(); NoteCur.ProvNum = _listProviders[listProv.SelectedIndex].ProvNum; NoteCur.Note = textNote.Text; if (_isTp) { NoteCur.ProcStatus = ProcStat.TP; } else { NoteCur.ProcStatus = ProcStat.C; } if (IsNew) { ProcCodeNotes.Insert(NoteCur); } else { ProcCodeNotes.Update(NoteCur); } _hasChanged = true; DialogResult = DialogResult.OK; }
private void FillNotes() { NoteList = ProcCodeNotes.GetList(ProcCode.CodeNum); gridNotes.BeginUpdate(); gridNotes.Columns.Clear(); ODGridColumn col = new ODGridColumn(Lan.g("TableProcedureNotes", "Prov"), 80); gridNotes.Columns.Add(col); col = new ODGridColumn(Lan.g("TableProcedureNotes", "Time"), 150); gridNotes.Columns.Add(col); col = new ODGridColumn(Lan.g("TableProcedureNotes", "Note"), 400); gridNotes.Columns.Add(col); gridNotes.Rows.Clear(); ODGridRow row; for (int i = 0; i < NoteList.Count; i++) { row = new ODGridRow(); row.Cells.Add(Providers.GetAbbr(NoteList[i].ProvNum)); row.Cells.Add(NoteList[i].ProcTime); row.Cells.Add(NoteList[i].Note); gridNotes.Rows.Add(row); } gridNotes.EndUpdate(); }
private void butDelete_Click(object sender, EventArgs e) { if (IsNew) { DialogResult = DialogResult.Cancel; return; } if (!MsgBox.Show(this, true, "Delete?")) { return; } ProcCodeNotes.Delete(NoteCur.ProcCodeNoteNum); DialogResult = DialogResult.OK; }
private void butOK_Click(object sender, System.EventArgs e) { if (listProv.SelectedIndex == -1) { MsgBox.Show(this, "Please select a provider first."); return; } NoteCur.ProcTime = strBTime.ToString(); NoteCur.ProvNum = ProviderC.ListShort[listProv.SelectedIndex].ProvNum; NoteCur.Note = textNote.Text; if (IsNew) { ProcCodeNotes.Insert(NoteCur); } else { ProcCodeNotes.Update(NoteCur); } DialogResult = DialogResult.OK; }