public ProductionLineProbablySaveResponse Execute(ProductionLineProbablySaveRequest request) { ProductionLineProbablySaveResponse probablySaveResponse = new ProductionLineProbablySaveResponse(); ProductionLineProbablyInfo productionLineProbably = ServiceHelper.LoadService <IProductionService>().GetProductionLineProbably(request.DID); productionLineProbably.Name = request.Name; productionLineProbably.TargetYield = request.TargetYield; ServiceHelper.LoadService <IProductionService>().SaveProductionLineProbably(productionLineProbably); return(probablySaveResponse); }
private void btnOK_Click(object sender, RoutedEventArgs e) { if (this.model == null) { return; } if (string.IsNullOrEmpty(this.model.Name)) { MessageBox.Show("请输入产线名称", "提示"); } else if (string.IsNullOrEmpty(this.model.TargetYield)) { MessageBox.Show("请输入目标产量", "提示"); } else { ProductionLineProbablySaveResponse probablySaveResponse = LocalApi.Execute(new ProductionLineProbablySaveRequest() { DID = this.model.DID, Name = this.model.Name, TargetYield = this.model.TargetYield }); this.DialogResult = new bool?(true); this.Close(); } }