Esempio n. 1
0
        //private static void ChecResource()
        //{
        //    if (Application.Current.Resources["FLOW_MODELDEFINE_T"] == null)
        //    {
        //        Utility.LoadDictss();
        //    }
        //    if (!Application.Current.Resources.Contains("ResourceConveter"))
        //    {
        //        Application.Current.Resources.Add("ResourceConveter", new SMT.SaaS.Globalization.ResourceConveter());
        //    }
        //}


        /// <summary>
        /// 加载权限
        /// </summary>
        /// <param name="FormName"></param>
        private static void CheckPermission(string FormName)
        {
            PermissionServiceClient clientPerm = new PermissionServiceClient();

            clientPerm.GetUserPermissionByUserToUICompleted += new EventHandler <GetUserPermissionByUserToUICompletedEventArgs>(clientPerm_GetUserPermissionByUserToUICompleted);

            string strUserId = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.SysUserID;

            //ApplicationCache.CacheMenuList
            clientPerm.GetUserPermissionByUserToUIAsync(strUserId);
        }
Esempio n. 2
0
        void client_UserLoginCompleted(object sender, UserLoginCompletedEventArgs e)
        {
            if (e.Result == null)
            {
                LoginResult = false;
                if (this.LoginedClick != null)
                {
                    this.LoginedClick(this, null);
                }
            }
            else
            {
                LoginResult = true;

                User = new T_SYS_USER();
                User = e.Result;
                client.GetUserPermissionByUserToUIAsync(User.SYSUSERID);
            }
        }
Esempio n. 3
0
File: Utility.cs Progetto: JuRogn/OA
        //private static void ChecResource()
        //{
        //    if (Application.Current.Resources["FLOW_MODELDEFINE_T"] == null)
        //    {
        //        Utility.LoadDictss();
        //    }
        //    if (!Application.Current.Resources.Contains("ResourceConveter"))
        //    {
        //        Application.Current.Resources.Add("ResourceConveter", new SMT.SaaS.Globalization.ResourceConveter());
        //    }
        //}


        /// <summary>
        /// 加载权限
        /// </summary>
        /// <param name="FormName"></param>
        private static void CheckPermission(string FormName)
        {
            PermissionServiceClient clientPerm = new PermissionServiceClient();

            clientPerm.GetUserPermissionByUserToUICompleted += new EventHandler<GetUserPermissionByUserToUICompletedEventArgs>(clientPerm_GetUserPermissionByUserToUICompleted);

            string strUserId = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.SysUserID;
            //ApplicationCache.CacheMenuList
            clientPerm.GetUserPermissionByUserToUIAsync(strUserId);

        }