コード例 #1
0
        public void AssignRelatedPerson(int p_Conversation_OID, int p_relatedPerson_OID)
        {
            ChroniGenNHibernate.EN.Chroni.ConversationEN conversationEN = null;
            try
            {
                SessionInitializeTransaction();
                conversationEN = (ConversationEN)session.Load(typeof(ConversationEN), p_Conversation_OID);
                conversationEN.RelatedPerson = (ChroniGenNHibernate.EN.Chroni.RelatedPersonEN)session.Load(typeof(ChroniGenNHibernate.EN.Chroni.RelatedPersonEN), p_relatedPerson_OID);

                conversationEN.RelatedPerson.Conversation.Add(conversationEN);



                session.Update(conversationEN);
                SessionCommit();
            }

            catch (Exception ex) {
                SessionRollBack();
                if (ex is ChroniGenNHibernate.Exceptions.ModelException)
                {
                    throw ex;
                }
                throw new ChroniGenNHibernate.Exceptions.DataLayerException("Error in ConversationCAD.", ex);
            }


            finally
            {
                SessionClose();
            }
        }
コード例 #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            ConversationEN t = obj as ConversationEN;

            if (t == null)
            {
                return(false);
            }
            if (Identifier.Equals(t.Identifier))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
コード例 #3
0
 public ConversationEN(ConversationEN conversation)
 {
     this.init(Identifier, conversation.StartDate, conversation.Message, conversation.Patient, conversation.Practitioner, conversation.RelatedPerson);
 }