Beispiel #1
0
    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);
        }
    }
Beispiel #2
0
 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);
 }
Beispiel #4
0
    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);
    }
Beispiel #5
0
        /*
         * /// <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));
        }
Beispiel #6
0
 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();
            }
        }
Beispiel #9
0
 public CommandBase(IServiceLocator serviceLocator)
 {
     ServiceLocator        = serviceLocator;
     ApplicationService    = serviceLocator.ResolveType <IApplicationService>();
     GlobalService         = serviceLocator.ResolveType <GlobalService>();
     GlobalFrontendService = serviceLocator.ResolveType <GlobalFrontendService>();
 }
Beispiel #10
0
        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();
        }
Beispiel #11
0
 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));
        }
Beispiel #16
0
        public ActionResult DeleteConfirmed(int id)
        {
            GlobalService globalService = db.GlobalService.Find(id);

            db.GlobalService.Remove(globalService);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #17
0
 /// <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);
 }
Beispiel #19
0
 public HelpCreateFeatureRequestCommandContainer(ICommandManager commandManager,
                                                 IUIVisualizerService uiVisualizerService, GlobalService globalService,
                                                 GlobalFrontendService globalFrontendService)
     : base(Commands.Help.CreateFeatureRequest, commandManager)
 {
     _uiVisualizerService   = uiVisualizerService;
     _globalFrontendService = globalFrontendService;
     _globalService         = globalService;
 }
Beispiel #20
0
 public HelpRequestSupportCommandContainer(ICommandManager commandManager,
                                           IUIVisualizerService uiVisualizerService, GlobalService globalService,
                                           GlobalFrontendService globalFrontendService)
     : base(Commands.Help.RequestSupport, commandManager)
 {
     _uiVisualizerService   = uiVisualizerService;
     _globalFrontendService = globalFrontendService;
     _globalService         = globalService;
 }
Beispiel #21
0
 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>();
 }
Beispiel #23
0
 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>();
 }
Beispiel #24
0
 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));
 }
Beispiel #25
0
 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>();
 }
Beispiel #26
0
        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;
 }
Beispiel #29
0
        public ActionResult Create([Bind(Include = "globalServiceId,name")] GlobalService globalService)
        {
            if (ModelState.IsValid)
            {
                db.GlobalService.Add(globalService);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(globalService));
        }
Beispiel #30
0
        /// <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");
        }