private void InitToolBar() { FormToolBar1.btnNew.Click += new RoutedEventHandler(btnNew_Click); FormToolBar1.btnEdit.Click += new RoutedEventHandler(btnEdit_Click); FormToolBar1.btnDelete.Click += new RoutedEventHandler(btnDelete_Click); FormToolBar1.BtnView.Click += new RoutedEventHandler(BtnView_Click); //隐藏未使用按钮 //FormToolBar1.btnRead.Visibility = Visibility.Collapsed; FormToolBar1.btnPrint.Visibility = Visibility.Collapsed; FormToolBar1.btnOutPDF.Visibility = Visibility.Collapsed; FormToolBar1.btnOutExcel.Visibility = Visibility.Collapsed; //FormToolBar1.btnimport.Visibility = Visibility.Collapsed; FormToolBar1.stpCheckState.Visibility = Visibility.Collapsed; FormToolBar1.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click); FormToolBar1.stpOtherAction.Visibility = Visibility.Collapsed; //FormToolBar1.btnSumbitAudit.Visibility = Visibility.Collapsed; FormToolBar1.btnAudit.Visibility = Visibility.Collapsed; //FormToolBar1.btnAduitNoTPass.Visibility = Visibility.Collapsed; DtGrid.SelectionChanged += new SelectionChangedEventHandler(DtGrid_SelectionChanged); FormToolBar1.ShowRect(); DtGrid.CurrentCellChanged += new EventHandler <EventArgs>(DataGrid_CurrentCellChanged); ServiceClient.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); }
void SysPermission_Loaded(object sender, RoutedEventArgs e) { FormToolBar1.btnEdit.Click += new RoutedEventHandler(btnEdit_Click); FormToolBar1.btnDelete.Click += new RoutedEventHandler(btnDelete_Click); FormToolBar1.btnNew.Click += new RoutedEventHandler(btnNew_Click); FormToolBar1.BtnView.Click += new RoutedEventHandler(BtnView_Click); FormToolBar1.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click); //隐藏未使用按钮 //FormToolBar1.btnRead.Visibility = Visibility.Collapsed; FormToolBar1.btnPrint.Visibility = Visibility.Collapsed; FormToolBar1.btnOutPDF.Visibility = Visibility.Collapsed; FormToolBar1.btnOutExcel.Visibility = Visibility.Collapsed; //FormToolBar1.btnimport.Visibility = Visibility.Collapsed; FormToolBar1.stpCheckState.Visibility = Visibility.Collapsed; FormToolBar1.stpOtherAction.Visibility = Visibility.Collapsed; //FormToolBar1.btnSumbitAudit.Visibility = Visibility.Collapsed; FormToolBar1.btnAudit.Visibility = Visibility.Collapsed; //FormToolBar1.btnAduitNoTPass.Visibility = Visibility.Collapsed; InitControlEvent(); ServiceClient.GetUserPermissionBySysCodeAndUserAndModelCodeAsync("1", "T_OA_APPROVALINFO", Common.CurrentLoginUserInfo.EmployeeID, "3"); GetEntityLogo("T_SYS_PERMISSION"); FormToolBar1.ShowRect(); LoadData(); }
/// <summary> /// formtoolbar控件控制 /// </summary> private void InitFormToolBarButton() { GetEntityLogo("T_SYS_ENTITYMENU"); FormToolBar1.btnNew.Click += new RoutedEventHandler(btnNew_Click); FormToolBar1.btnEdit.Click += new RoutedEventHandler(btnEdit_Click); FormToolBar1.btnDelete.Click += new RoutedEventHandler(btnDelete_Click); FormToolBar1.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click); //隐藏未使用按钮 //FormToolBar1.btnRead.Visibility = Visibility.Collapsed; FormToolBar1.btnPrint.Visibility = Visibility.Collapsed; FormToolBar1.btnOutPDF.Visibility = Visibility.Collapsed; FormToolBar1.btnOutExcel.Visibility = Visibility.Collapsed; FormToolBar1.BtnView.Visibility = Visibility.Collapsed; //FormToolBar1.btnimport.Visibility = Visibility.Collapsed; FormToolBar1.stpCheckState.Visibility = Visibility.Collapsed; FormToolBar1.stpOtherAction.Visibility = Visibility.Collapsed; //FormToolBar1.btnSumbitAudit.Visibility = Visibility.Collapsed; FormToolBar1.btnAudit.Visibility = Visibility.Collapsed; //FormToolBar1.btnAduitNoTPass.Visibility = Visibility.Collapsed; DtGrid.CurrentCellChanged += new EventHandler <EventArgs>(DataGrid_CurrentCellChanged); if (Application.Current.Resources["SYS_DICTIONARY"] == null) { client.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); } else { InitSysType();//如果字典加载了,则过滤了再帮定 } FormToolBar1.ShowRect(); LoadData(); }
//按钮呈现和触发事件 void SysUseractLog_Loaded(object sender, RoutedEventArgs e) { //FormToolBar1.btnNew.Click+=new RoutedEventHandler(btnNew_Click); FormToolBar1.btnNew.Click += new RoutedEventHandler(btnNew_Click); FormToolBar1.btnEdit.Click += new RoutedEventHandler(btnEdit_Click); FormToolBar1.btnDelete.Click += new RoutedEventHandler(btnDelete_Click); FormToolBar1.BtnView.Visibility = Visibility.Collapsed; FormToolBar1.cbxCheckState.Visibility = Visibility.Collapsed; FormToolBar1.btnAudit.Visibility = Visibility.Collapsed; FormToolBar1.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click); FormToolBar1.btnPrint.Visibility = Visibility.Collapsed; FormToolBar1.btnOutPDF.Visibility = Visibility.Collapsed; FormToolBar1.btnOutExcel.Visibility = Visibility.Collapsed; FormToolBar1.stpCheckState.Visibility = Visibility.Collapsed; FormToolBar1.stpOtherAction.Visibility = Visibility.Collapsed; FormToolBar1.ShowRect(); }
void SysRolePerm_Loaded(object sender, RoutedEventArgs e) { FormToolBar1.btnNew.Click += new RoutedEventHandler(btnNew_Click); FormToolBar1.btnEdit.Click += new RoutedEventHandler(btnEdit_Click); FormToolBar1.btnDelete.Click += new RoutedEventHandler(btnDelete_Click); //隐藏未使用按钮 //FormToolBar1.btnRead.Visibility = Visibility.Collapsed; FormToolBar1.btnPrint.Visibility = Visibility.Collapsed; FormToolBar1.btnOutPDF.Visibility = Visibility.Collapsed; FormToolBar1.btnOutExcel.Visibility = Visibility.Collapsed; //FormToolBar1.btnimport.Visibility = Visibility.Collapsed; FormToolBar1.stpCheckState.Visibility = Visibility.Collapsed; FormToolBar1.stpOtherAction.Visibility = Visibility.Collapsed; //FormToolBar1.btnSumbitAudit.Visibility = Visibility.Collapsed; FormToolBar1.btnAudit.Visibility = Visibility.Collapsed; //FormToolBar1.btnAduitNoTPass.Visibility = Visibility.Collapsed; FormToolBar1.ShowRect(); }
void InitPara() { client.GetSysDictionaryCategoryCompleted += new EventHandler <GetSysDictionaryCategoryCompletedEventArgs>(client_GetSysDictionaryCategoryCompleted); client.GetSysDictionaryByFilterPagingCompleted += new EventHandler <GetSysDictionaryByFilterPagingCompletedEventArgs>(client_GetSysDictionaryByFilterPagingCompleted); // client.GetSysDictionarySysTypeCompleted += new EventHandler<GetSysDictionarySysTypeCompletedEventArgs>(client_GetSysDictionarySysTypeCompleted); client.SysDictionaryDeleteCompleted += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(client_SysDictionaryDeleteCompleted); client.GetSysDictionaryByCategoryCompleted += new EventHandler <GetSysDictionaryByCategoryCompletedEventArgs>(client_GetSysDictionaryByCategoryCompleted); client.ImportCityCSVCompleted += new EventHandler <ImportCityCSVCompletedEventArgs>(client_ImportCityCSVCompleted); FormToolBar1.btnNew.Click += new RoutedEventHandler(btnNew_Click); FormToolBar1.btnEdit.Click += new RoutedEventHandler(btnEdit_Click); FormToolBar1.btnDelete.Click += new RoutedEventHandler(btnDelete_Click); FormToolBar1.cbxCheckState.Visibility = Visibility.Collapsed; FormToolBar1.txtCheckStateName.Visibility = Visibility.Collapsed; FormToolBar1.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click); FormToolBar1.btnAudit.Visibility = Visibility.Collapsed; FormToolBar1.retAudit.Visibility = Visibility.Collapsed; // FormToolBar1.BtnView.Visibility = Visibility.Collapsed; FormToolBar1.BtnView.Click += new RoutedEventHandler(BtnView_Click); #region 自定义导入按钮 ImageButton ChangeMeetingBtn = new ImageButton(); ChangeMeetingBtn.Image.Source = new System.Windows.Media.Imaging.BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/Tool/18_import.png", UriKind.Relative)); ChangeMeetingBtn.TextBlock.Text = Utility.GetResourceStr("批量导入城市字典");// 考勤备案 ChangeMeetingBtn.Image.Width = 16.0; ChangeMeetingBtn.Image.Height = 22.0; ChangeMeetingBtn.TextBlock.Margin = new Thickness(1, 0, 0, 0); ChangeMeetingBtn.Style = (Style)Application.Current.Resources["ButtonStyle"]; ChangeMeetingBtn.Click += new RoutedEventHandler(btnImport_Click); FormToolBar1.stpOtherAction.Children.Add(ChangeMeetingBtn); #endregion FormToolBar1.ShowRect(); }
void SysUserLoginRecordManagement_Loaded(object sender, RoutedEventArgs e) { FormToolBar1.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click); //隐藏未使用按钮 //FormToolBar1.btnRead.Visibility = Visibility.Collapsed; FormToolBar1.btnNew.Visibility = Visibility.Collapsed; FormToolBar1.btnPrint.Visibility = Visibility.Collapsed; FormToolBar1.btnOutPDF.Visibility = Visibility.Collapsed; FormToolBar1.btnOutExcel.Visibility = Visibility.Collapsed; //FormToolBar1.btnimport.Visibility = Visibility.Collapsed; FormToolBar1.stpCheckState.Visibility = Visibility.Collapsed; FormToolBar1.stpOtherAction.Visibility = Visibility.Collapsed; //FormToolBar1.btnSumbitAudit.Visibility = Visibility.Collapsed; FormToolBar1.btnAudit.Visibility = Visibility.Collapsed; FormToolBar1.BtnView.Visibility = Visibility.Collapsed; //FormToolBar1.btnAduitNoTPass.Visibility = Visibility.Collapsed; FormToolBar1.btnEdit.Visibility = Visibility.Collapsed; FormToolBar1.btnDelete.Visibility = Visibility.Collapsed; FormToolBar1.ShowRect(); }
void SysUserLoginHistoryRecordManagement_Loaded(object sender, RoutedEventArgs e) { //Utility.DisplayGridToolBarButton(FormToolBar1, "USERHISTORYLOGIN", true); FormToolBar1.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click); //隐藏未使用按钮 //FormToolBar1.btnRead.Visibility = Visibility.Collapsed; FormToolBar1.btnNew.Visibility = Visibility.Collapsed; FormToolBar1.BtnView.Visibility = Visibility.Collapsed; FormToolBar1.btnPrint.Visibility = Visibility.Collapsed; FormToolBar1.btnOutPDF.Visibility = Visibility.Collapsed; FormToolBar1.btnOutExcel.Visibility = Visibility.Collapsed; //FormToolBar1.btnimport.Visibility = Visibility.Collapsed; FormToolBar1.stpCheckState.Visibility = Visibility.Collapsed; FormToolBar1.stpOtherAction.Visibility = Visibility.Collapsed; //FormToolBar1.btnSumbitAudit.Visibility = Visibility.Collapsed; FormToolBar1.btnAudit.Visibility = Visibility.Collapsed; FormToolBar1.btnEdit.Visibility = Visibility.Collapsed; FormToolBar1.btnDelete.Visibility = Visibility.Collapsed; FormToolBar1.ShowRect(); }