// GET api/<controller>/5 public Hashtable Get(int id) { Hashtable res = new Hashtable(); List <Hashtable> ls = new List <Hashtable>(); int admin = UserInfo.GetUserIdFromCookie(HttpContext.Current); string auth = UserInfo.GetAuthFromCookie(HttpContext.Current); GroupInfo ai = new GroupInfo(); if (!auth.Equals("group")) { foreach (group_admin i in ai.GetGroupInfo(0, 10, id)) // admin = 1 { Hashtable ht = new Hashtable(); ht.Add("id", i.group_id_in_area); ht.Add("name", i.id_group_admin); ls.Add(ht); } } else { Hashtable ht = new Hashtable(); ht.Add("id", admin); ht.Add("name", ai.GetGroupName(admin)); ls.Add(ht); } res.Add("code", 20000); res.Add("data", ls); return(res); }