AllTabsMenuItemCommand(IDocumentTabService documentTabService, ISaveService saveService, ITabsVMSettings tabsVMSettings, IAppWindow appWindow) : base(documentTabService) { this.saveService = saveService; this.tabsVMSettings = tabsVMSettings; this.appWindow = appWindow; }
private static IUsageKeeper CreateOrLoadKeeper(ref ISaveService saveService, DataPrecision dataPrecision, Resolution chosenResolution, SaveType saveType) { IUsageKeeper keeper = saveService.GetSavedUsages(saveType); if (keeper == null) { if (dataPrecision == DataPrecision.High) { if (saveType == SaveType.Today) { keeper = new HighPrecisionUsageToday(chosenResolution); } else { keeper = new HighPrecisionUsageArchive(); } } else { throw new NotImplementedException(); } } return(keeper); }
public SaveController() { IUnitOfWork _unitOfWork = new UnitOfWork(); _saveService = new SaveService(_unitOfWork); _accountService = new AccountService(_unitOfWork); _roleCheckingService = new RoleCheckingService(_unitOfWork); }
/// <summary> /// Constructor to inject services /// </summary> /// <param name="saveService">The Save service this controller should use </param> /// <param name="identityService">The Identity service this controller should use </param> /// <param name="organizationService">The Organization service this controller should use </param> /// <param name="employerService">The Employer service this controller should use </param> /// <param name="attachmentService">The attachment service this controller should use </param> public SaveController(ISaveService saveService, IIdentityService identityService, IOrganizationService organizationService, IEmployerService employerService, IAttachmentService attachmentService) { _saveService = saveService; _identityService = identityService; _organizationService = organizationService; _employerService = employerService; _attachmentService = attachmentService; }
/// <summary> /// Default constructor for injecting dependent services /// </summary> /// <param name="identityService"></param> /// <param name="applicationService"></param> /// <param name="applicationSubmissionValidator"></param> /// <param name="applicationSummaryFactory"></param> /// <param name="statusService"></param> /// <param name="saveService"></param> public ApplicationController(IIdentityService identityService, IApplicationService applicationService, IApplicationSubmissionValidator applicationSubmissionValidator, IApplicationSummaryFactory applicationSummaryFactory, IStatusService statusService, ISaveService saveService) { _identityService = identityService; _applicationService = applicationService; _applicationSubmissionValidator = applicationSubmissionValidator; _applicationSummaryFactory = applicationSummaryFactory; _statusService = statusService; _saveService = saveService; }
public LevelFinishedState(SignalBus signalBus, GameService service, ISaveService SaveService, IPathService pathService, int level, IStarService starService) { this.starService = starService; currentLevel = level; this.saveService = SaveService; this.pathService = pathService; this.service = service; this.signalBus = signalBus; }
AllTabsMenuItemCommand(IDocumentTabService documentTabService, ISaveService saveService, ITabsVMSettings tabsVMSettings, IAppWindow appWindow, IClassificationFormatMapService classificationFormatMapService, ITextElementProvider textElementProvider) : base(documentTabService) { this.saveService = saveService; this.tabsVMSettings = tabsVMSettings; this.appWindow = appWindow; classificationFormatMap = classificationFormatMapService.GetClassificationFormatMap(AppearanceCategoryConstants.UIMisc); this.textElementProvider = textElementProvider; }
public TabsVM(IDocumentTabService documentTabService, ISaveService saveService, ITabsVMSettings tabsVMSettings) { this.documentTabService = documentTabService; this.saveService = saveService; this.Settings = tabsVMSettings; this.tabsList = new ObservableCollection <TabVM>(documentTabService.SortedTabs.Select(a => new TabVM(this, a))); this.SelectedItem = tabsList.Count == 0 ? null : tabsList[0]; InitializeSaveText(); }
public SMSApprovalService(IRepository repository, ISaveService saveService, ISpendService spendService, ICharityService charityService, IChoreService choreService, ISMSApprovalHistory smsApprovalHistory) : base(repository) { _saveService = saveService; _spendService = spendService; _charityService = charityService; _choreService = choreService; _smsApprovalHistory = smsApprovalHistory; }
//20170209 add by liwei1 for P001-170203001 ===end=== private void InsertMR(DateTime report_datetime, string category, string recommendedOperations, DependencyObjectCollection resultColl, object docId) //20170209 modi by liwei1 for P001-170124001 增加参数:docId { DataTable dt = QueryForMoReceiptReq(report_datetime, category, recommendedOperations, docId); //20170209 modi by liwei1 for P001-170124001 增加参数:docId ValidateParaFilDoc(dt); //20161213 add by shenbao for B001-161213006 DataTable dt_d = QueryForMoReceipt_D(category, report_datetime, recommendedOperations); if (dt.Rows.Count > 0) { IQueryService qrySrv = GetService <IQueryService>();//20170405 add by wangrm for P001-170328001 ICreateService createSrv = GetService <ICreateService>("MO_RECEIPT_REQUISTION"); DependencyObject entity = createSrv.Create() as DependencyObject; ISaveService saveService = this.GetService <ISaveService>("MO_RECEIPT_REQUISTION"); List <IGrouping <object, DataRow> > groupDt = dt_d.AsEnumerable().GroupBy(a => (a.Field <object>("MO_RECEIPT_REQUISTION_ID"))).ToList(); IEFNETStatusStatusService efnetSrv = this.GetService <IEFNETStatusStatusService>(); IDocumentNumberGenerateService docNumberService = this.GetService <IDocumentNumberGenerateService>("MO_RECEIPT_REQUISTION"); foreach (DataRow dr in dt.Rows) { DependencyObject newEntity = new DependencyObject(entity.DependencyObjectType); DependencyObjectCollection newEntityDColl = newEntity["MO_RECEIPT_REQUISTION_D"] as DependencyObjectCollection; AddToEntity(newEntity, dr, dt.Columns, false); newEntity["DOC_NO"] = docNumberService.NextNumber(dr["DOC_ID"], dr["DOC_DATE"].ToDate().Date); List <IGrouping <object, DataRow> > entityDColl = groupDt.Where(c => c.Key.Equals(dr["MO_RECEIPT_REQUISTION_ID"])).ToList(); foreach (IGrouping <object, DataRow> groupDColl in entityDColl) { foreach (DataRow dr_d in groupDColl) { DependencyObject newEntityD = new DependencyObject(newEntityDColl.ItemDependencyObjectType); AddToEntity(newEntityD, dr_d, dt_d.Columns, true); newEntityDColl.Add(newEntityD); } } //20170428 add by wangyq for P001-170427001 ============begin========== DependencyObject resultObj = resultColl.AddNew(); resultObj["doc_no"] = newEntity["DOC_NO"]; //20170428 add by wangyq for P001-170427001 ============end========== //20170628 modi by zhangcn for P001-170327001 ===begin=== try { SetIgnoreWarningTag(); //忽略警告 saveService.Save(newEntity); //希望触发保存校验 } finally { ResetIgnoreWarningTag();// 重置警告 } //20170628 modi by zhangcn for P001-170327001 ===end=== //7.3自动签核 efnetSrv.GetFormFlow("MO_RECEIPT_REQUISTION.I01", dr["DOC_ID"], dr["Owner_Org_ROid"], new List <object>() { dr["MO_RECEIPT_REQUISTION_ID"] }); } } }
/// <summary> /// /// </summary> /// <param name="counting_type">盘点类型</param> /// <param name="site_no">营运据点</param> /// <param name="counting_no">盘点计划编号</param> /// <param name="scan"></param> public void UpdateCountingPlan(string counting_type, string site_no, string counting_no, DependencyObjectCollection scan) { if (string.IsNullOrEmpty(counting_no)) { IInfoEncodeContainer infoContainer = this.GetService <IInfoEncodeContainer>(); throw new BusinessRuleException(string.Format(infoContainer.GetMessage("A111201"), "counting_no")); } using (IConnectionService connectionService = this.GetService <IConnectionService>()) { _qurService = this.GetService <IQueryService>(); CreateTempTable(); //创建临时表 InsertToScan(site_no, scan); //临时表储存scan入参 QueryNode queryScan = QueryScan(counting_no); QueryNode querySumNode = QuerySumForInsert(counting_no, queryScan); DependencyObjectCollection sumColl = _qurService.ExecuteDependencyObject(querySumNode); List <DependencyObject> newList = new List <DependencyObject>(); ISaveService saveService = this.GetService <ISaveService>("COUNTING"); if (sumColl.Count > 0) //查询存在记录新增实体COUNTING { ICreateService createSrv = GetService <ICreateService>("COUNTING"); DependencyObject entity = createSrv.Create() as DependencyObject; newList = InsertCOUNTING(counting_type, counting_no, sumColl, entity.DependencyObjectType); } ICreateService createSrvParaFil = this.GetService <ICreateService>("PARA_FIL"); QueryNode updateNode = null; QueryNode insertNode = null; if (createSrvParaFil != null) //表示该typekey存在 { bool bcManagement = GetBcInventoryManagement(); if (bcManagement) { QueryNode querySumBarcodeNode = QuerySumBarcode(counting_no, queryScan); updateNode = GetUpdateNode(counting_type, counting_no, querySumBarcodeNode); insertNode = QueryNodeForInsert(counting_no, counting_type, querySumBarcodeNode); } } using (ITransactionService transActionService = this.GetService <ITransactionService>()) { if (newList.Count > 0) { SetIgnoreWarningTag(true); saveService.Save(newList.ToArray()); SetIgnoreWarningTag(false); } //更新条码盘点计划 if (updateNode != null) //启用条码库存管理更新 { _qurService.ExecuteNoQueryWithManageProperties(updateNode); } //新增条码盘点计划 if (insertNode != null) //启用条码库存管理更新 { _qurService.ExecuteNoQueryWithManageProperties(insertNode); } transActionService.Complete(); } } }
public TabsVM(IDocumentTabService documentTabService, ISaveService saveService, ITabsVMSettings tabsVMSettings, IClassificationFormatMap classificationFormatMap, ITextElementProvider textElementProvider) { this.documentTabService = documentTabService; this.saveService = saveService; ClassificationFormatMap = classificationFormatMap; TextElementProvider = textElementProvider; Settings = tabsVMSettings; tabsList = new ObservableCollection<TabVM>(documentTabService.SortedTabs.Select(a => new TabVM(this, a))); SelectedItem = tabsList.Count == 0 ? null : tabsList[0]; InitializeSaveText(); }
public GameService(SignalBus signalBus, ScriptableLevels levels, IPathService pathService, ISaveService saveService, IStarService starService) { this.pathService = pathService; this.levels = levels; this.signalBus = signalBus; this.starService = starService; this.saveService = saveService; signalBus.Subscribe <LevelFinishedSignal>(ChangeToLevelFinishedState); //pathService.DrawGraph(levels.levelsList[currentLevel]); }
public void LoadData(ISaveService sc) { isAlive = sc.LoadInt(this.gameObject, "stats.isAlive") == 1? true : false; health = sc.LoadInt(this.gameObject, "stats.health"); if (isAlive == false){ //deactivate dead character to prevent death animation from replaying on load this.gameObject.SetActive(false); anim.SetBool(HashIDs.isAliveBool, false); } }
public SketchDownloadPageViewModel( INavigationService navigationService, IEventAggregator eventAggregator, IDalService dalService, ISaveService saveService) : base(navigationService) { _eventAggregator = eventAggregator; _dalService = dalService; _saveService = saveService; HasDownloadFinished = false; }
public ButtonClickedCommand(string buttonName, PauseUIUpdatedSignal pauseUIUpdatedSignal, IGameStateModel gameStateModel, ISaveService saveService, SetActivePanelSignal setActivePanelSignal, PlayerActionHappenedSignal playerActionHappenedSignal) { _buttonName = buttonName; _pauseUIUpdatedSignal = pauseUIUpdatedSignal; _gameStateModel = gameStateModel; _saveService = saveService; _setActivePanelSignal = setActivePanelSignal; _playerActionHappenedSignal = playerActionHappenedSignal; }
public TabsVM(IDocumentTabService documentTabService, ISaveService saveService, ITabsVMSettings tabsVMSettings, IClassificationFormatMap classificationFormatMap, ITextElementProvider textElementProvider) { this.documentTabService = documentTabService; this.saveService = saveService; ClassificationFormatMap = classificationFormatMap; TextElementProvider = textElementProvider; Settings = tabsVMSettings; tabsList = new ObservableCollection <TabVM>(documentTabService.SortedTabs.Select(a => new TabVM(this, a))); SelectedItem = tabsList.Count == 0 ? null : tabsList[0]; InitializeSaveText(); }
public WatcherService(ref IStorage store, ref ISaveService saveService) { this.store = store ?? throw new ArgumentNullException(nameof(store)); this.saveService = saveService ?? throw new ArgumentNullException(nameof(saveService)); store.TimerElasped += Store_TimerElasped; keyboard = new KeyboardHook(KeyboardHook.Parameters.PassAllKeysToNextApp); keyboard.KeyIntercepted += Keyboard_KeyIntercepted; mouse = new MouseDetector(store.GetResolution(), saveService.GetDataPrecision()); mouse.MouseMoved += Mouse_MouseMoved; }
public void LoadData(ISaveService sc) { items = new List<InventoryItem>(); int count = sc.LoadInt(this.gameObject, "inventory.count"); for (int i = 0; i< count; i++){ string name = sc.LoadString(this.gameObject, "inventory.items."+ i +".name"); int amount = sc.LoadInt(this.gameObject, "inventory.items."+ i +".amount"); InventoryItem it = InventoryItem.FromString(name); it.amount = amount; items.Add(it); } }
/// <summary> /// 不起作用 /// </summary> private void saveBtn() { /* * // 构建保存操作参数:设置操作选项值,忽略交互提示 * OperateOption saveOption = OperateOption.Create(); * // 忽略交互提示 * saveOption.SetIgnoreWarning(true); * saveOption.SetIgnoreInteractionFlag(true); */ ISaveService saveService = ServiceHelper.GetService <ISaveService>(); var dataObjects = new DynamicObject[] { this.View.BillModel.DataObject }; saveService.Save(this.Context, dataObjects); }
/// <summary> /// Default constructor for injecting dependent services /// </summary> /// <param name="identityService"> /// The identity service this controller should use /// </param> /// <param name="applicationService"> /// The application service this controller should use /// </param> /// <param name="applicationSubmissionValidator"> /// The application submission validator this controller should use /// </param> /// <param name="applicationSummaryFactory"> /// The application summary factory this controller should use /// </param> /// <param name="statusService"> /// The status service this controller should use /// </param> /// <param name="saveService"> /// The save service this controller should use /// </param> /// <param name="attachmentService"> /// The attachment service this controller should use /// </param> /// <param name="emailService"> /// The email service this controller should use /// </param> /// /// <param name="organizationService"> /// The organization service this controller should use /// </param> /// <param name="employerService"> /// The employer service this controller should use /// </param> /// <param name="responseService"> /// The response service this controller should use /// </param> public ApplicationController(IIdentityService identityService, IApplicationService applicationService, IApplicationSubmissionValidator applicationSubmissionValidator, IApplicationSummaryFactory applicationSummaryFactory, IStatusService statusService, ISaveService saveService, IAttachmentService attachmentService, IEmailContentService emailService, IOrganizationService organizationService, IEmployerService employerService, IResponseService responseService) { _identityService = identityService; _applicationService = applicationService; _applicationSubmissionValidator = applicationSubmissionValidator; _applicationSummaryFactory = applicationSummaryFactory; _statusService = statusService; _saveService = saveService; _attachmentService = attachmentService; _emailService = emailService; _organizationService = organizationService; _employerService = employerService; _responseService = responseService; }
public FileSetupPageViewModel( DirectoryListViewModel dirList, NotificationCenterViewModel notificationCenter, OpenFileDialogCommand openFile, SaveFileDialogCommand saveFile, ISaveService saveService ) : base("File Setup", PackIconKind.File) { this.DirList = dirList; this.NotificationCenter = notificationCenter; OpenFile = openFile; SaveFile = saveFile; this.saveService = saveService; this.SaveFileAction = (path) => saveService.Save(path); }
public void SaveData(ISaveService sc) { sc.SaveFloat(this.gameObject, "location.position.x", this.transform.position.x); sc.SaveFloat(this.gameObject, "location.position.y", this.transform.position.y); sc.SaveFloat(this.gameObject, "location.position.z", this.transform.position.z); sc.SaveFloat(this.gameObject, "location.rotation.x", this.transform.rotation.x); sc.SaveFloat(this.gameObject, "location.rotation.y", this.transform.rotation.y); sc.SaveFloat(this.gameObject, "location.rotation.z", this.transform.rotation.z); sc.SaveFloat(this.gameObject, "location.rotation.w", this.transform.rotation.w); sc.SaveFloat(this.gameObject, "location.scale.x", this.transform.localScale.x); sc.SaveFloat(this.gameObject, "location.scale.y", this.transform.localScale.y); sc.SaveFloat(this.gameObject, "location.scale.z", this.transform.localScale.z); }
public void LoadData(ISaveService sc) { this.transform.position = new Vector3( sc.LoadFloat(this.gameObject, "location.position.x"), sc.LoadFloat(this.gameObject, "location.position.y"), sc.LoadFloat(this.gameObject, "location.position.z")); this.transform.rotation = new Quaternion( sc.LoadFloat(this.gameObject, "location.rotation.x"), sc.LoadFloat(this.gameObject, "location.rotation.y"), sc.LoadFloat(this.gameObject, "location.rotation.z"), sc.LoadFloat(this.gameObject, "location.rotation.w")); this.transform.localScale = new Vector3( sc.LoadFloat(this.gameObject, "location.scale.x"), sc.LoadFloat(this.gameObject, "location.scale.y"), sc.LoadFloat(this.gameObject, "location.scale.z")); }
public UsageStorage(ref IUsageToday usageToday, ref IUsageArchive usageArchive, ref ISaveService saveService) { this.usageToday = usageToday ?? throw new ArgumentNullException(nameof(usageToday)); this.usageArchive = usageArchive ?? throw new ArgumentNullException(nameof(usageArchive)); this.saveService = saveService ?? throw new ArgumentNullException(nameof(saveService)); noArchiveList = new List <SavePreference>() { SavePreference.KeepDataForToday, SavePreference.NoSave }; SystemEvents.SessionSwitch += new SessionSwitchEventHandler(OnWindowsLockUnlock); usageTimer = new UsageTimer(usageToday.GetCurrentResolution()); saveTimer = new SaveTimer(); saveTimer.Elapsed += SaveTimer_Elapsed; }
private void RegisterServices() { IUnityContainer container = new UnityContainer(); container.RegisterType <IImageService, ImageService>(); container.RegisterType <IFontsService, FontsService>(); container.RegisterType <ISaveService, SaveService>(); container.RegisterType <ILoadService, LoadService>(); container.RegisterType <IPrintService, PrintService>(); container.RegisterType <IUrlToHyperlinkService, UrlToHyperlinkService>(); _imageService = container.Resolve <ImageService>(); _fontService = container.Resolve <FontsService>(); _saveService = container.Resolve <SaveService>(); _loadService = container.Resolve <LoadService>(); _printService = container.Resolve <PrintService>(); _urlToHyperlinkService = container.Resolve <UrlToHyperlinkService>(); }
public override void AfterBarItemClick(AfterBarItemClickEventArgs e) { if (e.BarItemKey.Equals("tbsave")) { long entryid = 0; getTableName(); Entity entity = this.View.BusinessInfo.GetEntity("FEntity"); DynamicObjectCollection objs = this.View.Model.GetEntityDataObject(entity); DynamicObject[] lotMasters = null; if (!lotIds.IsEmpty() && !lotIds.Equals("0")) { string filter = string.Format("FLOTID IN ('{0}')", lotIds); OQLFilter of = OQLFilter.CreateHeadEntityFilter(filter); lotMasters = BusinessDataServiceHelper.Load(this.Context, "BD_BatchMainFile", null, of); } foreach (DynamicObject obj in objs) { value = obj["F_QANo"]; entryid = Convert.ToInt64(obj["F_BEM_billentryid"]); if (entryid == 0) { continue; } foreach (DynamicObject lotobj in lotMasters) { if (lotobj["id"].Equals(obj["FLOT_Id"])) { lotobj["F_QANo"] = obj["F_QANo"]; } } updateSqls.Add(string.Format(@"UPDATE {0} set F_QANo ='{1}' WHERE fentryid = {2} ", tableName, value, entryid)); } ISaveService service = Kingdee.BOS.App.ServiceHelper.GetService <ISaveService>(); service.Save(this.Context, lotMasters); DBUtils.ExecuteBatch(this.Context, updateSqls, updateSqls.Count); //返回值到父窗口 this.View.ReturnToParentWindow("true"); this.View.Close(); } base.AfterBarItemClick(e); }
public MainWindowViewModel(IFormViewModel formViewModel, IMapViewModel mapViewModel, IProgressViewModel progressViewModel, IFileDialogService fileDialogService, IPackageService packageService, IImportService importservice, ISaveService saveService, ILoadService loadService, ILogService logService, IWindowService windowService, IProgressService progressService) { Loggers.PerformanceLogger.Debug("MainWindowViewModel constructor started"); this.loadService = loadService; loadService.PackageLoaded += PackageServiceOnPackageLoaded; loadService.PackageUnloaded += OnPackageUnloaded; this.saveService = saveService; // this.gisService = gisService; this.windowService = windowService; this.fileDialogService = fileDialogService; this.packageService = packageService; this.importservice = importservice; this.progressService = progressService; MapViewModel = mapViewModel; FormViewModel = formViewModel; ProgressViewModel = progressViewModel; ShowHideKarteCommand = new DelegateCommand(() => MapViewModel.IsVisible = !MapViewModel.IsVisible); ShowHideFormularCommand = new DelegateCommand(() => FormViewModel.IsVisible = !FormViewModel.IsVisible); ExitCommand = new DelegateCommand(App.Current.Shutdown); ImportCommand = new DelegateCommand(startImportWorker); SaveCommand = new DelegateCommand(() => fileDialogService.ShowSaveDialog(saveService.Save)); ExportCommand = new DelegateCommand(exportSingle); ExportAllCommand = new DelegateCommand(() => fileDialogService.ShowExportDialog(packageService.Export, true)); ExportLogCommand = new DelegateCommand(() => fileDialogService.ShowExportLogDialog(logService.ExportLog)); WindowTitle = string.Format("{0} v{1}-{2}", LocalizationLocator.MobileLocalization.MainWindowTitle, typeof(MainWindow).Assembly.GetName().Version, VersionPostfix.Postfix); MenuItemsVisible = false; isEnabled = true; fileDialogService.ImportStart += new EventHandler(fileDialogServiceImportStart); fileDialogService.ImportFinished += new EventHandler(fileDialogServiceImportFinished); progressService.OnStart += progressOnStart; progressService.OnStop += progressOnStop; Loggers.PerformanceLogger.Debug("MainWindowViewModel constructor ended"); }
//public Game(int gold = 0, GameState state = GameState.Idle, CharacterInfo[] characters = null) //{ // Gold = new ReactiveProperty<int>(gold); // State = new ReactiveProperty<GameState>(state); // CharactersLevels = characters; //} public Game(ISaveService saveService) { GameOptions options = saveService.Load(); if (options == null) { options = new GameOptions(0, new CharacterInfo[] { new CharacterInfo(1, 1), new CharacterInfo(2, 1), new CharacterInfo(3, 1) }); } State = new ReactiveProperty <GameState>(GameState.Idle); Gold = new ReactiveProperty <int>(options.Gold); foreach (var info in options.Characters) { CharactersLevels.Add(info.Type, info.Level); } }
public StartupViewModel( ISettingsService settingsService, ISaveService saveService, OpenFileDialogCommand openExistingLibraryCommand, LibraryInfoService libraryInfoService, LibraryViewModel libraryViewModel, SaveFileLoadingViewModel loadingScreen, IInjectionProviderService injectionProvider, AppWindow window) { this.MostRecentLibraries = settingsService.MostRecentLibraries; this.OpenNewLibraryCommand = new RelayCommand(_ => openNewLibrary()); this.OpenListedLibraryCommand = new RelayCommand(path => openExistingLibrary(path as string)); this.settingsService = settingsService; this.saveService = saveService; this.OpenExistingLibraryCommand = openExistingLibraryCommand; this.OpenExistingLibraryAction = openExistingLibrary; this.LibraryInfoService = libraryInfoService; this.libraryViewModel = libraryViewModel; this.loadingScreen = loadingScreen; this.injectionProvider = injectionProvider; this.window = window; }
private static IUsageKeeper CreateKeeper(ref ISaveService saveService, DataPrecision dataPrecision, Resolution chosenResolution) { IUsageKeeper keeper = saveService.GetSavedUsages(); if (keeper == null) { switch (dataPrecision) { case DataPrecision.HighPrecision: keeper = new HighPrecisionUsageKeeper(chosenResolution); break; case DataPrecision.LowPrecision: throw new NotImplementedException(); //break; default: break; } } return(keeper); }
/// <summary> /// 保存 /// </summary> /// <param name="ctx"></param> /// <param name="FormID">业务对象标识</param> /// <param name="dyObject">保存业务对象集合</param> /// <returns></returns> public IOperationResult SaveBill(Context ctx, string FormID, DynamicObject[] dyObject) { IMetaDataService metaService = ServiceHelper.GetService <IMetaDataService>(); FormMetadata targetBillMeta = metaService.Load(ctx, FormID) as FormMetadata; // 构建保存操作参数:设置操作选项值,忽略交互提示 OperateOption saveOption = OperateOption.Create(); // 忽略全部需要交互性质的提示,直接保存; //saveOption.SetIgnoreWarning(true); // 忽略交互提示 //saveOption.SetInteractionFlag(this.Option.GetInteractionFlag()); // 如果有交互,传入用户选择的交互结果 // using Kingdee.BOS.Core.Interaction; //saveOption.SetIgnoreInteractionFlag(this.Option.GetIgnoreInteractionFlag()); //// 如下代码,强制要求忽略交互提示(演示案例不需要,注释掉) saveOption.SetIgnoreWarning(true); //// using Kingdee.BOS.Core.Interaction; saveOption.SetIgnoreInteractionFlag(true); // 调用保存服务,自动保存 ISaveService saveService = ServiceHelper.GetService <ISaveService>(); IOperationResult saveResult = saveService.Save(ctx, targetBillMeta.BusinessInfo, dyObject, saveOption, "Save"); ISubmitService save1Service = ServiceHelper.GetService <ISubmitService>(); return(saveResult); }
SaveCommandInit(ISaveService saveService, IAppWindow appWindow, IDocumentTabService documentTabService) { appWindow.MainWindowCommands.Add(ApplicationCommands.Save, (s, e) => saveService.Save(documentTabService.ActiveTab), (s, e) => e.CanExecute = saveService.CanSave(documentTabService.ActiveTab)); }
SaveTabCtxMenuCommand(ISaveService saveService, IDocumentTabService documentTabService) : base(ApplicationCommands.Save) { this.saveService = saveService; this.documentTabService = documentTabService; }
public void SaveData(ISaveService sc) { sc.SaveInt(this.gameObject, "stats.isAlive", isAlive ? 1 : 0); sc.SaveInt(this.gameObject, "stats.health", health); }
public void SaveData(ISaveService sc) { sc.SaveInt(this.gameObject, "equipped_weapon", activeWeapon); }
private int activeWeapon = 0; //Index of the currently equipped weapon #endregion Fields #region Methods public void LoadData(ISaveService sc) { SelectWeapon(sc.LoadInt(this.gameObject, "equipped_weapon")); //Last minute hotfix if (activeWeapon == elementStaff) InventoryItem.FromString(InventoryItem.staff).Use(); }
public SaveController(ISaveService saveService) { _saveService = saveService; }
public void SaveData(ISaveService sc) { sc.SaveInt(this.gameObject, "inventory.count", items.Count); for (int i = 0; i< items.Count; i++){ sc.SaveString(this.gameObject, "inventory.items."+ i +".name", items[i].name); sc.SaveInt(this.gameObject, "inventory.items."+ i +".amount", items[i].amount); } }
public void SaveData(ISaveService sc) { sc.SaveString(owner, "pickup.item", item); sc.SaveInt(owner, "pickup.quantity", quantity); }
public int quantity = 0; //the amount of items that the player receives #endregion Fields #region Methods public void LoadData(ISaveService sc) { item = sc.LoadString(owner, "pickup.item"); quantity = sc.LoadInt(owner, "pickup.quantity"); }