private async void btnHocKyMacDinh_ItemClick(object sender, ItemClickEventArgs e) { List <HocKy> hks = await apis.GetHocKies(); HocKy = hks[0]; lblHocKy.Caption = HocKy.ToString(); cbxNamHoc.EditValue = HocKy.namHoc; cbxHocKy.EditValue = HocKy.ten; }
private async void ThietLapForm_Load(object sender, EventArgs e) { txtUrl.Text = apis.base_url; hockies = await apis.GetHocKies(); hks = new List <string>(); hockies.ForEach(element => { hks.Add("Học kỳ " + element.ten + " năm học " + element.namHoc); }); cbxHocKy.DataSource = hks; }
private async Task loadData() { hocKies = await apis.GetHocKies(); gridHockies.DataSource = hocKies; }