示例#1
0
        public ProductionTypeListResponse Execute(ProductionTypeListRequest request)
        {
            ProductionTypeListResponse typeListResponse    = new ProductionTypeListResponse();
            IList <ProductionTypeInfo> productionTypeInfos = ServiceHelper.LoadService <IProductionService>().GetProductionTypeInfos(request.CraftDID);

            typeListResponse.ProductionTypes = (IList <ProductionTypeModel>)productionTypeInfos.Select <ProductionTypeInfo, ProductionTypeModel>((Func <ProductionTypeInfo, ProductionTypeModel>)(m => m.ToModel())).ToList <ProductionTypeModel>();
            return(typeListResponse);
        }
示例#2
0
        private void BaseCraftDetailPage_Loaded(object sender, RoutedEventArgs e)
        {
            ProductionTypeListResponse typeListResponse = LocalApi.Execute(new ProductionTypeListRequest()
            {
                CraftDID = this.CraftDID
            });

            this.ddlProductNo.ItemsSource = typeListResponse.ProductionTypes;
            if (typeListResponse.ProductionTypes.Count <= 0)
            {
                return;
            }
            this.ddlProductNo.SelectedIndex = 0;
        }