Ejemplo n.º 1
0
        //通过Permission项目提供的WCf服务验证
        //protected Identity CurrentIdentity = null;
        //protected override void OnInit(EventArgs e)
        //{
        //    if (HttpContext.Current.User.Identity.Name.Trim() != string.Empty)
        //    {
        //        AuthenticateModule.SetPrincipal(HttpContext.Current.User.Identity.Name);
        //        CurrentIdentity = (Identity)Principal.Current.Identity;
        //    }
        //    if (CurrentIdentity == null)
        //    {
        //        Response.Redirect("~/login.aspx", true);
        //    }
        //    base.OnInit(e);
        //}
        #endregion

        #region "验证Form,View权限"

        #endregion


        /// <summary>
        /// 获取实体Logo
        /// </summary>
        /// <param name="entityCode">实体标示</param>
        public void GetEntityLogo(string entityCode)
        {
            PermissionServiceClient client = new PermissionServiceClient();

            client.GetSysMenuByEntityCodeCompleted += new EventHandler <GetSysMenuByEntityCodeCompletedEventArgs>(client_GetSysMenuByEntityCodeCompleted);
            client.GetSysMenuByEntityCodeAsync(entityCode);
        }
Ejemplo n.º 2
0
        public void GetEntityLogo(string entityCode)
        {
            //SMT.Saas.Tools.PermissionWS.PermissionServiceClient client = new SMT.Saas.Tools.PermissionWS.PermissionServiceClient();
            PermissionServiceClient client = new PermissionServiceClient();

            //client.GetSysMenuByEntityCodeCompleted += new EventHandler<SMT.Saas.Tools.PermissionWS.GetSysMenuByEntityCodeCompletedEventArgs>(client_GetSysMenuByEntityCodeCompleted);
            client.GetSysMenuByEntityCodeCompleted += new EventHandler <GetSysMenuByEntityCodeCompletedEventArgs>(client_GetSysMenuByEntityCodeCompleted);
            client.GetSysMenuByEntityCodeAsync(entityCode);
            //client.CloseAsync();//龙康才新增
            //client.Abort();//龙康才新增
        }
Ejemplo n.º 3
0
 public void SetRowLogo(DataGrid DtGrid, DataGridRow row, string entityCode)
 {
     if (DtGrid.ItemsSource != null)
     {
         Image logo = DtGrid.Columns[0].GetCellContent(row).FindName("entityLogo") as Image;
         if (logo != null)
         {
             if (string.IsNullOrEmpty(EntityLogo))
             {
                 PermissionServiceClient client = new PermissionServiceClient();
                 //SMT.Saas.Tools.PermissionWS.PermissionServiceClient client = new SMT.Saas.Tools.PermissionWS.PermissionServiceClient();
                 client.GetSysMenuByEntityCodeCompleted += new EventHandler <GetSysMenuByEntityCodeCompletedEventArgs>(client_GetSysMenuByEntityCodeCompleted);
                 client.GetSysMenuByEntityCodeAsync(entityCode, logo);
             }
             else
             {
                 logo.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri(EntityLogo, UriKind.Relative));
             }
         }
     }
 }
Ejemplo n.º 4
0
 public void SetRowLogo(DataGrid DtGrid, DataGridRow row, string entityCode)
 {
     if (DtGrid.ItemsSource != null)
     {
         Image logo = DtGrid.Columns[0].GetCellContent(row).FindName("entityLogo") as Image;
         if (logo != null)
         {
             if (string.IsNullOrEmpty(EntityLogo))
             {
                 PermissionServiceClient client = new PermissionServiceClient();
                 //SMT.Saas.Tools.PermissionWS.PermissionServiceClient client = new SMT.Saas.Tools.PermissionWS.PermissionServiceClient();
                 client.GetSysMenuByEntityCodeCompleted += new EventHandler<GetSysMenuByEntityCodeCompletedEventArgs>(client_GetSysMenuByEntityCodeCompleted);
                 client.GetSysMenuByEntityCodeAsync(entityCode, logo);
             }
             else
             {
                 logo.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri(EntityLogo, UriKind.Relative));
             }
         }
     }
 }
Ejemplo n.º 5
0
        //通过Permission项目提供的WCf服务验证
        //protected Identity CurrentIdentity = null;
        //protected override void OnInit(EventArgs e)
        //{
        //    if (HttpContext.Current.User.Identity.Name.Trim() != string.Empty)
        //    {
        //        AuthenticateModule.SetPrincipal(HttpContext.Current.User.Identity.Name);
        //        CurrentIdentity = (Identity)Principal.Current.Identity;
        //    }
        //    if (CurrentIdentity == null)
        //    {
        //        Response.Redirect("~/login.aspx", true);
        //    }
        //    base.OnInit(e);
        //}
        #endregion

        #region"验证Form,View权限"

        #endregion


        /// <summary>
        /// 获取实体Logo
        /// </summary>
        /// <param name="entityCode">实体标示</param>
        public void GetEntityLogo(string entityCode)
        {
            PermissionServiceClient client = new PermissionServiceClient();
            client.GetSysMenuByEntityCodeCompleted += new EventHandler<GetSysMenuByEntityCodeCompletedEventArgs>(client_GetSysMenuByEntityCodeCompleted);
            client.GetSysMenuByEntityCodeAsync(entityCode);

        }
Ejemplo n.º 6
0
        public void GetEntityLogo(string entityCode)
        {
            //SMT.Saas.Tools.PermissionWS.PermissionServiceClient client = new SMT.Saas.Tools.PermissionWS.PermissionServiceClient();
            PermissionServiceClient client = new PermissionServiceClient();
            //client.GetSysMenuByEntityCodeCompleted += new EventHandler<SMT.Saas.Tools.PermissionWS.GetSysMenuByEntityCodeCompletedEventArgs>(client_GetSysMenuByEntityCodeCompleted);
            client.GetSysMenuByEntityCodeCompleted += new EventHandler<GetSysMenuByEntityCodeCompletedEventArgs>(client_GetSysMenuByEntityCodeCompleted);
            client.GetSysMenuByEntityCodeAsync(entityCode);
            //client.CloseAsync();//龙康才新增
            //client.Abort();//龙康才新增

        }