Example #1
0
 private void LoadMenu()
 {
     MenuList.Add(new MenuItem()
     {
         Icon     = "\uf0e4",
         Title    = "Dashboard",
         PageName = MasterModule.GetMasterNavigationPage(PageRoutes.GetKey <DashBoardPage>())
     });
     MenuList.Add(new MenuItem()
     {
         Icon     = "\uf073",
         Title    = "Timesheet",
         PageName = MasterModule.GetMasterNavigationPage(PageRoutes.GetKey <TimesheetPage>())
     });
     MenuList.Add(new MenuItem()
     {
         Icon     = "\uf06e",
         Title    = "Review",
         PageName = MasterModule.GetMasterNavigationPage(PageRoutes.GetKey <ReviewPage>())
     });
     MenuList.Add(new MenuItem()
     {
         Icon     = "\uf085",
         Title    = "Configuration",
         PageName = MasterModule.GetMasterNavigationPage(PageRoutes.GetKey <ConfigurationPage>())
     });
 }
Example #2
0
        private async void SignIn()
        {
            try
            {
                IsBusy = true;
                if (Validate())
                {
                    var responseRequest = await BaseModule.AuthenticationService.Login(_email.Value, _password.Value);

                    if (responseRequest.Success)
                    {
                        NavigateCommand.Execute(MasterModule.GetMasterNavigationPage(PageRoutes.GetKey <DashBoardPage>()));
                    }
                    else
                    {
                        IsBusy = false;
                        await BaseModule.DialogService.ShowAlertAsync(responseRequest.Message, "Login error", "Ok");
                    }
                }
            }
            catch (ServiceAuthenticationException)
            {
                await BaseModule.DialogService.ShowAlertAsync("Please, try again", "Login error", "Ok");
            }
            catch (Exception)
            {
                await BaseModule.DialogService.ShowAlertAsync("An error occurred, try again", "Error", "Ok");
            }
            finally
            {
                IsBusy = false;
            }
        }
 protected void Close()
 {
     if (IsInternetAndCloseModal())
     {
         NavigateCommand.Execute(MasterModule.GetMasterNavigationPage(PageRoutes.GetKey <DashBoardPage>()));
     }
 }
Example #4
0
        /*
         * public void BuilDefaultPathesLinks(ItemsModulesOptions currentModule)
         * {
         *  string homeText = (string)HttpContext.GetGlobalResourceObject("Modules", "_Home");
         *  string moduleTitle = currentModule.GetModuleTitle();
         *  this.AddLink(homeText, "/");
         *  this.AddLastTitle(moduleTitle);
         *
         *  this.PageTitle = moduleTitle;
         *  this.TopHeader = moduleTitle;
         *
         * }
         *
         * protected void BuilMessagesDefaultPathesLinks()
         * {
         *
         *  MessagesModuleOptions CurrentMessagesModule = (MessagesModuleOptions)HttpStore.Items["CurrentMessagesModule"];
         *  string homeText = (string)HttpContext.GetGlobalResourceObject("Modules", "_Home");
         *  string moduleTitle = CurrentMessagesModule.GetModuleTitle();
         *  this.AddLink(homeText, "/Default.aspx");
         *  this.AddLastTitle(moduleTitle);
         *  this.PageTitle = moduleTitle;
         *  this.TopHeader = moduleTitle;
         *  ////------------------------------------------------------
         *  //int moduleDepartment, BaseDepartment = 0;
         *  ////------------------------------------------------------
         *  //int categoryID = 0;
         *  //if (MoversFW.Components.UrlManager.ChechIsValidIntegerParameter("id"))
         *  //{
         *  //    categoryID = Convert.ToInt32(Request.QueryString["id"]);
         *  //}
         *  ////------------------------------------------------------
         *  //PathHandler ph = new PathHandler(pc);
         *  //ph.GetSiteDepartment(currentModule.ModuleTypeID, out moduleDepartment, out BaseDepartment);
         *  //ph.BuildDepartmentsPathLinks(moduleDepartment, false);
         *  //ph.BuildCategoriesPathLinks(categoryID, true);
         *  ////------------------------------------------------------
         *  //Label lblTitle = (Label)this.Master.FindControl("lblTitle");
         *  ////ItemsFactory.AddTitlePath(pc, lblTitle);
         *  //lblTitle.Text = currentModule.GetModuleTitle();
         *
         * }
         */
        public void BuilDefaultPathesLinks(MasterModule currentModule)
        {
            string homeText    = (string)HttpContext.GetGlobalResourceObject("Modules", "_Home");
            string moduleTitle = currentModule.GetModuleTitle();

            this.AddLink(homeText, "/");
            this.AddLastTitle(moduleTitle);

            this.PageTitle = moduleTitle;
            this.TopHeader = moduleTitle;
        }
 private void AuthenticationRun()
 {
     if (AppSettings.AuthenticatedUserResponse != null)
     {
         BaseModule.NavigationService.NavigateAsync(MasterModule.GetMasterNavigationPage(AppSettings.StartupView));
     }
     else
     {
         NavigateCommand.Execute(PageRoutes.GetKey <LoginPage>());
     }
 }
 private async void AuthenticationRun()
 {
     if (CrossConnectivity.Current.IsConnected)
     {
         if (await BaseModule.AuthenticationService.UserIsAuthenticatedAndValidAsync())
         {
             NavigateCommand.Execute(MasterModule.GetMasterNavigationPage(PageRoutes.GetKey <DashBoardPage>()));
         }
         else
         {
             NavigateCommand.Execute(PageRoutes.GetKey <LoginPage>());
         }
     }
     else
     {
         NavigateCommand.Execute(PageRoutes.GetKey <ConnectionPage>());
     }
 }
Example #7
0
 private void SignIn()
 {
     IsBusy = true;
     Device.BeginInvokeOnMainThread(async() =>
     {
         try
         {
             if (Validate())
             {
                 if (this.IsInternetAndCloseModal())
                 {
                     BaseModule.AnalyticsService.TrackEvent("[Login] :: Start");
                     var responseRequest = await BaseModule.AuthenticationService.Login(_email.Value, _password.Value);
                     IsBusy = false;
                     if (responseRequest.Success)
                     {
                         NavigateCommand.Execute(MasterModule.GetMasterNavigationPage(PageRoutes.GetKey <DashBoardPage>()));
                         BaseModule.AnalyticsService.TrackEvent("[Login] :: End");
                     }
                     else
                     {
                         await BaseModule.DialogService.ShowAlertAsync(responseRequest.Message, "Login error", "Ok");
                     }
                 }
             }
             else
             {
                 IsBusy = false;
             }
         }
         catch (Exception e)
         {
             IsBusy = false;
             BaseModule.DialogErrorCustomService.DialogErrorCommonTryAgain();
             Crashes.TrackError(e);
         }
     });
 }
Example #8
0
        async void AuthenticationRun(bool isConnectivityChange = false)
        {
            try
            {
                var authenticationService = Container.Resolve <IAuthenticationService>();
                var result = await authenticationService.UserIsAuthenticatedAndValidAsync();

                if (!result)
                {
                    await NavigationService.NavigateAsync(PageRoutes.GetKey <LoginPage>());
                }
                else
                {
                    if (authenticationService.IsAuthenticated && isConnectivityChange)
                    {
                        await NavigationService.NavigateAsync(MasterModule.GetMasterNavigationPage(PageRoutes.GetKey <DashBoardPage>()));
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
Example #9
0
 public static string GetSinglesPageLink(MasterModule currentModule, int id)
 {
     return(GetSinglesPageLink(currentModule.Identifire, id.ToString()));
 }
Example #10
0
 public static string GetSinglesPageLink(MasterModule currentModule)
 {
     return(GetSinglesPageLink(currentModule.Identifire, "{0}"));
 }
Example #11
0
 public static string identifire(MasterModule currentModule, int pageIndex)
 {
     return(GetDefaultPageLink(currentModule.Identifire, pageIndex.ToString()));
 }