public void Modify(AdjuntoEN adjunto) { try { SessionInitializeTransaction(); AdjuntoEN adjuntoEN = (AdjuntoEN)session.Load(typeof(AdjuntoEN), adjunto.IdAdjunto); adjuntoEN.Url = adjunto.Url; adjuntoEN.Tipo = adjunto.Tipo; session.Update(adjuntoEN); SessionCommit(); } catch (Exception ex) { SessionRollBack(); if (ex is SanurGenNHibernate.Exceptions.ModelException) { throw ex; } throw new SanurGenNHibernate.Exceptions.DataLayerException("Error in AdjuntoCAD.", ex); } finally { SessionClose(); } }
public AdjuntoEN ReadOID(int idAdjunto) { AdjuntoEN adjuntoEN = null; adjuntoEN = _IAdjuntoCAD.ReadOID(idAdjunto); return(adjuntoEN); }
public int New_(AdjuntoEN adjunto) { try { SessionInitializeTransaction(); session.Save(adjunto); SessionCommit(); } catch (Exception ex) { SessionRollBack(); if (ex is SanurGenNHibernate.Exceptions.ModelException) { throw ex; } throw new SanurGenNHibernate.Exceptions.DataLayerException("Error in AdjuntoCAD.", ex); } finally { SessionClose(); } return(adjunto.IdAdjunto); }
public AdjuntoEN ReadOIDDefault(int idAdjunto) { AdjuntoEN adjuntoEN = null; try { SessionInitializeTransaction(); adjuntoEN = (AdjuntoEN)session.Get(typeof(AdjuntoEN), idAdjunto); SessionCommit(); } catch (Exception ex) { SessionRollBack(); if (ex is SanurGenNHibernate.Exceptions.ModelException) { throw ex; } throw new SanurGenNHibernate.Exceptions.DataLayerException("Error in AdjuntoCAD.", ex); } finally { SessionClose(); } return(adjuntoEN); }
public void Destroy(int idAdjunto) { try { SessionInitializeTransaction(); AdjuntoEN adjuntoEN = (AdjuntoEN)session.Load(typeof(AdjuntoEN), idAdjunto); session.Delete(adjuntoEN); SessionCommit(); } catch (Exception ex) { SessionRollBack(); if (ex is SanurGenNHibernate.Exceptions.ModelException) { throw ex; } throw new SanurGenNHibernate.Exceptions.DataLayerException("Error in AdjuntoCAD.", ex); } finally { SessionClose(); } }
public void Modify(int p_Adjunto_OID, string p_url, string p_tipo) { AdjuntoEN adjuntoEN = null; //Initialized AdjuntoEN adjuntoEN = new AdjuntoEN(); adjuntoEN.IdAdjunto = p_Adjunto_OID; adjuntoEN.Url = p_url; adjuntoEN.Tipo = p_tipo; //Call to AdjuntoCAD _IAdjuntoCAD.Modify(adjuntoEN); }
public int New_(string p_url, string p_tipo) { AdjuntoEN adjuntoEN = null; int oid; //Initialized AdjuntoEN adjuntoEN = new AdjuntoEN(); adjuntoEN.Url = p_url; adjuntoEN.Tipo = p_tipo; //Call to AdjuntoCAD oid = _IAdjuntoCAD.New_(adjuntoEN); return(oid); }