Esempio n. 1
0
        void x_MixPage()
        {
            try
            {
                //admin, engineer, supervisor,op权限均可登入.
                if (StaticRes.Global.Current_User.USER_GROUP == StaticRes.Global.User_Group.Admin ||
                    StaticRes.Global.Current_User.USER_GROUP == StaticRes.Global.User_Group.Engineer ||
                    StaticRes.Global.Current_User.USER_GROUP == StaticRes.Global.User_Group.Supervisor ||
                    StaticRes.Global.Current_User.USER_GROUP == StaticRes.Global.User_Group.OP)
                {
                    Transaction.Mix x = EMS.Singleton.MixSingleton.GetInstance;

                    x.userID     = StaticRes.Global.Current_User.USER_ID;
                    x.userName   = StaticRes.Global.Current_User.USER_NAME;
                    x.userGroup  = StaticRes.Global.Current_User.USER_GROUP;
                    x.department = StaticRes.Global.Current_User.DEPARTMENT;

                    x.ShowWindow();
                }
                else if (StaticRes.Global.Current_User.USER_GROUP.Length > 0)
                {
                    System.Windows.MessageBox.Show("You haven't access to entey it !!\n你没有访问权限!!");
                }
            }
            catch (Exception ee)
            {
                System.Windows.MessageBox.Show(ee.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                this.Close();
            }
        }
Esempio n. 2
0
        private void btn_mix_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Transaction.Mix mixPage = EMS.Singleton.MixSingleton.GetInstance;


                //正在运行的话, 直接显示窗口, 否则重新登入
                if (mixPage.onGoing)
                {
                    mixPage.ShowWindow();
                }
                else
                {
                    Views.Login x = new Views.Login();
                    x.HDClick   += new Views.Login.HDClickEventHandler(x_MixPage);
                    x.BackClick += new Views.Login.BackMaskEventHandler(CloseMask);
                    x.ShowDialog();
                }
            }
            catch (Exception ee)
            {
                System.Windows.MessageBox.Show(ee.Message);
            }
        }