Пример #1
0
        public List <KeyValuePair> GetWarddetails()
        {
            DataSet             wardDS      = adminDL.GetWarddetails();
            List <KeyValuePair> wardDetails = null;

            if (wardDS.Tables.Count > 0)
            {
                wardDetails = wardDS.Tables[0].AsEnumerable().Select(m => new KeyValuePair()
                {
                    Key   = m.Field <int>("WardId").ToString(),
                    Value = m.Field <string>("WardName")
                }).ToList();
            }
            return(wardDetails);
        }