Пример #1
0
        //更新完成

        private void client_UpdateOrganCompleted(object sender, UpdateOrganCompletedEventArgs e)
        {
            RefreshUI(RefreshedTypes.HideProgressBar);
            try
            {
                if (e.Error == null)
                {
                    //HtmlPage.Window.Alert("机构信息修改成功!");
                    if (e.Result)
                    {
                        if (e.UserState.ToString() == "Edit")
                        {
                            Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("MODIFYSUCCESSED"));
                            if (GlobalFunction.IsSaveAndClose(refreshType))
                            {
                                RefreshUI(refreshType);
                            }
                            else
                            {
                                InitData();
                            }
                        }
                        else if (e.UserState.ToString() == "Audit")
                        {
                            Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSAUDIT"));
                        }
                        else if (e.UserState.ToString() == "Submit")
                        {
                            Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSSUBMITAUDIT"));
                        }
                        RefreshUI(RefreshedTypes.All);



                        //if (actionFlag == DataActionFlag.SubmitFlow)
                        //{
                        //    //actionFlag = DataActionFlag.SubmitComplete;
                        //    SumbitFlow();
                        //}
                        //else
                        //{

                        //    if (actionFlag == DataActionFlag.SubmitComplete)
                        //    {
                        //        if (action == FormTypes.New || action == FormTypes.Edit)
                        //        {
                        //            Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUBMITORGANREGISTERSUCCESSED"));
                        //        }
                        //        else
                        //        {
                        //            Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("AUDITSUCCESSED", "ORGAN"));
                        //        }
                        //        RefreshUI(RefreshedTypes.CloseAndReloadData);

                        //    }
                        //    else
                        //    {
                        //        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("UPDATESUCCESSED", "ORGAN"));
                        //        if (GlobalFunction.IsSaveAndClose(refreshType))
                        //        {
                        //            RefreshUI(RefreshedTypes.CloseAndReloadData);
                        //        }
                        //        else
                        //        {
                        //            InitData();
                        //        }
                        //    }

                        //}
                    }
                    else
                    {
                        Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("UPDATEFAILED"));
                    }
                }
                else
                {
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message);
                }
            }
            catch (Exception ex)
            {
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
            }
        }
Пример #2
0
        //更新完成

        private void client_UpdateOrganCompleted(object sender, UpdateOrganCompletedEventArgs e)
        {
            RefreshUI(RefreshedTypes.HideProgressBar);
            try
            {
                
                if (e.Error == null)
                {
                    //HtmlPage.Window.Alert("机构信息修改成功!");  
                    if (e.Result)
                    {

                        if (e.UserState.ToString() == "Edit")
                        {
                            Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("MODIFYSUCCESSED"));
                            if (GlobalFunction.IsSaveAndClose(refreshType))
                            {
                                RefreshUI(refreshType);
                            }
                            else
                            {
                                InitData();
                            }

                        }
                        else if (e.UserState.ToString() == "Audit")
                        {
                            Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSAUDIT"));
                        }
                        else if (e.UserState.ToString() == "Submit")
                        {
                            Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSSUBMITAUDIT"));
                        }
                        RefreshUI(RefreshedTypes.All);




                        //if (actionFlag == DataActionFlag.SubmitFlow)
                        //{
                        //    //actionFlag = DataActionFlag.SubmitComplete;
                        //    SumbitFlow();
                        //}
                        //else
                        //{

                        //    if (actionFlag == DataActionFlag.SubmitComplete)
                        //    {
                        //        if (action == FormTypes.New || action == FormTypes.Edit)
                        //        {
                        //            Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUBMITORGANREGISTERSUCCESSED"));                                    
                        //        }
                        //        else
                        //        {
                        //            Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("AUDITSUCCESSED", "ORGAN"));                                    
                        //        }
                        //        RefreshUI(RefreshedTypes.CloseAndReloadData);

                        //    }
                        //    else
                        //    {
                        //        Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("UPDATESUCCESSED", "ORGAN"));
                        //        if (GlobalFunction.IsSaveAndClose(refreshType))
                        //        {
                        //            RefreshUI(RefreshedTypes.CloseAndReloadData);
                        //        }
                        //        else
                        //        {
                        //            InitData();
                        //        }
                        //    }
                            
                        //}
                    }
                    else
                    {
                        
                        Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("UPDATEFAILED"));
                    }
                }
                else
                {
                    
                    Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message);
                   
                }
            }
            catch (Exception ex)
            {
                
                Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.Message.ToString());
            }
        }