private List <object> getYear(string maDV) { List <Int32> lists = new ChartController().GetDanhSachNam(maDV); lists.Sort(new MyComparation()); List <object> obj = new List <object>(); if (!lists.Contains(DateTime.Now.Year)) { obj.Add(new { ID = DateTime.Now.Year, Title = DateTime.Now.Year }); } for (int i = 0; i < lists.Count; i++) { obj.Add(new { ID = lists[i], Title = lists[i] }); } if (obj.Count == 0) { obj.Add(new { ID = -1, Title = GlobalResourceManager.GetInstance().GetLanguageValue("not_have_data") }); } return(obj); }