public void GuardarDescripcionAlarma(string descripcionAlarma, SolicitudScreening oSolicitud, int user) { AlarmaScreening oRegistro = new AlarmaScreening(); oRegistro.IdSolicitudScreening = this; oRegistro.Descripcion = descripcionAlarma; oRegistro.IdUsuarioRegistro = user; oRegistro.FechaRegistro = DateTime.Now; oRegistro.Save(); }
public int GetCantidadAlarmas() { int i = 0; AlarmaScreening oDetalle = new AlarmaScreening(); ISession m_session = NHibernateHttpModule.CurrentSession; ICriteria crit = m_session.CreateCriteria(typeof(AlarmaScreening)); crit.Add(Expression.Eq("IdSolicitudScreening", this)); IList items = crit.List(); i = items.Count; return(i); }
public void EliminarAlarmas() { AlarmaScreening oDetalle = new AlarmaScreening(); ISession m_session = NHibernateHttpModule.CurrentSession; ICriteria crit = m_session.CreateCriteria(typeof(AlarmaScreening)); crit.Add(Expression.Eq("IdSolicitudScreening", this)); IList items = crit.List(); foreach (AlarmaScreening oDet in items) { oDet.Delete(); } }