Beispiel #1
0
        private void InitControlEvent()
        {
            GetEntityLogo("T_SYS_USERROLE");
            gridToolBar.btnNew.Click      += new RoutedEventHandler(btnNew_Click);
            gridToolBar.btnNew.Content     = "添加角色";
            gridToolBar.btnEdit.Visibility = Visibility.Collapsed;
            //gridToolBar.btnEdit.Click += new RoutedEventHandler(btnEdit_Click);
            //gridToolBar.btnEdit.Visibility = Visibility.Collapsed;
            gridToolBar.btnDelete.Click         += new RoutedEventHandler(btnDelete_Click);
            gridToolBar.btnAudit.Visibility      = Visibility.Collapsed;
            gridToolBar.BtnView.Visibility       = Visibility.Collapsed;
            gridToolBar.btnAudit.Visibility      = Visibility.Collapsed;
            gridToolBar.stpCheckState.Visibility = Visibility.Collapsed;
            DtGrid.CurrentCellChanged           += new EventHandler <EventArgs>(DtGrid_CurrentCellChanged);
            gridToolBar.btnRefresh.Click        += new RoutedEventHandler(btnRefresh_Click);

            gridToolBar.ShowRect();
            ServiceClient = new PermissionServiceClient();

            //ServiceClient.GetSysUserRoleByTypeCompleted += new EventHandler<GetSysUserRoleByTypeCompletedEventArgs>(ServiceClient_GetSysUserRoleByTypeCompleted);
            ServiceClient.GetSysUserRoleByUserCompleted += new EventHandler <GetSysUserRoleByUserCompletedEventArgs>(ServiceClient_GetSysUserRoleByUserCompleted);
            ServiceClient.SysUserRoleDeleteCompleted    += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(ServiceClient_SysUserRoleDeleteCompleted);
            ServiceClient.GetUserByIDCompleted          += new EventHandler <GetUserByIDCompletedEventArgs>(ServiceClient_GetUserByIDCompleted);

            ServiceClient.GetUserByIDAsync(tmpUserID);
        }
Beispiel #2
0
 // 当用户导航到此页面时执行。
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     tmpUserID = this.NavigationContext.QueryString.Count() == 0 ? "" : this.NavigationContext.QueryString["userid"].ToString();
     ServiceClient.GetUserByIDAsync(tmpUserID);
 }
Beispiel #3
0
        private void InitControlEvent()
        {
            GetEntityLogo("T_SYS_USERROLE"); 
            gridToolBar.btnNew.Click += new RoutedEventHandler(btnNew_Click);
            gridToolBar.btnNew.Content = "添加角色";
            gridToolBar.btnEdit.Visibility = Visibility.Collapsed;
            //gridToolBar.btnEdit.Click += new RoutedEventHandler(btnEdit_Click);
            //gridToolBar.btnEdit.Visibility = Visibility.Collapsed;
            gridToolBar.btnDelete.Click += new RoutedEventHandler(btnDelete_Click);
            gridToolBar.btnAudit.Visibility = Visibility.Collapsed;
            gridToolBar.BtnView.Visibility = Visibility.Collapsed;
            gridToolBar.btnAudit.Visibility = Visibility.Collapsed;
            gridToolBar.stpCheckState.Visibility = Visibility.Collapsed;
            DtGrid.CurrentCellChanged += new EventHandler<EventArgs>(DtGrid_CurrentCellChanged);
            gridToolBar.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);

            gridToolBar.ShowRect();
            ServiceClient = new PermissionServiceClient();

            //ServiceClient.GetSysUserRoleByTypeCompleted += new EventHandler<GetSysUserRoleByTypeCompletedEventArgs>(ServiceClient_GetSysUserRoleByTypeCompleted);
            ServiceClient.GetSysUserRoleByUserCompleted += new EventHandler<GetSysUserRoleByUserCompletedEventArgs>(ServiceClient_GetSysUserRoleByUserCompleted);
            ServiceClient.SysUserRoleDeleteCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(ServiceClient_SysUserRoleDeleteCompleted);
            ServiceClient.GetUserByIDCompleted += new EventHandler<GetUserByIDCompletedEventArgs>(ServiceClient_GetUserByIDCompleted);
            
            ServiceClient.GetUserByIDAsync(tmpUserID);
        }