public static SelectList GetCorrectMinorIncorrectDropDown() { List<DropDownModelString> list = new List<DropDownModelString>(); DropDownModelString modelCorrect = new DropDownModelString(); modelCorrect.Text = "Correct"; modelCorrect.Value = "Correct"; list.Add(modelCorrect); DropDownModelString modelMinor = new DropDownModelString(); modelMinor.Text = "Minor"; modelMinor.Value = "Minor"; list.Add(modelMinor); DropDownModelString modelIncorrect = new DropDownModelString(); modelIncorrect.Text = "Incorrect"; modelIncorrect.Value = "Incorrect"; list.Add(modelIncorrect); return new SelectList(list, "Value", "Text"); }
public static SelectList GetDispatcherDropDown() { List<DropDownModelString> list = new List<DropDownModelString>(); List<Dispatcher> dispatchers = Provider.GetDispatchers(); string format = "{0}, {1}"; foreach (Dispatcher dispatcher in dispatchers) { DropDownModelString model = new DropDownModelString(); model.Text = string.Format(format, dispatcher.LastName, dispatcher.FirstName); model.Value = dispatcher.DispatcherId; list.Add(model); } return new SelectList(list, "Value", "Text"); }
public static SelectList GetYesNoNADropDown() { List<DropDownModelString> list = new List<DropDownModelString>(); DropDownModelString modelCorrect = new DropDownModelString(); modelCorrect.Text = "Yes"; modelCorrect.Value = "Yes"; list.Add(modelCorrect); DropDownModelString modelMinor = new DropDownModelString(); modelMinor.Text = "No"; modelMinor.Value = "No"; list.Add(modelMinor); DropDownModelString modelIncorrect = new DropDownModelString(); modelIncorrect.Text = "NA"; modelIncorrect.Value = "NA"; list.Add(modelIncorrect); return new SelectList(list, "Value", "Text"); }