Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
        private void InitEvent()
        {
            PARENT.Children.Add(loadbar);

            client = new PersonnelServiceClient();
            client.EmployeePostChangePagingCompleted += new EventHandler <EmployeePostChangePagingCompletedEventArgs>(client_EmployeePostChangePagingCompleted);
            client.EmployeePostChangeDeleteCompleted += new EventHandler <EmployeePostChangeDeleteCompletedEventArgs>(client_EmployeePostChangeDeleteCompleted);

            this.Loaded += new RoutedEventHandler(LeftOffice_Loaded);

            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.btnAudit.Click                 += new RoutedEventHandler(btnAudit_Click);
            ToolBar.BtnView.Click                  += new RoutedEventHandler(BtnView_Click);
            ToolBar.btnReSubmit.Click              += new RoutedEventHandler(btnReSubmit_Click);
            ToolBar.btnReSubmit.Visibility          = Visibility.Collapsed;
            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);

            Button ButtonMainpostChange = new Button();

            ButtonMainpostChange.VerticalAlignment = VerticalAlignment.Center;
            ButtonMainpostChange.Content           = "员工主兼职岗位互换";
            ButtonMainpostChange.Click            += new RoutedEventHandler(ButtonMainpostChange_Click);
            ToolBar.stpOtherAction.Children.Add(ButtonMainpostChange);
        }
Ejemplo n.º 3
0
        private void InitEvent()
        {
            PARENT.Children.Add(loadbar);

            client = new OrganizationServiceClient();
            client.PostPagingCompleted           += new EventHandler <PostPagingCompletedEventArgs>(client_PostPagingCompleted);
            client.PostDeleteCompleted           += new EventHandler <PostDeleteCompletedEventArgs>(client_PostDeleteCompleted);
            client.GetCompanyActivedCompleted    += new EventHandler <GetCompanyActivedCompletedEventArgs>(client_GetCompanyActivedCompleted);
            client.GetDepartmentActivedCompleted += new EventHandler <GetDepartmentActivedCompletedEventArgs>(client_GetDepartmentActivedCompleted);
            client.PostCancelCompleted           += new EventHandler <PostCancelCompletedEventArgs>(client_PostCancelCompleted);
            this.Loaded += new RoutedEventHandler(Post_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);
            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);
        }
Ejemplo 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");
        }
Ejemplo n.º 5
0
        private void dg_LoadingRow(object sender, DataGridRowEventArgs e)
        {
            ImageButton MyButton_Delbaodao = dg.Columns[3].GetCellContent(e.Row).FindName("BtnDel") as ImageButton;

            MyButton_Delbaodao.Margin = new Thickness(0);
            MyButton_Delbaodao.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png", Utility.GetResourceStr("DELETE"));
        }
Ejemplo n.º 6
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);
        }
Ejemplo n.º 7
0
 private void dg_LoadingRow(object sender, DataGridRowEventArgs e)//点击回车新加载一行
 {
     T_OA_SATISFACTIONDETAIL temp = (T_OA_SATISFACTIONDETAIL)e.Row.DataContext;
     ImageButton MyButton_Delbaodao = dg.Columns[3].GetCellContent(e.Row).FindName("myDelete") as ImageButton;
     MyButton_Delbaodao.Margin = new Thickness(0);
     MyButton_Delbaodao.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png", Utility.GetResourceStr("DELETE"));
     MyButton_Delbaodao.Tag = temp;
 }
Ejemplo n.º 8
0
        void dgSubject_LoadingRow(object sender, DataGridRowEventArgs e)
        {
            T_OA_SATISFACTIONMASTER tmp    = e.Row.DataContext as T_OA_SATISFACTIONMASTER;
            ImageButton             delBtn = dgSubject.Columns[3].GetCellContent(e.Row).FindName("delSubject") as ImageButton;

            delBtn.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png", Utility.GetResourceStr("DELETE"));
            delBtn.Tag = tmp;
        }
        private void DaGrs_LoadingRow(object sender, DataGridRowEventArgs e)
        {
            T_OA_WELFAREDETAIL tmp = (T_OA_WELFAREDETAIL)e.Row.DataContext;

            ImageButton MyButton_Delbaodao = DaGrs.Columns[6].GetCellContent(e.Row).FindName("BtnDel") as ImageButton;

            MyButton_Delbaodao.Margin = new Thickness(0);
            MyButton_Delbaodao.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png", Utility.GetResourceStr("DELETE"));
            MyButton_Delbaodao.Tag = tmp;
        }
Ejemplo n.º 10
0
        private void DaGr_LoadingRow(object sender, DataGridRowEventArgs e)
        {
            V_ContractPrint tmp = (V_ContractPrint)e.Row.DataContext;

            SetRowLogo(DaGr, e.Row, "T_OA_CONTRACTPRINT");
            ImageButton MyButton_Addbaodao = DaGr.Columns[11].GetCellContent(e.Row).FindName("myBtn") as ImageButton;

            MyButton_Addbaodao.Margin = new Thickness(0);
            MyButton_Addbaodao.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/Tool/16_convertactivity.png", Utility.GetResourceStr("UPLOADACCESSORY"));
            MyButton_Addbaodao.Tag = tmp;
        }
Ejemplo n.º 11
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);
        }
Ejemplo n.º 12
0
        //行加载删除按钮
        private void dg_LoadingRow(object sender, DataGridRowEventArgs e)
        {
            T_OA_VEHICLECARD tmp = (T_OA_VEHICLECARD)e.Row.DataContext;
            ImageButton      MyButton_Delbaodao = dg.Columns[7].GetCellContent(e.Row).FindName("myDelete") as ImageButton;

            MyButton_Delbaodao.Margin = new Thickness(0);
            MyButton_Delbaodao.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png", Utility.GetResourceStr("DELETE"));
            MyButton_Delbaodao.Tag = tmp;

            ComboBox cmb = dg.Columns[1].GetCellContent(e.Row).FindName("cmbType") as ComboBox;

            switch (tmp.CARDTYPE)
            {
            case "家里": cmb.SelectedIndex = 1; break;

            default: cmb.SelectedIndex = 0; break;
            }
        }
Ejemplo n.º 13
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);
        }
Ejemplo n.º 14
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);
        }
Ejemplo n.º 15
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);
        }
Ejemplo n.º 16
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);
            }
        }
Ejemplo n.º 17
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();
                                fbs.FBService.SaveAsync(saveEntity);
                                // none;
                            };
                            var personName = entity.GetObjValue("Entity.T_FB_COMPANYBUDGETAPPLYMASTER.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"));
        }
Ejemplo n.º 18
0
        public void InitPara()
        {
            PARENT.Children.Add(loadbar);
            try
            {
                client = new SalaryServiceClient();
                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);
                this.Loaded += new RoutedEventHandler(Left_Loaded);
                treeOrganization.SelectedClick          += new EventHandler(treeOrganization_SelectedClick);
                client.PaymentConfirmUpdateCompleted    += new EventHandler <System.ComponentModel.AsyncCompletedEventArgs>(client_PaymentConfirmUpdateCompleted);
                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);
            }
            catch (Exception ex)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
                //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(ex.Message));
            }
            #region 工具栏初试化
            ToolBar.txtOtherName.Visibility      = Visibility.Collapsed;
            ToolBar.btnImport.Visibility         = Visibility.Collapsed;
            ToolBar.btnEdit.Click               += new RoutedEventHandler(btnEdit_Click);
            ToolBar.btnNew.Visibility            = Visibility.Collapsed;
            ToolBar.btnDelete.Visibility         = Visibility.Collapsed;
            ToolBar.btnAudit.Visibility          = Visibility.Collapsed;
            ToolBar.cbxCheckState.Visibility     = Visibility.Collapsed;
            ToolBar.txtCheckStateName.Visibility = Visibility.Collapsed;
            ToolBar.btnEdit.Visibility           = Visibility.Collapsed;
            ToolBar.BtnView.Visibility           = Visibility.Collapsed;
            ToolBar.retNew.Visibility            = Visibility.Collapsed;
            ToolBar.retEdit.Visibility           = Visibility.Collapsed;
            ToolBar.retAudit.Visibility          = Visibility.Visible;
            ToolBar.retAuditNoPass.Visibility    = Visibility.Collapsed;
            ToolBar.retPDF.Visibility            = Visibility.Collapsed;
            ToolBar.retDelete.Visibility         = Visibility.Collapsed;
            ToolBar.retRefresh.Visibility        = Visibility.Collapsed;
            ToolBar.btnRefresh.Click            += new RoutedEventHandler(btnRefresh_Click);

            ToolBarTwo.txtOtherName.Visibility = Visibility.Collapsed;
            ToolBarTwo.btnImport.Visibility    = Visibility.Collapsed;
            ToolBarTwo.btnEdit.Click          += new RoutedEventHandler(btnEdit_Click);
            ToolBarTwo.btnNew.Visibility       = Visibility.Collapsed;

            ToolBarTwo.btnDelete.Visibility  = Visibility.Collapsed;
            ToolBarTwo.btnRefresh.Visibility = Visibility.Collapsed;

            ToolBarTwo.btnSumbitAudit.Visibility    = Visibility.Collapsed;
            ToolBarTwo.btnAudit.Visibility          = Visibility.Collapsed;
            ToolBarTwo.cbxCheckState.Visibility     = Visibility.Collapsed;
            ToolBarTwo.txtCheckStateName.Visibility = Visibility.Collapsed;
            ToolBarTwo.btnEdit.Visibility           = Visibility.Collapsed;
            ToolBarTwo.btnAduitNoTPass.Visibility   = Visibility.Collapsed;
            ToolBarTwo.BtnView.Visibility           = Visibility.Collapsed;
            ToolBarTwo.retNew.Visibility            = Visibility.Collapsed;
            ToolBarTwo.retEdit.Visibility           = Visibility.Collapsed;
            ToolBarTwo.retAudit.Visibility          = Visibility.Collapsed;
            ToolBarTwo.retAuditNoPass.Visibility    = Visibility.Collapsed;
            ToolBarTwo.retPDF.Visibility            = Visibility.Collapsed;
            ToolBarTwo.retDelete.Visibility         = Visibility.Collapsed;
            ToolBarTwo.retRefresh.Visibility        = Visibility.Collapsed;
            ToolBarTwo.btnRefresh.Click            += new RoutedEventHandler(btnRefresh_Click);

            _ImgButtonAllSelect.VerticalAlignment = VerticalAlignment.Center;
            _ImgButtonAllSelect.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("全选")).Click += new RoutedEventHandler(_ImgButtonAllSelect_Click);
            ToolBarTwo.stpOtherAction.Children.Add(_ImgButtonAllSelect);

            _ImgButtonSalaryPaidConfirm.VerticalAlignment = VerticalAlignment.Center;
            _ImgButtonSalaryPaidConfirm.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/Tool/ico_16_1055.png", Utility.GetResourceStr("发放确认")).Click += new RoutedEventHandler(_ImgButtonSalaryPaidConfirm_Click);
            ToolBarTwo.stpOtherAction.Children.Add(_ImgButtonSalaryPaidConfirm);

            #endregion
        }
Ejemplo n.º 19
0
        protected override void OnLoadControlComplete()
        {
            DetailGrid dGrid = this.EditForm.FindControl("OrderGrid") as DetailGrid;

            if (dGrid != null && !this.EditForm.IsReInitForm)
            {
                dGrid.ToolBars[0].Title = "选择下拨人员";
                if (dGrid.ToolBars.Count > 1)
                {
                    dGrid.ToolBars.Remove(dGrid.ToolBars[1]);
                }
                dGrid.AddToolBarItems(dGrid.ToolBars);
                double width = dGrid.ADGrid.Columns[dGrid.ADGrid.Columns.Count - 1].Width.Value;
                dGrid.ToolBarItemClick += new EventHandler <ToolBarItemClickEventArgs>(dGrid_ToolBarItemClick);

                //if (this.OrderEntity.FBEntityState != FBEntityState.Added)
                //{
                //    dGrid.ADGrid.Columns[5].Visibility = Visibility.Collapsed;
                //}
                //else
                //{
                //    dGrid.ADGrid.Columns[5].Visibility = Visibility.Visible;
                //}
                var totalWidth = dGrid.ADGrid.Columns.Sum(item => item.Width.Value);
                dGrid.ADGrid.MinWidth    = totalWidth + 10;
                dGrid.ADGrid.LoadingRow += (object sender, DataGridRowEventArgs e) =>
                {
                    if (this.EditForm.OperationType == OperationTypes.Add ||
                        this.EditForm.OperationType == OperationTypes.Edit ||
                        this.EditForm.OperationType == OperationTypes.ReSubmit)
                    {
                        var         con      = dGrid.ADGrid.Columns[1].GetCellContent(e.Row) as StackPanel;
                        ImageButton myButton = new ImageButton();
                        myButton.Margin = new Thickness(0);
                        myButton.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png", Utility.GetResourceStr("DELETE"));
                        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
                                });
                                // none;
                            };
                            var personName = entity.GetObjValue("Entity.OWNERNAME");

                            var msg = "你确定要删除" + personName + "的个人活动经费下拨吗?";
                            CommonFunction.AskDelete(msg, action);
                        };
                        con.Children.Clear();
                        con.Children.Add(myButton);
                    }
                };
            }
            if (this.EditForm.OperationType != OperationTypes.Add)
            {
                LookUp lu = this.EditForm.FindControl("AssignCompanyID") as LookUp;

                if (lu != null)
                {
                    lu.IsEnabled = false;
                }
            }
        }
Ejemplo n.º 20
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);
            }
        }
Ejemplo n.º 21
0
        private void DaGrs_LoadingRow(object sender, DataGridRowEventArgs e)
        {
            try
            {
                T_OA_BUSINESSTRIPDETAIL tmp = (T_OA_BUSINESSTRIPDETAIL)e.Row.DataContext;
                ImageButton             MyButton_Delbaodao = DaGrs.Columns[10].GetCellContent(e.Row).FindName("myDelete") as ImageButton;
                SearchCity myCity      = DaGrs.Columns[1].GetCellContent(e.Row).FindName("txtDEPARTURECITY") as SearchCity;
                SearchCity myCitys     = DaGrs.Columns[3].GetCellContent(e.Row).FindName("txtTARGETCITIES") as SearchCity;
                CheckBox   IsCheck     = DaGrs.Columns[7].GetCellContent(e.Row).FindName("myChkBox") as CheckBox;
                CheckBox   IsCheckMeet = DaGrs.Columns[8].GetCellContent(e.Row).FindName("myChkBoxMeet") as CheckBox;
                CheckBox   IsCheckCar  = DaGrs.Columns[9].GetCellContent(e.Row).FindName("myChkBoxCar") as CheckBox;
                TravelDictionaryComboBox ComVechile = DaGrs.Columns[4].GetCellContent(e.Row).FindName("ComVechileType") as TravelDictionaryComboBox;
                TravelDictionaryComboBox ComLevel   = DaGrs.Columns[5].GetCellContent(e.Row).FindName("ComVechileTypeLeve") as TravelDictionaryComboBox;
                if (BtnNewButton == true)
                {
                    myCitys.TxtSelectedCity.Text = string.Empty;
                    //citysStartList_Golbal.Add(tmp.DEPCITY);
                }
                else
                {
                    BtnNewButton = false;
                }
                MyButton_Delbaodao.Margin = new Thickness(0);
                MyButton_Delbaodao.AddButtonAction("/SMT.SaaS.FrameworkUI;Component/Images/ToolBar/ico_16_delete.png", Utility.GetResourceStr("DELETE"));
                MyButton_Delbaodao.Tag = tmp;
                myCity.Tag             = tmp;

                myCitys.Tag = tmp;
                ComVechile.SelectedIndex = 0;
                ComLevel.SelectedIndex   = 0;
                //对默认颜色进行赋值
                tempcomTypeBorderBrush  = ComVechile.BorderBrush;
                tempcomTypeForeBrush    = ComVechile.Foreground;
                tempcomLevelBorderBrush = ComLevel.BorderBrush;
                tempcomLevelForeBrush   = ComLevel.Foreground;

                ObservableCollection <T_OA_BUSINESSTRIPDETAIL> objs = DaGrs.ItemsSource as ObservableCollection <T_OA_BUSINESSTRIPDETAIL>;
                if (formType != FormTypes.New)
                {
                    int j = 0;
                    if (DaGrs.ItemsSource != null && TraveDetailList_Golbal != null)
                    {
                        foreach (var obje in objs)
                        {
                            StandardsMethod(j);
                            j++;
                            if (obje.BUSINESSTRIPDETAILID == tmp.BUSINESSTRIPDETAILID) //判断记录的ID是否相同
                            {
                                if (myCity != null)                                    //出发城市
                                {
                                    if (obje.DEPCITY != null)
                                    {
                                        myCity.TxtSelectedCity.Text = GetCityName(obje.DEPCITY);
                                        if (TraveDetailList_Golbal.Count() > 1)
                                        {
                                            if (j > 1)
                                            {
                                                //By  : Sam
                                                //Date: 2011-9-6
                                                //For : 此处之前设置双击的时候还会出现打开状态
                                                myCity.IsEnabled = false;
                                                ((DataGridCell)((StackPanel)myCity.Parent).Parent).IsEnabled = false;
                                            }
                                        }
                                    }
                                }
                                if (myCitys != null)//目标城市
                                {
                                    if (obje.DESTCITY != null)
                                    {
                                        myCitys.TxtSelectedCity.Text = GetCityName(obje.DESTCITY);
                                    }
                                }
                                if (obje.PRIVATEAFFAIR == "1")//私事
                                {
                                    IsCheck.IsChecked = true;
                                }
                                if (obje.GOOUTTOMEET == "1")//外出开会
                                {
                                    IsCheckMeet.IsChecked = true;
                                }
                                if (obje.COMPANYCAR == "1")//公司派车
                                {
                                    IsCheckCar.IsChecked = true;
                                }
                            }
                            else
                            {
                                continue;
                            }

                            string dictid = "";
                            //获取交通工具类型、级别
                            if (ComVechile != null)
                            {
                                T_SYS_DICTIONARY type  = new T_SYS_DICTIONARY();
                                T_SYS_DICTIONARY level = new T_SYS_DICTIONARY();
                                type  = ComVechile.SelectedItem as T_SYS_DICTIONARY;
                                level = ComLevel.SelectedItem as T_SYS_DICTIONARY;
                                var thd = transportToolStand.FirstOrDefault();
                                if (type != null)
                                {
                                    thd = this.GetVehicleTypeValue(type.DICTIONARYVALUE.ToString());
                                    foreach (T_SYS_DICTIONARY Region in ComVechile.Items)
                                    {
                                        if (thd != null)
                                        {
                                            dictid = Region.DICTIONARYID;
                                            if (Region.DICTIONARYVALUE.ToString() == tmp.TYPEOFTRAVELTOOLS)
                                            {
                                                if (transportToolStand.Count() > 0)
                                                {
                                                    ComVechile.SelectedItem = Region;
                                                    if (thd.TYPEOFTRAVELTOOLS.ToInt32() > Region.DICTIONARYVALUE)
                                                    {
                                                        ComVechile.BorderBrush = new SolidColorBrush(Colors.Red);
                                                        ComVechile.Foreground  = new SolidColorBrush(Colors.Red);
                                                        ComLevel.BorderBrush   = new SolidColorBrush(Colors.Red);
                                                        ComLevel.Foreground    = new SolidColorBrush(Colors.Red);
                                                    }
                                                    if (thd.TYPEOFTRAVELTOOLS.ToInt32() <= Region.DICTIONARYVALUE)
                                                    {
                                                        if (tempcomTypeBorderBrush != null)
                                                        {
                                                            ComVechile.BorderBrush = tempcomTypeBorderBrush;
                                                        }
                                                        if (tempcomTypeForeBrush != null)
                                                        {
                                                            ComVechile.Foreground = tempcomTypeForeBrush;
                                                        }
                                                    }
                                                    break;
                                                }
                                            }
                                        }
                                    }
                                }
                            }

                            if (ComLevel != null)
                            {
                                var ents = from ent in ListVechileLevel
                                           where ent.T_SYS_DICTIONARY2.DICTIONARYID == dictid
                                           select ent;
                                ComLevel.ItemsSource = ents.ToList();
                                if (ents.Count() > 0)
                                {
                                    T_SYS_DICTIONARY type  = new T_SYS_DICTIONARY();
                                    T_SYS_DICTIONARY level = new T_SYS_DICTIONARY();
                                    type  = ComVechile.SelectedItem as T_SYS_DICTIONARY;
                                    level = ComLevel.SelectedItem as T_SYS_DICTIONARY;

                                    var thd = transportToolStand.FirstOrDefault();
                                    if (type != null)
                                    {
                                        thd = this.GetVehicleTypeValue(type.DICTIONARYVALUE.ToString());
                                    }
                                    if (thd != null)
                                    {
                                        foreach (T_SYS_DICTIONARY RegionLevel in ComLevel.Items)
                                        {
                                            if (RegionLevel.DICTIONARYVALUE.ToString() == tmp.TAKETHETOOLLEVEL)
                                            {
                                                ComLevel.SelectedItem = RegionLevel;
                                                if (thd.TAKETHETOOLLEVEL.ToInt32() <= RegionLevel.DICTIONARYVALUE)
                                                {
                                                    if (tempcomLevelForeBrush != null)
                                                    {
                                                        ComLevel.Foreground = tempcomLevelForeBrush;
                                                    }
                                                    if (tempcomLevelBorderBrush != null)
                                                    {
                                                        ComLevel.BorderBrush = tempcomLevelBorderBrush;
                                                    }
                                                }
                                                else
                                                {
                                                    if (thd.TAKETHETOOLLEVEL.ToInt32() > RegionLevel.DICTIONARYVALUE)
                                                    {
                                                        ComLevel.BorderBrush = new SolidColorBrush(Colors.Red);
                                                        ComLevel.Foreground  = new SolidColorBrush(Colors.Red);
                                                        return;
                                                    }
                                                    else
                                                    {
                                                        if (tempcomLevelForeBrush != null)
                                                        {
                                                            ComLevel.Foreground = tempcomLevelForeBrush;
                                                        }
                                                        if (tempcomLevelBorderBrush != null)
                                                        {
                                                            ComLevel.BorderBrush = tempcomLevelBorderBrush;
                                                        }
                                                    }
                                                }
                                                break;
                                            }
                                        }
                                    }
                                }// ComLevel != null
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                SMT.SAAS.Main.CurrentContext.AppContext.SystemMessage("出差申请DaGrs_LoadingRow异常:" + ex.ToString());
                SMT.SAAS.Main.CurrentContext.AppContext.ShowSystemMessageText();
            }
        }