/// <summary>
 ///  show splash screen
 /// </summary>
 void ShowSplashScreen()
 {
     sp = new SplashScreen();
     sp.Show();
 }
        /// <summary>
        /// Load Orders Grid in safe thread
        /// </summary>
        void RunLoadOrderGridInThread()
        {
            if (CurrentTabIndex != 0) return;
            if (!WINDOWACTIVE) return; // if current window is not active do not refresh grid
            SplashScreen sp = new SplashScreen();

            sp.TopLevel = true;
            sp.TopMost = true;
            sp.Show();
            IAsyncResult result = null;

            if (IsAdmin)
            {
                RefreshOrdersGridAction loadOrderStatusAsync = new RefreshOrdersGridAction(LoadOrdersGridforAdminView);
                result = this.BeginInvoke(loadOrderStatusAsync);
            }
            else
            {

                RefreshOrdersGridAction loadOrderStatusAsync = new RefreshOrdersGridAction(LoadOrdersGrid);
                result = this.BeginInvoke(loadOrderStatusAsync);
            }
            this.EndInvoke(result);
            if (result.IsCompleted)
            {
                if (sp != null)
                {
                    sp.Hide();
                    sp.Close();
                }
            }

        }
        /// <summary>
        /// Invoke admin store statistics dashboard in safe thread
        /// </summary>
        void RunAdminDashBoardInThread()
        {
            if (CurrentTabIndex != 1) return;
            if (!WINDOWACTIVE) return;
            SplashScreen sp = new SplashScreen();
            sp.TopLevel = true;
            sp.TopMost = true;
            sp.Show();
            IAsyncResult result = null;

            RefreshOrdersGridAction loadOrderStatusAsync = new RefreshOrdersGridAction(RefreshAdminDashboard);
            result = this.BeginInvoke(loadOrderStatusAsync);

            this.EndInvoke(result);
            if (result.IsCompleted)
            {
                if (sp != null)
                {
                    sp.Hide();
                    sp.Close();
                }
            }

        }