/// <summary> /// /// </summary> /// <param name="allowSelectAll"></param> /// <returns></returns> public static List <SelectListItem> ListOfCustomer(bool allowSelectAll = true) { List <SelectListItem> listCustomer = new List <SelectListItem>(); if (allowSelectAll) { listCustomer.Add(new SelectListItem() { Value = "", Text = "--- All Customer ---" }); } foreach (var item in CatalogBLL.Customer_ListNoPagination()) { listCustomer.Add(new SelectListItem() { Value = Convert.ToString(item.CustomerID), Text = item.CompanyName }); } return(listCustomer); }