package com.app.hxqh.pr;

import psdi.app.iface.srm.Srm2EamHandler;
import psdi.app.pr.PRLine;
import psdi.app.pr.PRLineRemote;
import psdi.mbo.MboRemote;
import psdi.mbo.MboSet;
import psdi.mbo.MboSetRemote;
import psdi.util.MXException;

import java.io.IOException;
import java.rmi.RemoteException;
import java.text.ParseException;

public class UdprlineMbo extends PRLine implements PRLineRemote {

    public UdprlineMbo(MboSet ms) throws MXException, RemoteException {
        super(ms);
    }

    @Override
    public void init() throws MXException {
        super.init();
    }

    @Override
    public void add() throws MXException, RemoteException {
        MboRemote owner = this.getOwner();
        if(owner!=null){
            super.add();
        }
    }

    public void save() throws MXException, RemoteException {
        super.save();
//        String app = "";
//        if (getOwner() != null) {
//            app = getOwner().getThisMboSet().getApp();
//        }
//        if ("UDPRGATHER".equalsIgnoreCase(app)) {//Ή€³§ΠθΗσΙκΗλ
//            boolean falg = toBeDeleted();
//            if(falg){
//                MboSetRemote prlineSet=getMboSet("$PRLINE", "PRLINE","PRNUM ='"+getString("UDPRNUM")+"' AND PRLINENUM='"+getString("UDPRLINENUM")+"' AND ORGID ='"+getString("ORGID")+"' AND SITEID ='"+getString("SITEID")+"'");
//                if(null!=prlineSet && !prlineSet.isEmpty()){
//                    for(int i=0;i<prlineSet.count();i++){
//                        prlineSet.getMbo(i).setValueNull("UDPRNUM",2L);
//                        prlineSet.getMbo(i).setValueNull("UDPRLINENUM",2L);
//                    }
//                }
//            }
//        }
    }
}
