Esempio n. 1
0
 void client_CompainRecordUpdateCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         if (!auditsign)
         {
             Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
         }
         else
         {
             //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("AUDITFAILURE"));
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("AUDITFAILURE"),
                                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
             auditsign = false;
         }
     }
     else
     {
         if (!auditsign)
         {
             //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("UPDATESUCCESSED", "KPIRECORDCOMPLAIN"));
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("MODIFYSUCCESSED"),
                                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
         }
         else
         {
             //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("审核通过"));
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUCCESSAUDIT"),
                                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
             //Utility.GetResourceStr("SUSSESSEDSUBMIT", "KPIRECORDCOMPLAIN"));
             //修改申诉状态
             kpirecord.SUMSCORE = KPIRecordComplain.REVIEWSCORE;
             client.KPIRecordUpdateAsync(kpirecord);
             if (KPIRecordComplain.CHECKSTATE == Utility.GetCheckState(CheckStates.Approved))
             {
                 client.CompainRecordUpdateOverAsync(kpirecord.KPIRECORDID);
             }
             auditsign = false;
         }
     }
     RefreshUI(RefreshedTypes.HideProgressBar);
     RefreshUI(RefreshedTypes.All);
     if (flag)
     {
         flag = false;
         EntityBrowser entBrowser = this.FindParentByType <EntityBrowser>();
         entBrowser.Close();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 更新完成事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void client_UpdateKPIRecordComplainCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
 {
     if (e.Error != null && e.Error.Message != "")
     {
         if (e.Error.Message == "Repetition")
         {
             //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("REPETITIONTWOPARAS", "KPIRECORDCOMPLAIN"));
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("REPETITIONTWOPARAS", "KPIRECORDCOMPLAIN"),
                                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
         }
         else
         {
             //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message));
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"),
                                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
         }
     }
     else
     {
         if (auditsign)
         {
             T_HR_KPIRECORD kpirecord = new T_HR_KPIRECORD();
             kpirecord = Record;
             kpirecord.COMPLAINSTATUS = "1";
             client.KPIRecordUpdateAsync(kpirecord);
             //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUBMITAUDITSUCCESSFUL"));
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("SUBMITAUDITSUCCESSFUL"),
                                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
         }
         else
         {
             //Utility.ShowCustomMessage(MessageTypes.Message, Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("UPDATESUCCESSED", "KPIRECORDCOMPLAIN"));
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("SUCCESSED"), Utility.GetResourceStr("MODIFYSUCCESSED"),
                                            Utility.GetResourceStr("CONFIRM"), MessageIcon.Information);
         }
         if (signCancel)
         {
             signCancel = false;
             EntityBrowser entBrowser = this.FindParentByType <EntityBrowser>();
             entBrowser.Close();
         }
         //FormType = FormTypes.Browse;
         SetComplainIsEnable(false);
         //SetReviewIsEnable(false);
         // InitFormControl();
     }
     RefreshUI(RefreshedTypes.HideProgressBar);
     RefreshUI(RefreshedTypes.All);
 }