コード例 #1
0
 private void client_AddIssuanceCompleted(object sender, AddIssuanceCompletedEventArgs e)
 {
     RefreshUI(RefreshedTypes.HideProgressBar);
     try
     {
         if (e.Error == null)
         {
             if (e.Result != "")
             {
                 Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Result);
             }
             else
             {
                 Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDDATASUCCESSED"));
                 if (GlobalFunction.IsSaveAndClose(refreshType))
                 {
                     RefreshUI(refreshType);
                 }
                 else
                 {
                     formTypeAction  = FormTypes.Edit;
                     action          = Action.Edit;
                     this.issuanceID = issuanceObj.ISSUANCEID;
                     InitData();
                     EntityBrowser entBrowser = this.FindParentByType <EntityBrowser>();
                     entBrowser.FormType = FormTypes.Edit;
                     RefreshUI(RefreshedTypes.AuditInfo);
                     RefreshUI(RefreshedTypes.All);
                 }
             }
         }
         else
         {
             Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message);
         }
     }
     catch (Exception ex)
     {
         Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString());
     }
 }
コード例 #2
0
        private void client_AddIssuanceCompleted(object sender, AddIssuanceCompletedEventArgs e)
        {
            RefreshUI(RefreshedTypes.HideProgressBar);
            try
            {
                if (e.Error == null)
                {
                    if (e.Result != "")
                    {   
                        Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Result);
                    }
                    else
                    {
                        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("ADDDATASUCCESSED"));
                        if (GlobalFunction.IsSaveAndClose(refreshType))
                        {
                            RefreshUI(refreshType);
                        }
                        else
                        {
                            formTypeAction = FormTypes.Edit;
                            action = Action.Edit;
                            this.issuanceID = issuanceObj.ISSUANCEID;
                            InitData();
                            EntityBrowser entBrowser = this.FindParentByType<EntityBrowser>();
                            entBrowser.FormType = FormTypes.Edit;
                            RefreshUI(RefreshedTypes.AuditInfo);
                            RefreshUI(RefreshedTypes.All);
                        }


                        
                    }
                }
                else
                {
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message);
                }
            }
            catch (Exception ex)
            {             
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString());
            }
        }