public static MvcHtmlString DropDownListForPatient(this HtmlHelper htmlHelper, string name) { PatientAdminLogic bl = new PatientAdminLogic(); string options = ""; foreach (var user in bl.listPatient()) { options += $"<option value ='{user.IdP}'> {user.IdP} </option>"; } return(new MvcHtmlString($"<select name={name} style='color:black style:position:relative; width:220px;'>{options}</select>")); }
public PatientModel() { patients = pl.listPatient(); }