Exemple #1
0
        private void InitParas(string CustPermID)
        {
            ServiceClient = new PermissionServiceClient();

            ServiceClient.GetEntityMenuCustomPermByIDCompleted += new EventHandler <GetEntityMenuCustomPermByIDCompletedEventArgs>(ServiceClient_GetEntityMenuCustomPermByIDCompleted);

            //ServiceClient.GetSysMenuByTypeCompleted += new EventHandler<GetSysMenuByTypeCompletedEventArgs>(ServiceClient_GetSysMenuByTypeCompleted);

            ServiceClient.FindSysPermissionByTypeCompleted += new EventHandler <FindSysPermissionByTypeCompletedEventArgs>(ServiceClient_FindSysPermissionByTypeCompleted);

            ServiceClient.EntityMenuCustomPermAddCompleted += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(ServiceClient_EntityMenuCustomPermAddCompleted);

            ServiceClient.EntityMenuCustomPermUpdateCompleted += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(ServiceClient_EntityMenuCustomPermUpdateCompleted);

            if (FormType == FormTypes.New)
            {
                CustPerm = new T_SYS_ENTITYMENUCUSTOMPERM();
                CustPerm.ENTITYMENUCUSTOMPERMID = Guid.NewGuid().ToString();
            }

            //初始化角色权限
            if (!string.IsNullOrEmpty(CustPermID))
            {
                ServiceClient.GetEntityMenuCustomPermByIDAsync(CustPermID);
            }
            else
            {
                //ServiceClient.GetSysMenuByTypeAsync("");
                ServiceClient.FindSysPermissionByTypeAsync("");
            }
        }
        private void InitParas(string CustPermID)
        {
            ServiceClient = new PermissionServiceClient();
            
            ServiceClient.GetEntityMenuCustomPermByIDCompleted += new EventHandler<GetEntityMenuCustomPermByIDCompletedEventArgs>(ServiceClient_GetEntityMenuCustomPermByIDCompleted);
           
            //ServiceClient.GetSysMenuByTypeCompleted += new EventHandler<GetSysMenuByTypeCompletedEventArgs>(ServiceClient_GetSysMenuByTypeCompleted);
           
            ServiceClient.FindSysPermissionByTypeCompleted += new EventHandler<FindSysPermissionByTypeCompletedEventArgs>(ServiceClient_FindSysPermissionByTypeCompleted);
            
            ServiceClient.EntityMenuCustomPermAddCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(ServiceClient_EntityMenuCustomPermAddCompleted);
                        
            ServiceClient.EntityMenuCustomPermUpdateCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(ServiceClient_EntityMenuCustomPermUpdateCompleted);
            
            if (FormType == FormTypes.New)
            {
                CustPerm = new T_SYS_ENTITYMENUCUSTOMPERM();
                CustPerm.ENTITYMENUCUSTOMPERMID = Guid.NewGuid().ToString();

            }

            //初始化角色权限
            if (!string.IsNullOrEmpty(CustPermID))
            {
                ServiceClient.GetEntityMenuCustomPermByIDAsync(CustPermID);
            }
            else
            {
                //ServiceClient.GetSysMenuByTypeAsync("");
                ServiceClient.FindSysPermissionByTypeAsync("");
            }
        }