public TaskOrderEditView() { int index = 0; InitializeComponent(); _viewModel = IoC.GetViewModel <TaskOrderViewModel>(this); _productParameterService = IoC.Get <IProductParameterService>(); _taskOrderManager = IoC.Get <TaskOrderManager>(); _viewModel.LoadParameters(); this.DataContext = _viewModel; radioButton1.IsChecked = true; if (_viewModel.EditModel != null) { if (_viewModel.EditModel.pack_mode == (int)PackMode.Pack)//装箱模式 { radioButton1.IsChecked = true; } else { radioButton2.IsChecked = true; } foreach (var Item in _viewModel.ParameterList) { if (Item.product_name == _viewModel.EditModel.product_name) { break; } ++index; } } cmbProduct.SelectedIndex = index; }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public ReportViewModel(ITaskOrderHistoryService taskOrderHistoryService, IProductParameterService productParameterService) { _historyService = taskOrderHistoryService; _productParameterService = productParameterService; LoadParameters(); }
public ProductParameterController(IProductParameterService productParameterService, IParameterService parameterService, IParameterValueService parameterValueService, IProductService productService, ICategoryService categoryService, IWorkContext workContext) { _productParameterService = productParameterService; _parameterService = parameterService; _parameterValueService = parameterValueService; _productService = productService; _categoryService = categoryService; _workContext = workContext; }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public TaskOrderViewModel(ITaskOrderService taskOrderService, ITaskOrderHistoryService taskOrderHistoryService, ITaskOrderDetailService taskOrderDetailService, ITaskOrderDetailHistoryService taskOrderDetailHistoryService, IProductParameterService productParameterService) { _taskOrderService = taskOrderService; _taskOrderDetailService = taskOrderDetailService; _taskOrderHistoryService = taskOrderHistoryService; _taskOrderDetailHistoryService = taskOrderDetailHistoryService; _productParameterService = productParameterService; }
/// <summary> /// 构造函数(操作函数注入) /// </summary> public ProductController( IProductService productService, IProductBrandService productBrandService, IProductDetailService productDetailService, IProductParameterService productParameterService, IClassifyService classifyService, IWorkContext workContent) { _productService = productService; _productBrandService = productBrandService; _productDetailService = productDetailService; _productParameterService = productParameterService; _classifyService = classifyService; _workContent = workContent; }
/// <summary> /// 构造函数(操作函数注入) /// </summary> public BrandController( IProductService productService, IProductBrandService productBrandService, IProductDetailService productDetailService, IProductParameterService productParameterService, IClassifyService classifyService, IBrandParameterService brandParameterService, IWorkContext workContext) { _productService = productService; _productBrandService = productBrandService; _productDetailService = productDetailService; _productParameterService = productParameterService; _classifyService = classifyService; _brandParameterService = brandParameterService; _workContext = workContext; }
/// <summary> /// 构造函数(操作函数注入) /// </summary> public ClassifyController( IProductService productService, IProductBrandService productBrandService, IProductDetailService productDetailService, IProductParameterService productParameterService, IClassifyService classifyService, IParameterValueService parameterValueService, IParameterService parameterService, IWorkContext workContext) { _productService = productService; _productBrandService = productBrandService; _productDetailService = productDetailService; _productParameterService = productParameterService; _classifyService = classifyService; _parameterService = parameterService; _parameterValueService = parameterValueService; _workContext = workContext; }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public ProductParameterViewModel(IProductParameterService productParameterService) { _productParameterService = productParameterService; LoadAllInfos(); }