public void changeState() { //BITCollege_BGContext db = new BITCollege_BGContext(); //int startState; //GPAState currentState = db.GPAStates.Find(this.GPAStateId); //do //{ // currentState.stateChangeCheck(this); //} while (currentState != startState); BITCollege_BGContext db = new BITCollege_BGContext(); int initialState; //int finalState; initialState = this.GPAStateId; //this.GPAState.stateChangeCheck(this); db.GPAStates.Find(this.GPAStateId).stateChangeCheck(this); //finalState = db.GPAStates.Find(this.GPAStateId).GPAStateId }
public static NextAuditCourse GetInstance() { if (nextAuditCourse == null) { BITCollege_BGContext context = new BITCollege_BGContext(); if (context.NextAuditCourses.SingleOrDefault() != null) { nextAuditCourse = context.NextAuditCourses.SingleOrDefault(); } else { nextAuditCourse = context.NextAuditCourses.Add(new NextAuditCourse()); context.SaveChanges(); } } return(nextAuditCourse); }
public static NextRegistrationNumber GetInstance() { if (nextRegistrationNumber == null) { BITCollege_BGContext context = new BITCollege_BGContext(); if (context.NextRegistrationNumbers.SingleOrDefault() != null) { nextRegistrationNumber = context.NextRegistrationNumbers.SingleOrDefault(); } else { nextRegistrationNumber = context.NextRegistrationNumbers.Add(new NextRegistrationNumber()); context.SaveChanges(); } } return(nextRegistrationNumber); }