コード例 #1
0
 void DocTypeTemplateClient_DocTypeTemplateAddCompleted(object sender, DocTypeTemplateAddCompletedEventArgs e)
 {
     RefreshUI(RefreshedTypes.ProgressBar);
     if (!e.Cancelled)
     {
         if (e.Result == "")
         {
             action = Action.Edit;
             //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDSUCCESSED", "DOCTYPETEMPLATE"));
             UserInfo User = new UserInfo();
             User.COMPANYID    = tmpDocTypeTemplateT.OWNERCOMPANYID;
             User.DEPARTMENTID = tmpDocTypeTemplateT.OWNERDEPARTMENTID;
             User.POSTID       = tmpDocTypeTemplateT.OWNERPOSTID;
             User.USERID       = tmpDocTypeTemplateT.OWNERID;
             User.USERNAME     = tmpDocTypeTemplateT.OWNERNAME;
             publicClient.AddContentAsync(tmpDocTypeTemplateT.SENDDOCTEMPLATEID, tmpDocTypeTemplateT.CONTENT, tmpDocTypeTemplateT.OWNERCOMPANYID, "OA", "T_OA_SENDDOCTEMPLATE", User);
             RefreshUI(saveType);
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDSUCCESSED", "DOCTYPETEMPLATE"),
                                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
         }
         else
         {
             //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Result.ToString(), "DOCTYPETEMPLATE"));
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Result.ToString(), "DOCTYPETEMPLATE"),
                                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
             return;
         }
     }
 }
コード例 #2
0
ファイル: MeetingTypeForm.xaml.cs プロジェクト: jjg0519/OA
        void MeetingType_MeetingTypeAddCompleted(object sender, MeetingTypeAddCompletedEventArgs e)
        {
            RefreshUI(RefreshedTypes.ProgressBar);
            if (!e.Cancelled)
            {
                if (e.Result == "")
                {
                    UserInfo User = new UserInfo();
                    User.COMPANYID    = TypeT.OWNERCOMPANYID;
                    User.DEPARTMENTID = TypeT.OWNERDEPARTMENTID;
                    User.POSTID       = TypeT.OWNERPOSTID;
                    User.USERID       = TypeT.OWNERID;
                    User.USERNAME     = TypeT.OWNERNAME;
                    publicClient.AddContentAsync(TypeT.MEETINGTYPEID, TypeT.CONTENT, TypeT.OWNERCOMPANYID, "OA", "T_OA_MEETINGTYPE", User);

                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDSUCCESSED", "MEETINGTYPE"));
                    this.tbxMeetingType.IsEnabled = false;
                    action = Action.Edit; //将保存状态改为  修改

                    RefreshUI(saveType);
                }
                else
                {
                    Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Result.ToString(), "MEETINGTYPE"));
                }
            }
            else
            {
                Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), e.Error.Message);
            }
        }
コード例 #3
0
        void _VM_AddApporvalTempletCompleted(object sender, AddApporvalTempletCompletedEventArgs e)
        {
            //提交保存为完成
            RefreshUI(RefreshedTypes.HideProgressBar);
            if (e.Result > 0)
            {
                if (e.Error != null && e.Error.Message != "")
                {
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"),
                                                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                    return;
                }
                string   xml  = "";
                UserInfo User = new UserInfo();
                User.COMPANYID    = approvalInfo.OWNERCOMPANYID;
                User.DEPARTMENTID = approvalInfo.OWNERDEPARTMENTID;
                User.POSTID       = approvalInfo.OWNERPOSTID;
                User.USERID       = approvalInfo.OWNERID;
                User.USERNAME     = approvalInfo.OWNERNAME;
                publicClient.AddContentAsync(approvalInfo.APPROVALID, approvalInfo.CONTENT, approvalInfo.OWNERCOMPANYID, "OA", "T_OA_APPROVAL", User);

                EntityBrowser entBrowser = this.FindParentByType <EntityBrowser>();
                entBrowser.FormType = FormTypes.Edit;
                //txtCode.Text = e.ApprovalCode;
                //approvalInfo.app = e.ApprovalCode;
                operationType = FormTypes.Edit;
                canSubmit     = true;
                RefreshUI(RefreshedTypes.AuditInfo);
                RefreshUI(saveType);

                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), "保存事项审批模板成功",
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                return;
            }
            else
            {
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SAVEFAILED", "MATTERSAPPROVAL"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                return;
            }
        }