public static CascadingDropDownNameValue[] GetSegmentsPageMethod(string knownCategoryValues, string category) { StringDictionary kv = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues); int workshopID; if (kv.ContainsKey("WorkshopCode")) { List <CascadingDropDownNameValue> values = new List <CascadingDropDownNameValue>(); if (Int32.TryParse(kv["WorkshopCode"], out workshopID)) { List <Segment> segmentList = GlobalService.GetSegmentbyWorkshopID(workshopID); values.Add(new CascadingDropDownNameValue(Consts.DROPDOWN_UNSELECTED_TEXT, string.Empty)); foreach (var item in segmentList) { values.Add(new CascadingDropDownNameValue(item.SegmentCode, item.SegmentID.ToString())); } } return(values.ToArray()); } else { return(null); } }
public SettingsController() { dataContext = new ExchaggleDbContext(); settingsManager = new SettingService(dataContext); global = new GlobalService(dataContext); adminManager = new AdminService(dataContext); }
public ItemsController() { dataContext = new ExchaggleDbContext(); uploadManager = new UploadService(dataContext); itemManager = new ItemService(dataContext); global = new GlobalService(dataContext); }
public static CascadingDropDownNameValue[] GetWorkshopsPageMethod(string knownCategoryValues, string category) { StringDictionary kv = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues); int plantID; if (kv.ContainsKey("PlantCode")) { List <CascadingDropDownNameValue> values = new List <CascadingDropDownNameValue>(); if (Int32.TryParse(kv["PlantCode"], out plantID)) { List <Workshop> workshopList = GlobalService.GetWorkshopbyPlantID(plantID); values.Add(new CascadingDropDownNameValue(Consts.DROPDOWN_UNSELECTED_TEXT, string.Empty)); foreach (var item in workshopList) { values.Add(new CascadingDropDownNameValue(item.WorkshopCode, item.WorkshopID.ToString())); } } return(values.ToArray()); } else { return(null); } //StringDictionary knownCategoryValuesDictionary = AjaxControlToolkit.CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues); //// Perform a simple query against the data document //return AjaxControlToolkit.CascadingDropDown.QuerySimpleCascadingDropDownDocument(doc, WorkshopHierarchy, knownCategoryValuesDictionary, category); }
/* * /// <summary> * /// 客户端获取《字段名》 * /// </summary> * /// <returns></returns> * private string Get《字段名》() * { * return FHRIS424Service.Get《字段名》(); * } */ /// <summary> /// 更新提交的数据 /// </summary> /// <returns></returns> private string Updata() { var key = this._ctx.Request["key"]; var model = this.GetModelFromRequest <Cost_Per>(); return(GlobalService.ExecuteFunc(FHRIS424Service.Update, key, model)); }
void Application_Idle(object sender, EventArgs e) { if (DateTime.Now.Millisecond % 10 == 1) { GlobalService.GoIdle(sender, e); } }
private void resetAutoLogin() { GlobalService.AppSettings.HasSavedUserPassword = false; GlobalService.AppSettings.LastUserPassword = String.Empty; GlobalService.AppSettings.LastAppCode = ""; GlobalService.SaveSettings(); }
private static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); BonusSkins.Register(); SkinManager.EnableFormSkins(); UserLookAndFeel.Default.SetSkinStyle("Office 2016 Colorful");//DevExpress Style GlobalService.Initialize(); System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fa-IR"); System.Threading.Thread.CurrentThread.CurrentUICulture = System.Threading.Thread.CurrentThread.CurrentCulture; //Application.Run(new frmMapTest()); var fLogin = new frmLogin(); if (fLogin.ShowDialog() == DialogResult.OK) { Application.Run(new frmMain()); } else { Application.Exit(); } }
public CommandBase(IServiceLocator serviceLocator) { ServiceLocator = serviceLocator; ApplicationService = serviceLocator.ResolveType <IApplicationService>(); GlobalService = serviceLocator.ResolveType <GlobalService>(); GlobalFrontendService = serviceLocator.ResolveType <GlobalFrontendService>(); }
public SettingsViewModel( IRuntimeConfigurationService configurationService, ILicenseService licenseService, ICommandManager commandManager, DataPersisterService dataPersisterService, GlobalFrontendService globalFrontendService, GlobalService globalService, IAdvancedMessageService advancedMessageService, AudioService audioService, MidiService midiService ) { Argument.IsNotNull(() => configurationService); Argument.IsNotNull(() => commandManager); Argument.IsNotNull(() => licenseService); _configurationService = configurationService; _commandManager = commandManager; _globalService = globalService; _advancedMessageService = advancedMessageService; ApplicationState = globalFrontendService.ApplicationState; OpenVstWorkerLogDirectory = new Command(OnOpenVstWorkerLogDirectoryExecute); OpenDataDirectory = new Command(OnOpenDataDirectoryExecute); Title = "Settings"; PresetDatabaseStatistics = dataPersisterService.GetStorageStatistics(); TotalPresets = (from p in PresetDatabaseStatistics select p.PresetCount).Sum(); TotalPresetsUncompressedSize = (from p in PresetDatabaseStatistics select p.PresetUncompressedSize).Sum(); TotalPresetsCompressedSize = (from p in PresetDatabaseStatistics select p.PresetCompressedSize).Sum(); SavedSpace = (from p in PresetDatabaseStatistics select p.SavedSpace).Sum(); SavedSpacePercent = (double)TotalPresetsCompressedSize / TotalPresetsUncompressedSize; AudioOutputDevices = audioService.GetOutputDevices(); MidiInputDevices = midiService.GetInputDevices(); }
public SendMailModel(IUnitOfWork unitOfWork, GlobalService service, IConfiguration config, IHostingEnvironment env, IEmailSender sendemail) { _unitOfWork = unitOfWork; _service = service; _config = config; _env = env; _sendemail = sendemail; }
private void Window_Loaded(object sender, RoutedEventArgs e) { globalService = new GlobalService(); PopulateComboboxes(); DefaultSituation(); PopulateListbox(); ClearControls(); }
public PluginToolsPatchPluginToAudioOutputCommandContainer(ICommandManager commandManager, IServiceLocator serviceLocator) : base(Commands.PluginTools.PatchPluginToAudioOutput, commandManager, serviceLocator) { _remoteVstService = ServiceLocator.ResolveType <RemoteVstService>(); _globalService = ServiceLocator.ResolveType <GlobalService>(); _globalFrontendService.SelectedPlugins.CollectionChanged += OnSelectedPluginsListChanged; }
public ApplicationApplyConfigurationCommandContainer(ICommandManager commandManager, IServiceLocator serviceLocator) : base(Commands.Application.ApplyConfiguration, commandManager, serviceLocator) { _globalService = ServiceLocator.ResolveType <GlobalService>(); _dataPersisterService = ServiceLocator.ResolveType <DataPersisterService>(); _commandManager = commandManager; }
private string Search() { string RID = this._ctx.Request["RID"]; string Table = this._ctx.Request["Table"]; Boolean IsShowAll = this._ctx.Request["ShowType"].Equals("all"); return(GlobalService.ExecuteFunc(ActionLogService.Search, RID, Table, IsShowAll)); }
public ActionResult DeleteConfirmed(int id) { GlobalService globalService = db.GlobalService.Find(id); db.GlobalService.Remove(globalService); db.SaveChanges(); return(RedirectToAction("Index")); }
/// <summary> /// 编辑查看页,获取数据 /// </summary> /// <param name="key"></param> /// <returns></returns> public static Cost_Per Get(string key) { using (var db = new DB()) { var rst = GlobalService.GetTempData <Cost_Per>(key); return(rst); } }
public AjaxController() { dataContext = new ExchaggleDbContext(); global = new GlobalService(dataContext); dashboardManager = new DashboardService(dataContext); searchManager = new SearchService(dataContext); reportManager = new ReportService(dataContext); }
public HelpCreateFeatureRequestCommandContainer(ICommandManager commandManager, IUIVisualizerService uiVisualizerService, GlobalService globalService, GlobalFrontendService globalFrontendService) : base(Commands.Help.CreateFeatureRequest, commandManager) { _uiVisualizerService = uiVisualizerService; _globalFrontendService = globalFrontendService; _globalService = globalService; }
public HelpRequestSupportCommandContainer(ICommandManager commandManager, IUIVisualizerService uiVisualizerService, GlobalService globalService, GlobalFrontendService globalFrontendService) : base(Commands.Help.RequestSupport, commandManager) { _uiVisualizerService = uiVisualizerService; _globalFrontendService = globalFrontendService; _globalService = globalService; }
public GridController( TMDbContext tmContext, ICustomerRepository customerRepo, GlobalService globalService) { _tmContext = tmContext; _customerRepo = customerRepo; _globalService = globalService; }
public PluginNotExportedAllToPresetExportListCommandContainer(ICommandManager commandManager, IServiceLocator serviceLocator) : base(Commands.Plugin.NotExportedAllToPresetExportList, commandManager, serviceLocator) { _applicationService = ServiceLocator.ResolveType <IApplicationService>(); _dispatcherService = ServiceLocator.ResolveType <IDispatcherService>(); _licenseService = ServiceLocator.ResolveType <ILicenseService>(); _globalService = ServiceLocator.ResolveType <GlobalService>(); }
public PluginRefreshPluginsCommandContainer(ICommandManager commandManager, IServiceLocator serviceLocator) : base(Commands.Plugin.RefreshPlugins, commandManager, serviceLocator) { _pluginService = ServiceLocator.ResolveType <PluginService>(); _applicationService = ServiceLocator.ResolveType <IApplicationService>(); _globalService = ServiceLocator.ResolveType <GlobalService>(); _dataPersisterService = ServiceLocator.ResolveType <DataPersisterService>(); }
public ActionResult Edit([Bind(Include = "globalServiceId,name")] GlobalService globalService) { if (ModelState.IsValid) { db.Entry(globalService).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(globalService)); }
public PresetExportDoExportCommandContainer(ICommandManager commandManager, IServiceLocator serviceLocator) : base(Commands.PresetExport.DoExport, commandManager, serviceLocator) { _presetDataPersisterService = ServiceLocator.ResolveType <PresetDataPersisterService>(); _applicationService = ServiceLocator.ResolveType <IApplicationService>(); _remoteVstService = ServiceLocator.ResolveType <RemoteVstService>(); _dataPersisterService = ServiceLocator.ResolveType <DataPersisterService>(); _globalService = ServiceLocator.ResolveType <GlobalService>(); }
public RibbonView(GlobalFrontendService globalFrontendService, GlobalService globalService) { _globalFrontendService = globalFrontendService; _globalService = globalService; InitializeComponent(); Ribbon.AddAboutButton(); _globalFrontendService.ApplicationState.PropertyChanged += ApplicationStateOnPropertyChanged; ScreenTip.HelpPressed += OnScreenTipHelpPressed; }
public RuntimeConfigurationService() { _globalFrontendService = ServiceLocator.Default.ResolveType <GlobalFrontendService>(); _globalService = ServiceLocator.Default.ResolveType <GlobalService>(); _audioService = ServiceLocator.Default.ResolveType <AudioService>(); _jsonSerializer = new JsonSerializer { Formatting = Formatting.Indented }; }
public PluginRemoveSelectedPluginsCommandContainer(ICommandManager commandManager, IServiceLocator serviceLocator) : base(Commands.Plugin.RemoveSelectedPlugins, commandManager, serviceLocator) { _messageService = serviceLocator.ResolveType <IAdvancedMessageService>(); _dataPersister = serviceLocator.ResolveType <DataPersisterService>(); _presetDataPersister = serviceLocator.ResolveType <PresetDataPersisterService>(); _dispatcherService = serviceLocator.ResolveType <IDispatcherService>(); _globalService = serviceLocator.ResolveType <GlobalService>(); _globalFrontendService.SelectedPlugins.CollectionChanged += SelectedPluginsOnCollectionChanged; }
public ActionResult Create([Bind(Include = "globalServiceId,name")] GlobalService globalService) { if (ModelState.IsValid) { db.GlobalService.Add(globalService); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(globalService)); }
/// <summary> /// 解锁 /// </summary> /// <returns></returns> private string Unlock() { var lockKey = this._ctx.Request["key"]; if (lockKey.IsNullOrEmpty()) { return("Please send the lock key"); } GlobalService.Unlock(lockKey); return("OK"); }