Ejemplo n.º 1
0
        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            //Auto logout timer start
            SessionManager.StartTime();

            //message Box Types.
            try
            {
                btnOK.Focus();
                Global.MsgBoxResult = "";
                lblmsg.Text         = Global.MsgBoxMessage;
                LblTitle.Content    = Global.MsgBoxTitle;
                if (Global.MsgBoxType == "Warning")
                {
                    Uri ImagesUri = new Uri("/PackingNet;component/Images/imgWarning.png", UriKind.Relative);
                    ImgMsgImage.Source = new BitmapImage(ImagesUri);
                }
                if (Global.MsgBoxType == "WarningImage")
                {
                    Uri    ImagesUri = new Uri("/PackingNet;component/Images/imgWarning.png", UriKind.Relative);
                    String Path      = Global.controller.GetSKuUrl(Global.SKUName);
                    ImageFromUrl.GetImageFrom(imgSKu, Path);
                    ImgMsgImage.Source = new BitmapImage(ImagesUri);
                    imgSKu.Visibility  = Visibility.Visible;
                }
                if (Global.MsgBoxType == "Error")
                {
                    Uri ImagesUri = new Uri("/PackingNet;component/Images/imgWarning.png", UriKind.Relative);
                    ImgMsgImage.Source = new BitmapImage(ImagesUri);
                    btnOK.Content      = "Yes";
                    btnCancel.Content  = "No";
                }
                if (Global.MsgBoxType == "Ok")
                {
                    Uri ImagesUri = new Uri("/PackingNet;component/Images/imgCorrectGreen.png", UriKind.Relative);
                    ImgMsgImage.Source = new BitmapImage(ImagesUri);
                }
                if (Global.MsgBoxType == "Shipment")
                {
                    Uri ImagesUri = new Uri("/PackingNet;component/Images/imgWarning.png", UriKind.Relative);
                    ImgMsgImage.Source   = new BitmapImage(ImagesUri);
                    btnCancel.Content    = "Continue any Way";
                    btnCancel.Background = new SolidColorBrush(Color.FromRgb(197, 69, 0));
                    btnOK.Background     = new SolidColorBrush(Colors.Green);
                }

                if (Global.MsgBoxType == "Continue")
                {
                    Uri ImagesUri = new Uri("/PackingNet;component/Images/imgWarning.png", UriKind.Relative);
                    ImgMsgImage.Source = new BitmapImage(ImagesUri);
                    btnOK.Visibility   = System.Windows.Visibility.Hidden;
                    txtUserName.Focus();
                }
            }
            catch (Exception)
            { }

            //Convert message Box to selected language.
            WindowLanguages.Convert(this);
        }
Ejemplo n.º 2
0
        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            //log
            SaveUserLogsTbl.logThis(csteActionType.UserManagement_ScreenLoaded.ToString());
            //Auto Timer Restart..
            SessionManager.StartTime();

            //Convert To Language
            WindowLanguages.Convert(this);
        }
        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            //Log .
            SaveUserLogsTbl.logThis(csteActionType.HomeScreenLoaded.ToString());

            //Auto Timer Restart..
            SessionManager.StartTime();
            if (Global.ISTimerTickInitialised == false)
            {
                SessionManager.Autotimer.Tick += Autotimer_Tick;
                Global.ISTimerTickInitialised  = true;
            }
            //Convert Language
            WindowLanguages.Convert(this);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Page Load event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            try
            {
                //Pause the Session till Login successfull
                SessionManager.Autotimer.Stop();

                txtUserName.Focus();

                //Convert screen language to set application language
                WindowLanguages.Convert(this);
            }
            catch (Exception Ex)
            {
                //Log the Error to the Error Log table
                ErrorLoger.save("wndLogin - Window_Loaded_1", "[" + DateTime.UtcNow.ToString() + "]" + Ex.ToString());
            }
        }
Ejemplo n.º 5
0
        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            try
            {
                if (Global.LoginType == "UPSandFEDEX")
                {
                    rbtnltl.Visibility   = Visibility.Hidden;
                    rbtnother.Visibility = Visibility.Hidden;
                }

                //log.
                SaveUserLogsTbl.logThis(csteActionType.MainWindowLoaded.ToString());
                if (Global.controller.IsSuperUser(Global.LoggedUserId))
                {
                    cvsHomeBtn.Visibility = System.Windows.Visibility.Visible;
                }

                lblTime.Content = DateTime.UtcNow.ToLongDateString();
                txtShipmentId.Focus();
                lblUserName.Content = Global.WindowTopUserName;

                // txtShipmentId.Text = "SH0002XXX";
                lblStationName.Content = Global.StationName;
                //Display label Last Login time Of The  user;
                DateTime Dt = Convert.ToDateTime(Global.LastLoginDateTime);
                lblLastLoginTime.Content = Dt.ToString("MMM dd, yyyy h:mm tt ").ToString();

                //Show Error message on the Strip;
                _scrollMsg("Please Scan shipment ID.", Colors.Green);

                //Convert All Form labels to Language.
                WindowLanguages.Convert(this);
            }
            catch (Exception Ex)
            {
                //Log the Error to the Error Log table
                ErrorLoger.save("wndShipmentScanPage - Window_Loaded_1", "[" + DateTime.UtcNow.ToString() + "]" + Ex.ToString(), DateTime.UtcNow, Global.LoggedUserId);
            }
        }
Ejemplo n.º 6
0
 private void Window_Loaded_1(object sender, RoutedEventArgs e)
 {
     //Change Language
     WindowLanguages.Convert(this);
 }