Exemplo n.º 1
0
        public static SelectList GetLanguageCodes(string ConnectionString)
        {
            SettingFacade         fac            = new SettingFacade(ConnectionString);
            DataTable             dt             = fac.GetLanguageCodes();
            List <SelectListItem> lstAllLanguage = new List <SelectListItem>();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                lstAllLanguage.Add(new SelectListItem {
                    Value = dt.Rows[i]["inLanguage"].ToString(), Text = dt.Rows[i]["Language"].ToString()
                });
            }
            return(new SelectList(lstAllLanguage, "Value", "Text"));
        }