Exemple #1
0
        public TblLecturetime getDayTime(int givenID)
        {
            TblLecturetime tdObj = (TblLecturetime)NHSession.CreateCriteria(typeof(TblLecturetime))
                                   .Add(Restrictions.Eq(Constants.allModelProperties.LecturetimeId, givenID))
                                   .UniqueResult();

            return(tdObj);
        }
Exemple #2
0
        public bool deleteDayTime(TblLecturetime L)
        {
            bool result = false;

            using (ITransaction T = NHSession.BeginTransaction())
            {
                try
                {
                    NHSession.Delete(L);
                    T.Commit();
                    result = true;
                }
                catch (Exception ex)
                {
                    T.Rollback();
                }
            }
            return(result);
        }