private void GetList() { try { ListHelper.FillMetroCombo(mcboUserGroupCode, usergroupbal.GetAll().Select(i => new { i.UserGroupCode, i.UserGroupDesc }).Distinct().OrderBy(m => m.UserGroupDesc).ToList(), "UserGroupCode", "UserGroupDesc"); //section ListHelper.FillMetroCombo(mcboSectionCode, sectionbal.GetAll().Select(i => new { i.SECTIONCODE, i.SECTIONDESC }).Distinct().OrderBy(m => m.SECTIONDESC).ToList(), "SECTIONCODE", "SECTIONDESC"); } catch (Exception ex) { throw ex; } }
public void RefreshGrid() { try { var list = usergroupbal.GetAll().OrderBy(m => m.UserGroupDesc).ToList(); DataTable usrgrpTable = new DataTable(); using (var reader = ObjectReader.Create(list, "GroupID", "UserGroupCode", "UserGroupDesc", "IsActive")) { usrgrpTable.Load(reader); mgridList.DataSource = usrgrpTable; } Grid.ListCheck(mgridList, listTS); } catch (Exception ex) { MessageHelpers.ShowError(ex.Message); } }