public static void GetListByParam(this RightManagerBase <Role> roleManager, string rolename) { try { IList <Role> roleList; ((RoleClient)roleManager.RightsClient).GetListByParam(rolename, out roleList); roleManager.BindingList = new System.ComponentModel.BindingList <Role>(roleList.ToList()); } catch (Exception ex) { roleManager.ExceptionAction(ex); } }
public static void GetEmployeeListByParam(this RightManagerBase <Employee> employeeManager, string username, string usercode, string Departmentname) { try { IList <Employee> employeeList; ((EmployeeClient)employeeManager.RightsClient).GetListByParam(username, usercode, Departmentname, out employeeList); employeeManager.BindingList = new BindingList <Employee>(employeeList.ToList()); } catch (Exception ex) { employeeManager.ExceptionAction(ex); } }