public override async void OnLoad() { base.OnLoad(); List <BbDepartment> deptCollection = await DbHandler.Instance.GetAllData <BbDepartment>(); List <BbCategory> categoryCollection = await DbHandler.Instance.GetAllData <BbCategory>(); DeptCollection.Clear(); CategoryCollection.Clear(); DeptCollection.AddRange(deptCollection); CategoryCollection.AddRange(categoryCollection); }
public DeptCollection GetAllDepartmentLists() { DeptCollection depts = new DeptCollection(); string sqlString = "select * from pt_d_bm order by i_sjdm,i_xh"; using (DataTable table = publicDbOpClass.DataTableQuary(sqlString)) { foreach (DataRow row in table.Rows) { depts.Add(this.DataTableConvertDeptInfo(row)); } } return(depts); }