public DSMGenNHibernate.EN.DSM.TransporteEN New_(int p_orden, int p_itinerario, DSMGenNHibernate.Enumerated.DSM.TipoTransporteEnum p_tipo, string p_origen, string p_destino) { /*PROTECTED REGION ID(DSMGenNHibernate.CP.DSM_Transporte_new_) ENABLED START*/ ITransporteCAD transporteCAD = null; TransporteCEN transporteCEN = null; DSMGenNHibernate.EN.DSM.TransporteEN result = null; try { SessionInitializeTransaction(); transporteCAD = new TransporteCAD(session); transporteCEN = new TransporteCEN(transporteCAD); int oid; //Initialized TransporteEN TransporteEN transporteEN; transporteEN = new TransporteEN(); transporteEN.Orden = p_orden; if (p_itinerario != -1) { transporteEN.Itinerario = new DSMGenNHibernate.EN.DSM.ItinerarioEN(); transporteEN.Itinerario.Id = p_itinerario; } transporteEN.Tipo = p_tipo; transporteEN.Origen = p_origen; transporteEN.Destino = p_destino; //Call to TransporteCAD oid = transporteCAD.New_(transporteEN); result = transporteCAD.ReadOIDDefault(oid); SessionCommit(); } catch (Exception ex) { SessionRollBack(); throw ex; } finally { SessionClose(); } return(result); /*PROTECTED REGION END*/ }
public override bool Equals(object obj) { if (obj == null) { return(false); } TransporteEN t = obj as TransporteEN; if (t == null) { return(false); } if (Id.Equals(t.Id)) { return(true); } else { return(false); } }
public TransporteEN(TransporteEN transporte) { this.init(Id, transporte.Tipo, transporte.Origen, transporte.Destino, transporte.Orden, transporte.Itinerario); }