示例#1
0
        /// <summary>
        /// 新增岗位字典
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>

        void client_PostDictionaryAddCompleted(object sender, PostDictionaryAddCompletedEventArgs e)
        {
            if (e.Error != null && e.Error.Message != "")
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
            }
            else
            {
                if (e.strMsg == "Repetition")
                {
                    //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("REPETITIONTWOPARAS", "POSTCODE,POSTNAME"));
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("REPETITIONTWOPARAS", "POSTCODE,POSTNAME"),
                                                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                    RefreshUI(RefreshedTypes.HideProgressBar);
                    return;
                }
                //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDDATASUCCESSED"));

                if (needsubmit)
                {
                    FormType = FormTypes.Edit;
                    EntityBrowser entBrowser = this.FindParentByType <EntityBrowser>();
                    entBrowser.FormType = FormTypes.Edit;
                    RefreshUI(RefreshedTypes.AuditInfo);
                    client.PostDictionaryUpdateAsync(PostDictionary, "", "Edit");
                    return;
                }
                else
                {
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDDATASUCCESSED"),
                                                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
                    if (closeFormFlag)
                    {
                        RefreshUI(RefreshedTypes.Close);
                    }
                    else
                    {
                        FormType = FormTypes.Edit;
                        EntityBrowser entBrowser = this.FindParentByType <EntityBrowser>();
                        entBrowser.FormType = FormTypes.Edit;
                        RefreshUI(RefreshedTypes.AuditInfo);
                    }
                }

                RefreshUI(RefreshedTypes.All);
            }
            RefreshUI(RefreshedTypes.HideProgressBar);
        }
示例#2
0
        public void OnSubmitCompleted(AuditEventArgs.AuditResult args)
        {
            // RefreshUI(RefreshedTypes.ProgressBar);
            string state     = "";
            string UserState = "Audit";
            string strMsg    = "";

            switch (args)
            {
            case SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs.AuditResult.Auditing:
                state = Utility.GetCheckState(CheckStates.Approving);
                break;

            case SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs.AuditResult.Successful:
                state = Utility.GetCheckState(CheckStates.Approved);
                if (PostDictionary.EDITSTATE == Convert.ToInt32(EditStates.PendingCanceled).ToString())
                {
                    PostDictionary.EDITSTATE = Convert.ToInt32(EditStates.Canceled).ToString();
                }
                else
                {
                    PostDictionary.EDITSTATE = Convert.ToInt32(EditStates.Actived).ToString();
                }
                break;

            case SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs.AuditResult.Fail:
                state = Utility.GetCheckState(CheckStates.UnApproved);
                break;
            }
            if (PostDictionary.CHECKSTATE == Convert.ToInt32(CheckStates.UnSubmit).ToString())
            {
                UserState = "Submit";
            }
            PostDictionary.CHECKSTATE = state;

            client.PostDictionaryUpdateAsync(PostDictionary, strMsg, UserState);
        }