Exemplo n.º 1
0
        SMTLoading loadbar = new SMTLoading();//全局定义loading控件
        #endregion

        #region 构造函数
        public AgentAgingSet()
        {
            InitializeComponent();
            PARENT.Children.Add(loadbar);//在父面板中加载loading控件
            GetEntityLogo("T_OA_AGENTDATESET");
            Utility.DisplayGridToolBarButton(FormToolBar1, "T_OA_AGENTDATESET", true);
            InitEvent();

            ImageButton btnShowDetail = new ImageButton();
            btnShowDetail.TextBlock.Text = Utility.GetResourceStr("CLOSEAGENT");//关闭代理
            btnShowDetail.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_close.png", UriKind.Relative));
            btnShowDetail.Click += new RoutedEventHandler(TravelapplicationPage_Click);
            FormToolBar1.stpOtherAction.Children.Add(btnShowDetail);

            FormToolBar1.stpOtherAction.Visibility = Visibility.Visible;//关闭代理
            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.BtnView.Click += new RoutedEventHandler(BtnView_Click);//查看
            FormToolBar1.btnPrint.Visibility = Visibility.Collapsed;//打印
            FormToolBar1.stpCheckState.Visibility = Visibility.Collapsed;//检查审核状态

            //隐藏未使用按钮
            FormToolBar1.btnNew.Visibility = Visibility.Visible;
            FormToolBar1.btnEdit.Visibility = Visibility.Collapsed;
            FormToolBar1.btnOutPDF.Visibility = Visibility.Collapsed;//导出pdf
            FormToolBar1.btnOutExcel.Visibility = Visibility.Collapsed;//导出excel
        }
Exemplo n.º 2
0
        private void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
        {
            txbSubId.Text = subjectViewInfo.SubjectInfo.SUBJECTID.ToString() + ".";
            txbSubContent.Text = subjectViewInfo.SubjectInfo.CONTENT;
            System.Linq.IOrderedEnumerable<T_OA_REQUIREDETAIL> oanswerList = subjectViewInfo.AnswerList.OrderBy(ee => ee.CODE);
            foreach (T_OA_REQUIREDETAIL anserInfo in oanswerList)
            {
                if (anserInfo.CONTENT != "无")
                {
                    SurveyAnswer sa = new SurveyAnswer(anserInfo);
                    sa.IsShowResult = isShowResult;
                    if (isShowResult != 0 && isShowResult != 3)
                        txtComments.Visibility = Visibility.Collapsed;
                    if (resultDetail != null)
                        if (resultDetail.RESULT == anserInfo.CODE)
                        {
                            sa.IsSelected = true;
                            if (resultDetail.CONTENT != null)
                                txtComments.Text = resultDetail.CONTENT;
                        }
                    spAnswerList.Children.Add(sa);
                }

            }
            ImageButton btn = new ImageButton();
            btn.Margin = new Thickness(0);
            btn.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_4406in.png", Utility.GetResourceStr("OTHERSUGGEST"));
            btn.Click += new RoutedEventHandler(chk_Other);
            spAnswerList.Children.Add(btn);
        }
Exemplo n.º 3
0
        private void InitParas()
        {
            PARENT.Children.Add(loadbar);
            client.GetSalaryLevelPagingCompleted += new EventHandler<GetSalaryLevelPagingCompletedEventArgs>(client_GetSalaryLevelPagingCompleted);
            permissionClient.GetSysDictionaryByCategoryCompleted += new EventHandler<SMT.Saas.Tools.PermissionWS.GetSysDictionaryByCategoryCompletedEventArgs>(permissionClient_GetSysDictionaryByCategoryCompleted);
            
            client.GenerateSalaryLevelCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_GenerateSalaryLevelCompleted);
            //获取字典中的岗位级别
            permissionClient.GetSysDictionaryByCategoryAsync("SALARYLEVEL");            

            ToolBar.btnDelete.Visibility = Visibility.Collapsed;
          //  ToolBar.btnNew.Visibility = Visibility.Collapsed;
            

            ToolBar.btnEdit.Click += new RoutedEventHandler(btnEdit_Click);
            ToolBar.btnNew.Click += new RoutedEventHandler(btnNew_Click);
            ToolBar.btnAudit.Visibility = Visibility.Collapsed;
            ToolBar.cbxCheckState.Visibility = Visibility.Collapsed;
            ToolBar.txtCheckStateName.Visibility = Visibility.Collapsed;
            ToolBar.retAudit.Visibility = Visibility.Collapsed;
            ToolBar.retDelete.Visibility = Visibility.Collapsed;
            ToolBar.BtnView.Visibility = Visibility.Collapsed;
            ToolBar.retRefresh.Visibility = Visibility.Collapsed;


            ImageButton btnPreView = new ImageButton();
            btnPreView.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/18_workPlace.png", Utility.GetResourceStr("PREVIEW")).Click += new RoutedEventHandler(btnPreView_Click);
            ToolBar.stpOtherAction.Children.Add(btnPreView);

            ImageButton btnCreate = new ImageButton();
            btnCreate.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/area/18_import.png", Utility.GetResourceStr("CREATE")).Click += new RoutedEventHandler(btnCreate_Click);
            ToolBar.stpOtherAction.Children.Add(btnCreate);
        }
Exemplo n.º 4
0
        private void InitParas()
        {
            PARENT.Children.Add(loadbar);
            client.GetSalarySystemWithPagingCompleted += new EventHandler<GetSalarySystemWithPagingCompletedEventArgs>(client_GetSalarySystemWithPagingCompleted);
            client.GetPostLevelDistinctionBySystemIDCompleted += new EventHandler<GetPostLevelDistinctionBySystemIDCompletedEventArgs>(client_GetPostLevelDistinctionBySystemIDCompleted);
            client.PostLevelDistinctionUpdateCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_PostLevelDistinctionUpdateCompleted);
            client.GenerateSalaryLevelCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_GenerateSalaryLevelCompleted);
            client.SalarySystemDeleteCompleted += new EventHandler<SalarySystemDeleteCompletedEventArgs>(client_SalarySystemDeleteCompleted);
            permissionClient.GetSysDictionaryByCategoryCompleted += new EventHandler<GetSysDictionaryByCategoryCompletedEventArgs>(permissionClient_GetSysDictionaryByCategoryCompleted);
            ToolBar.btnNew.Click += new RoutedEventHandler(btnNew_Click);
            ToolBar.btnEdit.Click += new RoutedEventHandler(btnEdit_Click);
            ToolBar.btnDelete.Click += new RoutedEventHandler(btnDelete_Click);
            ToolBar.btnAudit.Click += new RoutedEventHandler(btnAudit_Click);
            ToolBar.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);
            //ToolBar.btnAduitNoTPass.Click += new RoutedEventHandler(btnAuitNoTPass_click);
            //ToolBar.btnSumbitAudit.Click += new RoutedEventHandler(btnSumbitAudit_click);
            //ToolBar.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);
            ImageButton btnPreView = new ImageButton();
            btnPreView.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/18_workPlace.png", Utility.GetResourceStr("PREVIEW")).Click += new RoutedEventHandler(btnPreView_Click);
            ToolBar.stpOtherAction.Children.Add(btnPreView);
            ToolBar.btnReSubmit.Click += new RoutedEventHandler(btnReSubmit_Click);

            ImageButton btnCreatSalarySystem = new ImageButton();
            btnCreatSalarySystem.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/area/18_import.png", Utility.GetResourceStr("CREATSALARYSYSTEM")).Click += new RoutedEventHandler(btnCreatSalarySystem_Click);
            ToolBar.stpOtherAction.Children.Add(btnCreatSalarySystem);

            // ToolBar.BtnView.Click += new RoutedEventHandler(BtnView_Click);
            ToolBar.BtnView.Visibility = Visibility.Collapsed;
            ToolBar.retRefresh.Visibility = Visibility.Collapsed;
            //this.Loaded += new RoutedEventHandler(AuditState_Loaded);
            ToolBar.cbxCheckState.SelectionChanged += new SelectionChangedEventHandler(cbxCheckState_SelectionChanged);
            // permissionClient.GetSysDictionaryByCategoryAsync("POSTLEVEL");
        }
Exemplo n.º 5
0
        private void InitEvent()
        {
            PARENT.Children.Add(loadbar);

            client = new PersonnelServiceClient();
            //  client.LeftOfficePagingCompleted += new EventHandler<LeftOfficePagingCompletedEventArgs>(client_LeftOfficePagingCompleted);
            client.LeftOfficeConfirmDeleteCompleted += new EventHandler<LeftOfficeConfirmDeleteCompletedEventArgs>(client_LeftOfficeConfirmDeleteCompleted);
            client.LeftOfficeConfirmPagingCompleted += new EventHandler<LeftOfficeConfirmPagingCompletedEventArgs>(client_LeftOfficeConfirmPagingCompleted);

            this.Loaded += new RoutedEventHandler(LeftOfficeConfirm_Loaded);

            ToolBar.btnNew.Click += new RoutedEventHandler(btnNew_Click);
            ToolBar.btnEdit.Click += new RoutedEventHandler(btnEdit_Click);
            //ToolBar.btnNew.Visibility = Visibility.Collapsed;
            //ToolBar.retNew.Visibility = Visibility.Collapsed;
            ToolBar.btnDelete.Click += new RoutedEventHandler(btnDelete_Click);
            ToolBar.btnDelete.Visibility = Visibility.Collapsed;
            ToolBar.btnReSubmit.Click += new RoutedEventHandler(btnReSubmit_Click);
            ToolBar.btnAudit.Click += new RoutedEventHandler(btnAudit_Click);
            ToolBar.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);
            ToolBar.BtnView.Click += new RoutedEventHandler(BtnView_Click);
            ToolBar.cbxCheckState.SelectionChanged += new SelectionChangedEventHandler(cbxCheckState_SelectionChanged);
            ImageButton _ImgButtonViewBasicInfo = new ImageButton();
            _ImgButtonViewBasicInfo.VerticalAlignment = VerticalAlignment.Center;
            _ImgButtonViewBasicInfo.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("员工离职报表")).Click += new RoutedEventHandler(_ImgButtonViewBasicInfo_Click);
            ToolBar.stpOtherAction.Children.Add(_ImgButtonViewBasicInfo);
        }
Exemplo n.º 6
0
        public Satisfactioning()
        {
            InitializeComponent();
            EventRegister();
            Utility.DisplayGridToolBarButton(ToolBar, "Satisfactioning", true);


            ImageButton btnShowDetail = new ImageButton();
            btnShowDetail.TextBlock.Text = "参与调查";
            btnShowDetail.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_2_d.png", UriKind.Relative));
            btnShowDetail.Click += new RoutedEventHandler(btnSurveyDetail_Click);
            ToolBar.stpOtherAction.Children.Add(btnShowDetail);


            //  ToolBar.btnDelete.Click += new RoutedEventHandler(btnDelete_Click);
            Utility.CbxItemBinder(ToolBar.cbxCheckState, "CHECKSTATE", "4");
            //ToolBar.cbxCheckState.SelectionChanged += new SelectionChangedEventHandler(cbxCheckState_SelectionChanged);            
            PARENT.Children.Add(loadbar);
            

            //新增
            ToolBar.txtCheckStateName.Visibility = Visibility.Collapsed;
            ToolBar.btnNew.Visibility = Visibility.Collapsed;
            ToolBar.btnEdit.Visibility = Visibility.Collapsed;
            ToolBar.btnDelete.Visibility = Visibility.Collapsed;
            ToolBar.btnAudit.Visibility = Visibility.Collapsed;
            ToolBar.cbxCheckState.Visibility = Visibility.Collapsed;
            ToolBar.BtnView.Visibility = Visibility.Collapsed;
            GetData(dataPager.PageIndex, stateFlg);
            
        }
Exemplo n.º 7
0
        private void InitParas()
        {
            PARENT.Children.Add(loadbar);
            loadbar.Stop();
            client.EmployeeAddSumDeleteCompleted += new EventHandler<EmployeeAddSumDeleteCompletedEventArgs>(client_EmployeeAddSumDeleteCompleted);
            client.GetEmployeeAddSumWithPagingCompleted += new EventHandler<GetEmployeeAddSumWithPagingCompletedEventArgs>(client_GetEmployeeAddSumWithPagingCompleted);
            ToolBar.btnNew.Click += new RoutedEventHandler(btnNew_Click);
            ToolBar.btnEdit.Click += new RoutedEventHandler(btnEdit_Click);
            ToolBar.btnDelete.Click += new RoutedEventHandler(btnDelete_Click);
            ToolBar.btnAudit.Click += new RoutedEventHandler(btnAudit_Click);
            ToolBar.btnOtherAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("MASSAUDIT")).Click += new RoutedEventHandler(MassAudit_Click);

            ImageButton _ImgButtonBankPaySalary = new ImageButton();
            _ImgButtonBankPaySalary.VerticalAlignment = VerticalAlignment.Center;
            _ImgButtonBankPaySalary.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("test")).Click += new RoutedEventHandler(_ImgButtonBankPaySalary_Click);
            //ToolBar.stpOtherAction.Children.Add(_ImgButtonBankPaySalary);

            //ToolBar.btnAduitNoTPass.Click += new RoutedEventHandler(btnAuitNoTPass_click);
            //ToolBar.btnSumbitAudit.Click += new RoutedEventHandler(btnSumbitAudit_click);
            ToolBar.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);
            ToolBar.BtnView.Click += new RoutedEventHandler(BtnView_Click);
            //this.Loaded += new RoutedEventHandler(AuditState_Loaded);
            this.Loaded += new RoutedEventHandler(Left_Loaded);
            ToolBar.cbxCheckState.SelectionChanged += new SelectionChangedEventHandler(cbxCheckState_SelectionChanged);
            ToolBar.btnReSubmit.Click += new RoutedEventHandler(btnReSubmit_Click);
            //航信版本发布时需要打开
            ToolBar.btnImport.Visibility = Visibility.Visible;
            ToolBar.btnImport.Click += new RoutedEventHandler(btnImport_Click);

            treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);
            //orgClient = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();
            //orgClient.GetCompanyActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetCompanyActivedCompletedEventArgs>(orgClient_GetCompanyActivedCompleted);
            //orgClient.GetDepartmentActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs>(orgClient_GetDepartmentActivedCompleted);
            //orgClient.GetPostActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs>(orgClient_GetPostActivedCompleted);
        }
Exemplo n.º 8
0
        private void InitEvent()
        {
            PARENT.Children.Add(loadbar);


            client = new OrganizationServiceClient();
            client.DepartmentPagingCompleted += new EventHandler<DepartmentPagingCompletedEventArgs>(client_DepartmentPagingCompleted);
            client.DepartmentDeleteCompleted += new EventHandler<DepartmentDeleteCompletedEventArgs>(client_DepartmentDeleteCompleted);
            client.GetCompanyActivedCompleted += new EventHandler<GetCompanyActivedCompletedEventArgs>(client_GetCompanyActivedCompleted);
            client.DepartmentCancelCompleted += new EventHandler<DepartmentCancelCompletedEventArgs>(client_DepartmentCancelCompleted);
            this.Loaded += new RoutedEventHandler(Department_Loaded);
            this.DtGrid.SelectionChanged += new SelectionChangedEventHandler(DtGrid_SelectionChanged);

            ToolBar.btnNew.Click += new RoutedEventHandler(btnNew_Click);
            ToolBar.btnEdit.Click += new RoutedEventHandler(btnEdit_Click);
            ToolBar.btnDelete.Click += new RoutedEventHandler(btnDelete_Click);
            ToolBar.btnAudit.Click += new RoutedEventHandler(btnAudit_Click);
            ToolBar.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);
            ToolBar.cbxCheckState.SelectionChanged += new SelectionChangedEventHandler(cbxCheckState_SelectionChanged);
            ToolBar.BtnView.Click += new RoutedEventHandler(BtnView_Click);
            ToolBar.btnReSubmit.Click += new RoutedEventHandler(btnReSubmit_Click);
            //航信发布需要打卡
            ToolBar.btnImport.Visibility = Visibility.Visible;
            ToolBar.btnImport.Click += new RoutedEventHandler(btnImport_Click);

            ImageButton btnCancel = new ImageButton();
            btnCancel.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/area/18_import.png", Utility.GetResourceStr("CANCEL")).Click += new RoutedEventHandler(btnCancel_Click);
            ToolBar.stpOtherAction.Children.Add(btnCancel);
           
        }
Exemplo n.º 9
0
        /// <summary>
        /// 注册事件
        /// </summary>
        private void RegisterEvents()
        {
            PARENT.Children.Add(loadbar);
            loadbar.Stop();
            DateTime dtNow = DateTime.Now;
            int iMaxDay = DateTime.DaysInMonth(dtNow.Year, dtNow.Month);

            if (string.IsNullOrEmpty(txtBalanceYear.Text))
            {
                txtBalanceYear.Text = dtNow.Year.ToString();
                nudBalanceMonth.Value = dtNow.AddMonths(-1).Month;
            }

            toolbar1.btnImport.Visibility = Visibility.Visible;


            toolbar1.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);
            toolbar1.btnNew.Click += new RoutedEventHandler(btnNew_Click);
            toolbar1.btnDelete.Click += new RoutedEventHandler(btnDelete_Click);
            toolbar1.btnOtherAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1022.png", Utility.GetResourceStr("BALANCECALCULATE")).Click += new RoutedEventHandler(btnNew_Click);
            toolbar1.btnAudit.Click += new RoutedEventHandler(btnAudit_Click);
            toolbar1.btnImport.Click += new RoutedEventHandler(btnImport_Click);

            toolbar1.btnReSubmit.Visibility = Visibility;
            toolbar1.btnReSubmit.Click += new RoutedEventHandler(btnReSubmit_Click);
            //toolbar1.btnOtherAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1022.png", Utility.GetResourceStr("导出报表")).Click += new RoutedEventHandler(btnExportReports_Click);

            ImageButton ChangeMeetingBtn = new ImageButton();
            ChangeMeetingBtn.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/Tool/18_service.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(btnExportReports_Click);
            toolbar1.stpOtherAction.Children.Add(ChangeMeetingBtn);


            toolbar1.cbxCheckState.SelectionChanged += new SelectionChangedEventHandler(cbxCheckState_SelectionChanged);
            //orgClient.GetCompanyActivedCompleted += new EventHandler<GetCompanyActivedCompletedEventArgs>(orgClient_GetCompanyActivedCompleted);
            //orgClient.GetDepartmentActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs>(orgClient_GetDepartmentActivedCompleted);
            //orgClient.GetPostActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs>(orgClient_GetPostActivedCompleted);
            clientAtt.GetAttendMonthlyBalanceListByMultSearchCompleted += new EventHandler<GetAttendMonthlyBalanceListByMultSearchCompletedEventArgs>(clientAtt_GetAttendMonthlyBalanceListByMultSearchCompleted);
            //clientAtt.CalculateEmployeeAttendanceMonthlyByEmployeeIDCompleted +=clientAtt_CalculateEmployeeAttendanceMonthlyByEmployeeIDCompleted;
            clientAtt.RemoveAttendMonthlyBalanceCompleted += new EventHandler<RemoveAttendMonthlyBalanceCompletedEventArgs>(clientAtt_RemoveAttendMonthlyBalanceCompleted);
            clientAtt.ExportAttendMonthlyBalanceRdListReportsCompleted += new EventHandler<ExportAttendMonthlyBalanceRdListReportsCompletedEventArgs>(clientAtt_ExportAttendMonthlyBalanceRdListReportsCompleted);
            treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);
            //this.Loaded += new RoutedEventHandler(AttendMonthlyBalance_Loaded);
        }
Exemplo n.º 10
0
        public void NewCancelOrdermealButton()
        {
            ToolBar.stpOtherAction.Children.Clear();
            ImageButton _imgbutton = new ImageButton();
            _imgbutton.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/Tool/16_convertactivity.png", UriKind.Relative));
            _imgbutton.TextBlock.Text = Utility.GetResourceStr("CANCELORDERMEAL");//取消订餐
            _imgbutton.Image.Width = 16.0;
            _imgbutton.Image.Height = 22.0;
            _imgbutton.TextBlock.Margin = new Thickness(1, 0, 0, 0);
            _imgbutton.Style = (Style)Application.Current.Resources["ButtonStyle"];
            _imgbutton.Click += new RoutedEventHandler(_imgbutton_Click);
            ToolBar.stpOtherAction.Children.Add(_imgbutton);

            
        }
Exemplo n.º 11
0
        public void InitToolBarItem(List<ToolbarItem> list)
        {
            //初始化菜单按钮
            ButtonContainer.Children.Clear();

            List<ToolbarItem> bars = list;
            foreach (var bar in bars)
            {
                ImageButton btn = new ImageButton();
                btn.TextBlock.Text = bar.Title;
                btn.Name = bar.Key;
                btn.Tag = bar.Key;
                btn.Image.Source = new BitmapImage(new Uri(bar.ImageUrl, UriKind.Relative));
                btn.Click += new RoutedEventHandler(btn_Click);
                ButtonContainer.Children.Add(btn); 
            }
        }
Exemplo n.º 12
0
        private void InitParas()
        {
            PARENT.Children.Add(loadbar);
            client.SalarySolutionDeleteCompleted += new EventHandler<SalarySolutionDeleteCompletedEventArgs>(client_SalarySolutionDeleteCompleted);
            client.GetSalarySolutionPagingCompleted += new EventHandler<GetSalarySolutionPagingCompletedEventArgs>(client_GetSalarySolutionPagingCompleted);
            client.CreateSalaryStandBatchCompleted += new EventHandler<CreateSalaryStandBatchCompletedEventArgs>(client_CreateSalaryStandBatchCompleted);
            ToolBar.btnNew.Click += new RoutedEventHandler(btnNew_Click);
            ToolBar.btnEdit.Click += new RoutedEventHandler(btnEdit_Click);
            ToolBar.btnDelete.Click += new RoutedEventHandler(btnDelete_Click);
            ToolBar.btnAudit.Click += new RoutedEventHandler(btnAudit_Click);
            ToolBar.BtnView.Click += new RoutedEventHandler(BtnView_Click);
            ToolBar.cbxCheckState.SelectionChanged += new SelectionChangedEventHandler(cbxCheckState_SelectionChanged);
            this.Loaded += new RoutedEventHandler(AuditState_Loaded);
            ImageButton btnCreate = new ImageButton();
            btnCreate.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/area/18_import.png", Utility.GetResourceStr("BATCHCREATESTAND")).Click += new RoutedEventHandler(btnCreate_Click);
            ToolBar.stpOtherAction.Children.Add(btnCreate);
            ToolBar.btnReSubmit.Click += new RoutedEventHandler(btnReSubmit_Click);

        }
Exemplo n.º 13
0
        public SatisfactionDistribute()
        {
            InitializeComponent();
            EventRegister();
            this.dpStart.SelectedDate = DateTime.Today.AddDays(-15);
            this.dpEnd.SelectedDate = DateTime.Today.AddDays(15);
            ImageButton btnShowResult = new ImageButton();
            btnShowResult.TextBlock.Text = "显示结果";
            btnShowResult.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_18_5.png", UriKind.Relative));
            btnShowResult.Click += new RoutedEventHandler(btnShowResult_Click);
            ToolBar.stpOtherAction.Children.Add(btnShowResult);

            ImageButton btn = new ImageButton();
            btn.TextBlock.Text = "查看详情";
            btn.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1071_d.png", UriKind.Relative));
            btn.Click += new RoutedEventHandler(btnShowDetail_Click);
            ToolBar.stpOtherAction.Children.Add(btn);

        }
Exemplo n.º 14
0
        private void InitEvent()
        {
            try
            {
                PARENT.Children.Add(loadbar);

                client = new PersonnelServiceClient();
                clientSalary = new SalaryServiceClient();
                client.PensionDetailPagingCompleted += new EventHandler<PensionDetailPagingCompletedEventArgs>(client_PensionDetailPagingCompleted);
                client.PensionDetailDeleteCompleted += new EventHandler<PensionDetailDeleteCompletedEventArgs>(client_PensionDetailDeleteCompleted);
                client.ExportPensionDetailReportCompleted += new EventHandler<ExportPensionDetailReportCompletedEventArgs>(client_ExportPensionDetailReportCompleted);
                clientSalary.CheckSalaryAuditStateCompleted += new EventHandler<CheckSalaryAuditStateCompletedEventArgs>(clientSalary_CheckSalaryAuditStateCompleted);

                ToolBar.btnImport.Visibility = Visibility.Visible;
                ToolBar.btnOutExcel.Visibility = Visibility.Collapsed;

                ToolBar.btnOutExcel.Click += new RoutedEventHandler(btnOutExcel_Click);
                ToolBar.btnImport.Click += new RoutedEventHandler(btnImport_Click);
                //ToolBar.btnRead.Click += new RoutedEventHandler(btnRead_Click);
                ToolBar.btnDelete.Click += new RoutedEventHandler(btnDelete_Click);
                //ToolBar.btnEdit.Click += new RoutedEventHandler(btnEdit_Click);
                ToolBar.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);

                ImageButton ChangeMeetingBtn = new ImageButton();
                ChangeMeetingBtn.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/Tool/18_service.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(btnExportReports_Click);
                ToolBar.stpOtherAction.Children.Add(ChangeMeetingBtn);
            }
            catch (Exception ex)
            {
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
        }
Exemplo n.º 15
0
        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();
        }
Exemplo n.º 16
0
        private void InitToolBarEvent()
        {
            
            this.ToolBar.btnNew.Click += new RoutedEventHandler(btnAdd_Click);
            
            this.ToolBar.btnEdit.Click += new RoutedEventHandler(BtnAlter_Click);
            this.ToolBar.btnDelete.Click += new RoutedEventHandler(btnDel_Click);
            //this.ToolBar.btnDelete.Visibility = Visibility.Collapsed;
            this.ToolBar.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);
            this.ToolBar.BtnView.Click += new RoutedEventHandler(BtnView_Click);
            this.ToolBar.retNew.Visibility = Visibility.Collapsed;
            //this.ToolBar.btnEdit.Visibility = Visibility.Collapsed;
            this.ToolBar.cbxCheckState.Visibility = Visibility.Collapsed;
            this.ToolBar.txtCheckStateName.Visibility = Visibility.Collapsed;
            
            this.ToolBar.btnAudit.Visibility = Visibility.Collapsed;
            this.ToolBar.retAudit.Visibility = Visibility.Collapsed;
            this.ToolBar.BtnView.Visibility = Visibility.Collapsed;
            DtGrid.CurrentCellChanged += new EventHandler<EventArgs>(DtGrid_CurrentCellChanged);

            ToolBar.stpOtherAction.Children.Clear();
            
            ImageButton ChangeMeetingBtn = new ImageButton();                
            ChangeMeetingBtn.TextBlock.Text = "预算管理员可以为子公司设置管理员,还可以进行跨级设置,请根据实际情况进行操作";             
            SolidColorBrush brush = new SolidColorBrush();                    
            brush.Color = Colors.Red;
            
            ChangeMeetingBtn.Style = (Style)Application.Current.Resources["ButtonStyle"];
            ChangeMeetingBtn.TextBlock.Foreground = brush;
            ToolBar.stpOtherAction.Children.Add(ChangeMeetingBtn);
            
            
            
        }
Exemplo n.º 17
0
        /// <summary>
        /// 构造页面触发事件
        /// </summary>
        public void InitPara()
        {
            try
            {
                // 1s 冉龙军
                PARENT.Children.Add(loadbar);
                loadbar.Stop();
                // 1e
                client = new PersonnelServiceClient();

                kpiClient = new PerformanceServiceClient();
                kpiClient.GetKPIRecordPagingCompleted += new EventHandler<GetKPIRecordPagingCompletedEventArgs>(client_GetKPIRecordPagingCompleted);

                //orgClient = new OrganizationServiceClient();
                //orgClient.GetCompanyActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetCompanyActivedCompletedEventArgs>(orgClient_GetCompanyActivedCompleted);
                //orgClient.GetDepartmentActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs>(orgClient_GetDepartmentActivedCompleted);
                //orgClient.GetPostActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs>(orgClient_GetPostActivedCompleted);

                DtGrid.CurrentCellChanged += new EventHandler<EventArgs>(DtGrid_CurrentCellChanged);
                this.Loaded += new RoutedEventHandler(Employee_Loaded);
                this.Loaded += new RoutedEventHandler(AuditState_Loaded);
                treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);

                //this.ToolBar.btnNew.Click += new RoutedEventHandler(btnAdd_Click);
                this.ToolBar.btnNew.Visibility = Visibility.Collapsed;
                this.ToolBar.btnEdit.Visibility = Visibility.Collapsed;
                this.ToolBar.btnDelete.Visibility = Visibility.Collapsed;
                this.ToolBar.btnRefresh.Visibility = Visibility.Collapsed;
                this.ToolBar.BtnView.Visibility = Visibility.Collapsed;
                // 1s 冉龙军              
                this.ToolBar.btnAudit.Visibility = Visibility.Collapsed;

                this.ToolBar.cbxCheckState.Visibility = Visibility.Collapsed;
                this.ToolBar.cbxCheckState.SelectionChanged += new SelectionChangedEventHandler(cbxCheckState_SelectionChanged);
                this.ToolBar.retNew.Visibility = Visibility.Collapsed;
                this.ToolBar.retEdit.Visibility = Visibility.Collapsed;
                this.ToolBar.retDelete.Visibility = Visibility.Collapsed;
                this.ToolBar.retRefresh.Visibility = Visibility.Collapsed;
                this.ToolBar.retAudit.Visibility = Visibility.Collapsed;
                this.ToolBar.retAuditNoPass.Visibility = Visibility.Collapsed;
                this.ToolBar.txtCheckStateName.Visibility = Visibility.Collapsed;

                // 1e
                ImageButton btnComplain = new ImageButton();
                btnComplain.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_4405_d.png",
                    Utility.GetResourceStr("COMPLAIN")).Click += new RoutedEventHandler(btnComplain_Click);

                ImageButton btnEditComplain = new ImageButton();
                btnEditComplain.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/18_service.png",
                    Utility.GetResourceStr("EDIT")).Click += new RoutedEventHandler(btnEditComplain_Click);

                ImageButton btnViewComplain = new ImageButton();
                btnViewComplain.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/18_service.png",
                    Utility.GetResourceStr("VIEWCOMPLAIN")).Click += new RoutedEventHandler(btnViewComplain_Click);

                ImageButton btnViewReview = new ImageButton();
                btnViewReview.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1036.png",
                     Utility.GetResourceStr("VIEWREVIEW")).Click += new RoutedEventHandler(btnReview_Click);

                this.ToolBar.stpOtherAction.Children.Add(btnComplain);
                // 1s 冉龙军


                //this.ToolBar.stpOtherAction.Children.Add(btnEditComplain);  //修改


                this.ToolBar.stpOtherAction.Children.Add(ToolBar.AddPartition());
                // 1e
                // this.ToolBar.stpOtherAction.Children.Add(btnViewComplain);
                // 1s 冉龙军
                this.ToolBar.stpOtherAction.Children.Add(ToolBar.AddPartition());
                // 1e
                // this.ToolBar.stpOtherAction.Children.Add(btnViewReview);

            }
            catch (Exception ex)
            {
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
        }
Exemplo n.º 18
0
        public void NewButton()
        {
            
            ToolBar.stpOtherAction.Children.Clear();
            ImageButton ChangeMeetingBtn = new ImageButton();
            ChangeMeetingBtn.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/Tool/16_convertactivity.png", UriKind.Relative));
            ChangeMeetingBtn.TextBlock.Text = "变更时间";
            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(ChangeMeetingBtn_Click);
            ToolBar.stpOtherAction.Children.Add(ChangeMeetingBtn);

            ImageButton MeetingCancelBtn = new ImageButton();
            MeetingCancelBtn.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/Tool/16_convertactivity.png", UriKind.Relative));
            MeetingCancelBtn.TextBlock.Text = "取消会议";
            MeetingCancelBtn.Image.Width = 16.0;
            MeetingCancelBtn.Image.Height = 22.0;
            MeetingCancelBtn.TextBlock.Margin = new Thickness(1, 0, 0, 0);
            MeetingCancelBtn.Style = (Style)Application.Current.Resources["ButtonStyle"];
            MeetingCancelBtn.Click += new RoutedEventHandler(MeetingCancelBtn_Click);


            ToolBar.stpOtherAction.Children.Add(MeetingCancelBtn);
        }
Exemplo n.º 19
0
        public void InitPara()
        {
            PARENT.Children.Add(loadbar);
            loadbar.Stop();
            try
            {
                client = new SalaryServiceClient();
                client.GetSalaryItemSetPagingCompleted += new EventHandler<GetSalaryItemSetPagingCompletedEventArgs>(client_GetSalaryItemSetPagingCompleted);
                client.SalaryItemSetDeleteCompleted += new EventHandler<SalaryItemSetDeleteCompletedEventArgs>(client_SalaryItemSetDeleteCompleted);

                client.ExecuteSalaryItemSqlCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_ExecuteSalaryItemSqlCompleted);
                this.Loaded += new RoutedEventHandler(Left_Loaded);

                // orgClient = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();
                //orgClient.GetCompanyActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetCompanyActivedCompletedEventArgs>(orgClient_GetCompanyActivedCompleted);
                //orgClient.GetDepartmentActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs>(orgClient_GetDepartmentActivedCompleted);
            }
            catch (Exception ex)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                loadbar.Stop();
            }

            ToolBar.btnNew.Click += new RoutedEventHandler(btnNew_Click);
            ToolBar.btnEdit.Click += new RoutedEventHandler(btnEdit_Click);
            ToolBar.btnDelete.Click += new RoutedEventHandler(btnDelete_Click);
            ToolBar.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);
            ToolBar.BtnView.Click += new RoutedEventHandler(BtnView_Click);

            //xiedx
            //自定义的一个按钮
            ImageButton _ImgButtonExecuteSalaryItemSql = new ImageButton();
            _ImgButtonExecuteSalaryItemSql.VerticalAlignment = VerticalAlignment.Center;
            _ImgButtonExecuteSalaryItemSql.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png",
                Utility.GetResourceStr("初始化薪资")).Click += new RoutedEventHandler(_ImgButtonExecuteSalaryItemSql_Click);
            ToolBar.stpOtherAction.Children.Add(_ImgButtonExecuteSalaryItemSql);

            ToolBar.btnAudit.Visibility = Visibility.Collapsed;
            ToolBar.retAudit.Visibility = Visibility.Collapsed;
            ToolBar.stpCheckState.Visibility = Visibility.Collapsed;
            treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);

            ImageButton _ImgButtonRecoverySalaryItem = new ImageButton();
            _ImgButtonRecoverySalaryItem.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("RECOVERYSALARY")).Click += new RoutedEventHandler(_ImgButtonRecoverySalaryItem_Click);
            _ImgButtonRecoverySalaryItem.Visibility = Visibility.Collapsed;
            ToolBar.stpOtherAction.Children.Add(_ImgButtonRecoverySalaryItem);
        }
Exemplo n.º 20
0
        protected override void OnLoadControlComplete()
        {
            base.OnLoadControlComplete();
            DetailGrid grid = this.EditForm.FindControl("OrderGrid") as DetailGrid;
            if (grid != null)
            {
                grid.P1.Visibility = System.Windows.Visibility.Visible;
                List<ToolbarItem> list = new List<ToolbarItem>();
                ToolbarItem item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "S1",
                    Title = "按科目查看",
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png",


                };
                list.Add(item);
                item = new ToolbarItem
                {
                    DisplayType = ToolbarItemDisplayTypes.Image,
                    Key = "S2",
                    Title = "按公司部门单据查看",
                    ImageUrl = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_addView.png"
                };
                list.Add(item);

                grid.AddToolBarItems(list);
            }
            var dGrid = grid;
            dGrid.ADGrid.LoadingRow += (object sender, DataGridRowEventArgs e) =>
            {
                if ((this.EditForm.OperationType == OperationTypes.Add
                    || this.EditForm.OperationType == OperationTypes.Edit
                    || this.EditForm.OperationType == OperationTypes.ReSubmit) && SumType == 1)
                {
                    var con = dGrid.ADGrid.Columns[7].GetCellContent(e.Row) as StackPanel;
                    Action a2 = () =>
                    {
                        Label label = new Label();
                        label.Content = "已打回";
                        con.Children.Clear();
                        con.Children.Add(label);
                    };

                    Action a1 = () =>
                    {
                        ImageButton myButton = new ImageButton();
                        myButton.Margin = new Thickness(0);
                        myButton.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png", "打回");
                        myButton.Tag = e.Row.DataContext;
                        myButton.Click += (oo, ee) =>
                        {
                            Control c = oo as Control;
                            var entity = c.Tag as FBEntity;
                            Action action = () =>
                            {

                                // dGrid.Delete(new List<FBEntity> { entity });
                                var saveEntity = entity.Entity.ToFBEntity();
                                saveEntity.SetObjValue("Entity.CHECKSTATES", 4);
                                saveEntity.FBEntityState = FBEntityState.Modified;
                                FBEntityService fbs = new FBEntityService();
                                fbs.SetVisitUser(saveEntity);
                                fbs.FBService.SaveCompleted += (ooo, eee) =>
                                {
                                    this.CloseProcess();
                                    if (eee.Error != null)
                                    {
                                        CommonFunction.ShowErrorMessage("操作失败, " + eee.Error.Message);

                                    }
                                    else if (eee.Result.Exception != null)
                                    {
                                        CommonFunction.ShowErrorMessage(eee.Result.Exception);
                                    }
                                    else
                                    {
                                        a2();
                                    }
                                };
                                this.ShowProcess();

                                CurrentUserPost user = new CurrentUserPost();
                                user.EmployeeName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeName;
                                user.EmployeeID = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID;
                                user.PostName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].PostName;
                                user.DepartmentName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].DepartmentName;
                                user.CompanyName = SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.UserPosts[0].CompanyName;
                              
                                fbs.FBService.SaveAsync(saveEntity,user);
                                // none;
                            };
                            var personName = entity.GetObjValue("Entity.T_FB_DEPTBUDGETAPPLYMASTER.OWNERDEPARTMENTNAME");

                            var msg = "你确定要打回 [" + personName + "] 的部门月度预算吗?";
                            CommonFunction.AskDelete(msg, action);
                        };
                        con.Children.Clear();
                        con.Children.Add(myButton);
                    };

                    var cs = e.Row.DataContext.GetObjValue("Entity.CHECKSTATES") as decimal?;
                    if (cs.Equal(4))
                    {
                        a2();
                    }
                    else
                    {
                        a1();
                    }
                }
            };     


            grid.deatilGridBar.ItemClicked += new EventHandler<ToolBar.ToolBarItemClickArgs>(deatilGridBar_ItemClicked);
            deatilGridBar_ItemClicked(grid, new ToolBar.ToolBarItemClickArgs("S1"));
        }
Exemplo n.º 21
0
        public void NewButton()
        {

            ToolBar.stpOtherAction.Children.Clear();
            ImageButton ChangeMeetingBtn = new ImageButton();
            ChangeMeetingBtn.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_4209.png", UriKind.Relative));
            ChangeMeetingBtn.TextBlock.Text = Utility.GetResourceStr("CHECKOUTHIRE");// 退房
            ChangeMeetingBtn.Image.Width = 16.0;
            ChangeMeetingBtn.Image.Height = 16;
            ChangeMeetingBtn.TextBlock.Margin = new Thickness(1, 0, 0, 0);
            ChangeMeetingBtn.Style = (Style)Application.Current.Resources["ButtonStyle"];
            ChangeMeetingBtn.Click += new RoutedEventHandler(FrmHouseInfoManagement_Click);
            ToolBar.stpOtherAction.Children.Add(ChangeMeetingBtn);

            ImageButton MeetingCancelBtn = new ImageButton();
            MeetingCancelBtn.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_4211_d.png", UriKind.Relative));
            MeetingCancelBtn.TextBlock.Text = Utility.GetResourceStr("COMEINHIREHOUSE");// 入住
            MeetingCancelBtn.Image.Width = 16.0;
            MeetingCancelBtn.Image.Height = 16;
            MeetingCancelBtn.TextBlock.Margin = new Thickness(1, 0, 0, 0);
            MeetingCancelBtn.Style = (Style)Application.Current.Resources["ButtonStyle"];
            MeetingCancelBtn.Click += new RoutedEventHandler(FrmHouseComein_Click);


            ToolBar.stpOtherAction.Children.Add(MeetingCancelBtn);



        }
Exemplo n.º 22
0
        public void NewButton()
        {

            ToolBar.stpOtherAction.Children.Clear();
            if (customerPermission != null)
            {
                ImageButton ChangeMeetingBtn = new ImageButton();
                ChangeMeetingBtn.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/Tool/18_service.png", UriKind.Relative));
                ChangeMeetingBtn.TextBlock.Text = Utility.GetResourceStr("ISSUEDOCUMENT");// 发布文档
                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(IssueBtn_Click);
                ToolBar.stpOtherAction.Children.Add(ChangeMeetingBtn);
            }
            ImageButton MeetingCancelBtn = new ImageButton();
            MeetingCancelBtn.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/Tool/18_settings.png", UriKind.Relative));
            MeetingCancelBtn.TextBlock.Text = Utility.GetResourceStr("RECORD");// 归档
            MeetingCancelBtn.Image.Width = 16.0;
            MeetingCancelBtn.Image.Height = 22.0;
            MeetingCancelBtn.TextBlock.Margin = new Thickness(1, 0, 0, 0);
            MeetingCancelBtn.Style = (Style)Application.Current.Resources["ButtonStyle"];
            MeetingCancelBtn.Click += new RoutedEventHandler(DocTORecordBtn_Click);


            ToolBar.stpOtherAction.Children.Add(MeetingCancelBtn);

            //ImageButton DetailBtn = new ImageButton();
            //DetailBtn.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/Tool/16_convertactivity.png", UriKind.Relative));
            //DetailBtn.TextBlock.Text = Utility.GetResourceStr("DETAILINFO");// "查看";
            //DetailBtn.Image.Width = 16.0;
            //DetailBtn.Image.Height = 22.0;
            //DetailBtn.TextBlock.Margin = new Thickness(1, 0, 0, 0);
            //DetailBtn.Style = (Style)Application.Current.Resources["ButtonStyle"];
            //DetailBtn.Click += new RoutedEventHandler(SendDocDetailBtn_Click);
            //ToolBar.stpOtherAction.Children.Add(DetailBtn);

        }
Exemplo n.º 23
0
        public void InitPara()
        {
            PARENT.Children.Add(loadbar);
            try
            {
                client = new SalaryServiceClient();
                engineclient = new EngineWcfGlobalFunctionClient();
                client.GetAutoEmployeeSalaryRecordPagingsCompleted += new EventHandler<GetAutoEmployeeSalaryRecordPagingsCompletedEventArgs>(client_GetAutoEmployeeSalaryRecordPagingsCompleted);
                client.GetEmployeeSalaryRecordItemByIDCompleted += new EventHandler<GetEmployeeSalaryRecordItemByIDCompletedEventArgs>(client_GetEmployeeSalaryRecordItemByIDCompleted);
                client.PaymentUpdateCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(client_PaymentUpdateCompleted);
                client.GetPaymentPagingsCompleted += new EventHandler<GetPaymentPagingsCompletedEventArgs>(client_GetPaymentPagingsCompleted);
                client.GetPaymentPagingCompleted += new EventHandler<GetPaymentPagingCompletedEventArgs>(client_GetPaymentPagingCompleted);
                client.ExportExcelCompleted += new EventHandler<ExportExcelCompletedEventArgs>(client_ExportExcelCompleted);
                client.ImportExcelCompleted += new EventHandler<ImportExcelCompletedEventArgs>(client_ImportExcelCompleted);
                client.ReadExcelCompleted += new EventHandler<ReadExcelCompletedEventArgs>(client_ReadExcelCompleted);
                client.ExportExcelAllCompleted += new EventHandler<ExportExcelAllCompletedEventArgs>(client_ExportExcelAllCompleted);
                this.DtGrid.CanUserSortColumns = false;
                this.Loaded += new RoutedEventHandler(Left_Loaded);
                this.DtGrid.LoadingRowDetails += new EventHandler<DataGridRowDetailsEventArgs>(DtGrid_LoadingRowDetails);
                treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);
                client.GetSalaryStandardPagingCompleted += new EventHandler<GetSalaryStandardPagingCompletedEventArgs>(client_GetSalaryStandardPagingCompleted);


                //orgClient = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();
                //orgClient.GetCompanyActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetCompanyActivedCompletedEventArgs>(orgClient_GetCompanyActivedCompleted);
                //orgClient.GetDepartmentActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs>(orgClient_GetDepartmentActivedCompleted);
                //orgClient.GetPostActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs>(orgClient_GetPostActivedCompleted);

                //engineclient.MsgCloseCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(engineclient_MsgCloseCompleted);
                engineclient.CloseDoTaskCompleted += new EventHandler<System.ComponentModel.AsyncCompletedEventArgs>(engineclient_CloseDoTaskCompleted);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                //ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                loadbar.Stop();
            }
            #region 工具栏初始化
            ToolBar.txtOtherName.Visibility = Visibility.Visible;
            ToolBar.txtOtherName.Text = string.Empty;
            ToolBar.btnImport.Visibility = Visibility.Collapsed;
            ToolBar.btnImport.Click += new RoutedEventHandler(btnImport_Click);
            ToolBar.btnEdit.Click += new RoutedEventHandler(btnEdit_Click);
            ToolBar.btnNew.Visibility = Visibility.Collapsed;
            ToolBar.btnDelete.Visibility = Visibility.Collapsed;
            //ToolBar.btnSumbitAudit.Visibility = Visibility.Collapsed;
            ToolBar.btnAudit.Visibility = Visibility.Collapsed;
            ToolBar.cbxCheckState.Visibility = Visibility.Collapsed;
            ToolBar.txtCheckStateName.Visibility = Visibility.Collapsed;
            ToolBar.btnEdit.Visibility = Visibility.Collapsed;
            //ToolBar.btnAduitNoTPass.Visibility = Visibility.Collapsed;
            ToolBar.BtnView.Visibility = Visibility.Collapsed;
            ToolBar.retNew.Visibility = Visibility.Collapsed;
            ToolBar.retEdit.Visibility = Visibility.Collapsed;
            ToolBar.retAudit.Visibility = Visibility.Collapsed;
            ToolBar.retAuditNoPass.Visibility = Visibility.Collapsed;
            ToolBar.retRead.Visibility = Visibility.Visible;
            ToolBar.retPDF.Visibility = Visibility.Collapsed;
            ToolBar.retDelete.Visibility = Visibility.Collapsed;
            ToolBar.retRefresh.Visibility = Visibility.Collapsed;
            ToolBar.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);
            //ToolBar.BtnView.Click += new RoutedEventHandler(BtnView_Click);
            ToolBar.btnOtherAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("PAY")).Click += new RoutedEventHandler(Payment_Click);
            ImageButton _ImgButtonBankPaySalary = new ImageButton();
            _ImgButtonBankPaySalary.VerticalAlignment = VerticalAlignment.Center;
            _ImgButtonBankPaySalary.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("BANKPAY")).Click += new RoutedEventHandler(_ImgButtonBankPaySalary_Click);
            ToolBar.stpOtherAction.Children.Add(_ImgButtonBankPaySalary);

            //_ImgButtonDataExPort.VerticalAlignment = VerticalAlignment.Center;
            //_ImgButtonDataExPort.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("数据导出")).Click += new RoutedEventHandler(_ImgButtonDataExPort_Click);
            //ToolBar.stpOtherAction.Children.Add(_ImgButtonDataExPort);

            _ImgButtonMsgclose.VerticalAlignment = VerticalAlignment.Center;
            _ImgButtonMsgclose.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("关闭代办")).Click += new RoutedEventHandler(_ImgButtonMsgclose_Click);
            ToolBar.stpOtherAction.Children.Add(_ImgButtonMsgclose);

            #endregion
        }
Exemplo n.º 24
0
        private void InitParas()
        {
            PARENT.Children.Add(loadbar);
            client.SalaryArchiveDeleteCompleted += new EventHandler<SalaryArchiveDeleteCompletedEventArgs>(client_SalaryArchiveDeleteCompleted);
            client.GetSalaryArchivePagingCompleted += new EventHandler<GetSalaryArchivePagingCompletedEventArgs>(client_GetSalaryArchivePagingCompleted);
            client.ExportSalaryArchiveCompleted += new EventHandler<ExportSalaryArchiveCompletedEventArgs>(client_ExportSalaryArchiveCompleted);
            client.GetSalaryStandardPagingCompleted += new EventHandler<GetSalaryStandardPagingCompletedEventArgs>(client_GetSalaryStandardPagingCompleted);
            client.GetSalaryArchiveItemsByArchiveIDsCompleted += new EventHandler<GetSalaryArchiveItemsByArchiveIDsCompletedEventArgs>(client_GetSalaryArchiveItemsByArchiveIDsCompleted);
            //   client.GetCustomGuerdonArchiveWithPagingCompleted += new EventHandler<GetCustomGuerdonArchiveWithPagingCompletedEventArgs>(client_GetCustomGuerdonArchiveWithPagingCompleted);
            ToolBar.btnNew.Click += new RoutedEventHandler(btnNew_Click);
            ToolBar.btnEdit.Click += new RoutedEventHandler(btnEdit_Click);
            ToolBar.btnDelete.Click += new RoutedEventHandler(btnDelete_Click);
            ToolBar.btnAudit.Click += new RoutedEventHandler(btnAudit_Click);
            ToolBar.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);
            ToolBar.BtnView.Click += new RoutedEventHandler(BtnView_Click);
            //this.Loaded += new RoutedEventHandler(AuditState_Loaded);
            ToolBar.cbxCheckState.SelectionChanged += new SelectionChangedEventHandler(cbxCheckState_SelectionChanged);
            Utility.CbxItemBinder(ToolBar.cbxCheckState, "CHECKSTATE", Convert.ToInt32(CheckStates.All).ToString());

            ToolBar.btnReSubmit.Click += new RoutedEventHandler(btnReSubmit_Click);
            treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);
            //orgClient = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();
            //orgClient.GetCompanyActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetCompanyActivedCompletedEventArgs>(orgClient_GetCompanyActivedCompleted);
            //orgClient.GetDepartmentActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs>(orgClient_GetDepartmentActivedCompleted);
            //orgClient.GetPostActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs>(orgClient_GetPostActivedCompleted);
            //BindTree();
            ImageButton ChangeMeetingBtn = new ImageButton();
            ChangeMeetingBtn.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/Tool/18_service.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(btnExportArchive_Click);
            ToolBar.stpOtherAction.Children.Add(ChangeMeetingBtn);
            SetToolBarBtn();
            SetOrgTree();
            loadbar.Stop();
        }
Exemplo n.º 25
0
 void CreateControl(SMT.SaaS.FrameworkUI.FormToolBar ToolBar)
 {
     ImageButton btnSave = new ImageButton();
     btnSave.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/16_save.png", Utility.GetResourceStr("保存")).Click += new RoutedEventHandler(btnSave_Click);
     ToolBar.stpOtherAction.Children.Add(btnSave);
 }
Exemplo n.º 26
0
        private void GenerateEntityInfoCtr(string sType)
        {
            FootBar.Children.Clear();
            ImageButton btn;
            string img;
            switch (sType)
            {
                case "0":
                    btn = new ImageButton();
                    btn.TextBlock.Text = UIHelper.GetResourceStr("NEXT");
                    //btn.TextBlock.Text = "下一步";
                    img = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/mnu_actions.png";

                    btn.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                    btn.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                    btn.Click += new RoutedEventHandler(btnNext_Click);
                    FootBar.Children.Add(btn);
                    break;
                case "1":
                    btn = new ImageButton();
                    //btn.TextBlock.Text = UIHelper.GetResourceStr("MANUALAUDIT");
                    btn.TextBlock.Text = "上一步";
                    img = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/mnu_actions.png";
                    btn.Visibility = Visibility.Collapsed;
                    btn.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                    btn.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                    btn.Click += new RoutedEventHandler(btnPre_Click);
                    FootBar.Children.Add(btn);

                    btn = new ImageButton();
                    btn.TextBlock.Text = UIHelper.GetResourceStr("SAVE");
                    //btn.TextBlock.Text = "下一步";
                    img = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/mnu_actions.png";

                    btn.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                    btn.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                    btn.Click += new RoutedEventHandler(btnSave_Click);
                    FootBar.Children.Add(btn);

                    btn = new ImageButton();
                    btn.TextBlock.Text = UIHelper.GetResourceStr("NEXT");
                    //btn.TextBlock.Text = "下一步";
                    img = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/mnu_actions.png";

                    btn.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                    btn.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                    btn.Click += new RoutedEventHandler(btnNext_Click);
                    FootBar.Children.Add(btn);
                    break;
                default:
                    btn = new ImageButton();
                    //btn.TextBlock.Text = UIHelper.GetResourceStr("MANUALAUDIT");
                    btn.TextBlock.Text = "上一步";
                    img = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/mnu_actions.png";
                    // btn.Visibility = Visibility.Collapsed;
                    btn.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                    btn.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                    btn.Click += new RoutedEventHandler(btnPre_Click);
                    FootBar.Children.Add(btn);

                    btn = new ImageButton();
                    btn.TextBlock.Text = UIHelper.GetResourceStr("FINISH");
                    //btn.TextBlock.Text = "完成";
                    img = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/mnu_actions.png";

                    btn.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                    btn.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                    btn.Click += new RoutedEventHandler(btnFinshed_Click);
                    FootBar.Children.Add(btn);
                    break;

            }

        }
Exemplo n.º 27
0
        //private void HideDistributeButton()
        //{
        //    if (tmpSendDocT.CHECKSTATE != "2" || tmpSendDocT.ISDISTRIBUTE != "0")
        //    {
        //        var toolbar = GetToolBarItems();
        //        int count = 0;
        //        foreach (var t in toolbar)
        //        {
        //            if (t.Key == "3") toolbar.RemoveAt(count);
        //            count++;
        //        }
        //    }
        //    else
        //    {
        //        EntityBrowser entBrowser = this.FindParentByType<EntityBrowser>();
        //    }
        //}

        private void ShowDistributButton()
        {
            if (tmpSendDocT != null && tmpSendDocT.CHECKSTATE == "2" && tmpSendDocT.ISDISTRIBUTE == "0")
            {
                PermissionServiceClient PermClient = new PermissionServiceClient();
                PermClient.GetCustomerPermissionByUserIDAndEntityCodeCompleted += (to, te) =>
                {
                    if (te.Result != null)
                    {
                        canShowDistButton = true;
                        EntityBrowser entBrowser = this.FindParentByType<EntityBrowser>();
                        ToolBar bar = SMT.SaaS.FrameworkUI.Common.Utility.FindChildControl<ToolBar>(entBrowser, "toolBar1");
                        //bar.ButtonContainer.Children.Clear();
                        if (IsAudit && canShowDistButton)
                        {
                            if (tmpSendDocT != null && tmpSendDocT.CHECKSTATE == "2" && tmpSendDocT.ISDISTRIBUTE == "0")
                            {
                                ImageButton btn;
                                string img;
                                btn = new ImageButton();
                                btn.TextBlock.Text = "发布";
                                img = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/mnu_actions.png";

                                btn.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                                btn.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                                btn.Click += new RoutedEventHandler(DistributeCompanyDoc);
                                bar.ButtonContainer.Children.Add(btn);
                            }
                        }    
                        //GetToolBarItems();
                    }
                };
                PermClient.GetCustomerPermissionByUserIDAndEntityCodeAsync(Common.CurrentLoginUserInfo.SysUserID, "T_OA_SENDDOC");
            }
        }
Exemplo n.º 28
0
        private void GenerateToolBar()
        {
            //初始化菜单按钮
            toolBarTop.ButtonContainer.Children.Clear();
            toolBarBottom.buttonContainer.Children.Clear();
            // string state = "";
            //添加权限按钮
            if (EntityEditor is IAudit)
            {
                state = ((IAudit)EntityEditor).GetAuditState();
                if (FormType == FormTypes.New)
                {
                    //state = "";
                }
                //if (state == Convert.ToInt32(CheckStates.UnSubmit).ToString())
                //{
                //    string img;
                //    BtnDelete.TextBlock.Text ="删除";
                //    img = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png";

                //    BtnDelete.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                //    BtnDelete.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                //    //BtnDelete.Click += BtnDelete_Click;
                //    toolBarTop.ButtonContainer.Children.Add(BtnDelete);
                //    //BtnDelete.Visibility = Visibility.Collapsed;//默认不显示
                //}

                if (state != "-1" && Convert.ToInt32(CheckStates.Approved).ToString() != state
                    && Convert.ToInt32(CheckStates.UnApproved).ToString() != state)
                {
                    ImageButton btn;
                    string img;
                    if (state == Convert.ToInt32(CheckStates.Approving).ToString()
                        || state == Convert.ToInt32(CheckStates.WaittingApproval).ToString()
                        || state == Convert.ToInt32(CheckStates.UnSubmit).ToString())
                    {
                        //手动审核已隐藏
                        Manubtn = new ImageButton();
                        Manubtn.TextBlock.Text = UIHelper.GetResourceStr("MANUALAUDIT");
                        img = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/mnu_actions.png";
                        Manubtn.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                        Manubtn.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                        Manubtn.Click += new RoutedEventHandler(btnManualAudit_Click);
                        Manubtn.Visibility = Visibility.Collapsed;
                        toolBarTop.ButtonContainer.Children.Add(Manubtn);
                        //已隐藏
                        ImageButton btnima =new ImageButton();
                        btnima = new ImageButton();
                        btnima.TextBlock.Text = UIHelper.GetResourceStr("MANUALAUDIT");
                        btnima.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                        btnima.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                        btnima.Click += new RoutedEventHandler(btnManualAudit_Click);
                        btnima.Visibility = Visibility.Collapsed;
                        toolBarBottom.ButtonContainer.Children.Add(btnima);

                        HrCommws.GetAppConfigByNameAsync("CanManuAudit");

                        //审核通过
                        //btn = new ImageButton();
                        //btn.TextBlock.Text = UIHelper.GetResourceStr("AUDITPASS");
                        //img = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_audit.png";

                        //btn.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                        //btn.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                        //btn.Click += new RoutedEventHandler(btnAudit_Click);
                        //toolBarTop.ButtonContainer.Children.Add(btn);


                        //审核不通过
                        //btn = new ImageButton();
                        //btn.TextBlock.Text = UIHelper.GetResourceStr("AUDITNOTPASS");
                        //img = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_4424.png";

                        //btn.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                        //btn.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                        //btn.Click += new RoutedEventHandler(btnAuditNoPass_Click);
                        //toolBarTop.ButtonContainer.Children.Add(btn);
                    }

                    //if (state == Convert.ToInt32(CheckStates.UnSubmit).ToString())
                    //9是撤单状态
                    if ((state == Convert.ToInt32(CheckStates.UnSubmit).ToString() || state == "9") && (FormType == FormTypes.Edit || FormType == FormTypes.Audit) || FormType == FormTypes.Resubmit)
                    {
                        //if (ShowSubmitButtonWhenUnSubmit) return;
                        //提交审核
                        //BtnSaveSubmit = new ImageButton();
                        BtnSaveSubmit.TextBlock.Text = UIHelper.GetResourceStr("SUBMITAUDIT");
                        img = "/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/18_audit.png";
                        BtnSaveSubmit.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                        BtnSaveSubmit.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"]; 
                        toolBarTop.ButtonContainer.Children.Add(BtnSaveSubmit);

                        ImageButton BtnSave = new ImageButton();
                        BtnSave.TextBlock.Text = UIHelper.GetResourceStr("SUBMITAUDIT");
                        BtnSave.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                        BtnSave.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                        toolBarBottom.ButtonContainer.Children.Add(BtnSave);
                    }
                }

                if (state == Convert.ToInt32(CheckStates.Approved).ToString()
                    || state == Convert.ToInt32(CheckStates.UnApproved).ToString())
                {
                    //转发
                    ImageButton btn;
                    string img;
                    btn = new ImageButton();
                    btn.TextBlock.Text = UIHelper.GetResourceStr("FORWARDRECORD");
                    img = "/SMT.SaaS.FrameworkUI;Component/Images/Tool/18_schedulerules.png";

                    btn.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                    btn.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                    btn.Click += new RoutedEventHandler(btnForward_Click);
                    toolBarTop.ButtonContainer.Children.Add(btn);

                    ImageButton btnButtom = new ImageButton();
                    btnButtom.TextBlock.Text = UIHelper.GetResourceStr("FORWARDRECORD");
                    btnButtom.Image.Source = new BitmapImage(new Uri(img, UriKind.Relative));
                    btnButtom.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                    btnButtom.Click += new RoutedEventHandler(btnForward_Click);
                    toolBarBottom.ButtonContainer.Children.Add(btnButtom);
                }
            }

            if (EntityEditor is IEntityEditor)
            {
                List<ToolbarItem> bars = ((IEntityEditor)EntityEditor).GetToolBarItems();
                if (bars!=null)
                {
                    foreach (var bar in bars)
                    {
                        bool display = true;

                        if (bar.Key == "0" || bar.Key == "1")
                        {
                            if (string.IsNullOrEmpty(state) || Convert.ToInt32(CheckStates.UnSubmit).ToString() == state || (CheckStates.UnSubmit).ToString() == state)
                            {
                                display = true;
                            }
                            else
                                display = false;
                        }
                        if (display)
                        {
                            ImageButton btn = new ImageButton();
                            btn.TextBlock.Text = bar.Title;
                            btn.Tag = bar.Key;
                            btn.Image.Source = new BitmapImage(new Uri(bar.ImageUrl, UriKind.Relative));
                            btn.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                            btn.Click += new RoutedEventHandler(btn_Click);
                            toolBarTop.ButtonContainer.Children.Insert(0, btn);

                            ImageButton btnButtom = new ImageButton();
                            btnButtom.TextBlock.Text = bar.Title;
                            btnButtom.Tag = bar.Key;
                            btnButtom.Image.Source = new BitmapImage(new Uri(bar.ImageUrl, UriKind.Relative));
                            btnButtom.Style = (Style)Application.Current.Resources["ButtonToolBarStyle"];
                            btnButtom.Click += new RoutedEventHandler(btn_Click);
                            toolBarBottom.ButtonContainer.Children.Insert(0, btnButtom);
                        }
                    }
                }
            }
        }
Exemplo n.º 29
0
        //#region 选择部门

        //private void PostsObject_FindClick(object sender, EventArgs e)
        //{
        //    OrganizationLookupForm lookup = new OrganizationLookupForm();
        //    lookup.SelectedObjType = OrgTreeItemTypes.Department;


        //    lookup.SelectedClick += (obj, ev) =>
        //    {
        //        PostsObject.DataContext = lookup.SelectedObj;
        //        if (lookup.SelectedObj is T_HR_DEPARTMENT)
        //        {
        //            T_HR_DEPARTMENT tmp = lookup.SelectedObj as T_HR_DEPARTMENT;

        //            //StrDepartmentID = tmp.DEPARTMENTID;
        //            //StrDepartmentName = tmp.T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME;

        //            PostsObject.DisplayMemberPath = "T_HR_DEPARTMENTDICTIONARY.DEPARTMENTNAME";
        //        }

        //    };

        //    lookup.Show();
        //}



        //#endregion



        #region 添加报告Button
        public void NewButton()
        {

            ToolBar.stpOtherAction.Children.Clear();
            ImageButton ChangeMeetingBtn = new ImageButton();
            ChangeMeetingBtn.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/Tool/16_convertactivity.png", UriKind.Relative));
            ChangeMeetingBtn.TextBlock.Text = Utility.GetResourceStr("ORDEREDMEAL");
            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(ConfirmBtn_Click);
            ToolBar.stpOtherAction.Children.Add(ChangeMeetingBtn);

            
            //ImageButton ChangeMeetingBtn1 = new ImageButton();
            //ChangeMeetingBtn1.Image.Source = new BitmapImage(new Uri("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/Tool/16_convertactivity.png", UriKind.Relative));
            //ChangeMeetingBtn1.TextBlock.Text = Utility.GetResourceStr("DETAILINFO");
            //ChangeMeetingBtn1.Image.Width = 16.0;
            //ChangeMeetingBtn1.Image.Height = 22.0;
            //ChangeMeetingBtn1.TextBlock.Margin = new Thickness(1, 0, 0, 0);
            //ChangeMeetingBtn1.Style = (Style)Application.Current.Resources["ButtonStyle"];
            //ChangeMeetingBtn1.Click += new RoutedEventHandler(OrderDetailBtn_Click);
            //ToolBar.stpOtherAction.Children.Add(ChangeMeetingBtn1);

            
        }
Exemplo n.º 30
0
        public void InitPara()
        {
            try
            {
                PARENT.Children.Add(loadbar);
                loadbar.Stop();
                //DtGrid.CurrentCellChanged += new EventHandler<EventArgs>(DtGrid_CurrentCellChanged);

                client = new SMT.Saas.Tools.PersonnelWS.PersonnelServiceClient();
                //client.GetEmployeePagingCompleted += new EventHandler<GetEmployeePagingCompletedEventArgs>(client_GetEmployeePagingCompleted);
                client.EmployeeDeleteCompleted += new EventHandler<EmployeeDeleteCompletedEventArgs>(client_EmployeeDeleteCompleted);

                //client.GetEmployeeViewsPagingCompleted += new EventHandler<GetEmployeeViewsPagingCompletedEventArgs>(client_GetEmployeeViewsPagingCompleted);
                client.GetEmployeeBasicInfoPagingViewCompleted += new EventHandler<GetEmployeeBasicInfoPagingViewCompletedEventArgs>(client_GetEmployeeBasicInfoPagingViewCompleted);

                client.ExportEmployeeCompleted += new EventHandler<ExportEmployeeCompletedEventArgs>(client_ExportEmployeeCompleted);
                client.GetLeaveEmployeeViewsPagingCompleted += new EventHandler<GetLeaveEmployeeViewsPagingCompletedEventArgs>(client_GetLeaveEmployeeViewsPagingCompleted);
                // orgClient = new SMT.Saas.Tools.OrganizationWS.OrganizationServiceClient();
                //orgClient.GetCompanyActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetCompanyActivedCompletedEventArgs>(orgClient_GetCompanyActivedCompleted);
                //orgClient.GetDepartmentActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetDepartmentActivedCompletedEventArgs>(orgClient_GetDepartmentActivedCompleted);
                //orgClient.GetPostActivedCompleted += new EventHandler<SMT.Saas.Tools.OrganizationWS.GetPostActivedCompletedEventArgs>(orgClient_GetPostActivedCompleted);

                this.Loaded += new RoutedEventHandler(Employee_Loaded);
                this.ToolBar.btnNew.Click += new RoutedEventHandler(btnAdd_Click);
                this.ToolBar.btnEdit.Click += new RoutedEventHandler(BtnAlter_Click);
                this.ToolBar.btnDelete.Click += new RoutedEventHandler(btnDel_Click);
                this.ToolBar.btnRefresh.Click += new RoutedEventHandler(btnRefresh_Click);
                this.ToolBar.BtnView.Click += new RoutedEventHandler(BtnView_Click);
                this.ToolBar.retNew.Visibility = Visibility.Collapsed;
                this.ToolBar.btnNew.Visibility = Visibility.Collapsed;
                this.ToolBar.cbxCheckState.Visibility = Visibility.Collapsed;
                this.ToolBar.txtCheckStateName.Visibility = Visibility.Collapsed;
                this.ToolBar.btnDelete.Visibility = Visibility.Collapsed;
                this.ToolBar.btnAudit.Visibility = Visibility.Collapsed;
                this.ToolBar.retAudit.Visibility = Visibility.Collapsed;

                ImageButton _ImgButtonViewInTime = new ImageButton();
                _ImgButtonViewInTime.VerticalAlignment = VerticalAlignment.Center;
                _ImgButtonViewInTime.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("员工即时信息")).Click += new RoutedEventHandler(_ImgButtonViewInTime_Click);
                ToolBar.stpOtherAction.Children.Add(_ImgButtonViewInTime);

                treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);

                ImageButton _ImgButtonViewBasicInfo = new ImageButton();
                _ImgButtonViewBasicInfo.VerticalAlignment = VerticalAlignment.Center;
                _ImgButtonViewBasicInfo.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("报表信息")).Click += new RoutedEventHandler(_ImgButtonViewBasicInfo_Click);
                ToolBar.stpOtherAction.Children.Add(_ImgButtonViewBasicInfo);

                //ImageButton _ImgButtonEmployeeTotal = new ImageButton();
                //_ImgButtonEmployeeTotal.VerticalAlignment = VerticalAlignment.Center;
                //_ImgButtonEmployeeTotal.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("统计报表")).Click += new RoutedEventHandler(_ImgButtonEmployeeTotal_Click);
                //ToolBar.stpOtherAction.Children.Add(_ImgButtonEmployeeTotal);

                //ImageButton _ImgButtonEmployeeStruct = new ImageButton();
                //_ImgButtonEmployeeStruct.VerticalAlignment = VerticalAlignment.Center;
                //_ImgButtonEmployeeStruct.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("结构报表")).Click += new RoutedEventHandler(_ImgButtonEmployeeStruct_Click);
                //ToolBar.stpOtherAction.Children.Add(_ImgButtonEmployeeStruct);

                //ImageButton _ImgButtonReport = new ImageButton();
                //_ImgButtonReport.VerticalAlignment = VerticalAlignment.Center;
                //_ImgButtonReport.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("薪酬保险缴交报表")).Click += new RoutedEventHandler(_ImgButtonReports_Click);
                //ToolBar.stpOtherAction.Children.Add(_ImgButtonReport);

                ToolBar.btnOutExcel.Visibility = Visibility.Visible;
                ToolBar.btnOutExcel.Click += new RoutedEventHandler(btnOutExcel_Click);

                treeOrganization.SelectedClick += new EventHandler(treeOrganization_SelectedClick);
            }
            catch (Exception )
            {
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
                 Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
        }