private void butAttach_Click(object sender,EventArgs e) { if(IsNew){ MessageBox.Show("Cannot attach lab panels to a brand new order. Please save order first."); return; } FormEhrLabPanels formL=new FormEhrLabPanels(); Patient pat=Patients.GetPat(MedOrderCur.PatNum); formL.PatCur=pat; formL.IsSelectionMode=true; formL.ShowDialog(); if(formL.DialogResult!=DialogResult.OK) { return; } LabPanel panel=LabPanels.GetOne(formL.SelectedLabPanelNum); panel.MedicalOrderNum=MedOrderCur.MedicalOrderNum; LabPanels.Update(panel); FillGrid(); }
private void butAttach_Click(object sender, EventArgs e) { if (IsNew) { MessageBox.Show("Cannot attach lab panels to a brand new order. Please save order first."); return; } FormEhrLabPanels formL = new FormEhrLabPanels(); Patient pat = Patients.GetPat(MedOrderCur.PatNum); formL.PatCur = pat; formL.IsSelectionMode = true; formL.ShowDialog(); if (formL.DialogResult != DialogResult.OK) { return; } LabPanel panel = LabPanels.GetOne(formL.SelectedLabPanelNum); panel.MedicalOrderNum = MedOrderCur.MedicalOrderNum; LabPanels.Update(panel); FillGrid(); }