Esempio n. 1
0
        /// <summary>
        ///在没有获取图片时,重复调用,设置每一行的Logo图片,
        /// </summary>
        /// <param name="DtGrid"></param>
        /// <param name="row"></param>
        /// <param name="entityCode"></param>
        public void SetRowLogo(DataGrid DtGrid, DataGridRow row, string entityCode)
        {
            if (DtGrid.ItemsSource == null)
            {
                return;
            }

            Image logo = DtGrid.Columns[0].GetCellContent(row).FindName("entityLogo") as Image;

            if (logo == null)
            {
                return;
            }

            if (Application.Current.Resources["RowLogo" + entityCode] != null)
            {
                string strPpath = Application.Current.Resources["RowLogo" + entityCode].ToString();
                logo.Margin = new Thickness(2, 2, 0, 0);
                logo.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri(strPpath, UriKind.Relative));
                return;
            }

            SMT.Saas.Tools.PermissionWS.PermissionServiceClient client = new SMT.Saas.Tools.PermissionWS.PermissionServiceClient();
            client.GetSysMenuByEntityCodeCompleted += new EventHandler <SMT.Saas.Tools.PermissionWS.GetSysMenuByEntityCodeCompletedEventArgs>(client_GetSysMenuByEntityCodeCompleted);
            client.GetSysMenuByEntityCodeAsync(entityCode);
        }
Esempio n. 2
0
 public CommonServices()
 {
     _toolsClient = new Saas.Tools.PermissionWS.PermissionServiceClient();
     _client.GetSysLeftMenuFilterPermissionToNewFrameCompleted += new System.EventHandler <GetSysLeftMenuFilterPermissionToNewFrameCompletedEventArgs>(_client_GetSysLeftMenuFilterPermissionToNewFrameCompleted);
     _toolsClient.GetEntityPermissionByUserCompleted           += new EventHandler <Saas.Tools.PermissionWS.GetEntityPermissionByUserCompletedEventArgs>(_toolsClient_GetEntityPermissionByUserCompleted);
     _client.GetUserInfoCompleted       += new EventHandler <GetUserInfoCompletedEventArgs>(_client_GetUserInfoCompleted);
     _client.SysUserInfoUpdateCompleted += new EventHandler <SysUserInfoUpdateCompletedEventArgs>(_client_SysUserInfoUpdateCompleted);
     _client.SysUserInfoUpdateByUserIdandUsernameCompleted            += new EventHandler <SysUserInfoUpdateByUserIdandUsernameCompletedEventArgs>(_client_SysUserInfoUpdateByUserIdandUsernameCompleted);
     _toolsClient.GetCustomerPermissionByUserIDAndEntityCodeCompleted += new EventHandler <Saas.Tools.PermissionWS.GetCustomerPermissionByUserIDAndEntityCodeCompletedEventArgs>(_toolsClient_GetCustomerPermissionByUserIDAndEntityCodeCompleted);
 }
Esempio n. 3
0
 public CommonServices()
 {
     _toolsClient = new Saas.Tools.PermissionWS.PermissionServiceClient();
     _client.GetSysLeftMenuFilterPermissionToNewFrameCompleted += new System.EventHandler<GetSysLeftMenuFilterPermissionToNewFrameCompletedEventArgs>(_client_GetSysLeftMenuFilterPermissionToNewFrameCompleted);
     _toolsClient.GetEntityPermissionByUserCompleted += new EventHandler<Saas.Tools.PermissionWS.GetEntityPermissionByUserCompletedEventArgs>(_toolsClient_GetEntityPermissionByUserCompleted);
     _client.GetUserInfoCompleted += new EventHandler<GetUserInfoCompletedEventArgs>(_client_GetUserInfoCompleted);
     _client.SysUserInfoUpdateCompleted += new EventHandler<SysUserInfoUpdateCompletedEventArgs>(_client_SysUserInfoUpdateCompleted);
     _client.SysUserInfoUpdateByUserIdandUsernameCompleted += new EventHandler<SysUserInfoUpdateByUserIdandUsernameCompletedEventArgs>(_client_SysUserInfoUpdateByUserIdandUsernameCompleted);
     _toolsClient.GetCustomerPermissionByUserIDAndEntityCodeCompleted += new EventHandler<Saas.Tools.PermissionWS.GetCustomerPermissionByUserIDAndEntityCodeCompletedEventArgs>(_toolsClient_GetCustomerPermissionByUserIDAndEntityCodeCompleted);
 }
Esempio n. 4
0
        /// <summary>
        ///在没有获取图片时,重复调用,设置每一行的Logo图片,
        /// </summary>
        /// <param name="DtGrid"></param>
        /// <param name="row"></param>
        /// <param name="entityCode"></param>
        public void SetRowLogo(DataGrid DtGrid, DataGridRow row, string entityCode)
        {
            if (DtGrid.ItemsSource == null)
            {
                return;
            }

            Image logo = DtGrid.Columns[0].GetCellContent(row).FindName("entityLogo") as Image;
            if (logo == null)
            {
                return;
            }

            if (Application.Current.Resources["RowLogo" + entityCode] != null)
            {
                string strPpath = Application.Current.Resources["RowLogo" + entityCode].ToString();
                logo.Margin = new Thickness(2, 2, 0, 0);
                logo.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri(strPpath, UriKind.Relative));
                return;
            }

            SMT.Saas.Tools.PermissionWS.PermissionServiceClient client = new SMT.Saas.Tools.PermissionWS.PermissionServiceClient();
            client.GetSysMenuByEntityCodeCompleted += new EventHandler<SMT.Saas.Tools.PermissionWS.GetSysMenuByEntityCodeCompletedEventArgs>(client_GetSysMenuByEntityCodeCompleted);
            client.GetSysMenuByEntityCodeAsync(entityCode);
        }
Esempio n. 5
0
 public CustomPermissionServices()
 {
     _toolsClient = new Saas.Tools.PermissionWS.PermissionServiceClient();
     _toolsClient.GetCustomerPermissionByUserIDAndEntityCodeCompleted += new EventHandler<Saas.Tools.PermissionWS.GetCustomerPermissionByUserIDAndEntityCodeCompletedEventArgs>(_toolsClient_GetCustomerPermissionByUserIDAndEntityCodeCompleted);
 }
Esempio n. 6
0
 public CustomPermissionServices()
 {
     _toolsClient = new Saas.Tools.PermissionWS.PermissionServiceClient();
     _toolsClient.GetCustomerPermissionByUserIDAndEntityCodeCompleted += new EventHandler <Saas.Tools.PermissionWS.GetCustomerPermissionByUserIDAndEntityCodeCompletedEventArgs>(_toolsClient_GetCustomerPermissionByUserIDAndEntityCodeCompleted);
 }