private void butFormulary_Click(object sender, EventArgs e) { FormFormularies FormF = new FormFormularies(); FormF.IsSelectionMode = true; FormF.ShowDialog(); Cursor = Cursors.WaitCursor; if (FormF.DialogResult != DialogResult.OK) { Cursor = Cursors.Default; return; } List <FormularyMed> ListMeds = FormularyMeds.GetMedsForFormulary(FormF.SelectedFormularyNum); bool medIsInFormulary = false; for (int i = 0; i < ListMeds.Count; i++) { if (ListMeds[i].MedicationNum == MedicationPatCur.MedicationNum) { medIsInFormulary = true; } } Cursor = Cursors.Default; if (medIsInFormulary) { MsgBox.Show(this, "This medication is in the selected formulary."); } else { MsgBox.Show(this, "This medication is not in the selected forumulary."); } }
private void butFormularies_Click(object sender, EventArgs e) { FormFormularies FormE = new FormFormularies(); FormE.ShowDialog(); }
private void butFormulary_Click(object sender,EventArgs e) { FormFormularies FormF=new FormFormularies(); FormF.IsSelectionMode=true; FormF.ShowDialog(); Cursor=Cursors.WaitCursor; if(FormF.DialogResult!=DialogResult.OK) { Cursor=Cursors.Default; return; } List<FormularyMed> ListMeds=FormularyMeds.GetMedsForFormulary(FormF.SelectedFormularyNum); bool medIsInFormulary=false; for(int i=0;i<ListMeds.Count;i++) { if(ListMeds[i].MedicationNum==MedicationPatCur.MedicationNum) { medIsInFormulary=true; } } Cursor=Cursors.Default; if(medIsInFormulary){ MsgBox.Show(this,"This medication is in the selected formulary."); } else { MsgBox.Show(this,"This medication is not in the selected forumulary."); } }
private void butFormularies_Click(object sender,EventArgs e) { FormFormularies FormE=new FormFormularies(); FormE.ShowDialog(); }