//public TblLecturetime getTimeTable(int givenID) //{ // TblLecturetime tdObj = (TblLecturetime)NHSession.CreateCriteria(typeof(TblLecturetime)) // .Add(Restrictions.Eq(Constants.allModelProperties.LecturetimeId, givenID)) // .UniqueResult(); // return tdObj; //} //public bool deleteTimeTable(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; //} public TblEveningtime getEveningSchedule(int givenID) { TblEveningtime tdObj = (TblEveningtime)NHSession.CreateCriteria(typeof(TblEveningtime)) .Add(Restrictions.Eq(Constants.allModelProperties.EveningtimeId, givenID)) .UniqueResult(); return(tdObj); }
public bool deleteEveningSchedule(TblEveningtime et) { bool result = false; using (ITransaction T = NHSession.BeginTransaction()) { try { NHSession.Delete(et); T.Commit(); result = true; } catch (Exception ex) { T.Rollback(); } } return(result); }
public bool AddTimeTableEvening(TblEveningtime Tbe) { bool result = false; using (ITransaction T = NHSession.BeginTransaction()) { try { NHSession.SaveOrUpdate(Tbe); T.Commit(); result = true; } catch (Exception ex) { T.Rollback(); } } return(result); }