// Modify default (Update all attributes of the class) public void ModifyDefault(RelationshipEN relationship) { try { SessionInitializeTransaction(); RelationshipEN relationshipEN = (RelationshipEN)session.Load(typeof(RelationshipEN), relationship.Identifier); relationshipEN.Relationship = relationship.Relationship; relationshipEN.PatientOID = relationship.PatientOID; relationshipEN.RelatedPersonOID = relationship.RelatedPersonOID; session.Update(relationshipEN); SessionCommit(); } catch (Exception ex) { SessionRollBack(); if (ex is ChroniGenNHibernate.Exceptions.ModelException) { throw ex; } throw new ChroniGenNHibernate.Exceptions.DataLayerException("Error in RelationshipCAD.", ex); } finally { SessionClose(); } }
public void SetRelationshipType(int p_oid, ChroniGenNHibernate.Enumerated.Chroni.RelationshipEnum p_relationship) { /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Relationship_setRelationshipType) ENABLED START*/ // Write here your custom code... RelationshipCAD relationshipCAD = new RelationshipCAD(); RelationshipCEN relationshipCEN = new RelationshipCEN(relationshipCAD); if (p_oid > 0) { RelationshipEN relationship = relationshipCEN.ReadOID(p_oid); if (relationship != null) { if (p_relationship > 0) { relationship.Relationship = p_relationship; relationshipCAD.Modify(relationship); } } } /*PROTECTED REGION END*/ }
public RelationshipEN ReadOIDDefault(int identifier ) { RelationshipEN relationshipEN = null; try { SessionInitializeTransaction(); relationshipEN = (RelationshipEN)session.Get(typeof(RelationshipEN), identifier); SessionCommit(); } catch (Exception ex) { SessionRollBack(); if (ex is ChroniGenNHibernate.Exceptions.ModelException) { throw ex; } throw new ChroniGenNHibernate.Exceptions.DataLayerException("Error in RelationshipCAD.", ex); } finally { SessionClose(); } return(relationshipEN); }
public void Destroy(int identifier ) { try { SessionInitializeTransaction(); RelationshipEN relationshipEN = (RelationshipEN)session.Load(typeof(RelationshipEN), identifier); session.Delete(relationshipEN); SessionCommit(); } catch (Exception ex) { SessionRollBack(); if (ex is ChroniGenNHibernate.Exceptions.ModelException) { throw ex; } throw new ChroniGenNHibernate.Exceptions.DataLayerException("Error in RelationshipCAD.", ex); } finally { SessionClose(); } }
public int New_(RelationshipEN relationship) { try { SessionInitializeTransaction(); session.Save(relationship); SessionCommit(); } catch (Exception ex) { SessionRollBack(); if (ex is ChroniGenNHibernate.Exceptions.ModelException) { throw ex; } throw new ChroniGenNHibernate.Exceptions.DataLayerException("Error in RelationshipCAD.", ex); } finally { SessionClose(); } return(relationship.Identifier); }
public RelationshipEN ReadOID(int identifier ) { RelationshipEN relationshipEN = null; relationshipEN = _IRelationshipCAD.ReadOID(identifier); return(relationshipEN); }
public void Modify(int p_Relationship_OID, ChroniGenNHibernate.Enumerated.Chroni.RelationshipEnum p_relationship, int p_patientOID, int p_relatedPersonOID) { RelationshipEN relationshipEN = null; //Initialized RelationshipEN relationshipEN = new RelationshipEN(); relationshipEN.Identifier = p_Relationship_OID; relationshipEN.Relationship = p_relationship; relationshipEN.PatientOID = p_patientOID; relationshipEN.RelatedPersonOID = p_relatedPersonOID; //Call to RelationshipCAD _IRelationshipCAD.Modify(relationshipEN); }
public void SetRelationship(int p_oid, int p_oid_patient, int p_oid_relatedPerson) { /*PROTECTED REGION ID(ChroniGenNHibernate.CEN.Chroni_Relationship_setRelationship) ENABLED START*/ // Write here your custom code... RelationshipCAD relationshipCAD = new RelationshipCAD(); RelationshipCEN relationshipCEN = new RelationshipCEN(relationshipCAD); PatientCAD patientCAD = new PatientCAD(); PatientCEN patientCen = new PatientCEN(patientCAD); RelatedPersonCAD relatedPersonCAD = new RelatedPersonCAD(); RelatedPersonCEN relatedPersonCEN = new RelatedPersonCEN(relatedPersonCAD); if (p_oid > 0) { RelationshipEN relationship = relationshipCEN.ReadOID(p_oid); if (relationship != null) { if (p_oid_patient > 0) { PatientEN patient = patientCen.ReadOID(p_oid_patient); if (patient != null) { if (p_oid_relatedPerson > 0) { RelatedPersonEN relatedPerson = relatedPersonCEN.ReadOID(p_oid_relatedPerson); if (relatedPerson != null) { relationship.PatientOID = p_oid_patient; relationship.RelatedPersonOID = p_oid_relatedPerson; relationshipCAD.Modify(relationship); } } } } } } /*PROTECTED REGION END*/ }
public int New_(ChroniGenNHibernate.Enumerated.Chroni.RelationshipEnum p_relationship, int p_patientOID, int p_relatedPersonOID) { RelationshipEN relationshipEN = null; int oid; //Initialized RelationshipEN relationshipEN = new RelationshipEN(); relationshipEN.Relationship = p_relationship; relationshipEN.PatientOID = p_patientOID; relationshipEN.RelatedPersonOID = p_relatedPersonOID; //Call to RelationshipCAD oid = _IRelationshipCAD.New_(relationshipEN); return(oid); }