public static SelectList GetListOfTables()
        {
            List<SelectListItem> _ListItems = new List<SelectListItem>();

            TablesRepositary tbleobject = new TablesRepositary();
            List<TablesExt> list = new List<TablesExt>();
            DataTable dt = new DataTable();
            string CultureCode = System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName;

            dt = tbleobject.GetTables(CultureCode);
            if (dt != null)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    SelectListItem itr = new SelectListItem();
                    itr.Text = dr["Name"].ToString();
                    itr.Value = dr["ID"].ToString();
                    itr.Selected = false;

                    _ListItems.Add(itr);
                }
            }

            return new SelectList(_ListItems, "Value", "Text");
        }
        public static SelectList GetListEmailTemplates(int? SelectedItem)
        {
            DropDownListsRepository modelRepo = new DropDownListsRepository();

            var emailTemplates = modelRepo.ReadTemplate();

            List<SelectListItem> _ListItems = new List<SelectListItem>();

            TablesRepositary tbleobject = new TablesRepositary();
            List<TablesExt> list = new List<TablesExt>();
            foreach (var dr in emailTemplates)
                {
                    SelectListItem itr = new SelectListItem();
                    itr.Text = dr.Name;
                    itr.Value = dr.ID.ToString();
                    itr.Selected = false;

                    _ListItems.Add(itr);
                }

            return new SelectList(_ListItems, "Value", "Text", SelectedItem);
        }