public static MultiDropDownItem ConvertToMultiDropDownItem(this MasterDataViewModel model) { var item = new MultiDropDownItem() { Value = model.MasterId.ToString(), Text = model.GetLocalizedName() }; return(item); }
public static SelectListItem ConvertToSelectListItems(this MasterDataViewModel item, string language = null, bool code = false) { if (language == null) { language = Localization.CurrentLanguage; } var result = new SelectListItem() { Value = item.MasterId.ToString(), Text = code ? item.Code : item.GetLocalizedName(language) }; return(result); }