refactoring
This commit is contained in:
parent
f950f93f90
commit
18d1b7fea4
8 changed files with 33 additions and 11 deletions
|
|
@ -25,6 +25,12 @@ namespace Yavsc.Server.Helpers
|
|||
|
||||
}
|
||||
|
||||
public static List<SelectListItem> AddNull(this List<SelectListItem> selectList, string displayNull)
|
||||
{
|
||||
selectList.Add(new SelectListItem { Text = displayNull });
|
||||
return selectList;
|
||||
}
|
||||
|
||||
public static List<SelectListItem> CreateSelectListItems<T> (this IEnumerable<T>data,
|
||||
Func<T,string> dataField,
|
||||
Func<T,string> displayField = null, object selectedValue =null) where T : class
|
||||
|
|
@ -43,4 +49,4 @@ namespace Yavsc.Server.Helpers
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue