public void RelationerPuntuacionGymkana(int p_Puntuacion_OID, int p_gymkana_OID) { WhateverGenNHibernate.EN.Whatever.PuntuacionEN puntuacionEN = null; try { SessionInitializeTransaction(); puntuacionEN = (PuntuacionEN)session.Load(typeof(PuntuacionEN), p_Puntuacion_OID); puntuacionEN.Gymkana = (WhateverGenNHibernate.EN.Whatever.GymkanaEN)session.Load(typeof(WhateverGenNHibernate.EN.Whatever.GymkanaEN), p_gymkana_OID); puntuacionEN.Gymkana.Puntuacion.Add(puntuacionEN); session.Update(puntuacionEN); SessionCommit(); } catch (Exception ex) { SessionRollBack(); if (ex is WhateverGenNHibernate.Exceptions.ModelException) { throw ex; } throw new WhateverGenNHibernate.Exceptions.DataLayerException("Error in PuntuacionCAD.", ex); } finally { SessionClose(); } }
public void CrearPuntuacion(WhateverGenNHibernate.EN.Whatever.PuntuacionEN puntuacion) { /*PROTECTED REGION ID(WhateverGenNHibernate.CEN.Whatever_Puntuacion_crearPuntuacion) ENABLED START*/ _IPuntuacionCAD.New_(puntuacion); /*PROTECTED REGION END*/ }
public override bool Equals(object obj) { if (obj == null) { return(false); } PuntuacionEN t = obj as PuntuacionEN; if (t == null) { return(false); } if (Id.Equals(t.Id)) { return(true); } else { return(false); } }
public void UnrelationerPuntuacionGymkana(int p_Puntuacion_OID, int p_gymkana_OID) { try { SessionInitializeTransaction(); WhateverGenNHibernate.EN.Whatever.PuntuacionEN puntuacionEN = null; puntuacionEN = (PuntuacionEN)session.Load(typeof(PuntuacionEN), p_Puntuacion_OID); if (puntuacionEN.Gymkana.ID == p_gymkana_OID) { puntuacionEN.Gymkana = null; } else { throw new ModelException("The identifier " + p_gymkana_OID + " in p_gymkana_OID you are trying to unrelationer, doesn't exist in PuntuacionEN"); } session.Update(puntuacionEN); SessionCommit(); } catch (Exception ex) { SessionRollBack(); if (ex is WhateverGenNHibernate.Exceptions.ModelException) { throw ex; } throw new WhateverGenNHibernate.Exceptions.DataLayerException("Error in PuntuacionCAD.", ex); } finally { SessionClose(); } }
public PuntuacionEN(PuntuacionEN puntuacion) { this.init(Id, puntuacion.Usuario, puntuacion.Reto, puntuacion.Evento, puntuacion.Puntuacion, puntuacion.Gymkana); }