Java 类ims.emergency.vo.enums.OpenFormFromNewTriageComponent 实例源码

项目:openMAXIMS    文件:Logic.java   
@Override
    protected void onFormDialogClosed(ims.framework.FormName formName, DialogResult result) throws PresentationLogicException
    {
        if(form.getForms().Emergency.EDAssessmentComponent.equals(formName))            //wdev-16751
        {
            if( DialogResult.OK.equals(result))
            {

                if( OpenFormFromNewTriageComponent.TRACKINGSUMMARY.equals(form.getGlobalContext().Emergency.getNewTriageComponentOpenForm()))
                {
                    form.getGlobalContext().Emergency.setNewTriageComponentOpenForm(null);
                    engine.open(form.getForms().Emergency.TrackingSummary);

                }
                else if(OpenFormFromNewTriageComponent.TRACKING.equals(form.getGlobalContext().Emergency.getNewTriageComponentOpenForm()))
                {
                    form.getGlobalContext().Emergency.setNewTriageComponentOpenForm(null);
                    engine.open(form.getForms().Emergency.Tracking);

                }

            }
        }
        else if( form.getForms().Emergency.TransferDialog.equals(formName))         //wdev-16867
        {
            //WDEV-19006 
//          if( DialogResult.OK.equals(result))
//          {
//              TrackingSaveVo trackingWithDNW = domain.getTracking((TrackingVo) form.dyngrdTrack().getValue());
//          
//              if( trackingWithDNW != null && !trackingWithDNW.getCurrentTransferRecordIsNotNull() && form.getGlobalContext().Emergency.getEDTransferVoIsNotNull())
//              {
//                  trackingWithDNW.setCurrentTransferRecord(form.getGlobalContext().Emergency.getEDTransferVo());
//                  String[] errors = trackingWithDNW.validate();
//                  if(errors != null && errors.length > 0)
//                  {
//                      engine.showErrors(errors);
//                      return;
//                  }
//                  
//                  try 
//                  {
//                      domain.saveTracking(trackingWithDNW);
//                  } 
//                  catch (StaleObjectException e) 
//                  {
//                      e.printStackTrace();
//                  } 
//                  catch (UniqueKeyViolationException e) 
//                  {
//                      e.printStackTrace();
//                  }
//                  
//              }
//                  
//          }
        }
        //WDEV-22171
        else if (form.getForms().Emergency.SendToAreaDialog.equals(formName))
        {
            if (DialogResult.OK.equals(result))
            {
                if (changeStatusOnMove()) //WDEV-22858
                    saveTrackingWithWaitingToBeSeenStatus();

            }
        }

        open();
    }