示例#1
0
 /// <summary>
 /// 修改岗位字典
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void client_PostDictionaryUpdateCompleted(object sender, PostDictionaryUpdateCompletedEventArgs e)
 {
     if (e.Error != null && e.Error.Message != "")
     {
         needsubmit = false;
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
                                        Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
     }
     else
     {
         if (e.strMsg == "Repetition")
         {
             needsubmit = false;
             //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;
         }
         if (e.strMsg == "Repetition")
         {
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("REPETITIONTWOPARAS", "COMPANRYCODE,CNAME"),
                                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
             RefreshUI(RefreshedTypes.HideProgressBar);
             return;
         }
         if (e.UserState.ToString() == "Edit")
         {
             if (!isSubmit)
             {
                 ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("MODIFYSUCCESSED"),
                                                Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
             }
         }
         if (needsubmit)
         {
             try
             {
                 EntityBrowser entBrowser = this.FindParentByType <EntityBrowser>();
                 entBrowser.ManualSubmit();
                 BackToSubmit();
             }
             catch (Exception ex)
             {
                 RefreshUI(RefreshedTypes.HideProgressBar);
                 ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("提交失败"),
                                                Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
             }
         }
         else if (e.UserState.ToString() == "Audit")
         {
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSAUDIT"),
                                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
         }
         else if (e.UserState.ToString() == "Submit")
         {
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSSUBMITAUDIT"),
                                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
         }
         if (closeFormFlag)
         {
             RefreshUI(RefreshedTypes.Close);
         }
         else
         {
             RefreshUI(RefreshedTypes.AuditInfo);
         }
     }
     RefreshUI(RefreshedTypes.All);
     RefreshUI(RefreshedTypes.HideProgressBar);
 }
示例#2
0
        /// <summary>
        /// 修改岗位字典
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void client_PostDictionaryUpdateCompleted(object sender, PostDictionaryUpdateCompletedEventArgs e)
        {
            if (e.Error != null && e.Error.Message != "")
            {
                needsubmit = false;
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
                             Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
            }
            else
            {
                if (e.strMsg == "Repetition")
                {
                    needsubmit = false;
                    //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;
                }
                if (e.strMsg == "Repetition")
                {
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("REPETITIONTWOPARAS", "COMPANRYCODE,CNAME"),
                          Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                    RefreshUI(RefreshedTypes.HideProgressBar);
                    return;
                }
                if (e.UserState.ToString() == "Edit")
                {
                    if (!isSubmit)
                    {
                        ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("MODIFYSUCCESSED"),
                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
                    }
                }
                if (needsubmit)
                {
                    try
                    {
                        EntityBrowser entBrowser = this.FindParentByType<EntityBrowser>();
                        entBrowser.ManualSubmit();
                        BackToSubmit();
                    }
                    catch (Exception ex)
                    {
                        RefreshUI(RefreshedTypes.HideProgressBar);
                        ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("提交失败"),
                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);

                    }

                }
                else if (e.UserState.ToString() == "Audit")
                {
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSAUDIT"),
                     Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
                }
                else if (e.UserState.ToString() == "Submit")
                {

                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSSUBMITAUDIT"),
                 Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
                }
                if (closeFormFlag)
                {
                    RefreshUI(RefreshedTypes.Close);
                }
                else
                {
                    RefreshUI(RefreshedTypes.AuditInfo);
                }

            }
            RefreshUI(RefreshedTypes.All);
            RefreshUI(RefreshedTypes.HideProgressBar);
        }