public static IEnumerable <SelectListItem> GetCashBankAccountList() { var countryList = new POSAccount.BusinessFactory.ChartOfAccountBO().GetCashBankAccountList(); var selectList = countryList.Select(c => new SelectListItem { Value = c.AccountCode, Text = string.Format("{0} ({1})", c.AccountCode, c.Description) }); return(new SelectList(selectList, "Value", "Text")); }
public static IEnumerable <SelectListItem> GetAccountCodeItemList() { var lstaccountcode = new POSAccount.BusinessFactory.ChartOfAccountBO().GetList(SsnBranch); if (lstaccountcode == null) { return(null); } var selectList = lstaccountcode.Select(c => new SelectListItem { Value = c.AccountCode, Text = c.Description }); return(new SelectList(selectList, "Value", "Text")); }