Java 类ims.core.vo.ReadAuditVoCollection 实例源码

项目:AvoinApotti    文件:Logic.java   
private void search()
{

    if (form.cmbPatientType().getValue() != null && form.txtPatientValue().getValue() == null)
    {
        engine.showMessage("Patient Value must be supplied with Patient Type for Search");
        return;
    }
    else if (form.cmbPatientType().getValue() == null && form.txtPatientValue().getValue() != null)
    {
        engine.showMessage("Patient Type must be supplied with Patient Value for Search");
        return;
    }


    //Clear down the two grids before the search
    form.grdAudit().setValue(null);
    form.grdAudit().getRows().clear();

    // Call the domain to list Audit Records based
    // on the selection criteria
    grdAuditRow row;
    form.grdAudit().getRows().clear();

    ReadAuditFilterVo filter =  this.populateDataFromScreen();
    filter.setAction(form.cmbAction().getValue());
    if (form.qmbUsers().getValue() != null)
        filter.setAuditUser(form.qmbUsers().getValue().getUsername());
    filter.setAuditLocation(form.qmbLocation().getValue());

    if (form.txtPatientValue().getValue() != null)
    {
        PatientId patId = new PatientId();
        patId.setValue(form.txtPatientValue().getValue());
        patId.setType(form.cmbPatientType().getValue());
        filter.setPatient(patId);
    }

    ReadAuditVoCollection coll = domain.listReadAuditRecords(filter);
    for (int i=0; i<coll.size(); i++)
    {
        ReadAuditVo audit = coll.get(i);
        row = form.grdAudit().getRows().newRow();
        row.setValue(audit);
        row.setcolAction(audit.getAction());
        row.setcolHost(audit.getHostName());
        row.setcolLocation(audit.getLocation());
        row.setcolPatientId(audit.getPatient().getID_Patient() + " - " + audit.getPatient().getName().getForename() + " " + audit.getPatient().getName().getSurname());
        row.setTooltip(audit.getPatient().getPatientInfo());
        if (audit.getAuditDateTime() != null)
        {
            row.setcolDateTime(audit.getAuditDateTime().toString(DateTimeFormat.STANDARD_SECS));
        }
        if (audit.getAuditUser() != null)
            row.setcolUser(audit.getAuditUser());
    }

    form.lblTotal().setValue("Total: " + coll.size());

    form.setMode(FormMode.VIEW);
}
项目:openMAXIMS    文件:Logic.java   
private void search()
{

    if (form.cmbPatientType().getValue() != null && form.txtPatientValue().getValue() == null)
    {
        engine.showMessage("Patient Value must be supplied with Patient Type for Search");
        return;
    }
    else if (form.cmbPatientType().getValue() == null && form.txtPatientValue().getValue() != null)
    {
        engine.showMessage("Patient Type must be supplied with Patient Value for Search");
        return;
    }


    //Clear down the two grids before the search
    form.grdAudit().setValue(null);
    form.grdAudit().getRows().clear();

    // Call the domain to list Audit Records based
    // on the selection criteria
    grdAuditRow row;
    form.grdAudit().getRows().clear();

    ReadAuditFilterVo filter =  this.populateDataFromScreen();
    filter.setAction(form.cmbAction().getValue());
    if (form.qmbUsers().getValue() != null)
        filter.setAuditUser(form.qmbUsers().getValue().getUsername());
    filter.setAuditLocation(form.qmbLocation().getValue());

    if (form.txtPatientValue().getValue() != null)
    {
        PatientId patId = new PatientId();
        patId.setValue(form.txtPatientValue().getValue());
        patId.setType(form.cmbPatientType().getValue());
        filter.setPatient(patId);
    }

    ReadAuditVoCollection coll = domain.listReadAuditRecords(filter);
    for (int i=0; i<coll.size(); i++)
    {
        ReadAuditVo audit = coll.get(i);
        row = form.grdAudit().getRows().newRow();
        row.setValue(audit);
        row.setcolAction(audit.getAction());
        row.setcolHost(audit.getHostName());
        row.setcolLocation(audit.getLocation());
        row.setcolPatientId(audit.getPatient().getID_Patient() + " - " + audit.getPatient().getName().getForename() + " " + audit.getPatient().getName().getSurname());
        row.setTooltip(audit.getPatient().getPatientInfo());
        if (audit.getAuditDateTime() != null)
        {
            row.setcolDateTime(audit.getAuditDateTime().toString(DateTimeFormat.STANDARD_SECS));
        }
        if (audit.getAuditUser() != null)
            row.setcolUser(audit.getAuditUser());
    }

    form.lblTotal().setValue("Total: " + coll.size());

    form.setMode(FormMode.VIEW);
}
项目:openMAXIMS    文件:Logic.java   
private void search()
{

    if (form.cmbPatientType().getValue() != null && form.txtPatientValue().getValue() == null)
    {
        engine.showMessage("Patient Value must be supplied with Patient Type for Search");
        return;
    }
    else if (form.cmbPatientType().getValue() == null && form.txtPatientValue().getValue() != null)
    {
        engine.showMessage("Patient Type must be supplied with Patient Value for Search");
        return;
    }


    //Clear down the two grids before the search
    form.grdAudit().setValue(null);
    form.grdAudit().getRows().clear();

    // Call the domain to list Audit Records based
    // on the selection criteria
    grdAuditRow row;
    form.grdAudit().getRows().clear();

    ReadAuditFilterVo filter =  this.populateDataFromScreen();
    filter.setAction(form.cmbAction().getValue());
    if (form.qmbUsers().getValue() != null)
        filter.setAuditUser(form.qmbUsers().getValue().getUsername());
    filter.setAuditLocation(form.qmbLocation().getValue());

    if (form.txtPatientValue().getValue() != null)
    {
        PatientId patId = new PatientId();
        patId.setValue(form.txtPatientValue().getValue());
        patId.setType(form.cmbPatientType().getValue());
        filter.setPatient(patId);
    }

    ReadAuditVoCollection coll = domain.listReadAuditRecords(filter);
    for (int i=0; i<coll.size(); i++)
    {
        ReadAuditVo audit = coll.get(i);
        row = form.grdAudit().getRows().newRow();
        row.setValue(audit);
        row.setcolAction(audit.getAction());
        row.setcolHost(audit.getHostName());
        row.setcolLocation(audit.getLocation());
        row.setcolPatientId(audit.getPatient().getID_Patient() + " - " + audit.getPatient().getName().getForename() + " " + audit.getPatient().getName().getSurname());
        row.setTooltip(audit.getPatient().getPatientInfo());
        if (audit.getAuditDateTime() != null)
        {
            row.setcolDateTime(audit.getAuditDateTime().toString(DateTimeFormat.STANDARD_SECS));
        }
        if (audit.getAuditUser() != null)
            row.setcolUser(audit.getAuditUser());
    }

    form.lblTotal().setValue("Total: " + coll.size());

    form.setMode(FormMode.VIEW);
}
项目:openmaxims-linux    文件:Logic.java   
private void search()
{

    if (form.cmbPatientType().getValue() != null && form.txtPatientValue().getValue() == null)
    {
        engine.showMessage("Patient Value must be supplied with Patient Type for Search");
        return;
    }
    else if (form.cmbPatientType().getValue() == null && form.txtPatientValue().getValue() != null)
    {
        engine.showMessage("Patient Type must be supplied with Patient Value for Search");
        return;
    }


    //Clear down the two grids before the search
    form.grdAudit().setValue(null);
    form.grdAudit().getRows().clear();

    // Call the domain to list Audit Records based
    // on the selection criteria
    grdAuditRow row;
    form.grdAudit().getRows().clear();

    ReadAuditFilterVo filter =  this.populateDataFromScreen();
    filter.setAction(form.cmbAction().getValue());
    if (form.qmbUsers().getValue() != null)
        filter.setAuditUser(form.qmbUsers().getValue().getUsername());
    filter.setAuditLocation(form.qmbLocation().getValue());

    if (form.txtPatientValue().getValue() != null)
    {
        PatientId patId = new PatientId();
        patId.setValue(form.txtPatientValue().getValue());
        patId.setType(form.cmbPatientType().getValue());
        filter.setPatient(patId);
    }

    ReadAuditVoCollection coll = domain.listReadAuditRecords(filter);
    for (int i=0; i<coll.size(); i++)
    {
        ReadAuditVo audit = coll.get(i);
        row = form.grdAudit().getRows().newRow();
        row.setValue(audit);
        row.setcolAction(audit.getAction());
        row.setcolHost(audit.getHostName());
        row.setcolLocation(audit.getLocation());
        row.setcolPatientId(audit.getPatient().getID_Patient() + " - " + audit.getPatient().getName().getForename() + " " + audit.getPatient().getName().getSurname());
        row.setTooltip(audit.getPatient().getPatientInfo());
        if (audit.getAuditDateTime() != null)
        {
            row.setcolDateTime(audit.getAuditDateTime().toString(DateTimeFormat.STANDARD_SECS));
        }
        if (audit.getAuditUser() != null)
            row.setcolUser(audit.getAuditUser());
    }

    form.lblTotal().setValue("Total: " + coll.size());

    form.setMode(FormMode.VIEW);
}