private void FillProviders() { gridProviders.BeginUpdate(); gridProviders.Rows.Clear(); gridProviders.Columns.Clear(); gridProviders.Columns.Add(new UI.ODGridColumn("Type", 74, HorizontalAlignment.Left)); //Column width determined in LayoutProviders(). gridProviders.Columns.Add(new UI.ODGridColumn("IsEnabled", 74, HorizontalAlignment.Center)); //Column width determined in LayoutProviders(). gridProviders.Columns.Add(new UI.ODGridColumn("IsIDPd", 74, HorizontalAlignment.Center)); //Column width determined in LayoutProviders(). gridProviders.Columns.Add(new UI.ODGridColumn("IsEPCS", 74, HorizontalAlignment.Center)); gridProviders.Columns.Add(new UI.ODGridColumn("NPI", 0, HorizontalAlignment.Left)); //Column width determined in LayoutProviders(). //Gets from db. Better to call db than to use cache at HQ, since cache might be large. //Only get Legacy eRx items. Other types will be in the BroadcasterMonitor. _listProvErxs = ProviderErxs.Refresh(_patCur.PatNum).FindAll(x => x.ErxType == ErxOption.Legacy); for (int i = 0; i < _listProvErxs.Count; i++) { UI.ODGridRow row = new UI.ODGridRow(); row.Tag = _listProvErxs[i]; row.Cells.Add(new UI.ODGridCell(_listProvErxs[i].ErxType.ToString())); string status = ""; if (_listProvErxs[i].IsEnabled == ErxStatus.Enabled) { status = "X"; } else if (_listProvErxs[i].IsEnabled != ErxStatus.Disabled) { status = "P"; } row.Cells.Add(new UI.ODGridCell(status)); row.Cells.Add(new UI.ODGridCell(_listProvErxs[i].IsIdentifyProofed?"X":"")); row.Cells.Add(new UI.ODGridCell(_listProvErxs[i].IsEpcs?"X":"")); row.Cells.Add(new UI.ODGridCell(_listProvErxs[i].NationalProviderID)); gridProviders.Rows.Add(row); } gridProviders.EndUpdate(); }
private void butOK_Click(object sender, EventArgs e) { List <ProviderErx> listOldProvErxs = ProviderErxs.Refresh(_patCur.PatNum).FindAll(x => x.ErxType == ErxOption.Legacy); ProviderErxs.Sync(_listProvErxs, listOldProvErxs); //No cache refresh because this is an HQ only form. DialogResult = DialogResult.OK; }