public void LoadUserControl(BreedMaterialEditView view) { ViewSelf = view; view.cbCultivationBase.ItemsSource = iCultivationBaseService.GetPagerCultivationBase("", 1, 100); //.Select(_=>_.BreedBase); view.cbCultivationBase.DisplayMemberPath = "CultivationID"; // "BreedBase.BreedName"; view.cbCultivationBase.SelectedValuePath = "CultivationID"; }
public ActionResult Index() { //屠宰批次 var killBatch = _batchService.GetKillBatchListPaging(1, 1000); ViewBag.KillBatch = new SelectList(killBatch.rows, "KillBatchID", "BatchNO"); //个体 var cultivation = _cultivationBaseService.GetPagerCultivationBase(string.Empty, 1, 1000); ViewBag.Cultivation = new SelectList(cultivation, "CultivationID", "CultivationEPC"); return(View()); }
private void LoadData(string key, int pageIndex = 1, int pageSize = 10) { pbLoading.Visibility = Visibility.Visible; Task.Factory.StartNew(() => { var list = iCultivationBaseService.GetPagerCultivationBase(key, pageIndex, pageSize); var total = iCultivationBaseService.GetCultivationBaseCount(key); var pageCount = total / pageSize == 0 ? 1 : (total / pageSize) + (total % pageSize == 0 ? 0 : 1); ModelCollection = new BindableCollection <CultivationBaseModel>(list); PagerModel = new PagerModel { TotalCount = total, PageCount = pageCount, DetailMsg = string.Format("[共{0}页/共{1}条]", pageCount, total) }; }).ContinueWith((task) => { System.Windows.Application.Current.Dispatcher.Invoke(new System.Action(() => { pbLoading.Visibility = Visibility.Collapsed; })); }); }
public void LoadUserControl(BreedBatchDetailEditView view) { ViewSelf = view; view.cbBreedBase.ItemsSource = iBreedBaseService.GetPagerBreedBase("", 1, 100); //.Select(_=>_.BreedBase); view.cbBreedBase.DisplayMemberPath = "BreedName"; // "BreedBase.BreedName"; view.cbBreedBase.SelectedValuePath = "BreedID"; view.cbBreedArea.ItemsSource = iBreedAreaService.GetPagerBreedArea("", 1, 100); //.Select(_=>_.BreedBase); view.cbBreedArea.DisplayMemberPath = "AreaName"; // "BreedBase.BreedName"; view.cbBreedArea.SelectedValuePath = "AreaID"; view.cbBreedBatch.ItemsSource = iBreedBatchService.GetPagerBreedBatch("", 1, 100); //.Select(_=>_.BreedBase); view.cbBreedBatch.DisplayMemberPath = "BatchNO"; // "BreedBase.BreedName"; view.cbBreedBatch.SelectedValuePath = "BreedBatchID"; view.cbBreedHome.ItemsSource = iBreedHomeService.GetPagerBreedHome("", 1, 100); //.Select(_=>_.BreedBase); view.cbBreedHome.DisplayMemberPath = "HomeName"; // "BreedBase.BreedName"; view.cbBreedHome.SelectedValuePath = "HomeID"; view.cbCultivationBase.ItemsSource = iCultivationBaseService.GetPagerCultivationBase("", 1, 100); //.Select(_=>_.BreedBase); view.cbCultivationBase.DisplayMemberPath = "CultivationID"; // "BreedBase.BreedName"; view.cbCultivationBase.SelectedValuePath = "CultivationID"; }