Beispiel #1
0
        public void OnSubmitCompleted(FrameworkUI.AuditControl.AuditEventArgs.AuditResult args)
        {
            string state = "";

            Utility.InitFileLoad(FormTypes.Audit, uploadFile, Master_Golbal.BUSINESSTRIPID, false);
            switch (args)
            {
            case SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs.AuditResult.Auditing:    //审核中
                state = Utility.GetCheckState(CheckStates.Approving);
                if (Master_Golbal.CHARGEMONEY > 0)
                {
                    fbCtr.Save(SMT.SaaS.FrameworkUI.CheckStates.Approving);     //审核中
                }
                break;

            case SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs.AuditResult.Successful:    //审核通过
                state    = Utility.GetCheckState(CheckStates.Approved);
                formType = FormTypes.Audit;
                if (Master_Golbal.CHARGEMONEY > 0)
                {
                    fbCtr.Save(SMT.SaaS.FrameworkUI.CheckStates.Approved); //审核通过
                }
                if (Master_Golbal.ISAGENT == "1")                          //如果启用代理
                {
                    AddAgent(TraveDetailList_Golbal.Count() - 1);
                    OaCommonOfficeClient.AgentDataSetAddAsync(AgentDateSet);    //插入代理
                }
                break;

            case SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs.AuditResult.Fail:    //审核未通过
                state = Utility.GetCheckState(CheckStates.UnApproved);
                if (Master_Golbal.CHARGEMONEY > 0)
                {
                    fbCtr.Save(SMT.SaaS.FrameworkUI.CheckStates.UnApproved);     //审核不通过
                }
                break;
            }
            if (Master_Golbal.CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString())
            {
                //UserState = "Submit";
            }
            if (formType == FormTypes.Resubmit || formType == FormTypes.New || formType == FormTypes.Edit)
            {
                SetTraveRequestMasterValue();
            }
            Master_Golbal.CHECKSTATE = state;
            RefreshUI(RefreshedTypes.HideProgressBar);
            if (formType == FormTypes.Edit || formType == FormTypes.Resubmit)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSSUBMITAUDIT"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
            }
            if (formType == FormTypes.Audit || formType == FormTypes.Browse)
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSAUDIT"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
            }

            //approvalInfo.CHECKSTATE = state;
            RefreshUI(RefreshedTypes.AuditInfo);
            RefreshUI(RefreshedTypes.All);
            //Travelmanagement.UpdateTravelmanagementAsync(Businesstrip, buipList, actions.ToString(), UserState);
        }
Beispiel #2
0
 private void ckEnabled_Click(object sender, RoutedEventArgs e)
 {
     OaCommonOfficeClient.IsExistAgentAsync("T_OA_BUSINESSTRIP", Master_Golbal.OWNERCOMPANYID);
 }