private void FrmChooseAcrossLocation_Load(object sender, EventArgs e) { LocationDal locDal = new LocationDal(); List <LocationEntity> locations = locDal.GetStockLocationByWarehouse(GlobeSettings.LoginedUser.WarehouseCode, SysCodeConstant.ZONE_TYPE_TEMP); lookUpEdit1.Properties.DataSource = locations; //默认选中第一行 if (locations.Count > 0) { lookUpEdit1.EditValue = locations[0].LocationCode; } }
private void OnFormLoad(object sender, EventArgs e) { ImageCollection ic = IconHelper.LoadToolImages(); barManager1.Images = ic; toolConfirm.ImageIndex = (int)IconHelper.Images.add; toolRefresh.ImageIndex = (int)IconHelper.Images.refresh; warehouseCode = GlobeSettings.LoginedUser.WarehouseCode; LocationDal locDal = new LocationDal(); List <LocationEntity> locations = locDal.GetStockLocationByWarehouse(warehouseCode, SysCodeConstant.ZONE_TYPE_TEMP); listLocations.Properties.DataSource = locations; //默认选中第一行 if (locations.Count > 0) { listLocations.EditValue = locations[0].LocationCode; } BindQueryResult(); }