public List<IAppField> GetAppFields(app app)
        {
            IApp apphandle = GetAppHandle(app.ID);
            List<IAppField> appfields = AppExtensions.GetAppFields(apphandle).ToList();

            return appfields;
        }
Beispiel #2
0
        public int Execute(params string[] args)
        {
            _args = args;
            ParseArgs();
            bool needsReparse = false;

            if (ExtraArgsFileNames != null && ExtraArgsFileNames.Count > 0)
            {   // add the extra args to the _args and force a reparse
                // This cannot adjust the template name, so no need to re-check here.
                IReadOnlyList <string> extraArgs = AppExtensions.CreateArgListFromAdditionalFiles(ExtraArgsFileNames);
                List <string>          allArgs   = RemoveExtraArgsTokens(_args);
                allArgs.AddRange(extraArgs);
                _args                  = allArgs;
                needsReparse           = true;
                ExpandedExtraArgsFiles = true;
            }

            if (string.IsNullOrEmpty(_templateNameArg))
            {
                _currentCommand = CommandParserSupport.CreateNewCommandForNoTemplateName(_commandName);
                needsReparse    = true;
            }

            if (needsReparse)
            {
                ParseArgs();
            }

            return(_invoke.Invoke().Result);
        }
Beispiel #3
0
        public ActionResult Index()
        {
            var home = SessionHelper.SYS_MenuModel.Where(m => m.SYS_CODE.AsString().ToUpper() == "HOME").FirstOrDefault();

            if (home != null && AppExtensions.ExistsAction(home.PRG_ACTION, home.PRG_CONTROLLER, home.PRG_AREA))
            {
                return(RedirectToAction(home.PRG_ACTION, home.PRG_CONTROLLER, new { Area = home.PRG_AREA, SYS_SYS_CODE = home.SYS_CODE, SYS_PRG_CODE = home.PRG_CODE }));
            }
            return(View());
        }
        public IActionResult Profile()
        {
            SetSessionInfo();
            int userId = int.Parse(ViewBag.id);

            DataTable user  = _serviceFactory.User.GetProfile(userId);
            var       model = AppExtensions.GetItem <ProfileViewModel>(user.Rows[0]);

            return(View(model));
        }
        private async Task InitAsync()
        {
            await Task.Delay(1000);

            var allInstalled = await _catalog.FindAllAsync();

            AppExtensions = allInstalled.ToList();

            IsAppExtensionListEmpty = !AppExtensions.Any();
        }
        public IActionResult Calendar()
        {
            ViewData["page-2"] = "active";

            object guests    = _internService.GetWhitelist();
            string whitelist = AppExtensions.Dump(guests);

            IList <EventTypeModel> eventype = _eventTypeService.GetAll();

            var model = new CalendarViewModel(eventype, whitelist)
            {
                Creator = ViewBag.fullname
            };

            return(View(model));
        }
        public ActionResult Index(string ACTIVE_STEP = "1")
        {
            //ViewBag.UrlToClosePage = Url.Action(StandardActionName.Index, "Default", new { Area = "Admin" });
            #region Set Close Page
            var menu = SessionHelper.SYS_MenuModel;
            if (menu != null)
            {
                var home = menu.Where(m => m.SYS_CODE.AsString().ToUpper() == "HOME").FirstOrDefault();
                if (home != null && AppExtensions.ExistsAction(home.PRG_ACTION, home.PRG_CONTROLLER, home.PRG_AREA))
                {
                    ViewBag.UrlToClosePage = Url.Action(home.PRG_ACTION, home.PRG_CONTROLLER, new { Area = home.PRG_AREA, SYS_SYS_CODE = home.SYS_CODE, SYS_PRG_CODE = home.PRG_CODE });
                }
            }
            #endregion

            var view = string.Empty;
            localModel.ACTIVE_STEP = "3"; //if set 2 then block step3 end
            SetDefaulButton(StandardButtonMode.Index);
            RemoveStandardButton("DeleteSearch");
            RemoveStandardButton("Add");

            if (ACTIVE_STEP == "1")
            {
                view = "NewTask";
                SetClientSideRuleSet("NewTask");
            }
            else if (ACTIVE_STEP == "2")
            {
                view = "DoTask";
                SetClientSideRuleSet("DoTask");
            }
            else if (ACTIVE_STEP == "3")
            {
                view = "DoneTask";
                SetClientSideRuleSet("DoneTask");
            }

            SetDefaultData();
            SetHeaderWizard(new WizardHelper.WizardHeaderConfig(
                                ACTIVE_STEP,
                                localModel.ACTIVE_STEP,
                                new WizardHelper.WizardHeader(Translation.MIS.MISS01P003.STEP_1, Url.Action("Index", new { ACTIVE_STEP = "1" }), iconCssClass: FaIcons.FaAreaChart),
                                new WizardHelper.WizardHeader(Translation.MIS.MISS01P003.STEP_2, Url.Action("Index", new { ACTIVE_STEP = "2" }), iconCssClass: FaIcons.FaFile),
                                new WizardHelper.WizardHeader(Translation.MIS.MISS01P003.STEP_3, Url.Action("Index", new { ACTIVE_STEP = "3" }), iconCssClass: FaIcons.FaFile)));

            return(View(view, localModel));
        }
        public int Execute(params string[] args)
        {
            _args = args;
            ParseArgs();
            bool needsReparse = false;

            if (ExtraArgsFileNames != null && ExtraArgsFileNames.Count > 0)
            {   // add the extra args to the _args and force a reparse
                IReadOnlyList <string> extraArgs = AppExtensions.CreateArgListFromAdditionalFiles(ExtraArgsFileNames);
                List <string>          allArgs   = new List <string>(_args);
                allArgs.AddRange(extraArgs);
                _args        = allArgs;
                needsReparse = true;
            }

            IList <string> templateNameList = _parseResult.GetArgumentListAtPath(new[] { _commandName }).ToList();

            if ((templateNameList.Count > 0) &&
                !templateNameList[0].StartsWith("-", StringComparison.Ordinal) &&
                (_parseResult.Tokens.Count >= 2) &&
                string.Equals(templateNameList[0], _parseResult.Tokens.ElementAt(1), StringComparison.Ordinal))
            {
                _templateNameArg = templateNameList[0];
            }
            else
            {
                _templateNameArg = string.Empty;
                _currentCommand  = CommandParserSupport.CreateNewCommandForNoTemplateName(_commandName);
                needsReparse     = true;
            }

            if (needsReparse)
            {
                ParseArgs();
            }

            return(_invoke.Invoke().Result);
        }
Beispiel #9
0
 public async Task <IEnumerable <Theme> > GetThemes()
 {
     return(await AppExtensions.GetThemes());
 }
Beispiel #10
0
 public async Task <IEnumerable <ShapedDataModel> > GetShapedData()
 {
     return(await AppExtensions.GetShapedData());
 }
Beispiel #11
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            WebApiConfig.Register(GlobalConfiguration.Configuration);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            BundleConfig.RegisterBundles(BundleTable.Bundles);
            BundleConfigAuthorPortal.RegisterBundles(BundleTable.Bundles);
            BundleConfigPortalAdmin.RegisterBundles(BundleTable.Bundles);
            BundleConfigUserPortal.RegisterBundles(BundleTable.Bundles);
            BundleConfigWidget.RegisterBundles(BundleTable.Bundles);
            BundleConfigWix.RegisterBundles(BundleTable.Bundles);

            AuthConfig.RegisterAuth();

            //JSON Settings
            var jsonSettings = new JsonSerializerSettings
            {
                NullValueHandling            = NullValueHandling.Ignore
                , ReferenceLoopHandling      = ReferenceLoopHandling.Ignore
                , Formatting                 = Formatting.Indented
                , PreserveReferencesHandling = PreserveReferencesHandling.Objects
            };

            GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings = jsonSettings;

            // initializing dependency injection  container
            var builder = new ContainerBuilder();

            // registration all the existing controllers
            builder.RegisterControllers(Assembly.GetExecutingAssembly());

            //Repositories registration
            AppExtensions.RegisterRepositories(builder);

            // NLog service registration
            builder.Register(c => new NLogLogger()).AsSelf().InstancePerRequest();

            //Services
            ServicesConfig.Register(builder);

            // build the dependencies
            var container = builder.Build();

            DependencyResolver.SetResolver(new AutofacDependencyResolver(container));


            // Get your HttpConfiguration.
            var config = GlobalConfiguration.Configuration;

            config.DependencyResolver = new AutofacWebApiDependencyResolver(container);

            // Register your Web API controllers.
            builder.RegisterApiControllers(Assembly.GetExecutingAssembly());

            // OPTIONAL: Register the Autofac filter provider.
            builder.RegisterWebApiFilterProvider(config);


            if (!WebSecurity.Initialized)
            {
                WebSecurity.InitializeDatabaseConnection("DefaultConnection", "UserProfile", "UserId", "Email", autoCreateTables: false);
            }

            FacebookConfig.Register(GlobalFacebookConfiguration.Configuration);

            AntiForgeryConfig.UniqueClaimTypeIdentifier = ClaimTypes.NameIdentifier;
        }