private async void LoadKho() { var result = await KhoService.LayTatCaKho(); if (result != null && result.Status == Config.CODE_OK) { listKho = (List <Kho>)result.Data; cboKho.DataSource = listKho; cboKho.DisplayMember = "Ten"; cboKho.ValueMember = "Id"; } }
private async void LoadKho() { var result = await KhoService.LayTatCaKho(); if (result != null && result.Status == Config.CODE_OK) { listKho = (List <Kho>)result.Data; cboKho.DataSource = listKho; cboKho.DisplayMember = "Ten"; cboKho.ValueMember = "Id"; isLoadingKhoDone = true; isLoadingKhoDone = true; if (ucXuatKho.idPhieuXuat == 0) { LoadDanhSachVatTu(listKho[0].Id); dtpNgayNhap.Value = DateTime.Now; } } }
private async void LoadKho() { var result = await KhoService.LayTatCaKho(); if (result != null && result.Status == Config.CODE_OK) { listKho = (List <Kho>)result.Data; lvKho.Items.Clear(); foreach (Kho kho in listKho) { ListViewItem listViewItem = new ListViewItem(kho.Ma.ToString()); listViewItem.SubItems.Add(kho.Ten); listViewItem.SubItems.Add(kho.DiaChi); listViewItem.SubItems.Add(kho.SDT); listViewItem.SubItems.Add(kho.QuanLy.Ten); listViewItem.SubItems.Add(kho.GhiChu); listViewItem.SubItems[0].Tag = kho.Id; lvKho.Items.Add(listViewItem); } } }